slack-ruby-client 3.0.0 → 3.1.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/pr_lint.yml +1 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/update_api.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/bin/commands/admin_functions.rb +3 -2
- data/bin/commands/admin_functions_permissions.rb +2 -2
- data/bin/commands/admin_users.rb +10 -0
- data/bin/commands/assistant_search.rb +6 -3
- data/bin/commands/assistant_threads.rb +1 -0
- data/bin/commands/chat.rb +40 -1
- data/bin/commands/entity.rb +24 -0
- data/bin/commands/files.rb +1 -1
- data/bin/commands/oauth_v2.rb +1 -0
- data/examples/oauth_v2/README.md +3 -3
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_functions.rb +3 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_users.rb +13 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +9 -3
- data/lib/slack/web/api/endpoints/assistant_threads.rb +3 -1
- data/lib/slack/web/api/endpoints/chat.rb +70 -5
- data/lib/slack/web/api/endpoints/entity.rb +32 -0
- data/lib/slack/web/api/endpoints/files.rb +1 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -0
- data/lib/slack/web/api/endpoints.rb +2 -0
- data/lib/slack/web/api/errors.rb +68 -0
- data/lib/slack/web/api/helpers/files.rb +4 -1
- data/lib/tasks/web.rake +2 -0
- metadata +5 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2adaaa262bea7ceba8032b2a8ff54c179e1a972a94a34c1ca9fb526fb2e82728
|
|
4
|
+
data.tar.gz: 12da6b07266549b471b6ca7e07ccb525269a074f0f4f0b8f8fc9fc9563c4a620
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2998c891be3fc2195b24ff696989fd748695f3350a9f8db14672fc94a66519aac0a3c332f5002adda414a628574094348de2de6b5010fd06cfe61e50fc0eeb08
|
|
7
|
+
data.tar.gz: 13ece08f3789dbed0edbc3c5e3a150ce171a8b89585b554710165af55008eb798b5a08c7062a5a7735eb0082f67818f02ea428b6653d6959609881bc6794fc17
|
data/.github/workflows/lint.yml
CHANGED
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
### 3.1.0 (Next)
|
|
2
|
+
|
|
3
|
+
* [#576](https://github.com/slack-ruby/slack-ruby-client/pull/576): Add support for `blocks` in `files_upload_v2` - [@childish-sambino](https://github.com/childish-sambino).
|
|
4
|
+
* [#574](https://github.com/slack-ruby/slack-ruby-client/pull/574): Update API from [slack-api-ref@bd5dd34](https://github.com/slack-ruby/slack-api-ref/commit/bd5dd34) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
|
5
|
+
|
|
1
6
|
### 3.0.0 (2025/09/22)
|
|
2
7
|
|
|
3
8
|
* [#573](https://github.com/slack-ruby/slack-ruby-client/pull/573): Removed support for RTM APIs - [@dblock](https://github.com/dblock).
|
data/README.md
CHANGED
|
@@ -70,7 +70,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web) and [Events](https:
|
|
|
70
70
|
|
|
71
71
|
## Stable Release
|
|
72
72
|
|
|
73
|
-
You're reading the documentation for the **stable** release of slack-ruby-client
|
|
73
|
+
You're reading the documentation for the **stable** release of slack-ruby-client. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
|
74
74
|
|
|
75
75
|
## Installation
|
|
76
76
|
|
|
@@ -6,11 +6,12 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'AdminFunctions methods.'
|
|
8
8
|
command 'admin_functions' do |g|
|
|
9
|
-
g.desc 'Look up functions by a set of apps'
|
|
10
|
-
g.long_desc %( Look up functions by a set of apps )
|
|
9
|
+
g.desc 'Look up functions by a set of apps.'
|
|
10
|
+
g.long_desc %( Look up functions by a set of apps. )
|
|
11
11
|
g.command 'list' do |c|
|
|
12
12
|
c.flag 'team_id', desc: 'The team context to retrieve functions from.'
|
|
13
13
|
c.flag 'app_ids', desc: 'Comma-separated array of app IDs to get functions for; max 50.'
|
|
14
|
+
c.flag 'include_non_distributed_functions', desc: 'Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app.'
|
|
14
15
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
15
16
|
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.'
|
|
16
17
|
c.action do |_global_options, options, _args|
|
|
@@ -15,8 +15,8 @@ module Slack
|
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
g.desc 'Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities'
|
|
19
|
-
g.long_desc %( Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities )
|
|
18
|
+
g.desc 'Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.'
|
|
19
|
+
g.long_desc %( Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities. )
|
|
20
20
|
g.command 'set' do |c|
|
|
21
21
|
c.flag 'function_id', desc: 'The function ID to set permissions for.'
|
|
22
22
|
c.flag 'visibility', desc: 'The function visibility.'
|
data/bin/commands/admin_users.rb
CHANGED
|
@@ -19,6 +19,16 @@ module Slack
|
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
g.desc 'Fetches the expiration timestamp for a guest'
|
|
23
|
+
g.long_desc %( Fetches the expiration timestamp for a guest )
|
|
24
|
+
g.command 'getExpiration' do |c|
|
|
25
|
+
c.flag 'user_id', desc: 'The ID of the guest user to get the expiration for.'
|
|
26
|
+
c.flag 'target_team', desc: 'If an org token is passed in and this team is on the org, it will operate on the workspace level on the specified team. Otherwise it will operate on the org or team in context.'
|
|
27
|
+
c.action do |_global_options, options, _args|
|
|
28
|
+
puts JSON.dump(@client.admin_users_getExpiration(options))
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
22
32
|
g.desc 'Invite a user to a workspace.'
|
|
23
33
|
g.long_desc %( Invite a user to a workspace. )
|
|
24
34
|
g.command 'invite' do |c|
|
|
@@ -13,18 +13,21 @@ module Slack
|
|
|
13
13
|
c.flag 'action_token', desc: 'Send action_token as received in a message event.'
|
|
14
14
|
c.flag 'channel_types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
|
|
15
15
|
c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files, channels, users.'
|
|
16
|
-
c.flag 'include_bots', desc: '
|
|
16
|
+
c.flag 'include_bots', desc: 'Whether the results should include bots.'
|
|
17
|
+
c.flag 'include_deleted_users', desc: 'Whether to include deleted users in the user search results. Defaults to false.'
|
|
17
18
|
c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
|
|
18
19
|
c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
|
|
19
20
|
c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
|
|
20
21
|
c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
|
|
21
|
-
c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request
|
|
22
|
+
c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results.'
|
|
22
23
|
c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
|
|
23
24
|
c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
|
|
24
25
|
c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
|
|
25
26
|
c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
|
|
26
27
|
c.flag 'highlight', desc: 'Whether to highlight the search query in the results. Defaults to false if unspecified.'
|
|
27
|
-
c.flag 'term_clauses', desc: '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
|
|
28
|
+
c.flag 'term_clauses', desc: '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).'
|
|
29
|
+
c.flag 'modifiers', desc: '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.'
|
|
30
|
+
c.flag 'include_archived_channels', desc: 'Whether to include archived channels in the search results.'
|
|
28
31
|
c.action do |_global_options, options, _args|
|
|
29
32
|
puts JSON.dump(@client.assistant_search_context(options))
|
|
30
33
|
end
|
|
@@ -12,6 +12,7 @@ module Slack
|
|
|
12
12
|
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
|
13
13
|
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
|
|
14
14
|
c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
|
|
15
|
+
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator.'
|
|
15
16
|
c.action do |_global_options, options, _args|
|
|
16
17
|
puts JSON.dump(@client.assistant_threads_setStatus(options))
|
|
17
18
|
end
|
data/bin/commands/chat.rb
CHANGED
|
@@ -6,6 +6,17 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'Chat methods.'
|
|
8
8
|
command 'chat' do |g|
|
|
9
|
+
g.desc 'Appends text to an existing streaming conversation.'
|
|
10
|
+
g.long_desc %( Appends text to an existing streaming conversation. )
|
|
11
|
+
g.command 'appendStream' do |c|
|
|
12
|
+
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
|
|
13
|
+
c.flag 'ts', desc: 'The timestamp of the streaming message.'
|
|
14
|
+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.chat_appendStream(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
9
20
|
g.desc 'Execute a slash command in a public channel (undocumented)'
|
|
10
21
|
g.long_desc %( Execute a slash command in a public channel )
|
|
11
22
|
g.command 'command' do |c|
|
|
@@ -87,6 +98,7 @@ module Slack
|
|
|
87
98
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
|
88
99
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
|
89
100
|
c.flag 'channel', desc: 'An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.'
|
|
101
|
+
c.flag 'current_draft_last_updated_ts', desc: "This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server."
|
|
90
102
|
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
|
|
91
103
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
|
|
92
104
|
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
|
|
@@ -127,18 +139,45 @@ module Slack
|
|
|
127
139
|
end
|
|
128
140
|
end
|
|
129
141
|
|
|
142
|
+
g.desc 'Starts a new streaming conversation.'
|
|
143
|
+
g.long_desc %( Starts a new streaming conversation. )
|
|
144
|
+
g.command 'startStream' do |c|
|
|
145
|
+
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
|
|
146
|
+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
|
|
147
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
|
|
148
|
+
c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
|
|
149
|
+
c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.'
|
|
150
|
+
c.action do |_global_options, options, _args|
|
|
151
|
+
puts JSON.dump(@client.chat_startStream(options))
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
g.desc 'Stops a streaming conversation.'
|
|
156
|
+
g.long_desc %( Stops a streaming conversation. )
|
|
157
|
+
g.command 'stopStream' do |c|
|
|
158
|
+
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
|
|
159
|
+
c.flag 'ts', desc: 'The timestamp of the streaming message.'
|
|
160
|
+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
|
|
161
|
+
c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
|
|
162
|
+
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
|
163
|
+
c.action do |_global_options, options, _args|
|
|
164
|
+
puts JSON.dump(@client.chat_stopStream(options))
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
130
168
|
g.desc 'Provide custom unfurl behavior for user-posted URLs'
|
|
131
169
|
g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
|
|
132
170
|
g.command 'unfurl' do |c|
|
|
133
171
|
c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
|
|
134
172
|
c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
|
|
135
|
-
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.'
|
|
173
|
+
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Either unfurls or metadata must be provided.'
|
|
136
174
|
c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
|
|
137
175
|
c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
|
|
138
176
|
c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
|
|
139
177
|
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
|
|
140
178
|
c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
|
|
141
179
|
c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
|
|
180
|
+
c.flag 'metadata', desc: 'JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.'
|
|
142
181
|
c.action do |_global_options, options, _args|
|
|
143
182
|
puts JSON.dump(@client.chat_unfurl(options))
|
|
144
183
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'Entity methods.'
|
|
8
|
+
command 'entity' do |g|
|
|
9
|
+
g.desc 'Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.'
|
|
10
|
+
g.long_desc %( Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. )
|
|
11
|
+
g.command 'presentDetails' do |c|
|
|
12
|
+
c.flag 'metadata', desc: 'URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.'
|
|
13
|
+
c.flag 'trigger_id', desc: 'A reference to the original user action that initiated the request.'
|
|
14
|
+
c.flag 'user_auth_required', desc: 'Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.'
|
|
15
|
+
c.flag 'user_auth_url', desc: 'A custom URL to which users are directed for authentication if required.'
|
|
16
|
+
c.flag 'error', desc: ''
|
|
17
|
+
c.action do |_global_options, options, _args|
|
|
18
|
+
puts JSON.dump(@client.entity_presentDetails(options))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/bin/commands/files.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Slack
|
|
|
12
12
|
c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
|
|
13
13
|
c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
|
|
14
14
|
c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'."
|
|
15
|
-
c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
|
|
15
|
+
c.flag 'channels', desc: 'Comma-separated string of channel IDs or user IDs where the file will be shared.'
|
|
16
16
|
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
|
17
17
|
c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
|
|
18
18
|
c.action do |_global_options, options, _args|
|
data/bin/commands/oauth_v2.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Slack
|
|
|
12
12
|
c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
|
13
13
|
c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
|
14
14
|
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
|
|
15
|
+
c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
|
|
15
16
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
|
16
17
|
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
|
17
18
|
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
data/examples/oauth_v2/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Obtain a user OAuth token from Slack.
|
|
2
2
|
|
|
3
|
-
Create a Slack app [here](https://api.slack.com/tutorials/tracks/getting-a-token).
|
|
3
|
+
Create a Slack app [here](https://api.slack.com/tutorials/tracks/getting-a-token).
|
|
4
4
|
|
|
5
5
|
The new app has a pre-configured User OAuth Token which you can use for most of the examples.
|
|
6
6
|
However you may want to obtain a token for a different user, which can be accomplished as follows.
|
|
7
7
|
|
|
8
|
-
To test locally use [ngrok](https://ngrok.com/) to expose your local server to the internet.
|
|
8
|
+
To test locally use [ngrok](https://ngrok.com/) to expose your local server to the internet.
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
11
|
ngrok http 4242
|
|
@@ -27,7 +27,7 @@ Run the example.
|
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
29
|
bundle install
|
|
30
|
-
bundle exec dotenv ruby oauth_v2.rb
|
|
30
|
+
bundle exec dotenv ruby oauth_v2.rb
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
A browser window will open to complete the OAuth flow.
|
data/lib/slack/version.rb
CHANGED
|
@@ -7,12 +7,14 @@ module Slack
|
|
|
7
7
|
module Endpoints
|
|
8
8
|
module AdminFunctions
|
|
9
9
|
#
|
|
10
|
-
# Look up functions by a set of apps
|
|
10
|
+
# Look up functions by a set of apps.
|
|
11
11
|
#
|
|
12
12
|
# @option options [Object] :team_id
|
|
13
13
|
# The team context to retrieve functions from.
|
|
14
14
|
# @option options [array] :app_ids
|
|
15
15
|
# Comma-separated array of app IDs to get functions for; max 50.
|
|
16
|
+
# @option options [boolean] :include_non_distributed_functions
|
|
17
|
+
# Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app.
|
|
16
18
|
# @option options [string] :cursor
|
|
17
19
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
|
18
20
|
# @option options [integer] :limit
|
|
@@ -19,7 +19,7 @@ module Slack
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
#
|
|
22
|
-
# Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities
|
|
22
|
+
# Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.
|
|
23
23
|
#
|
|
24
24
|
# @option options [string] :function_id
|
|
25
25
|
# The function ID to set permissions for.
|
|
@@ -27,6 +27,19 @@ module Slack
|
|
|
27
27
|
post('admin.users.assign', options)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
#
|
|
31
|
+
# Fetches the expiration timestamp for a guest
|
|
32
|
+
#
|
|
33
|
+
# @option options [Object] :user_id
|
|
34
|
+
# The ID of the guest user to get the expiration for.
|
|
35
|
+
# @option options [Object] :target_team
|
|
36
|
+
# If an org token is passed in and this team is on the org, it will operate on the workspace level on the specified team. Otherwise it will operate on the org or team in context.
|
|
37
|
+
# @see https://api.slack.com/methods/admin.users.getExpiration
|
|
38
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.getExpiration.json
|
|
39
|
+
def admin_users_getExpiration(options = {})
|
|
40
|
+
post('admin.users.getExpiration', options)
|
|
41
|
+
end
|
|
42
|
+
|
|
30
43
|
#
|
|
31
44
|
# Invite a user to a workspace.
|
|
32
45
|
#
|
|
@@ -18,7 +18,9 @@ module Slack
|
|
|
18
18
|
# @option options [array] :content_types
|
|
19
19
|
# Content types to include, a comma-separated list of any combination of messages, files, channels, users.
|
|
20
20
|
# @option options [boolean] :include_bots
|
|
21
|
-
#
|
|
21
|
+
# Whether the results should include bots.
|
|
22
|
+
# @option options [boolean] :include_deleted_users
|
|
23
|
+
# Whether to include deleted users in the user search results. Defaults to false.
|
|
22
24
|
# @option options [integer] :before
|
|
23
25
|
# UNIX timestamp filter. If present, filters for results before this date.
|
|
24
26
|
# @option options [integer] :after
|
|
@@ -28,7 +30,7 @@ module Slack
|
|
|
28
30
|
# @option options [Object] :context_channel_id
|
|
29
31
|
# Context channel ID to support scoping the search when applicable.
|
|
30
32
|
# @option options [string] :cursor
|
|
31
|
-
# The cursor returned by the API. Leave this blank for the first request
|
|
33
|
+
# The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results.
|
|
32
34
|
# @option options [integer] :limit
|
|
33
35
|
# Number of results to return, up to a max of 20. Defaults to 20.
|
|
34
36
|
# @option options [enum] :sort
|
|
@@ -40,7 +42,11 @@ module Slack
|
|
|
40
42
|
# @option options [boolean] :highlight
|
|
41
43
|
# Whether to highlight the search query in the results. Defaults to false if unspecified.
|
|
42
44
|
# @option options [array] :term_clauses
|
|
43
|
-
# 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
|
|
45
|
+
# 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).
|
|
46
|
+
# @option options [string] :modifiers
|
|
47
|
+
# 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.
|
|
48
|
+
# @option options [boolean] :include_archived_channels
|
|
49
|
+
# Whether to include archived channels in the search results.
|
|
44
50
|
# @see https://api.slack.com/methods/assistant.search.context
|
|
45
51
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json
|
|
46
52
|
def assistant_search_context(options = {})
|
|
@@ -9,12 +9,14 @@ module Slack
|
|
|
9
9
|
#
|
|
10
10
|
# Set the status for an AI assistant thread.
|
|
11
11
|
#
|
|
12
|
-
# @option options [
|
|
12
|
+
# @option options [string] :channel_id
|
|
13
13
|
# Channel ID containing the assistant thread.
|
|
14
14
|
# @option options [string] :thread_ts
|
|
15
15
|
# Message timestamp of the thread of where to set the status.
|
|
16
16
|
# @option options [string] :status
|
|
17
17
|
# Status of the specified bot user, e.g. 'is thinking...'.
|
|
18
|
+
# @option options [array] :loading_messages
|
|
19
|
+
# The list of messages to rotate through as a loading indicator.
|
|
18
20
|
# @see https://api.slack.com/methods/assistant.threads.setStatus
|
|
19
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
|
|
20
22
|
def assistant_threads_setStatus(options = {})
|
|
@@ -6,6 +6,25 @@ module Slack
|
|
|
6
6
|
module Api
|
|
7
7
|
module Endpoints
|
|
8
8
|
module Chat
|
|
9
|
+
#
|
|
10
|
+
# Appends text to an existing streaming conversation.
|
|
11
|
+
#
|
|
12
|
+
# @option options [channel] :channel
|
|
13
|
+
# An encoded ID that represents a channel, private group, or DM.
|
|
14
|
+
# @option options [timestamp] :ts
|
|
15
|
+
# The timestamp of the streaming message.
|
|
16
|
+
# @option options [string] :markdown_text
|
|
17
|
+
# Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.
|
|
18
|
+
# @see https://api.slack.com/methods/chat.appendStream
|
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.appendStream.json
|
|
20
|
+
def chat_appendStream(options = {})
|
|
21
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
22
|
+
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
23
|
+
raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
|
|
24
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
25
|
+
post('chat.appendStream', options)
|
|
26
|
+
end
|
|
27
|
+
|
|
9
28
|
#
|
|
10
29
|
# Execute a slash command in a public channel (undocumented)
|
|
11
30
|
#
|
|
@@ -142,6 +161,8 @@ module Slack
|
|
|
142
161
|
# A JSON-based array of structured blocks, presented as a URL-encoded string.
|
|
143
162
|
# @option options [channel] :channel
|
|
144
163
|
# An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.
|
|
164
|
+
# @option options [string] :current_draft_last_updated_ts
|
|
165
|
+
# This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server.
|
|
145
166
|
# @option options [string] :icon_emoji
|
|
146
167
|
# Emoji to use as the icon for this message. Overrides icon_url.
|
|
147
168
|
# @option options [string] :icon_url
|
|
@@ -218,6 +239,51 @@ module Slack
|
|
|
218
239
|
post('chat.scheduleMessage', options)
|
|
219
240
|
end
|
|
220
241
|
|
|
242
|
+
#
|
|
243
|
+
# Starts a new streaming conversation.
|
|
244
|
+
#
|
|
245
|
+
# @option options [channel] :channel
|
|
246
|
+
# An encoded ID that represents a channel, private group, or DM.
|
|
247
|
+
# @option options [string] :markdown_text
|
|
248
|
+
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
249
|
+
# @option options [string] :thread_ts
|
|
250
|
+
# Provide another message's ts value to reply to. Streamed messages should always be replies to a user request.
|
|
251
|
+
# @option options [Object] :recipient_user_id
|
|
252
|
+
# The encoded ID of the user to receive the streaming text. Required when streaming to channels.
|
|
253
|
+
# @option options [string] :recipient_team_id
|
|
254
|
+
# The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
|
|
255
|
+
# @see https://api.slack.com/methods/chat.startStream
|
|
256
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
|
|
257
|
+
def chat_startStream(options = {})
|
|
258
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
259
|
+
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
|
260
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
261
|
+
post('chat.startStream', options)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
#
|
|
265
|
+
# Stops a streaming conversation.
|
|
266
|
+
#
|
|
267
|
+
# @option options [channel] :channel
|
|
268
|
+
# An encoded ID that represents a channel, private group, or DM.
|
|
269
|
+
# @option options [timestamp] :ts
|
|
270
|
+
# The timestamp of the streaming message.
|
|
271
|
+
# @option options [string] :markdown_text
|
|
272
|
+
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
273
|
+
# @option options [Object] :blocks
|
|
274
|
+
# A list of blocks that will be rendered at the bottom of the finalized message.
|
|
275
|
+
# @option options [string] :metadata
|
|
276
|
+
# JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.
|
|
277
|
+
# @see https://api.slack.com/methods/chat.stopStream
|
|
278
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
|
|
279
|
+
def chat_stopStream(options = {})
|
|
280
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
281
|
+
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
282
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
283
|
+
options = encode_options_as_json(options, %i[metadata])
|
|
284
|
+
post('chat.stopStream', options)
|
|
285
|
+
end
|
|
286
|
+
|
|
221
287
|
#
|
|
222
288
|
# Provide custom unfurl behavior for user-posted URLs
|
|
223
289
|
#
|
|
@@ -226,7 +292,7 @@ module Slack
|
|
|
226
292
|
# @option options [timestamp] :ts
|
|
227
293
|
# Timestamp of the message to add unfurl behavior to.
|
|
228
294
|
# @option options [string] :unfurls
|
|
229
|
-
# URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.
|
|
295
|
+
# URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Either unfurls or metadata must be provided.
|
|
230
296
|
# @option options [string] :user_auth_message
|
|
231
297
|
# Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.
|
|
232
298
|
# @option options [boolean] :user_auth_required
|
|
@@ -239,14 +305,13 @@ module Slack
|
|
|
239
305
|
# The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.
|
|
240
306
|
# @option options [enum] :source
|
|
241
307
|
# The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.
|
|
308
|
+
# @option options [string] :metadata
|
|
309
|
+
# JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.
|
|
242
310
|
# @see https://api.slack.com/methods/chat.unfurl
|
|
243
311
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
|
|
244
312
|
def chat_unfurl(options = {})
|
|
245
|
-
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
246
|
-
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
247
|
-
raise ArgumentError, 'Required arguments :unfurls missing' if options[:unfurls].nil?
|
|
248
313
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
249
|
-
options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
|
|
314
|
+
options = encode_options_as_json(options, %i[unfurls user_auth_blocks metadata])
|
|
250
315
|
post('chat.unfurl', options)
|
|
251
316
|
end
|
|
252
317
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Web
|
|
6
|
+
module Api
|
|
7
|
+
module Endpoints
|
|
8
|
+
module Entity
|
|
9
|
+
#
|
|
10
|
+
# Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.
|
|
11
|
+
#
|
|
12
|
+
# @option options [object] :metadata
|
|
13
|
+
# URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.
|
|
14
|
+
# @option options [string] :trigger_id
|
|
15
|
+
# A reference to the original user action that initiated the request.
|
|
16
|
+
# @option options [boolean] :user_auth_required
|
|
17
|
+
# Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.
|
|
18
|
+
# @option options [string] :user_auth_url
|
|
19
|
+
# A custom URL to which users are directed for authentication if required.
|
|
20
|
+
# @option options [Object] :error
|
|
21
|
+
# @see https://api.slack.com/methods/entity.presentDetails
|
|
22
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.presentDetails.json
|
|
23
|
+
def entity_presentDetails(options = {})
|
|
24
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
25
|
+
options = encode_options_as_json(options, %i[metadata])
|
|
26
|
+
post('entity.presentDetails', options)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -16,7 +16,7 @@ module Slack
|
|
|
16
16
|
# @option options [string] :thread_ts
|
|
17
17
|
# Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'.
|
|
18
18
|
# @option options [string] :channels
|
|
19
|
-
# Comma-separated string of channel IDs where the file will be shared.
|
|
19
|
+
# Comma-separated string of channel IDs or user IDs where the file will be shared.
|
|
20
20
|
# @option options [string] :initial_comment
|
|
21
21
|
# The message text introducing the file in specified channels.
|
|
22
22
|
# @option options [string] :blocks
|
|
@@ -15,6 +15,8 @@ module Slack
|
|
|
15
15
|
# Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
|
|
16
16
|
# @option options [string] :code
|
|
17
17
|
# The code param returned via the OAuth callback.
|
|
18
|
+
# @option options [string] :code_verifier
|
|
19
|
+
# The code_verifier param used to generate the code_challenge originally. Used for PKCE.
|
|
18
20
|
# @option options [string] :redirect_uri
|
|
19
21
|
# This must match the originally submitted URI (if one was sent).
|
|
20
22
|
# @option options [string] :grant_type
|
|
@@ -61,6 +61,7 @@ require_relative 'endpoints/conversations_requestSharedInvite'
|
|
|
61
61
|
require_relative 'endpoints/dialog'
|
|
62
62
|
require_relative 'endpoints/dnd'
|
|
63
63
|
require_relative 'endpoints/emoji'
|
|
64
|
+
require_relative 'endpoints/entity'
|
|
64
65
|
require_relative 'endpoints/files'
|
|
65
66
|
require_relative 'endpoints/files_comments'
|
|
66
67
|
require_relative 'endpoints/files_remote'
|
|
@@ -166,6 +167,7 @@ module Slack
|
|
|
166
167
|
include Dialog
|
|
167
168
|
include Dnd
|
|
168
169
|
include Emoji
|
|
170
|
+
include Entity
|
|
169
171
|
include Files
|
|
170
172
|
include FilesComments
|
|
171
173
|
include FilesRemote
|
data/lib/slack/web/api/errors.rb
CHANGED
|
@@ -7,6 +7,7 @@ module Slack
|
|
|
7
7
|
module Errors
|
|
8
8
|
class AccessDenied < SlackError; end
|
|
9
9
|
class AccessTokenExchangeFailed < SlackError; end
|
|
10
|
+
class Accesslimited < SlackError; end
|
|
10
11
|
class AccountInactive < SlackError; end
|
|
11
12
|
class ActionAlreadyInProgress < SlackError; end
|
|
12
13
|
class AdminUnauthorized < SlackError; end
|
|
@@ -31,6 +32,7 @@ module Slack
|
|
|
31
32
|
class ApprovalNotFound < SlackError; end
|
|
32
33
|
class ArchiveNotSupported < SlackError; end
|
|
33
34
|
class AsUserNotSupported < SlackError; end
|
|
35
|
+
class AssistantSearchContextDisabled < SlackError; end
|
|
34
36
|
class AtLeastOneSessionSettingRequired < SlackError; end
|
|
35
37
|
class AttachmentPayloadLimitExceeded < SlackError; end
|
|
36
38
|
class AuthMismatch < SlackError; end
|
|
@@ -166,9 +168,14 @@ module Slack
|
|
|
166
168
|
class DefaultChannelRestricted < SlackError; end
|
|
167
169
|
class DefaultOrgWideChannel < SlackError; end
|
|
168
170
|
class DeleteNotAllowed < SlackError; end
|
|
171
|
+
class DeprecatedEndpoint < SlackError; end
|
|
169
172
|
class DescriptionTooLong < SlackError; end
|
|
170
173
|
class DiscoverabilitySettingInvalid < SlackError; end
|
|
171
174
|
class DomainTaken < SlackError; end
|
|
175
|
+
class DraftAlreadyDeleted < SlackError; end
|
|
176
|
+
class DraftAlreadySent < SlackError; end
|
|
177
|
+
class DraftHasConflict < SlackError; end
|
|
178
|
+
class DraftNotFound < SlackError; end
|
|
172
179
|
class DuplicateChannelNotFound < SlackError; end
|
|
173
180
|
class DuplicateExternalId < SlackError; end
|
|
174
181
|
class DuplicateMessageNotFound < SlackError; end
|
|
@@ -183,6 +190,7 @@ module Slack
|
|
|
183
190
|
class EndpointUnavailable < SlackError; end
|
|
184
191
|
class EnterpriseIsRestricted < SlackError; end
|
|
185
192
|
class EnterpriseNotFound < SlackError; end
|
|
193
|
+
class EntityMetadataDoesNotMatchTrigger < SlackError; end
|
|
186
194
|
class EntityNotFound < SlackError; end
|
|
187
195
|
class ErrorAddingCollaborators < SlackError; end
|
|
188
196
|
class ErrorBadFormat < SlackError; end
|
|
@@ -198,6 +206,7 @@ module Slack
|
|
|
198
206
|
class ErrorNameTaken < SlackError; end
|
|
199
207
|
class ErrorNameTakenI18n < SlackError; end
|
|
200
208
|
class ErrorNoImage < SlackError; end
|
|
209
|
+
class ErrorProcessingMetadata < SlackError; end
|
|
201
210
|
class ErrorRemovingCollaborators < SlackError; end
|
|
202
211
|
class ErrorTooBig < SlackError; end
|
|
203
212
|
class ErrorUnpublishingWorkflows < SlackError; end
|
|
@@ -288,8 +297,10 @@ module Slack
|
|
|
288
297
|
class InvalidApp < SlackError; end
|
|
289
298
|
class InvalidAppActionType < SlackError; end
|
|
290
299
|
class InvalidAppId < SlackError; end
|
|
300
|
+
class InvalidArgName < SlackError; end
|
|
291
301
|
class InvalidArgs < SlackError; end
|
|
292
302
|
class InvalidArguments < SlackError; end
|
|
303
|
+
class InvalidArrayArg < SlackError; end
|
|
293
304
|
class InvalidAttachment < SlackError; end
|
|
294
305
|
class InvalidAttachments < SlackError; end
|
|
295
306
|
class InvalidAuth < SlackError; end
|
|
@@ -302,9 +313,11 @@ module Slack
|
|
|
302
313
|
class InvalidChannelProvided < SlackError; end
|
|
303
314
|
class InvalidChannelType < SlackError; end
|
|
304
315
|
class InvalidChannelsLimit < SlackError; end
|
|
316
|
+
class InvalidCharset < SlackError; end
|
|
305
317
|
class InvalidChildType < SlackError; end
|
|
306
318
|
class InvalidClientId < SlackError; end
|
|
307
319
|
class InvalidCode < SlackError; end
|
|
320
|
+
class InvalidCodeVerifier < SlackError; end
|
|
308
321
|
class InvalidColumnId < SlackError; end
|
|
309
322
|
class InvalidColumnType < SlackError; end
|
|
310
323
|
class InvalidCopyAndSchemaArgs < SlackError; end
|
|
@@ -322,6 +335,7 @@ module Slack
|
|
|
322
335
|
class InvalidEventContext < SlackError; end
|
|
323
336
|
class InvalidExternalId < SlackError; end
|
|
324
337
|
class InvalidFieldOrData < SlackError; end
|
|
338
|
+
class InvalidFormData < SlackError; end
|
|
325
339
|
class InvalidGrantType < SlackError; end
|
|
326
340
|
class InvalidGroupProvided < SlackError; end
|
|
327
341
|
class InvalidHostTeam < SlackError; end
|
|
@@ -330,6 +344,7 @@ module Slack
|
|
|
330
344
|
class InvalidLink < SlackError; end
|
|
331
345
|
class InvalidManifest < SlackError; end
|
|
332
346
|
class InvalidMessage < SlackError; end
|
|
347
|
+
class InvalidMetadata < SlackError; end
|
|
333
348
|
class InvalidMetadataFilterKeys < SlackError; end
|
|
334
349
|
class InvalidMetadataFormat < SlackError; end
|
|
335
350
|
class InvalidMetadataSchema < SlackError; end
|
|
@@ -347,6 +362,7 @@ module Slack
|
|
|
347
362
|
class InvalidPermissionType < SlackError; end
|
|
348
363
|
class InvalidPermissions < SlackError; end
|
|
349
364
|
class InvalidPhoneNumber < SlackError; end
|
|
365
|
+
class InvalidPostType < SlackError; end
|
|
350
366
|
class InvalidPresence < SlackError; end
|
|
351
367
|
class InvalidPrimaryColumn < SlackError; end
|
|
352
368
|
class InvalidPrivacy < SlackError; end
|
|
@@ -410,6 +426,7 @@ module Slack
|
|
|
410
426
|
class InviteeCantSeeChannel < SlackError; end
|
|
411
427
|
class InvitorCannotSeeChannel < SlackError; end
|
|
412
428
|
class IsArchived < SlackError; end
|
|
429
|
+
class IsBot < SlackError; end
|
|
413
430
|
class IsIdpManaged < SlackError; end
|
|
414
431
|
class IsInactive < SlackError; end
|
|
415
432
|
class IsPendingConnectedToOrg < SlackError; end
|
|
@@ -433,8 +450,10 @@ module Slack
|
|
|
433
450
|
class MemberLimitExceeded < SlackError; end
|
|
434
451
|
class MessageLimitExceeded < SlackError; end
|
|
435
452
|
class MessageNotFound < SlackError; end
|
|
453
|
+
class MessageNotInStreamingState < SlackError; end
|
|
436
454
|
class MessageTooLong < SlackError; end
|
|
437
455
|
class MessagesTabDisabled < SlackError; end
|
|
456
|
+
class MessagingProcessingFailed < SlackError; end
|
|
438
457
|
class MetadataMustBeSentFromApp < SlackError; end
|
|
439
458
|
class MetadataNotAvailable < SlackError; end
|
|
440
459
|
class MetadataOnlyDoesNotSupportDate < SlackError; end
|
|
@@ -451,8 +470,13 @@ module Slack
|
|
|
451
470
|
class MissingDialog < SlackError; end
|
|
452
471
|
class MissingDuration < SlackError; end
|
|
453
472
|
class MissingFileData < SlackError; end
|
|
473
|
+
class MissingInteractivityUrl < SlackError; end
|
|
474
|
+
class MissingOptionsLoadUrl < SlackError; end
|
|
475
|
+
class MissingPostType < SlackError; end
|
|
454
476
|
class MissingProfileId < SlackError; end
|
|
455
477
|
class MissingQuery < SlackError; end
|
|
478
|
+
class MissingRecipientTeamId < SlackError; end
|
|
479
|
+
class MissingRecipientUserId < SlackError; end
|
|
456
480
|
class MissingRecordChannelConfig < SlackError; end
|
|
457
481
|
class MissingResource < SlackError; end
|
|
458
482
|
class MissingScope < SlackError; end
|
|
@@ -491,6 +515,7 @@ module Slack
|
|
|
491
515
|
class NoItemSpecified < SlackError; end
|
|
492
516
|
class NoLocalUserOnTeam < SlackError; end
|
|
493
517
|
class NoPermission < SlackError; end
|
|
518
|
+
class NoPerms < SlackError; end
|
|
494
519
|
class NoPin < SlackError; end
|
|
495
520
|
class NoReaction < SlackError; end
|
|
496
521
|
class NoRefreshToken < SlackError; end
|
|
@@ -540,6 +565,7 @@ module Slack
|
|
|
540
565
|
class OauthAuthorizationUrlMismatch < SlackError; end
|
|
541
566
|
class OneOrMoreInvalidChannels < SlackError; end
|
|
542
567
|
class OrgLevelEmailDisplayDisabled < SlackError; end
|
|
568
|
+
class OrgLoginRequired < SlackError; end
|
|
543
569
|
class OrgNotConnected < SlackError; end
|
|
544
570
|
class OrgNotFound < SlackError; end
|
|
545
571
|
class OrgResolutionRequired < SlackError; end
|
|
@@ -560,6 +586,7 @@ module Slack
|
|
|
560
586
|
class PartialProfileSetFailed < SlackError; end
|
|
561
587
|
class PermissionDenied < SlackError; end
|
|
562
588
|
class PermissionTypeRequired < SlackError; end
|
|
589
|
+
class PkceNotAllowed < SlackError; end
|
|
563
590
|
class PlanUpgradeRequired < SlackError; end
|
|
564
591
|
class PolicyNotFound < SlackError; end
|
|
565
592
|
class PostContentsTooLarge < SlackError; end
|
|
@@ -584,6 +611,7 @@ module Slack
|
|
|
584
611
|
class RequestAlreadyResolved < SlackError; end
|
|
585
612
|
class RequestIdOrAppIdIsRequired < SlackError; end
|
|
586
613
|
class RequestIdRequiredForCustomIntegrations < SlackError; end
|
|
614
|
+
class RequestTimeout < SlackError; end
|
|
587
615
|
class ReservedName < SlackError; end
|
|
588
616
|
class ResizedButStillTooLarge < SlackError; end
|
|
589
617
|
class RestrictedAction < SlackError; end
|
|
@@ -598,6 +626,7 @@ module Slack
|
|
|
598
626
|
class RowNotFound < SlackError; end
|
|
599
627
|
class RtmConnectRequired < SlackError; end
|
|
600
628
|
class SentRecently < SlackError; end
|
|
629
|
+
class ServiceUnavailable < SlackError; end
|
|
601
630
|
class SessionInvalidationFailed < SlackError; end
|
|
602
631
|
class SessionNotFound < SlackError; end
|
|
603
632
|
class SessionResetNotAllowed < SlackError; end
|
|
@@ -619,6 +648,7 @@ module Slack
|
|
|
619
648
|
class TargetTeamMustBeSpecifiedInOrgContext < SlackError; end
|
|
620
649
|
class TargetTeamNotFound < SlackError; end
|
|
621
650
|
class TargetTeamNotOnOrg < SlackError; end
|
|
651
|
+
class TeamAddedToOrg < SlackError; end
|
|
622
652
|
class TeamIdOrOrgRequired < SlackError; end
|
|
623
653
|
class TeamIdRequiredForEnterprise < SlackError; end
|
|
624
654
|
class TeamNotConnected < SlackError; end
|
|
@@ -633,6 +663,7 @@ module Slack
|
|
|
633
663
|
class TimeInPast < SlackError; end
|
|
634
664
|
class TimeTooFar < SlackError; end
|
|
635
665
|
class TokenAlreadyExchanged < SlackError; end
|
|
666
|
+
class TokenExpired < SlackError; end
|
|
636
667
|
class TokenNotFound < SlackError; end
|
|
637
668
|
class TokenRevoked < SlackError; end
|
|
638
669
|
class TokenRotationNotEnabled < SlackError; end
|
|
@@ -662,6 +693,7 @@ module Slack
|
|
|
662
693
|
class TriggerExpired < SlackError; end
|
|
663
694
|
class TriggerNotFound < SlackError; end
|
|
664
695
|
class TriggerTypeIdNotFound < SlackError; end
|
|
696
|
+
class TwoFactorSetupRequired < SlackError; end
|
|
665
697
|
class UnableToDelete < SlackError; end
|
|
666
698
|
class UnableToFetchCustomEmojis < SlackError; end
|
|
667
699
|
class UnableToLinkIdpGroupAndChannel < SlackError; end
|
|
@@ -689,6 +721,7 @@ module Slack
|
|
|
689
721
|
class UrlRestrictionNotSupported < SlackError; end
|
|
690
722
|
class UserAlreadyDeleted < SlackError; end
|
|
691
723
|
class UserAlreadyTeamMember < SlackError; end
|
|
724
|
+
class UserAuthUrlMissing < SlackError; end
|
|
692
725
|
class UserCannotCreateChannel < SlackError; end
|
|
693
726
|
class UserCannotManagePublicChannels < SlackError; end
|
|
694
727
|
class UserCannotManageWorkspace < SlackError; end
|
|
@@ -699,6 +732,7 @@ module Slack
|
|
|
699
732
|
class UserIsBot < SlackError; end
|
|
700
733
|
class UserIsDeactivated < SlackError; end
|
|
701
734
|
class UserIsNotAGuest < SlackError; end
|
|
735
|
+
class UserIsNotGuest < SlackError; end
|
|
702
736
|
class UserIsRestricted < SlackError; end
|
|
703
737
|
class UserMustBeAdmin < SlackError; end
|
|
704
738
|
class UserMustBeInWorkspace < SlackError; end
|
|
@@ -721,6 +755,7 @@ module Slack
|
|
|
721
755
|
ERROR_CLASSES = {
|
|
722
756
|
'access_denied' => AccessDenied,
|
|
723
757
|
'access_token_exchange_failed' => AccessTokenExchangeFailed,
|
|
758
|
+
'accesslimited' => Accesslimited,
|
|
724
759
|
'account_inactive' => AccountInactive,
|
|
725
760
|
'action_already_in_progress' => ActionAlreadyInProgress,
|
|
726
761
|
'admin_unauthorized' => AdminUnauthorized,
|
|
@@ -745,6 +780,7 @@ module Slack
|
|
|
745
780
|
'approval_not_found' => ApprovalNotFound,
|
|
746
781
|
'archive_not_supported' => ArchiveNotSupported,
|
|
747
782
|
'as_user_not_supported' => AsUserNotSupported,
|
|
783
|
+
'assistant_search_context_disabled' => AssistantSearchContextDisabled,
|
|
748
784
|
'at_least_one_session_setting_required' => AtLeastOneSessionSettingRequired,
|
|
749
785
|
'attachment_payload_limit_exceeded' => AttachmentPayloadLimitExceeded,
|
|
750
786
|
'auth_mismatch' => AuthMismatch,
|
|
@@ -880,9 +916,14 @@ module Slack
|
|
|
880
916
|
'default_channel_restricted' => DefaultChannelRestricted,
|
|
881
917
|
'default_org_wide_channel' => DefaultOrgWideChannel,
|
|
882
918
|
'delete_not_allowed' => DeleteNotAllowed,
|
|
919
|
+
'deprecated_endpoint' => DeprecatedEndpoint,
|
|
883
920
|
'description_too_long' => DescriptionTooLong,
|
|
884
921
|
'discoverability_setting_invalid' => DiscoverabilitySettingInvalid,
|
|
885
922
|
'domain_taken' => DomainTaken,
|
|
923
|
+
'draft_already_deleted' => DraftAlreadyDeleted,
|
|
924
|
+
'draft_already_sent' => DraftAlreadySent,
|
|
925
|
+
'draft_has_conflict' => DraftHasConflict,
|
|
926
|
+
'draft_not_found' => DraftNotFound,
|
|
886
927
|
'duplicate_channel_not_found' => DuplicateChannelNotFound,
|
|
887
928
|
'duplicate_external_id' => DuplicateExternalId,
|
|
888
929
|
'duplicate_message_not_found' => DuplicateMessageNotFound,
|
|
@@ -897,6 +938,7 @@ module Slack
|
|
|
897
938
|
'endpoint_unavailable' => EndpointUnavailable,
|
|
898
939
|
'enterprise_is_restricted' => EnterpriseIsRestricted,
|
|
899
940
|
'enterprise_not_found' => EnterpriseNotFound,
|
|
941
|
+
'entity_metadata_does_not_match_trigger' => EntityMetadataDoesNotMatchTrigger,
|
|
900
942
|
'entity_not_found' => EntityNotFound,
|
|
901
943
|
'error_adding_collaborators' => ErrorAddingCollaborators,
|
|
902
944
|
'error_bad_format' => ErrorBadFormat,
|
|
@@ -912,6 +954,7 @@ module Slack
|
|
|
912
954
|
'error_name_taken' => ErrorNameTaken,
|
|
913
955
|
'error_name_taken_i18n' => ErrorNameTakenI18n,
|
|
914
956
|
'error_no_image' => ErrorNoImage,
|
|
957
|
+
'error_processing_metadata' => ErrorProcessingMetadata,
|
|
915
958
|
'error_removing_collaborators' => ErrorRemovingCollaborators,
|
|
916
959
|
'error_too_big' => ErrorTooBig,
|
|
917
960
|
'error_unpublishing_workflows' => ErrorUnpublishingWorkflows,
|
|
@@ -1002,8 +1045,10 @@ module Slack
|
|
|
1002
1045
|
'invalid_app' => InvalidApp,
|
|
1003
1046
|
'invalid_app_action_type' => InvalidAppActionType,
|
|
1004
1047
|
'invalid_app_id' => InvalidAppId,
|
|
1048
|
+
'invalid_arg_name' => InvalidArgName,
|
|
1005
1049
|
'invalid_args' => InvalidArgs,
|
|
1006
1050
|
'invalid_arguments' => InvalidArguments,
|
|
1051
|
+
'invalid_array_arg' => InvalidArrayArg,
|
|
1007
1052
|
'invalid_attachment' => InvalidAttachment,
|
|
1008
1053
|
'invalid_attachments' => InvalidAttachments,
|
|
1009
1054
|
'invalid_auth' => InvalidAuth,
|
|
@@ -1016,9 +1061,11 @@ module Slack
|
|
|
1016
1061
|
'invalid_channel_provided' => InvalidChannelProvided,
|
|
1017
1062
|
'invalid_channel_type' => InvalidChannelType,
|
|
1018
1063
|
'invalid_channels_limit' => InvalidChannelsLimit,
|
|
1064
|
+
'invalid_charset' => InvalidCharset,
|
|
1019
1065
|
'invalid_child_type' => InvalidChildType,
|
|
1020
1066
|
'invalid_client_id' => InvalidClientId,
|
|
1021
1067
|
'invalid_code' => InvalidCode,
|
|
1068
|
+
'invalid_code_verifier' => InvalidCodeVerifier,
|
|
1022
1069
|
'invalid_column_id' => InvalidColumnId,
|
|
1023
1070
|
'invalid_column_type' => InvalidColumnType,
|
|
1024
1071
|
'invalid_copy_and_schema_args' => InvalidCopyAndSchemaArgs,
|
|
@@ -1036,6 +1083,7 @@ module Slack
|
|
|
1036
1083
|
'invalid_event_context' => InvalidEventContext,
|
|
1037
1084
|
'invalid_external_id' => InvalidExternalId,
|
|
1038
1085
|
'invalid_field_or_data' => InvalidFieldOrData,
|
|
1086
|
+
'invalid_form_data' => InvalidFormData,
|
|
1039
1087
|
'invalid_grant_type' => InvalidGrantType,
|
|
1040
1088
|
'invalid_group_provided' => InvalidGroupProvided,
|
|
1041
1089
|
'invalid_host_team' => InvalidHostTeam,
|
|
@@ -1044,6 +1092,7 @@ module Slack
|
|
|
1044
1092
|
'invalid_link' => InvalidLink,
|
|
1045
1093
|
'invalid_manifest' => InvalidManifest,
|
|
1046
1094
|
'invalid_message' => InvalidMessage,
|
|
1095
|
+
'invalid_metadata' => InvalidMetadata,
|
|
1047
1096
|
'invalid_metadata_filter_keys' => InvalidMetadataFilterKeys,
|
|
1048
1097
|
'invalid_metadata_format' => InvalidMetadataFormat,
|
|
1049
1098
|
'invalid_metadata_schema' => InvalidMetadataSchema,
|
|
@@ -1061,6 +1110,7 @@ module Slack
|
|
|
1061
1110
|
'invalid_permission_type' => InvalidPermissionType,
|
|
1062
1111
|
'invalid_permissions' => InvalidPermissions,
|
|
1063
1112
|
'invalid_phone_number' => InvalidPhoneNumber,
|
|
1113
|
+
'invalid_post_type' => InvalidPostType,
|
|
1064
1114
|
'invalid_presence' => InvalidPresence,
|
|
1065
1115
|
'invalid_primary_column' => InvalidPrimaryColumn,
|
|
1066
1116
|
'invalid_privacy' => InvalidPrivacy,
|
|
@@ -1124,6 +1174,7 @@ module Slack
|
|
|
1124
1174
|
'invitee_cant_see_channel' => InviteeCantSeeChannel,
|
|
1125
1175
|
'invitor_cannot_see_channel' => InvitorCannotSeeChannel,
|
|
1126
1176
|
'is_archived' => IsArchived,
|
|
1177
|
+
'is_bot' => IsBot,
|
|
1127
1178
|
'is_idp_managed' => IsIdpManaged,
|
|
1128
1179
|
'is_inactive' => IsInactive,
|
|
1129
1180
|
'is_pending_connected_to_org' => IsPendingConnectedToOrg,
|
|
@@ -1147,8 +1198,10 @@ module Slack
|
|
|
1147
1198
|
'member_limit_exceeded' => MemberLimitExceeded,
|
|
1148
1199
|
'message_limit_exceeded' => MessageLimitExceeded,
|
|
1149
1200
|
'message_not_found' => MessageNotFound,
|
|
1201
|
+
'message_not_in_streaming_state' => MessageNotInStreamingState,
|
|
1150
1202
|
'message_too_long' => MessageTooLong,
|
|
1151
1203
|
'messages_tab_disabled' => MessagesTabDisabled,
|
|
1204
|
+
'messaging_processing_failed' => MessagingProcessingFailed,
|
|
1152
1205
|
'metadata_must_be_sent_from_app' => MetadataMustBeSentFromApp,
|
|
1153
1206
|
'metadata_not_available' => MetadataNotAvailable,
|
|
1154
1207
|
'metadata_only_does_not_support_date' => MetadataOnlyDoesNotSupportDate,
|
|
@@ -1165,8 +1218,13 @@ module Slack
|
|
|
1165
1218
|
'missing_dialog' => MissingDialog,
|
|
1166
1219
|
'missing_duration' => MissingDuration,
|
|
1167
1220
|
'missing_file_data' => MissingFileData,
|
|
1221
|
+
'missing_interactivity_url' => MissingInteractivityUrl,
|
|
1222
|
+
'missing_options_load_url' => MissingOptionsLoadUrl,
|
|
1223
|
+
'missing_post_type' => MissingPostType,
|
|
1168
1224
|
'missing_profile_id' => MissingProfileId,
|
|
1169
1225
|
'missing_query' => MissingQuery,
|
|
1226
|
+
'missing_recipient_team_id' => MissingRecipientTeamId,
|
|
1227
|
+
'missing_recipient_user_id' => MissingRecipientUserId,
|
|
1170
1228
|
'missing_record_channel_config' => MissingRecordChannelConfig,
|
|
1171
1229
|
'missing_resource' => MissingResource,
|
|
1172
1230
|
'missing_scope' => MissingScope,
|
|
@@ -1205,6 +1263,7 @@ module Slack
|
|
|
1205
1263
|
'no_item_specified' => NoItemSpecified,
|
|
1206
1264
|
'no_local_user_on_team' => NoLocalUserOnTeam,
|
|
1207
1265
|
'no_permission' => NoPermission,
|
|
1266
|
+
'no_perms' => NoPerms,
|
|
1208
1267
|
'no_pin' => NoPin,
|
|
1209
1268
|
'no_reaction' => NoReaction,
|
|
1210
1269
|
'no_refresh_token' => NoRefreshToken,
|
|
@@ -1254,6 +1313,7 @@ module Slack
|
|
|
1254
1313
|
'oauth_authorization_url_mismatch' => OauthAuthorizationUrlMismatch,
|
|
1255
1314
|
'one_or_more_invalid_channels' => OneOrMoreInvalidChannels,
|
|
1256
1315
|
'org_level_email_display_disabled' => OrgLevelEmailDisplayDisabled,
|
|
1316
|
+
'org_login_required' => OrgLoginRequired,
|
|
1257
1317
|
'org_not_connected' => OrgNotConnected,
|
|
1258
1318
|
'org_not_found' => OrgNotFound,
|
|
1259
1319
|
'org_resolution_required' => OrgResolutionRequired,
|
|
@@ -1274,6 +1334,7 @@ module Slack
|
|
|
1274
1334
|
'partial_profile_set_failed' => PartialProfileSetFailed,
|
|
1275
1335
|
'permission_denied' => PermissionDenied,
|
|
1276
1336
|
'permission_type_required' => PermissionTypeRequired,
|
|
1337
|
+
'pkce_not_allowed' => PkceNotAllowed,
|
|
1277
1338
|
'plan_upgrade_required' => PlanUpgradeRequired,
|
|
1278
1339
|
'policy_not_found' => PolicyNotFound,
|
|
1279
1340
|
'post_contents_too_large' => PostContentsTooLarge,
|
|
@@ -1298,6 +1359,7 @@ module Slack
|
|
|
1298
1359
|
'request_already_resolved' => RequestAlreadyResolved,
|
|
1299
1360
|
'request_id_or_app_id_is_required' => RequestIdOrAppIdIsRequired,
|
|
1300
1361
|
'request_id_required_for_custom_integrations' => RequestIdRequiredForCustomIntegrations,
|
|
1362
|
+
'request_timeout' => RequestTimeout,
|
|
1301
1363
|
'reserved_name' => ReservedName,
|
|
1302
1364
|
'resized_but_still_too_large' => ResizedButStillTooLarge,
|
|
1303
1365
|
'restricted_action' => RestrictedAction,
|
|
@@ -1312,6 +1374,7 @@ module Slack
|
|
|
1312
1374
|
'row_not_found' => RowNotFound,
|
|
1313
1375
|
'rtm_connect_required' => RtmConnectRequired,
|
|
1314
1376
|
'sent_recently' => SentRecently,
|
|
1377
|
+
'service_unavailable' => ServiceUnavailable,
|
|
1315
1378
|
'session_invalidation_failed' => SessionInvalidationFailed,
|
|
1316
1379
|
'session_not_found' => SessionNotFound,
|
|
1317
1380
|
'session_reset_not_allowed' => SessionResetNotAllowed,
|
|
@@ -1333,6 +1396,7 @@ module Slack
|
|
|
1333
1396
|
'target_team_must_be_specified_in_org_context' => TargetTeamMustBeSpecifiedInOrgContext,
|
|
1334
1397
|
'target_team_not_found' => TargetTeamNotFound,
|
|
1335
1398
|
'target_team_not_on_org' => TargetTeamNotOnOrg,
|
|
1399
|
+
'team_added_to_org' => TeamAddedToOrg,
|
|
1336
1400
|
'team_id_or_org_required' => TeamIdOrOrgRequired,
|
|
1337
1401
|
'team_id_required_for_enterprise' => TeamIdRequiredForEnterprise,
|
|
1338
1402
|
'team_not_connected' => TeamNotConnected,
|
|
@@ -1347,6 +1411,7 @@ module Slack
|
|
|
1347
1411
|
'time_in_past' => TimeInPast,
|
|
1348
1412
|
'time_too_far' => TimeTooFar,
|
|
1349
1413
|
'token_already_exchanged' => TokenAlreadyExchanged,
|
|
1414
|
+
'token_expired' => TokenExpired,
|
|
1350
1415
|
'token_not_found' => TokenNotFound,
|
|
1351
1416
|
'token_revoked' => TokenRevoked,
|
|
1352
1417
|
'token_rotation_not_enabled' => TokenRotationNotEnabled,
|
|
@@ -1376,6 +1441,7 @@ module Slack
|
|
|
1376
1441
|
'trigger_expired' => TriggerExpired,
|
|
1377
1442
|
'trigger_not_found' => TriggerNotFound,
|
|
1378
1443
|
'trigger_type_id_not_found' => TriggerTypeIdNotFound,
|
|
1444
|
+
'two_factor_setup_required' => TwoFactorSetupRequired,
|
|
1379
1445
|
'unable_to_delete' => UnableToDelete,
|
|
1380
1446
|
'unable_to_fetch_custom_emojis' => UnableToFetchCustomEmojis,
|
|
1381
1447
|
'unable_to_link_idp_group_and_channel' => UnableToLinkIdpGroupAndChannel,
|
|
@@ -1403,6 +1469,7 @@ module Slack
|
|
|
1403
1469
|
'url_restriction_not_supported' => UrlRestrictionNotSupported,
|
|
1404
1470
|
'user_already_deleted' => UserAlreadyDeleted,
|
|
1405
1471
|
'user_already_team_member' => UserAlreadyTeamMember,
|
|
1472
|
+
'user_auth_url_missing' => UserAuthUrlMissing,
|
|
1406
1473
|
'user_cannot_create_channel' => UserCannotCreateChannel,
|
|
1407
1474
|
'user_cannot_manage_public_channels' => UserCannotManagePublicChannels,
|
|
1408
1475
|
'user_cannot_manage_workspace' => UserCannotManageWorkspace,
|
|
@@ -1413,6 +1480,7 @@ module Slack
|
|
|
1413
1480
|
'user_is_bot' => UserIsBot,
|
|
1414
1481
|
'user_is_deactivated' => UserIsDeactivated,
|
|
1415
1482
|
'user_is_not_a_guest' => UserIsNotAGuest,
|
|
1483
|
+
'user_is_not_guest' => UserIsNotGuest,
|
|
1416
1484
|
'user_is_restricted' => UserIsRestricted,
|
|
1417
1485
|
'user_must_be_admin' => UserMustBeAdmin,
|
|
1418
1486
|
'user_must_be_in_workspace' => UserMustBeInWorkspace,
|
|
@@ -29,6 +29,9 @@ module Slack
|
|
|
29
29
|
# Comma-separated string of channel IDs where the file will be shared. If not specified the file will be private.
|
|
30
30
|
# @option params [string] :initial_comment
|
|
31
31
|
# The message text introducing the file in specified channels.
|
|
32
|
+
# @option params [string] :blocks
|
|
33
|
+
# A JSON-based array of structured rich text blocks, presented as a URL-encoded string.
|
|
34
|
+
# If the initial_comment field is provided, the blocks field is ignored.
|
|
32
35
|
# @option params [string] :thread_ts
|
|
33
36
|
# Provide another message's ts value to upload this file as a reply.
|
|
34
37
|
# Never use a reply's ts value; use its parent instead.
|
|
@@ -49,7 +52,7 @@ module Slack
|
|
|
49
52
|
channel_params = %i[channel channels channel_id].map { |param| params[param] }.compact
|
|
50
53
|
raise ArgumentError, 'Only one of :channel, :channels, or :channel_id is required' if channel_params.size > 1
|
|
51
54
|
|
|
52
|
-
complete_upload_request_params = params.slice(:initial_comment, :thread_ts)
|
|
55
|
+
complete_upload_request_params = params.slice(:initial_comment, :blocks, :thread_ts)
|
|
53
56
|
|
|
54
57
|
if params[:channels]
|
|
55
58
|
complete_upload_request_params[:channels] = Array(params[:channels]).map do |channel|
|
data/lib/tasks/web.rake
CHANGED
|
@@ -27,6 +27,8 @@ namespace :slack do
|
|
|
27
27
|
Dir.glob('lib/slack/web/api/mixins/**/*.json')
|
|
28
28
|
].flatten.each_with_object({}) do |path, result|
|
|
29
29
|
file_name = File.basename(path, '.json')
|
|
30
|
+
next if File.dirname(path).split('/').last.start_with?('_') # skip _common, _errors, etc.
|
|
31
|
+
|
|
30
32
|
prefix = file_name.split('.')[0..-2].join('.')
|
|
31
33
|
name = file_name.split('.')[-1]
|
|
32
34
|
result[prefix] ||= {}
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slack-ruby-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Doubrovkine
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -94,7 +93,6 @@ dependencies:
|
|
|
94
93
|
- - ">="
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '0'
|
|
97
|
-
description:
|
|
98
96
|
email: dblock@dblock.org
|
|
99
97
|
executables:
|
|
100
98
|
- slack
|
|
@@ -185,6 +183,7 @@ files:
|
|
|
185
183
|
- bin/commands/dialog.rb
|
|
186
184
|
- bin/commands/dnd.rb
|
|
187
185
|
- bin/commands/emoji.rb
|
|
186
|
+
- bin/commands/entity.rb
|
|
188
187
|
- bin/commands/files.rb
|
|
189
188
|
- bin/commands/files_comments.rb
|
|
190
189
|
- bin/commands/files_remote.rb
|
|
@@ -307,6 +306,7 @@ files:
|
|
|
307
306
|
- lib/slack/web/api/endpoints/dialog.rb
|
|
308
307
|
- lib/slack/web/api/endpoints/dnd.rb
|
|
309
308
|
- lib/slack/web/api/endpoints/emoji.rb
|
|
309
|
+
- lib/slack/web/api/endpoints/entity.rb
|
|
310
310
|
- lib/slack/web/api/endpoints/files.rb
|
|
311
311
|
- lib/slack/web/api/endpoints/files_comments.rb
|
|
312
312
|
- lib/slack/web/api/endpoints/files_remote.rb
|
|
@@ -387,7 +387,6 @@ licenses:
|
|
|
387
387
|
metadata:
|
|
388
388
|
rubygems_mfa_required: 'true'
|
|
389
389
|
changelog_uri: https://github.com/slack-ruby/slack-ruby-client/blob/master/CHANGELOG.md
|
|
390
|
-
post_install_message:
|
|
391
390
|
rdoc_options: []
|
|
392
391
|
require_paths:
|
|
393
392
|
- lib
|
|
@@ -402,8 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
402
401
|
- !ruby/object:Gem::Version
|
|
403
402
|
version: 1.3.6
|
|
404
403
|
requirements: []
|
|
405
|
-
rubygems_version: 3.
|
|
406
|
-
signing_key:
|
|
404
|
+
rubygems_version: 3.6.9
|
|
407
405
|
specification_version: 4
|
|
408
406
|
summary: Slack Web and RealTime API client.
|
|
409
407
|
test_files: []
|