Skip to content

Commit 15bd1ca

Browse files
committed
Update API from slack-api-ref@1ee282e (2025-03-11)
1 parent f2423d4 commit 15bd1ca

19 files changed

+124
-19
lines changed

bin/commands/admin_conversations.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class App
219219
c.flag 'channel_id', desc: 'The encoded channel_id to add or remove to workspaces.'
220220
c.flag 'org_channel', desc: 'True if channel has to be converted to an org channel.'
221221
c.flag 'target_team_ids', desc: 'A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.'
222-
c.flag 'team_id', desc: 'The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.'
222+
c.flag 'team_id', desc: 'The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.'
223223
c.action do |_global_options, options, _args|
224224
puts JSON.dump(@client.admin_conversations_setTeams(options))
225225
end

bin/commands/admin_users.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class App
4444
c.flag 'include_deactivated_user_workspaces', desc: 'Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.'
4545
c.flag 'is_active', desc: 'If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.'
4646
c.flag 'limit', desc: 'Limit for how many users to be retrieved per page.'
47-
c.flag 'team_id', desc: 'The ID (T1234) of the workspace. The team_id is required if you use an org-level token.'
47+
c.flag 'team_id', desc: 'The ID (T1234) of a workspace. Filters results to just the specified workspace.'
4848
c.action do |_global_options, options, _args|
4949
puts JSON.dump(@client.admin_users_list(options))
5050
end

bin/commands/assistant_search.rb

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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 'AssistantSearch methods.'
8+
command 'assistant_search' do |g|
9+
g.desc 'Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.'
10+
g.long_desc %( Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval. )
11+
g.command 'context' do |c|
12+
c.flag 'query', desc: 'User prompt or search query.'
13+
c.flag 'action_token', desc: 'Send action_token as received in a message event.'
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+
c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files.'
16+
c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
17+
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.'
18+
c.flag 'include_bots', desc: 'If you want the results to include bots.'
19+
c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
20+
c.action do |_global_options, options, _args|
21+
puts JSON.dump(@client.assistant_search_context(options))
22+
end
23+
end
24+
end
25+
end
26+
end
27+
end

bin/commands/files.rb

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class App
1010
g.long_desc %( Finishes an upload started with files.getUploadURLExternal )
1111
g.command 'completeUploadExternal' do |c|
1212
c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
13+
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
1314
c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
1415
c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
1516
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'

bin/commands/functions_distributions_permissions.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class App
1818
end
1919
end
2020

21-
g.desc 'List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities'
22-
g.long_desc %( List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities )
21+
g.desc 'List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities'
22+
g.long_desc %( List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities )
2323
g.command 'list' do |c|
2424
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
2525
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
@@ -41,13 +41,15 @@ class App
4141
end
4242
end
4343

44-
g.desc 'Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities'
45-
g.long_desc %( Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities )
44+
g.desc 'Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities'
45+
g.long_desc %( Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities )
4646
g.command 'set' do |c|
4747
c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
4848
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
4949
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
5050
c.flag 'function_id', desc: 'The encoded ID of the function.'
51+
c.flag 'org_ids', desc: 'List of org IDs to allow for named_entities permission.'
52+
c.flag 'team_ids', desc: 'List of team IDs to allow for named_entities permission.'
5153
c.flag 'user_ids', desc: 'List of encoded user IDs.'
5254
c.action do |_global_options, options, _args|
5355
puts JSON.dump(@client.functions_distributions_permissions_set(options))

bin/commands/usergroups.rb

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class App
5151
c.flag 'include_disabled', desc: 'Include disabled User Groups.'
5252
c.flag 'include_users', desc: 'Include the list of users for each User Group.'
5353
c.flag 'team_id', desc: 'encoded team id to list user groups in, required if org token is used.'
54-
c.flag 'usergroup_id', desc: 'The id of the usergroup you would like to filter the results down to.'
5554
c.action do |_global_options, options, _args|
5655
puts JSON.dump(@client.usergroups_list(options))
5756
end

lib/slack/web/api/endpoints.rb

+2
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_search'
4445
require_relative 'endpoints/assistant_threads'
4546
require_relative 'endpoints/auth'
4647
require_relative 'endpoints/auth_teams'
@@ -141,6 +142,7 @@ module Endpoints
141142
include AppsDatastore
142143
include AppsEventAuthorizations
143144
include AppsManifest
145+
include AssistantSearch
144146
include AssistantThreads
145147
include Auth
146148
include AuthTeams

