Skip to content

Commit faf026f

Browse files
committed
Update API from slack-api-ref@3275786 (2025-12-15)
1 parent adfde85 commit faf026f

14 files changed

+221
-62
lines changed

CHANGELOG.md

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

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

56
### 3.1.0 (2025/11/15)

bin/commands/admin_users.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class App
7171
end
7272
end
7373

74-
g.desc 'Set an existing regular user or owner to be a workspace admin.'
75-
g.long_desc %( Set an existing regular user or owner to be a workspace admin. )
74+
g.desc 'Set an existing regular user or owner to be a workspace or org admin.'
75+
g.long_desc %( Set an existing regular user or owner to be a workspace or org admin. )
7676
g.command 'setAdmin' do |c|
77-
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
77+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
7878
c.flag 'user_id', desc: 'The ID of the user to designate as an admin.'
7979
c.action do |_global_options, options, _args|
8080
puts JSON.dump(@client.admin_users_setAdmin(options))
@@ -92,11 +92,11 @@ class App
9292
end
9393
end
9494

95-
g.desc 'Set an existing regular user or admin to be a workspace owner.'
96-
g.long_desc %( Set an existing regular user or admin to be a workspace owner. )
95+
g.desc 'Set an existing regular user or admin to be a workspace or org owner.'
96+
g.long_desc %( Set an existing regular user or admin to be a workspace or org owner. )
9797
g.command 'setOwner' do |c|
98-
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
99-
c.flag 'user_id', desc: 'Id of the user to promote to owner.'
98+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
99+
c.flag 'user_id', desc: 'ID of the user to promote to owner.'
100100
c.action do |_global_options, options, _args|
101101
puts JSON.dump(@client.admin_users_setOwner(options))
102102
end
@@ -105,7 +105,7 @@ class App
105105
g.desc 'Set an existing guest user, admin user, or owner to be a regular user.'
106106
g.long_desc %( Set an existing guest user, admin user, or owner to be a regular user. )
107107
g.command 'setRegular' do |c|
108-
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
108+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
109109
c.flag 'user_id', desc: 'The ID of the user to designate as a regular user.'
110110
c.action do |_global_options, options, _args|
111111
puts JSON.dump(@client.admin_users_setRegular(options))

bin/commands/admin_workflows_triggers_types_permissions.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ 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'
10-
g.long_desc %( list the permissions for using each trigger type )
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|
12-
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
12+
c.flag 'trigger_type_ids', desc: 'The trigger type 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
@@ -21,6 +21,7 @@ class App
2121
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
2222
c.flag 'visibility', desc: 'The function visibility.'
2323
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
24+
c.flag 'permissions', desc: ''
2425
c.action do |_global_options, options, _args|
2526
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(options))
2627
end

bin/commands/assistant_threads.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class App
1111
g.command 'setStatus' do |c|
1212
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
1313
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
14-
c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
15-
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator.'
14+
c.flag 'status', desc: "Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent."
15+
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator. Maximum of 10 messages.'
1616
c.action do |_global_options, options, _args|
1717
puts JSON.dump(@client.assistant_threads_setStatus(options))
1818
end

bin/commands/chat.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class App
103103
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
104104
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
105105
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.'
106-
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.'
106+
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
107107
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
108108
c.flag 'parse', desc: 'Change how messages are treated. See below.'
109109
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.'
@@ -142,7 +142,7 @@ class App
142142
g.desc 'Starts a new streaming conversation.'
143143
g.long_desc %( Starts a new streaming conversation. )
144144
g.command 'startStream' do |c|
145-
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
145+
c.flag 'channel', desc: 'An encoded ID that represents a channel thread or DM.'
146146
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
147147
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
148148
c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
@@ -177,7 +177,7 @@ class App
177177
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
178178
c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
179179
c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
180-
c.flag 'metadata', desc: 'JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.'
180+
c.flag 'metadata', desc: 'JSON object with an entities field providing an array of Work Object entities. Either unfurls or metadata must be provided.'
181181
c.action do |_global_options, options, _args|
182182
puts JSON.dump(@client.chat_unfurl(options))
183183
end

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ def admin_users_remove(options = {})
115115
end
116116

117117
#
118-
# Set an existing regular user or owner to be a workspace admin.
118+
# Set an existing regular user or owner to be a workspace or org admin.
119119
#
120120
# @option options [Object] :team_id
121-
# The ID (T1234) of the workspace.
121+
# The ID of the workspace or organization.
122122
# @option options [string] :user_id
123123
# The ID of the user to designate as an admin.
124124
# @see https://api.slack.com/methods/admin.users.setAdmin
@@ -147,12 +147,12 @@ def admin_users_setExpiration(options = {})
147147
end
148148

