Skip to content

Commit 4ceb94f

Browse files
committed
Update API from slack-api-ref@3ec3c10 (2025-02-03)
1 parent c75d8e4 commit 4ceb94f

38 files changed

+511
-52
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* [#527](https://github.com/slack-ruby/slack-ruby-client/pull/527): Explicitly require `racc` and `ostruct` - [@dblock](https://github.com/dblock).
55
* [#528](https://github.com/slack-ruby/slack-ruby-client/pull/528): Don't treat asterisks in list items as italic in markdown - [@rspeicher](https://github.com/rspeicher).
66
* [#530](https://github.com/slack-ruby/slack-ruby-client/pull/530): Specify dependency on logger - [@rwstauner](https://github.com/rwstauner).
7+
* [#524](https://github.com/slack-ruby-client/pulls/524): Update API from [slack-api-ref@3ec3c10](https://github.com/slack-ruby/slack-api-ref/commit/3ec3c10) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
78
* Your contribution here.
89

910
### 2.4.0 (2024/07/14)

bin/commands/admin_conversations.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ class App
133133
end
134134
end
135135

136+
g.desc 'Link a Salesforce record to a channel'
137+
g.long_desc %( Link a Salesforce record to a channel )
138+
g.command 'linkObjects' do |c|
139+
c.flag 'channel', desc: 'Channel ID for Slack channel that will be linked to a Salesforce record.'
140+
c.flag 'record_id', desc: 'Salesforce record ID (15 or 18 digit accepted). See here for how to look up record ID.'
141+
c.flag 'salesforce_org_id', desc: 'Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.'
142+
c.action do |_global_options, options, _args|
143+
puts JSON.dump(@client.admin_conversations_linkObjects(options))
144+
end
145+
end
146+
136147
g.desc 'Returns channels on the given team using the filters.'
137148
g.long_desc %( Returns channels on the given team using the filters. )
138149
g.command 'lookup' do |c|
@@ -222,6 +233,16 @@ class App
222233
puts JSON.dump(@client.admin_conversations_unarchive(options))
223234
end
224235
end
236+
237+
g.desc 'Unlink a Salesforce record from a channel'
238+
g.long_desc %( Unlink a Salesforce record from a channel )
239+
g.command 'unlinkObjects' do |c|
240+
c.flag 'channel', desc: 'Channel ID for Slack channel that will be unlinked from the Salesforce record.'
241+
c.flag 'new_name', desc: 'Channel name you would like to give to the channel that is being unlinked from the Salesforce record.'
242+
c.action do |_global_options, options, _args|
243+
puts JSON.dump(@client.admin_conversations_unlinkObjects(options))
244+
end
245+
end
225246
end
226247
end
227248
end

bin/commands/admin_users_session.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class App
2828
g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
2929
g.command 'invalidate' do |c|
3030
c.flag 'session_id', desc: 'ID of the session to invalidate.'
31-
c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
31+
c.flag 'user_id', desc: 'ID of the user that the session belongs to.'
3232
c.action do |_global_options, options, _args|
3333
puts JSON.dump(@client.admin_users_session_invalidate(options))
3434
end

bin/commands/admin_workflows.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ class App
1010
g.long_desc %( Search workflows within the team or enterprise )
1111
g.command 'search' do |c|
1212
c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
13-
c.flag 'collaborator_ids', desc: 'Only include workflows where the provided user IDs are a manager/collaborator of that workflow.'
13+
c.flag 'collaborator_ids', desc: 'Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.'
1414
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
1515
c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
1616
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
1717
c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
1818
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 10.'
19+
c.flag 'publish_status', desc: 'Filter workflows by their published status.'
1920
c.flag 'query', desc: 'A search query to filter for workflow name or description.'
2021
c.flag 'sort', desc: 'The field used to sort the returned workflows.'
2122
c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
2223
c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
24+
c.flag 'step_function_ids', desc: 'Only include workflows that use all of the provided step function ids.'
2325
c.flag 'trigger_type_id', desc: 'Only include workflows with this trigger type.'
2426
c.action do |_global_options, options, _args|
2527
puts JSON.dump(@client.admin_workflows_search(options))

bin/commands/admin_workflows_triggers_types_permissions.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ module Cli
66
class App
77
desc 'AdminWorkflowsTriggersTypesPermissions methods.'
88
command 'admin_workflows_triggers_types_permissions' do |g|
9-
g.desc 'list the permissions for using each trigger type in workflow builder'
10-
g.long_desc %( list the permissions for using each trigger type in workflow builder )
9+
g.desc 'list the permissions for using each trigger type'
10+
g.long_desc %( list the permissions for using each trigger type )
1111
g.command 'lookup' do |c|
1212
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
1313
c.action do |_global_options, options, _args|
1414
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options))
1515
end
1616
end
1717

18-
g.desc 'Set the permissions for using a trigger type in workflow builder'
19-
g.long_desc %( Set the permissions for using a trigger type in workflow builder )
18+
g.desc 'Set the permissions for using a trigger type'
19+
g.long_desc %( Set the permissions for using a trigger type )
2020
g.command 'set' do |c|
2121
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
2222
c.flag 'visibility', desc: 'The function visibility.'

bin/commands/assistant_threads.rb

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 'AssistantThreads methods.'
8+
command 'assistant_threads' do |g|
9+
g.desc 'Set the status for an AI assistant thread.'
10+
g.long_desc %( Set the status for an AI assistant thread. )
11+
g.command 'setStatus' do |c|
12+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
13+
c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
14+
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
15+
c.action do |_global_options, options, _args|
16+
puts JSON.dump(@client.assistant_threads_setStatus(options))
17+
end
18+
end
19+
20+
g.desc 'Set suggested prompts for the given assistant thread'
21+
g.long_desc %( Set suggested prompts for the given assistant thread )
22+
g.command 'setSuggestedPrompts' do |c|
23+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
24+
c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
25+
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
26+
c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
27+
c.action do |_global_options, options, _args|
28+
puts JSON.dump(@client.assistant_threads_setSuggestedPrompts(options))
29+
end
30+
end
31+
32+
g.desc 'Set the title for the given assistant thread'
33+
g.long_desc %( Set the title for the given assistant thread )
34+
g.command 'setTitle' do |c|
35+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
36+
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
37+
c.flag 'title', desc: 'The title to use for the thread.'
38+
c.action do |_global_options, options, _args|
39+
puts JSON.dump(@client.assistant_threads_setTitle(options))
40+
end
41+
end
42+
end
43+
end
44+
end
45+
end

bin/commands/bookmarks.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 to add bookmark in.'
1313
c.flag 'title', desc: 'Title for the bookmark.'
1414
c.flag 'type', desc: 'Type of the bookmark i.e link.'
15+
c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
1516
c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
1617
c.flag 'entity_id', desc: 'ID of the entity being bookmarked. Only applies to message and file types.'
1718
c.flag 'link', desc: 'Link to bookmark.'

bin/commands/canvases.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module Cli
66
class App
77
desc 'Canvases methods.'
88
command 'canvases' do |g|
9-
g.desc 'Create Canvas for a user.'
10-
g.long_desc %( Create Canvas for a user. )
9+
g.desc 'Create canvas for a user'
10+
g.long_desc %( Create canvas for a user )
1111
g.command 'create' do |c|
1212
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
1313
c.flag 'title', desc: 'Title of the newly created canvas.'
@@ -16,8 +16,8 @@ class App
1616
end
1717
end
1818

19-
g.desc 'Deletes a canvas.'
20-
g.long_desc %( Deletes a canvas. )
19+
g.desc 'Deletes a canvas'
20+
g.long_desc %( Deletes a canvas )
2121
g.command 'delete' do |c|
2222
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
2323
c.action do |_global_options, options, _args|

bin/commands/canvases_access.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ class App
2020
g.desc 'Sets the access level to a canvas for specified entities'
2121
g.long_desc %( Sets the access level to a canvas for specified entities )
2222
g.command 'set' do |c|
23-
c.flag 'access_level', desc: 'Desired level of access (e.g. read, write).'
23+
c.flag 'access_level', desc: 'Desired level of access.'
2424
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
25-
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
26-
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
25+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
26+
c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
2727
c.action do |_global_options, options, _args|
2828
puts JSON.dump(@client.canvases_access_set(options))
2929
end

bin/commands/chat.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class App
7171
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
7272
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
7373
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
74+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
7475
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
7576
c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread."
7677
c.flag 'username', desc: "Set your bot's user name."
@@ -82,14 +83,15 @@ class App
8283
g.desc 'Sends a message to a channel.'
8384
g.long_desc %( Sends a message to a channel. )
8485
g.command 'postMessage' do |c|
85-
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
86+
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or IM channel to send the message to. See below for more details.'
8687
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
8788
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
8889
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
89-
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic Slack apps. See authorship below.'
90+
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.'
9091
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
9192
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
9293
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
94+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
9395
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.'
9496
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
9597
c.flag 'parse', desc: 'Change how messages are treated. See below.'
@@ -113,6 +115,7 @@ class App
113115
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
114116
c.flag 'as_user', desc: 'Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.'
115117
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
118+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
116119
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.'
117120
c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
118121
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
@@ -152,6 +155,7 @@ class App
152155
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
153156
c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
154157
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.'
158+
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
155159
c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
156160
c.flag 'parse', desc: 'Change how messages are treated. Defaults to client, unlike chat.postMessage. Accepts either none or full. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, client.'
157161
c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'

0 commit comments

Comments
 (0)