lib/slack/web/api/endpoints/admin_conversations.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def admin_conversations_setCustomRetention(options = {})
338338
# @option options [array] :target_team_ids
339339
# A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
340340
# @option options [Object] :team_id
341-
# The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
341+
# The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.
342342
# @see https://api.slack.com/methods/admin.conversations.setTeams
343343
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setTeams.json
344344
def admin_conversations_setTeams(options = {})

lib/slack/web/api/endpoints/admin_users.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def admin_users_invite(options = {})
7171
# @option options [integer] :limit
7272
# Limit for how many users to be retrieved per page.
7373
# @option options [Object] :team_id
74-
# The ID (T1234) of the workspace. The team_id is required if you use an org-level token.
74+
# The ID (T1234) of a workspace. Filters results to just the specified workspace.
7575
# @see https://api.slack.com/methods/admin.users.list
7676
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.list.json
7777
def admin_users_list(options = {})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 AssistantSearch
9+
#
10+
# Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.
11+
#
12+
# @option options [string] :query
13+
# User prompt or search query.
14+
# @option options [string] :action_token
15+
# Send action_token as received in a message event.
16+
# @option options [array] :channel_types
17+
# Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.
18+
# @option options [array] :content_types
19+
# Content types to include, a comma-separated list of any combination of messages, files.
20+
# @option options [Object] :context_channel_id
21+
# Context channel ID to support scoping the search when applicable.
22+
# @option options [string] :cursor
23+
# The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.
24+
# @option options [boolean] :include_bots
25+
# If you want the results to include bots.
26+
# @option options [integer] :limit
27+
# Number of results to return, up to a max of 20. Defaults to 20.
28+
# @see https://api.slack.com/methods/assistant.search.context
29+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json
30+
def assistant_search_context(options = {})
31+
raise ArgumentError, 'Required arguments :query missing' if options[:query].nil?
32+
if block_given?
33+
Pagination::Cursor.new(self, :assistant_search_context, options).each do |page|
34+
yield page
35+
end
36+
else
37+
post('assistant.search.context', options)
38+
end
39+
end
40+
end
41+
end
42+
end
43+
end
44+
end

lib/slack/web/api/endpoints/conversations.rb

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ def conversations_join(options = {})
207207
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.kick.json
208208
def conversations_kick(options = {})
209209
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
210-
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
211210
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
212211
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
213212
post('conversations.kick', options)

lib/slack/web/api/endpoints/files.rb

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ module Files
1111
#
1212
# @option options [array] :files
1313
# Array of file ids and their corresponding (optional) titles.
14+
# @option options [blocks[] as string] :blocks
15+
# A JSON-based array of structured blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.
1416
# @option options [Object] :channel_id
1517
# Channel ID where the file will be shared. If not specified the file will be private.
1618
# @option options [string] :channels
@@ -23,6 +25,7 @@ module Files
2325
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
2426
def files_completeUploadExternal(options = {})
2527
raise ArgumentError, 'Required arguments :files missing' if options[:files].nil?
28+
options = encode_options_as_json(options, %i[blocks])
2629
post('files.completeUploadExternal', options)
2730
end
2831

lib/slack/web/api/endpoints/functions_distributions_permissions.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def functions_distributions_permissions_add(options = {})
2424
end
2525

2626
#
27-
# List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities
27+
# List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities
2828
#
2929
# @option options [string] :function_app_id
3030
# The encoded ID of the app.
@@ -56,7 +56,7 @@ def functions_distributions_permissions_remove(options = {})
5656
end
5757

5858
#
59-
# Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities
59+
# Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities
6060
#
6161
# @option options [enum] :permission_type
6262
# The type of permission that defines how the function can be distributed.
@@ -66,6 +66,10 @@ def functions_distributions_permissions_remove(options = {})
6666
# The callback ID defined in the function's definition file.
6767
# @option options [string] :function_id
6868
# The encoded ID of the function.
69+
# @option options [array] :org_ids
70+
# List of org IDs to allow for named_entities permission.
71+
# @option options [array] :team_ids
72+
# List of team IDs to allow for named_entities permission.
6973
# @option options [array] :user_ids
7074
# List of encoded user IDs.
7175
# @see https://api.slack.com/methods/functions.distributions.permissions.set

lib/slack/web/api/endpoints/usergroups.rb

-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def usergroups_enable(options = {})
7575
# Include the list of users for each User Group.
7676
# @option options [string] :team_id
7777
# encoded team id to list user groups in, required if org token is used.
78-
# @option options [Object] :usergroup_id
79-
# The id of the usergroup you would like to filter the results down to.
8078
# @see https://api.slack.com/methods/usergroups.list
8179
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json
8280
def usergroups_list(options = {})

0 commit comments

Comments
 (0)