149149
#
150-
# Set an existing regular user or admin to be a workspace owner.
150+
# Set an existing regular user or admin to be a workspace or org owner.
151151
#
152152
# @option options [Object] :team_id
153-
# The ID (T1234) of the workspace.
153+
# The ID of the workspace or organization.
154154
# @option options [Object] :user_id
155-
# Id of the user to promote to owner.
155+
# ID of the user to promote to owner.
156156
# @see https://api.slack.com/methods/admin.users.setOwner
157157
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setOwner.json
158158
def admin_users_setOwner(options = {})
@@ -165,7 +165,7 @@ def admin_users_setOwner(options = {})
165165
# Set an existing guest user, admin user, or owner to be a regular user.
166166
#
167167
# @option options [Object] :team_id
168-
# The ID (T1234) of the workspace.
168+
# The ID of the workspace or organization.
169169
# @option options [string] :user_id
170170
# The ID of the user to designate as a regular user.
171171
# @see https://api.slack.com/methods/admin.users.setRegular

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ module Api
77
module Endpoints
88
module AdminWorkflowsTriggersTypesPermissions
99
#
10-
# list the permissions for using each trigger type
10+
# List the permissions for using each trigger type.
1111
#
1212
# @option options [array] :trigger_type_ids
13-
# The trigger types IDs for which to get the permissions.
13+
# The trigger type IDs for which to get the permissions.
1414
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup
1515
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json
1616
def admin_workflows_triggers_types_permissions_lookup(options = {})
@@ -27,11 +27,11 @@ def admin_workflows_triggers_types_permissions_lookup(options = {})
2727
# The function visibility.
2828
# @option options [array] :user_ids
2929
# List of user IDs to allow for named_entities visibility.
30+
# @option options [object] :permissions
3031
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set
3132
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json
3233
def admin_workflows_triggers_types_permissions_set(options = {})
3334
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
34-
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
3535
post('admin.workflows.triggers.types.permissions.set', options)
3636
end
3737
end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ module AssistantThreads
1414
# @option options [string] :thread_ts
1515
# Message timestamp of the thread of where to set the status.
1616
# @option options [string] :status
17-
# Status of the specified bot user, e.g. 'is thinking...'.
17+
# Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent.
1818
# @option options [array] :loading_messages
19-
# The list of messages to rotate through as a loading indicator.
19+
# The list of messages to rotate through as a loading indicator. Maximum of 10 messages.
2020
# @see https://api.slack.com/methods/assistant.threads.setStatus
2121
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
2222
def assistant_threads_setStatus(options = {})

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def chat_meMessage(options = {})
144144
def chat_postEphemeral(options = {})
145145
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
146146
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
147-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
147+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
148+
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
148149
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
149150
options = encode_options_as_json(options, %i[attachments blocks])
150151
post('chat.postEphemeral', options)
@@ -172,7 +173,7 @@ def chat_postEphemeral(options = {})
172173
# @option options [string] :markdown_text
173174
# 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.
174175
# @option options [string] :metadata
175-
# 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.
176+
# JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.
176177
# @option options [boolean] :mrkdwn
177178
# Disable Slack markup parsing by setting to false. Enabled by default.
178179
# @option options [string] :parse
@@ -193,7 +194,8 @@ def chat_postEphemeral(options = {})
193194
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
194195
def chat_postMessage(options = {})
195196
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
196-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
197+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
198+
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
197199
options = encode_options_as_json(options, %i[attachments blocks metadata])
198200
post('chat.postMessage', options)
199201
end
@@ -234,7 +236,8 @@ def chat_postMessage(options = {})
234236
def chat_scheduleMessage(options = {})
235237
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
236238
raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
237-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
239+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
240+
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
238241
options = encode_options_as_json(options, %i[attachments blocks metadata])
239242
post('chat.scheduleMessage', options)
240243
end
@@ -243,7 +246,7 @@ def chat_scheduleMessage(options = {})
243246
# Starts a new streaming conversation.
244247
#
245248
# @option options [channel] :channel
246-
# An encoded ID that represents a channel, private group, or DM.
249+
# An encoded ID that represents a channel thread or DM.
247250
# @option options [string] :markdown_text
248251
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
249252
# @option options [string] :thread_ts
@@ -306,7 +309,7 @@ def chat_stopStream(options = {})
306309
# @option options [enum] :source
307310
# The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.
308311
# @option options [string] :metadata
309-
# JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.
312+
# JSON object with an entities field providing an array of Work Object entities. Either unfurls or metadata must be provided.
310313
# @see https://api.slack.com/methods/chat.unfurl
311314
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
312315
def chat_unfurl(options = {})
@@ -347,7 +350,8 @@ def chat_unfurl(options = {})
347350
def chat_update(options = {})
348351
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
349352
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
350-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
353+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
354+
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
351355
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
352356
options = encode_options_as_json(options, %i[attachments blocks metadata])
353357
post('chat.update', options)

0 commit comments

Comments
 (0)