Skip to content

Commit bbec5ce

Browse files
committed
Update API from slack-api-ref@3ec3c10 (2024-11-05)
1 parent 56995cc commit bbec5ce

23 files changed

+369
-32
lines changed

CHANGELOG.md

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

33
* [#525](https://github.com/slack-ruby/slack-ruby-client/pull/525): Exclude spec files from gem package - [@amatsuda](https://github.com/amatsuda).
4+
* [#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).
45
* Your contribution here.
56

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

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/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/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/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

bin/commands/conversations_canvases.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module Cli
66
class App
77
desc 'ConversationsCanvases methods.'
88
command 'conversations_canvases' do |g|
9-
g.desc 'Create a Channel Canvas for a channel.'
10-
g.long_desc %( Create a Channel Canvas for a channel. )
9+
g.desc 'Create a channel canvas for a channel'
10+
g.long_desc %( Create a channel canvas for a channel )
1111
g.command 'create' do |c|
1212
c.flag 'channel_id', desc: 'Channel ID of the channel we create the channel canvas for.'
1313
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 'ConversationsRequestsharedinvite methods.'
8+
command 'conversations_requestSharedInvite' do |g|
9+
g.desc 'Approves a request to add an external user to a channel and sends them a Slack Connect invite'
10+
g.long_desc %( Approves a request to add an external user to a channel and sends them a Slack Connect invite )
11+
g.command 'approve' do |c|
12+
c.flag 'invite_id', desc: 'ID of the requested shared channel invite to approve.'
13+
c.flag 'channel_id', desc: 'Optional channel_id to which external user will be invited to. Will override the value on the requested invite.'
14+
c.flag 'is_external_limited', desc: 'Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.'
15+
c.flag 'message', desc: 'Object describing the text to send along with the invite. If this object is specified, both text and is_override are required properties. If is_override is set to true, text will override the original invitation message. Otherwise, text will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If is_override is set to false, the length of text and the user specified message on the invite request in total must be less than 560 characters.'
16+
c.action do |_global_options, options, _args|
17+
puts JSON.dump(@client.conversations_requestSharedInvite_approve(options))
18+
end
19+
end
20+
21+
g.desc 'Denies a request to invite an external user to a channel'
22+
g.long_desc %( Denies a request to invite an external user to a channel )
23+
g.command 'deny' do |c|
24+
c.flag 'invite_id', desc: 'ID of the requested shared channel invite to deny.'
25+
c.flag 'message', desc: 'Optional message explaining why the request to invite was denied.'
26+
c.action do |_global_options, options, _args|
27+
puts JSON.dump(@client.conversations_requestSharedInvite_deny(options))
28+
end
29+
end
30+
31+
g.desc 'Lists requests to add external users to channels with ability to filter.'
32+
g.long_desc %( Lists requests to add external users to channels with ability to filter. )
33+
g.command 'list' do |c|
34+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail."
35+
c.flag 'include_approved', desc: 'When true approved invitation requests will be returned, otherwise they will be excluded.'
36+
c.flag 'include_denied', desc: 'When true denied invitation requests will be returned, otherwise they will be excluded.'
37+
c.flag 'include_expired', desc: 'When true expired invitation requests will be returned, otherwise they will be excluded.'
38+
c.flag 'invite_ids', desc: 'An optional list of invitation ids to look up.'
39+
c.flag 'limit', desc: 'The number of items to return. Must be between 1 - 1000 (inclusive).'
40+
c.flag 'user_id', desc: 'Optional filter to return invitation requests for the inviting user.'
41+
c.action do |_global_options, options, _args|
42+
puts JSON.dump(@client.conversations_requestSharedInvite_list(options))
43+
end
44+
end
45+
end
46+
end
47+
end
48+
end

bin/commands/usergroups.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class App
1212
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
1313
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
1414
c.flag 'description', desc: 'A short description of the User Group.'
15+
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
1516
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
1617
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
1718
c.flag 'team_id', desc: 'Encoded team id where the user group has to be created, required if org token is used.'
@@ -60,6 +61,7 @@ class App
6061
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
6162
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
6263
c.flag 'description', desc: 'A short description of the User Group.'
64+
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
6365
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
6466
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
6567
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'

lib/slack/web/api/endpoints.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
require_relative 'endpoints/apps_datastore'
4242
require_relative 'endpoints/apps_event_authorizations'
4343
require_relative 'endpoints/apps_manifest'
44+
require_relative 'endpoints/assistant_threads'
4445
require_relative 'endpoints/auth'
4546
require_relative 'endpoints/auth_teams'
4647
require_relative 'endpoints/bookmarks'
@@ -55,6 +56,7 @@
5556
require_relative 'endpoints/conversations'
5657
require_relative 'endpoints/conversations_canvases'
5758
require_relative 'endpoints/conversations_externalInvitePermissions'
59+
require_relative 'endpoints/conversations_requestSharedInvite'
5860
require_relative 'endpoints/dialog'
5961
require_relative 'endpoints/dnd'
6062
require_relative 'endpoints/emoji'
@@ -139,6 +141,7 @@ module Endpoints
139141
include AppsDatastore
140142
include AppsEventAuthorizations
141143
include AppsManifest
144+
include AssistantThreads
142145
include Auth
143146
include AuthTeams
144147
include Bookmarks
@@ -153,6 +156,7 @@ module Endpoints
153156
include Conversations
154157
include ConversationsCanvases
155158
include ConversationsExternalinvitepermissions
159+
include ConversationsRequestsharedinvite
156160
include Dialog
157161
include Dnd
158162
include Emoji

0 commit comments

Comments
 (0)