Skip to content

Commit ea0c987

Browse files
committed
Update API from slack-api-ref@3ec3c10 (2024-12-14)
1 parent 9edd5ff commit ea0c987

32 files changed

+468
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [#525](https://github.com/slack-ruby/slack-ruby-client/pull/525): Exclude spec files from gem package - [@amatsuda](https://github.com/amatsuda).
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).
6+
* [#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).
67
* Your contribution here.
78

89
### 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +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 'user_id', desc: 'ID of the user that the session belongs to.'
3132
c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
3233
c.action do |_global_options, options, _args|
3334
puts JSON.dump(@client.admin_users_session_invalidate(options))

bin/commands/admin_workflows.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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.'

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ 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 (e.g. read, write, owner).'
2424
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
2525
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
2626
c.flag 'user_ids', desc: 'List of users you wish to update access for.'

bin/commands/chat.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class App
8282
g.desc 'Sends a message to a channel.'
8383
g.long_desc %( Sends a message to a channel. )
8484
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.'
85+
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.'
8686
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
8787
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
8888
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.'
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 apps. See legacy as_user parameter below.'
9090
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
9191
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
9292
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'

bin/commands/conversations.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class App
111111
g.command 'inviteShared' do |c|
112112
c.flag 'channel', desc: "ID of the channel on your team that you'd like to share."
113113
c.flag 'emails', desc: 'Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
114-
c.flag 'external_limited', desc: 'Optional boolean on whether invite is to a external limited member. Defaults to true.'
114+
c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
115115
c.flag 'user_ids', desc: 'Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
116116
c.action do |_global_options, options, _args|
117117
puts JSON.dump(@client.conversations_inviteShared(options))
@@ -228,11 +228,11 @@ class App
228228
end
229229
end
230230

231-
g.desc 'Sets the purpose for a conversation.'
232-
g.long_desc %( Sets the purpose for a conversation. )
231+
g.desc 'Sets the channel description.'
232+
g.long_desc %( Sets the channel description. )
233233
g.command 'setPurpose' do |c|
234-
c.flag 'channel', desc: 'Conversation to set the purpose of.'
235-
c.flag 'purpose', desc: 'A new, specialer purpose.'
234+
c.flag 'channel', desc: 'Channel to set the description of.'
235+
c.flag 'purpose', desc: 'The description.'
236236
c.action do |_global_options, options, _args|
237237
puts JSON.dump(@client.conversations_setPurpose(options))
238238
end

0 commit comments

Comments
 (0)