Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 3.1.1 (Next)

* [#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).
* Your contribution here.

### 3.1.0 (2025/11/15)
Expand Down
7 changes: 4 additions & 3 deletions bin/commands/admin_workflows_triggers_types_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module Cli
class App
desc 'AdminWorkflowsTriggersTypesPermissions methods.'
command 'admin_workflows_triggers_types_permissions' do |g|
g.desc 'list the permissions for using each trigger type'
g.long_desc %( list the permissions for using each trigger type )
g.desc 'List the permissions for using each trigger type.'
g.long_desc %( List the permissions for using each trigger type. )
g.command 'lookup' do |c|
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
c.flag 'trigger_type_ids', desc: 'The trigger type IDs for which to get the permissions.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options))
end
Expand All @@ -21,6 +21,7 @@ class App
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
c.flag 'visibility', desc: 'The function visibility.'
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
c.flag 'permissions', desc: ''
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(options))
end
Expand Down
4 changes: 2 additions & 2 deletions bin/commands/assistant_threads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class App
g.command 'setStatus' do |c|
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator.'
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."
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator. Maximum of 10 messages.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.assistant_threads_setStatus(options))
end
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class App
g.desc 'Starts a new streaming conversation.'
g.long_desc %( Starts a new streaming conversation. )
g.command 'startStream' do |c|
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
c.flag 'channel', desc: 'An encoded ID that represents a channel thread or DM.'
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ module Api
module Endpoints
module AdminWorkflowsTriggersTypesPermissions
#
# list the permissions for using each trigger type
# List the permissions for using each trigger type.
#
# @option options [array] :trigger_type_ids
# The trigger types IDs for which to get the permissions.
# The trigger type IDs for which to get the permissions.
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json
def admin_workflows_triggers_types_permissions_lookup(options = {})
Expand All @@ -27,11 +27,11 @@ def admin_workflows_triggers_types_permissions_lookup(options = {})
# The function visibility.
# @option options [array] :user_ids
# List of user IDs to allow for named_entities visibility.
# @option options [object] :permissions
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json
def admin_workflows_triggers_types_permissions_set(options = {})
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
post('admin.workflows.triggers.types.permissions.set', options)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/slack/web/api/endpoints/assistant_threads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ module AssistantThreads
# @option options [string] :thread_ts
# Message timestamp of the thread of where to set the status.
# @option options [string] :status
# Status of the specified bot user, e.g. 'is thinking...'.
# 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.
# @option options [array] :loading_messages
# The list of messages to rotate through as a loading indicator.
# The list of messages to rotate through as a loading indicator. Maximum of 10 messages.
# @see https://api.slack.com/methods/assistant.threads.setStatus
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
def assistant_threads_setStatus(options = {})
Expand Down
14 changes: 9 additions & 5 deletions lib/slack/web/api/endpoints/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def chat_meMessage(options = {})
def chat_postEphemeral(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
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?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
options = encode_options_as_json(options, %i[attachments blocks])
post('chat.postEphemeral', options)
Expand Down Expand Up @@ -193,7 +194,8 @@ def chat_postEphemeral(options = {})
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
def chat_postMessage(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
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?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = encode_options_as_json(options, %i[attachments blocks metadata])
post('chat.postMessage', options)
end
Expand Down Expand Up @@ -234,7 +236,8 @@ def chat_postMessage(options = {})
def chat_scheduleMessage(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
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?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = encode_options_as_json(options, %i[attachments blocks metadata])
post('chat.scheduleMessage', options)
end
Expand All @@ -243,7 +246,7 @@ def chat_scheduleMessage(options = {})
# Starts a new streaming conversation.
#
# @option options [channel] :channel
# An encoded ID that represents a channel, private group, or DM.
# An encoded ID that represents a channel thread or DM.
# @option options [string] :markdown_text
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
# @option options [string] :thread_ts
Expand Down Expand Up @@ -347,7 +350,8 @@ def chat_unfurl(options = {})
def chat_update(options = {})
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
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?
raise ArgumentError, 'Exactly one of :text, :markdown_text is required' unless options[:text].nil? ^ options[:markdown_text].nil?
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
options = encode_options_as_json(options, %i[attachments blocks metadata])
post('chat.update', options)
Expand Down
16 changes: 16 additions & 0 deletions lib/slack/web/api/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,11 @@ class FileChannelRenameError < SlackError; end
class FileCommentNotFound < SlackError; end
class FileDeleted < SlackError; end
class FileDeletingDisabled < SlackError; end
class FileIsDeleted < SlackError; end
class FileNotFound < SlackError; end
class FileNotShared < SlackError; end
class FileNotYetAvailable < SlackError; end
class FileShareLimitReached < SlackError; end
class FileUnderReview < SlackError; end
class FileUpdateFailed < SlackError; end
class FileUploadSizeRestricted < SlackError; end
Expand Down Expand Up @@ -359,6 +361,7 @@ class InvalidOptionId < SlackError; end
class InvalidOrgId < SlackError; end
class InvalidParameters < SlackError; end
class InvalidParentType < SlackError; end
class InvalidPermissionSet < SlackError; end
class InvalidPermissionType < SlackError; end
class InvalidPermissions < SlackError; end
class InvalidPhoneNumber < SlackError; end
Expand Down Expand Up @@ -446,11 +449,13 @@ class ListsDisabledUserTeam < SlackError; end
class MalwareDetected < SlackError; end
class ManagedChannelNotSupported < SlackError; end
class MarkdownTextConflict < SlackError; end
class MaxFileSharingExceeded < SlackError; end
class MemberAnalyticsDisabled < SlackError; end
class MemberLimitExceeded < SlackError; end
class MessageLimitExceeded < SlackError; end
class MessageNotFound < SlackError; end
class MessageNotInStreamingState < SlackError; end
class MessageNotOwnedByBot < SlackError; end
class MessageTooLong < SlackError; end
class MessagesTabDisabled < SlackError; end
class MessagingProcessingFailed < SlackError; end
Expand Down Expand Up @@ -612,6 +617,7 @@ class RequestAlreadyResolved < SlackError; end
class RequestIdOrAppIdIsRequired < SlackError; end
class RequestIdRequiredForCustomIntegrations < SlackError; end
class RequestTimeout < SlackError; end
class RequiredVisibility < SlackError; end
class ReservedName < SlackError; end
class ResizedButStillTooLarge < SlackError; end
class RestrictedAction < SlackError; end
Expand Down Expand Up @@ -651,6 +657,7 @@ class TargetTeamNotOnOrg < SlackError; end
class TeamAddedToOrg < SlackError; end
class TeamIdOrOrgRequired < SlackError; end
class TeamIdRequiredForEnterprise < SlackError; end
class TeamLimitExceeded < SlackError; end
class TeamNotConnected < SlackError; end
class TeamNotFound < SlackError; end
class TeamNotOnEnterprise < SlackError; end
Expand Down Expand Up @@ -698,6 +705,7 @@ class UnableToDelete < SlackError; end
class UnableToFetchCustomEmojis < SlackError; end
class UnableToLinkIdpGroupAndChannel < SlackError; end
class UnableToProcessPostRequest < SlackError; end
class UnableToShareFiles < SlackError; end
class UnableToUnlinkIdpGroupAndChannel < SlackError; end
class UnableToUpdateExistingSessions < SlackError; end
class UneditableColumn < SlackError; end
Expand Down Expand Up @@ -1013,9 +1021,11 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'file_comment_not_found' => FileCommentNotFound,
'file_deleted' => FileDeleted,
'file_deleting_disabled' => FileDeletingDisabled,
'file_is_deleted' => FileIsDeleted,
'file_not_found' => FileNotFound,
'file_not_shared' => FileNotShared,
'file_not_yet_available' => FileNotYetAvailable,
'file_share_limit_reached' => FileShareLimitReached,
'file_under_review' => FileUnderReview,
'file_update_failed' => FileUpdateFailed,
'file_upload_size_restricted' => FileUploadSizeRestricted,
Expand Down Expand Up @@ -1107,6 +1117,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'invalid_org_id' => InvalidOrgId,
'invalid_parameters' => InvalidParameters,
'invalid_parent_type' => InvalidParentType,
'invalid_permission_set' => InvalidPermissionSet,
'invalid_permission_type' => InvalidPermissionType,
'invalid_permissions' => InvalidPermissions,
'invalid_phone_number' => InvalidPhoneNumber,
Expand Down Expand Up @@ -1194,11 +1205,13 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'malware_detected' => MalwareDetected,
'managed_channel_not_supported' => ManagedChannelNotSupported,
'markdown_text_conflict' => MarkdownTextConflict,
'max_file_sharing_exceeded' => MaxFileSharingExceeded,
'member_analytics_disabled' => MemberAnalyticsDisabled,
'member_limit_exceeded' => MemberLimitExceeded,
'message_limit_exceeded' => MessageLimitExceeded,
'message_not_found' => MessageNotFound,
'message_not_in_streaming_state' => MessageNotInStreamingState,
'message_not_owned_by_bot' => MessageNotOwnedByBot,
'message_too_long' => MessageTooLong,
'messages_tab_disabled' => MessagesTabDisabled,
'messaging_processing_failed' => MessagingProcessingFailed,
Expand Down Expand Up @@ -1360,6 +1373,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'request_id_or_app_id_is_required' => RequestIdOrAppIdIsRequired,
'request_id_required_for_custom_integrations' => RequestIdRequiredForCustomIntegrations,
'request_timeout' => RequestTimeout,
'required_visibility' => RequiredVisibility,
'reserved_name' => ReservedName,
'resized_but_still_too_large' => ResizedButStillTooLarge,
'restricted_action' => RestrictedAction,
Expand Down Expand Up @@ -1399,6 +1413,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'team_added_to_org' => TeamAddedToOrg,
'team_id_or_org_required' => TeamIdOrOrgRequired,
'team_id_required_for_enterprise' => TeamIdRequiredForEnterprise,
'team_limit_exceeded' => TeamLimitExceeded,
'team_not_connected' => TeamNotConnected,
'team_not_found' => TeamNotFound,
'team_not_on_enterprise' => TeamNotOnEnterprise,
Expand Down Expand Up @@ -1446,6 +1461,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'unable_to_fetch_custom_emojis' => UnableToFetchCustomEmojis,
'unable_to_link_idp_group_and_channel' => UnableToLinkIdpGroupAndChannel,
'unable_to_process_post_request' => UnableToProcessPostRequest,
'unable_to_share_files' => UnableToShareFiles,
'unable_to_unlink_idp_group_and_channel' => UnableToUnlinkIdpGroupAndChannel,
'unable_to_update_existing_sessions' => UnableToUpdateExistingSessions,
'uneditable_column' => UneditableColumn,
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/slack-api-ref
Submodule slack-api-ref updated 30 files
+6 −2 docs.slack.dev/events/events.json
+3 −0 docs.slack.dev/methods/admin.usergroups.addTeams.json
+1 −1 docs.slack.dev/methods/admin.users.invite.json
+1 −1 docs.slack.dev/methods/admin.users.setAdmin.json
+1 −1 docs.slack.dev/methods/admin.users.setOwner.json
+1 −1 docs.slack.dev/methods/admin.users.setRegular.json
+96 −5 docs.slack.dev/methods/admin.workflows.triggers.types.permissions.lookup.json
+58 −6 docs.slack.dev/methods/admin.workflows.triggers.types.permissions.set.json
+2 −2 docs.slack.dev/methods/assistant.threads.setStatus.json
+1 −1 docs.slack.dev/methods/chat.startStream.json
+3 −0 docs.slack.dev/methods/chat.stopStream.json
+46 −13 docs.slack.dev/methods/chat.update.json
+1 −1 docs.slack.dev/methods/methods.json
+3 −1 events/app_deleted.json
+3 −1 events/app_uninstalled_team.json
+12 −3 methods/_patches/chat/chat.postEphemeral.json
+12 −3 methods/_patches/chat/chat.postMessage.json
+12 −3 methods/_patches/chat/chat.scheduleMessage.json
+12 −3 methods/_patches/chat/chat.update.json
+1 −0 methods/admin/admin.usergroups.addTeams.json
+1 −1 methods/admin/admin.users.invite.json
+2 −2 methods/admin/admin.workflows.triggers.types.permissions.lookup.json
+10 −2 methods/admin/admin.workflows.triggers.types.permissions.set.json
+2 −2 methods/assistant/assistant.threads.setStatus.json
+11 −2 methods/chat/chat.postEphemeral.json
+11 −2 methods/chat/chat.postMessage.json
+11 −2 methods/chat/chat.scheduleMessage.json
+1 −1 methods/chat/chat.startStream.json
+1 −0 methods/chat/chat.stopStream.json
+23 −3 methods/chat/chat.update.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
end
context 'admin.workflows.triggers.types.permissions_set' do
it 'requires id' do
expect { client.admin_workflows_triggers_types_permissions_set(visibility: %q[]) }.to raise_error ArgumentError, /Required arguments :id missing/
end
it 'requires visibility' do
expect { client.admin_workflows_triggers_types_permissions_set(id: %q[['FTT01', 'FTT02', 'FTT03']]) }.to raise_error ArgumentError, /Required arguments :visibility missing/
expect { client.admin_workflows_triggers_types_permissions_set }.to raise_error ArgumentError, /Required arguments :id missing/
end
end
end
Loading