Skip to content

Commit 9095291

Browse files
committed
Update API from slack-api-ref@c408935 (2025-07-21)
1 parent 0a9401f commit 9095291

File tree

13 files changed

+316
-7
lines changed

13 files changed

+316
-7
lines changed

CHANGELOG.md

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

3+
* [#558](https://github.com/slack-ruby/slack-ruby-client/pull/558): Update API from [slack-api-ref@c408935](https://github.com/slack-ruby/slack-api-ref/commit/c408935) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
34
* Your contribution here.
45

56
### 2.7.0 (2025/07/20)

bin/commands/admin_apps_config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class App
1010
g.long_desc %( Look up the app config for connectors by their IDs )
1111
g.command 'lookup' do |c|
1212
c.flag 'app_ids', desc: 'An array of app IDs to get app configs for.'
13+
c.flag 'rich_link_preview_types', desc: 'return apps with the corresponding rich link preview layouts.'
1314
c.action do |_global_options, options, _args|
1415
puts JSON.dump(@client.admin_apps_config_lookup(options))
1516
end
@@ -20,6 +21,7 @@ class App
2021
g.command 'set' do |c|
2122
c.flag 'app_id', desc: 'The encoded app ID to set the app config for.'
2223
c.flag 'domain_restrictions', desc: 'Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.'
24+
c.flag 'rich_link_preview_type', desc: 'Indicates the app-level override for rich link preview. Unsupported for free teams.'
2325
c.flag 'workflow_auth_strategy', desc: 'The workflow auth permission. Can be one of builder_choice or end_user_only.'
2426
c.action do |_global_options, options, _args|
2527
puts JSON.dump(@client.admin_apps_config_set(options))

bin/commands/slackLists_items.rb

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 'SlackListsItems methods.'
8+
command 'slackLists_items' do |g|
9+
g.desc 'Deletes an item from an existing list.'
10+
g.long_desc %( Deletes an item from an existing list. )
11+
g.command 'delete' do |c|
12+
c.flag 'id', desc: 'Id of item to delete.'
13+
c.flag 'list_id', desc: 'Id of list that contains the item.'
14+
c.action do |_global_options, options, _args|
15+
puts JSON.dump(@client.slackLists_items_delete(options))
16+
end
17+
end
18+
19+
g.desc 'Deletes multiple items from an existing list.'
20+
g.long_desc %( Deletes multiple items from an existing list. )
21+
g.command 'deleteMultiple' do |c|
22+
c.flag 'ids', desc: 'Ids of items to delete.'
23+
c.flag 'list_id', desc: 'Id of list that contains the items.'
24+
c.action do |_global_options, options, _args|
25+
puts JSON.dump(@client.slackLists_items_deleteMultiple(options))
26+
end
27+
end
28+
29+
g.desc 'Get records from a list'
30+
g.long_desc %( Get records from a list )
31+
g.command 'list' do |c|
32+
c.flag 'list_id', desc: 'Id of list.'
33+
c.flag 'archived', desc: 'Boolean indicating whether archived items or normal items should be returned.'
34+
c.flag 'cursor', desc: 'Next cursor for pagination.'
35+
c.flag 'limit', desc: 'The maximum number of records to return.'
36+
c.action do |_global_options, options, _args|
37+
puts JSON.dump(@client.slackLists_items_list(options))
38+
end
39+
end
40+
end
41+
end
42+
end
43+
end

bin/commands/workflows_featured.rb

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 'WorkflowsFeatured methods.'
8+
command 'workflows_featured' do |g|
9+
g.desc 'Add featured workflows to a channel.'
10+
g.long_desc %( Add featured workflows to a channel. )
11+
g.command 'add' do |c|
12+
c.flag 'channel_id', desc: 'Channel to add featured workflow in.'
13+
c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs to add; max 15.'
14+
c.action do |_global_options, options, _args|
15+
puts JSON.dump(@client.workflows_featured_add(options))
16+
end
17+
end
18+
19+
g.desc 'List the featured workflows for specified channels.'
20+
g.long_desc %( List the featured workflows for specified channels. )
21+
g.command 'list' do |c|
22+
c.flag 'channel_ids', desc: 'Comma-separated array of channel IDs to list featured workflows for.'
23+
c.action do |_global_options, options, _args|
24+
puts JSON.dump(@client.workflows_featured_list(options))
25+
end
26+
end
27+
28+
g.desc 'Remove featured workflows from a channel.'
29+
g.long_desc %( Remove featured workflows from a channel. )
30+
g.command 'remove' do |c|
31+
c.flag 'channel_id', desc: 'Channel to remove featured workflow from.'
32+
c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs to remove; max 15.'
33+
c.action do |_global_options, options, _args|
34+
puts JSON.dump(@client.workflows_featured_remove(options))
35+
end
36+
end
37+
38+
g.desc 'Set featured workflows for a channel.'
39+
g.long_desc %( Set featured workflows for a channel. )
40+
g.command 'set' do |c|
41+
c.flag 'channel_id', desc: 'Channel to set featured workflows in.'
42+
c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15.'
43+
c.action do |_global_options, options, _args|
44+
puts JSON.dump(@client.workflows_featured_set(options))
45+
end
46+
end
47+
end
48+
end
49+
end
50+
end

lib/slack/web/api/endpoints.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
require_relative 'endpoints/reminders'
7878
require_relative 'endpoints/rtm'
7979
require_relative 'endpoints/search'
80+
require_relative 'endpoints/slackLists_items'
8081
require_relative 'endpoints/stars'
8182
require_relative 'endpoints/team'
8283
require_relative 'endpoints/team_billing'
@@ -93,6 +94,7 @@
9394
require_relative 'endpoints/users_profile'
9495
require_relative 'endpoints/views'
9596
require_relative 'endpoints/workflows'
97+
require_relative 'endpoints/workflows_featured'
9698
require_relative 'endpoints/workflows_triggers_permissions'
9799

98100
module Slack
@@ -178,6 +180,7 @@ module Endpoints
178180
include Reminders
179181
include Rtm
180182
include Search
183+
include SlackListsItems
181184
include Stars
182185
include Team
183186
include TeamBilling
@@ -194,6 +197,7 @@ module Endpoints
194197
include UsersProfile
195198
include Views
196199
include Workflows
200+
include WorkflowsFeatured
197201
include WorkflowsTriggersPermissions
198202
end
199203
end

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ module AdminAppsConfig
1111
#
1212
# @option options [array] :app_ids
1313
# An array of app IDs to get app configs for.
14+
# @option options [array] :rich_link_preview_types
15+
# return apps with the corresponding rich link preview layouts.
1416
# @see https://api.slack.com/methods/admin.apps.config.lookup
1517
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.config/admin.apps.config.lookup.json
1618
def admin_apps_config_lookup(options = {})
17-
raise ArgumentError, 'Required arguments :app_ids missing' if options[:app_ids].nil?
1819
post('admin.apps.config.lookup', options)
1920
end
2021

@@ -25,6 +26,8 @@ def admin_apps_config_lookup(options = {})
2526
# The encoded app ID to set the app config for.
2627
# @option options [object] :domain_restrictions
2728
# Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.
29+
# @option options [enum] :rich_link_preview_type
30+
# Indicates the app-level override for rich link preview. Unsupported for free teams.
2831
# @option options [enum] :workflow_auth_strategy
2932
# The workflow auth permission. Can be one of builder_choice or end_user_only.
3033
# @see https://api.slack.com/methods/admin.apps.config.set
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 SlackListsItems
9+
#
10+
# Deletes an item from an existing list.
11+
#
12+
# @option options [string] :id
13+
# Id of item to delete.
14+
# @option options [string] :list_id
15+
# Id of list that contains the item.
16+
# @see https://api.slack.com/methods/slackLists.items.delete
17+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.delete.json
18+
def slackLists_items_delete(options = {})
19+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
20+
raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
21+
post('slackLists.items.delete', options)
22+
end
23+
24+
#
25+
# Deletes multiple items from an existing list.
26+
#
27+
# @option options [array] :ids
28+
# Ids of items to delete.
29+
# @option options [string] :list_id
30+
# Id of list that contains the items.
31+
# @see https://api.slack.com/methods/slackLists.items.deleteMultiple
32+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.deleteMultiple.json
33+
def slackLists_items_deleteMultiple(options = {})
34+
raise ArgumentError, 'Required arguments :ids missing' if options[:ids].nil?
35+
raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
36+
post('slackLists.items.deleteMultiple', options)
37+
end
38+
39+
#
40+
# Get records from a list
41+
#
42+
# @option options [string] :list_id
43+
# Id of list.
44+
# @option options [boolean] :archived
45+
# Boolean indicating whether archived items or normal items should be returned.
46+
# @option options [string] :cursor
47+
# Next cursor for pagination.
48+
# @option options [integer] :limit
49+
# The maximum number of records to return.
50+
# @see https://api.slack.com/methods/slackLists.items.list
51+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.list.json
52+
def slackLists_items_list(options = {})
53+
raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
54+
if block_given?
55+
Pagination::Cursor.new(self, :slackLists_items_list, options).each do |page|
56+
yield page
57+
end
58+
else
59+
post('slackLists.items.list', options)
60+
end
61+
end
62+
end
63+
end
64+
end
65+
end
66+
end
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 WorkflowsFeatured
9+
#
10+
# Add featured workflows to a channel.
11+
#
12+
# @option options [string] :channel_id
13+
# Channel to add featured workflow in.
14+
# @option options [array] :trigger_ids
15+
# Comma-separated array of trigger IDs to add; max 15.
16+
# @see https://api.slack.com/methods/workflows.featured.add
17+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.featured/workflows.featured.add.json
18+
def workflows_featured_add(options = {})
19+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
20+
raise ArgumentError, 'Required arguments :trigger_ids missing' if options[:trigger_ids].nil?
21+
post('workflows.featured.add', options)
22+
end
23+
24+
#
25+
# List the featured workflows for specified channels.
26+
#
27+
# @option options [array] :channel_ids
28+
# Comma-separated array of channel IDs to list featured workflows for.
29+
# @see https://api.slack.com/methods/workflows.featured.list
30+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.featured/workflows.featured.list.json
31+
def workflows_featured_list(options = {})
32+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
33+
post('workflows.featured.list', options)
34+
end
35+
36+
#
37+
# Remove featured workflows from a channel.
38+
#
39+
# @option options [string] :channel_id
40+
# Channel to remove featured workflow from.
41+
# @option options [array] :trigger_ids
42+
# Comma-separated array of trigger IDs to remove; max 15.
43+
# @see https://api.slack.com/methods/workflows.featured.remove
44+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.featured/workflows.featured.remove.json
45+
def workflows_featured_remove(options = {})
46+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
47+
raise ArgumentError, 'Required arguments :trigger_ids missing' if options[:trigger_ids].nil?
48+
post('workflows.featured.remove', options)
49+
end
50+
51+
#
52+
# Set featured workflows for a channel.
53+
#
54+
# @option options [string] :channel_id
55+
# Channel to set featured workflows in.
56+
# @option options [array] :trigger_ids
57+
# Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15.
58+
# @see https://api.slack.com/methods/workflows.featured.set
59+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.featured/workflows.featured.set.json
60+
def workflows_featured_set(options = {})
61+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
62+
raise ArgumentError, 'Required arguments :trigger_ids missing' if options[:trigger_ids].nil?
63+
post('workflows.featured.set', options)
64+
end
65+
end
66+
end
67+
end
68+
end
69+
end

lib/slack/web/api/errors.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class AppNotHosted < SlackError; end
3030
class AppRestrictedOrgWide < SlackError; end
3131
class ApprovalInactive < SlackError; end
3232
class ApprovalNotFound < SlackError; end
33+
class ArchiveNotSupported < SlackError; end
3334
class AsUserNotSupported < SlackError; end
3435
class AtLeastOneSessionSettingRequired < SlackError; end
3536
class AttachmentPayloadLimitExceeded < SlackError; end
@@ -185,9 +186,11 @@ class ErrorBadNameI18n < SlackError; end
185186
class ErrorBadUpload < SlackError; end
186187
class ErrorBadWide < SlackError; end
187188
class ErrorInvalidAlias < SlackError; end
189+
class ErrorInvalidChannels < SlackError; end
188190
class ErrorInvalidEmojiToRename < SlackError; end
189191
class ErrorLowerCaseNamesOnly < SlackError; end
190192
class ErrorMissingName < SlackError; end
193+
class ErrorModifyingWorkflows < SlackError; end
191194
class ErrorNameTaken < SlackError; end
192195
class ErrorNameTakenI18n < SlackError; end
193196
class ErrorNoImage < SlackError; end
@@ -409,6 +412,7 @@ class LegacyConnectionInvalidOrg < SlackError; end
409412
class LegacyConnectionLimitExceeded < SlackError; end
410413
class LimitRequired < SlackError; end
411414
class LinkNotFound < SlackError; end
415+
class ListNotFound < SlackError; end
412416
class ListRecordCommentFetchFailed < SlackError; end
413417
class MalwareDetected < SlackError; end
414418
class ManagedChannelNotSupported < SlackError; end
@@ -676,6 +680,7 @@ class UserDoesNotOwnChannel < SlackError; end
676680
class UserEmailUnverified < SlackError; end
677681
class UserIsAlreadyDeleted < SlackError; end
678682
class UserIsBot < SlackError; end
683+
class UserIsDeactivated < SlackError; end
679684
class UserIsNotAGuest < SlackError; end
680685
class UserIsRestricted < SlackError; end
681686
class UserIsUltraRestricted < SlackError; end
@@ -723,6 +728,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
723728
'app_restricted_org_wide' => AppRestrictedOrgWide,
724729
'approval_inactive' => ApprovalInactive,
725730
'approval_not_found' => ApprovalNotFound,
731+
'archive_not_supported' => ArchiveNotSupported,
726732
'as_user_not_supported' => AsUserNotSupported,
727733
'at_least_one_session_setting_required' => AtLeastOneSessionSettingRequired,
728734
'attachment_payload_limit_exceeded' => AttachmentPayloadLimitExceeded,
@@ -878,9 +884,11 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
878884
'error_bad_upload' => ErrorBadUpload,
879885
'error_bad_wide' => ErrorBadWide,
880886
'error_invalid_alias' => ErrorInvalidAlias,
887+
'error_invalid_channels' => ErrorInvalidChannels,
881888
'error_invalid_emoji_to_rename' => ErrorInvalidEmojiToRename,
882889
'error_lower_case_names_only' => ErrorLowerCaseNamesOnly,
883890
'error_missing_name' => ErrorMissingName,
891+
'error_modifying_workflows' => ErrorModifyingWorkflows,
884892
'error_name_taken' => ErrorNameTaken,
885893
'error_name_taken_i18n' => ErrorNameTakenI18n,
886894
'error_no_image' => ErrorNoImage,
@@ -1102,6 +1110,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
11021110
'legacy_connection_limit_exceeded' => LegacyConnectionLimitExceeded,
11031111
'limit_required' => LimitRequired,
11041112
'link_not_found' => LinkNotFound,
1113+
'list_not_found' => ListNotFound,
11051114
'list_record_comment_fetch_failed' => ListRecordCommentFetchFailed,
11061115
'malware_detected' => MalwareDetected,
11071116
'managed_channel_not_supported' => ManagedChannelNotSupported,
@@ -1369,6 +1378,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
13691378
'user_email_unverified' => UserEmailUnverified,
13701379
'user_is_already_deleted' => UserIsAlreadyDeleted,
13711380
'user_is_bot' => UserIsBot,
1381+
'user_is_deactivated' => UserIsDeactivated,
13721382
'user_is_not_a_guest' => UserIsNotAGuest,
13731383
'user_is_restricted' => UserIsRestricted,
13741384
'user_is_ultra_restricted' => UserIsUltraRestricted,

0 commit comments

Comments
 (0)