Skip to content

Commit 5318965

Browse files
committed
Update API from slack-api-ref@bd5dd34 (2025-11-10)
1 parent 35ee09f commit 5318965

25 files changed

+342
-31
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 3.0.1 (Next)
22

3+
* [#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).
34
* Your contribution here.
45
* [#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).
56

bin/commands/admin_functions.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ module Cli
66
class App
77
desc 'AdminFunctions methods.'
88
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. )
1111
g.command 'list' do |c|
1212
c.flag 'team_id', desc: 'The team context to retrieve functions from.'
1313
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.'
1415
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
1516
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.'
1617
c.action do |_global_options, options, _args|

bin/commands/admin_functions_permissions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class App
1515
end
1616
end
1717

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. )
2020
g.command 'set' do |c|
2121
c.flag 'function_id', desc: 'The function ID to set permissions for.'
2222
c.flag 'visibility', desc: 'The function visibility.'

bin/commands/admin_users.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ class App
1919
end
2020
end
2121

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+
2232
g.desc 'Invite a user to a workspace.'
2333
g.long_desc %( Invite a user to a workspace. )
2434
g.command 'invite' do |c|

bin/commands/assistant_search.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ class App
1313
c.flag 'action_token', desc: 'Send action_token as received in a message event.'
1414
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.'
1515
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: 'If you want the results to include bots.'
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.'
1718
c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
1819
c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
1920
c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
2021
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, and use this to get the next page of results.'
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.'
2223
c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
2324
c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
2425
c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
2526
c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
2627
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. conjunctive normal form).'
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.'
2831
c.action do |_global_options, options, _args|
2932
puts JSON.dump(@client.assistant_search_context(options))
3033
end

bin/commands/assistant_threads.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class App
1212
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
1313
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
1414
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.'
1516
c.action do |_global_options, options, _args|
1617
puts JSON.dump(@client.assistant_threads_setStatus(options))
1718
end

bin/commands/chat.rb

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ module Cli
66
class App
77
desc 'Chat methods.'
88
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+
920
g.desc 'Execute a slash command in a public channel (undocumented)'
1021
g.long_desc %( Execute a slash command in a public channel )
1122
g.command 'command' do |c|
@@ -87,6 +98,7 @@ class App
8798
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
8899
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
89100
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."
90102
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
91103
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
92104
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 @@ class App
127139
end
128140
end
129141

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+
130168
g.desc 'Provide custom unfurl behavior for user-posted URLs'
131169
g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
132170
g.command 'unfurl' do |c|
133171
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.'
134172
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.'
136174
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.'
137175
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.'
138176
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.'
139177
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.'
140178
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.'
141179
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.'
142181
c.action do |_global_options, options, _args|
143182
puts JSON.dump(@client.chat_unfurl(options))
144183
end

bin/commands/entity.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

bin/commands/files.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class App
1212
c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
1313
c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
1414
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.'
1616
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
1717
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.'
1818
c.action do |_global_options, options, _args|

bin/commands/oauth_v2.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class App
1212
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.'
1313
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.'
1414
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.'
1516
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
1617
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
1718
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'

0 commit comments

Comments
 (0)