diff --git a/CHANGELOG.md b/CHANGELOG.md index d04c5958..ff0e78ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add format, include_threads, and include_attachments arguments to slackLists.download.start and slackLists.download.get - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add exclude_muted argument to users.conversations - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add new error codes to errors.rb and update slack-api-ref submodule - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add admin.conversations.bulkSetProperties method for bulk-setting channel properties - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add admin.usergroups.removeTeams method for removing default workspaces from an organization-wide IDP Group or Admin Group - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add unfurl_app_links argument to chat.postMessage - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Remove required team_id argument from admin.users.session.invalidate - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add AgentsSessions and AppsManagedPermissions endpoint modules for agents.sessions and apps.managedPermissions methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Increase conversations.invite users limit from 100 to 1000 - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). +* [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add new Slack API error codes - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot). * Your contribution here. ### 3.2.0 (2026/07/05) diff --git a/bin/commands/admin_analytics_messages.rb b/bin/commands/admin_analytics_messages.rb index fb3001ea..bb572ece 100644 --- a/bin/commands/admin_analytics_messages.rb +++ b/bin/commands/admin_analytics_messages.rb @@ -13,7 +13,7 @@ class App c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.' c.flag 'latest_ts', desc: 'Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.' 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. Default value fetches the first 'page' of the collection." - c.flag 'limit', desc: 'Maximum number of entries to return. The maximum limit is 100.' + c.flag 'limit', desc: 'Maximum number of entries to return. Defaults to 50 if not passed. Max allowed is 100.' c.action do |_global_options, options, _args| puts JSON.dump(@client.admin_analytics_messages_activity(options)) end @@ -25,7 +25,7 @@ class App c.flag 'channel', desc: 'Channel ID for channel containing the messages to query.' c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results.' c.flag 'latest_ts', desc: 'Most recent timestamp to include in the results. If not passed, defaults to current time.' - 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. Default value fetches the first 'page' of the collection. See pagination for more details." + 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. Default value fetches the first 'page' of the collection. See pagination for more detail." c.action do |_global_options, options, _args| puts JSON.dump(@client.admin_analytics_messages_metadata(options)) end diff --git a/bin/commands/admin_conversations.rb b/bin/commands/admin_conversations.rb index 678f255d..7317a816 100644 --- a/bin/commands/admin_conversations.rb +++ b/bin/commands/admin_conversations.rb @@ -53,6 +53,16 @@ class App end end + g.desc 'Set properties on channels in bulk.' + g.long_desc %( Set properties on channels in bulk. ) + g.command 'bulkSetProperties' do |c| + c.flag 'channel_ids', desc: 'An array of channel IDs on which to set the property.' + c.flag 'property', desc: 'The property for this channel in a key value format. Only one property can be updated at a time.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.admin_conversations_bulkSetProperties(options)) + end + end + g.desc 'Convert a public channel to a private channel.' g.long_desc %( Convert a public channel to a private channel. ) g.command 'convertToPrivate' do |c| diff --git a/bin/commands/admin_functions.rb b/bin/commands/admin_functions.rb index 5f7d4461..3d3e771b 100644 --- a/bin/commands/admin_functions.rb +++ b/bin/commands/admin_functions.rb @@ -11,7 +11,7 @@ class App g.command 'list' do |c| c.flag 'team_id', desc: 'The team context to retrieve functions from.' c.flag 'app_ids', desc: 'Comma-separated array of app IDs to get functions for; max 50.' - c.flag 'include_non_distributed_functions', desc: 'Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app.' + c.flag 'include_non_distributed_functions', desc: 'Whether to also include functions that are not yet distributed to any users in the function list. This is needed for admins that are approving an app request and will only work if the team owns the app.' c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.' c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.' c.action do |_global_options, options, _args| diff --git a/bin/commands/admin_usergroups.rb b/bin/commands/admin_usergroups.rb index 6f1fcb00..1d30536d 100644 --- a/bin/commands/admin_usergroups.rb +++ b/bin/commands/admin_usergroups.rb @@ -48,6 +48,16 @@ class App puts JSON.dump(@client.admin_usergroups_removeChannels(options)) end end + + g.desc 'Remove one or more default workspaces from an organization-wide IDP Group or Admin Group.' + g.long_desc %( Remove one or more default workspaces from an organization-wide IDP Group or Admin Group. ) + g.command 'removeTeams' do |c| + c.flag 'usergroup_id', desc: 'An encoded usergroup (IDP Group) ID.' + c.flag 'team_ids', desc: 'A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.admin_usergroups_removeTeams(options)) + end + end end end end diff --git a/bin/commands/admin_users_session.rb b/bin/commands/admin_users_session.rb index 924e7756..edc271b9 100644 --- a/bin/commands/admin_users_session.rb +++ b/bin/commands/admin_users_session.rb @@ -27,7 +27,6 @@ class App g.desc 'Revoke a single session for a user. The user will be forced to login to Slack.' g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. ) g.command 'invalidate' do |c| - c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.' c.flag 'user_id', desc: 'ID of the user that the session belongs to.' c.flag 'session_id', desc: 'ID of the session to invalidate.' c.action do |_global_options, options, _args| diff --git a/bin/commands/agents_sessions.rb b/bin/commands/agents_sessions.rb new file mode 100644 index 00000000..b44231e8 --- /dev/null +++ b/bin/commands/agents_sessions.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'AgentsSessions methods.' + command 'agents_sessions' do |g| + g.desc 'Rename an agent session.' + g.long_desc %( Rename an agent session. ) + g.command 'rename' do |c| + c.flag 'channel_id', desc: 'ID of the channel containing the agent session. Required for public channels.' + c.flag 'title', desc: 'New title for the agent session (1-200 characters). For a session channel, this also renames the channel.' + c.flag 'thread_ts', desc: 'Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.agents_sessions_rename(options)) + end + end + + g.desc "Set an agent session's lifecycle status, creating the session if needed." + g.long_desc %( Set an agent session's lifecycle status, creating the session if needed. ) + g.command 'setStatus' do |c| + c.flag 'channel_id', desc: 'ID of the channel containing the agent session. Required for public channels.' + c.flag 'status', desc: 'The lifecycle status to set.' + c.flag 'thread_ts', desc: 'Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels.' + c.flag 'title', desc: 'Title for the agent session (max 200 characters). Only used when creating a new session; ignored if the session already exists. To rename an existing session, use agents.sessions.rename.' + c.flag 'initiator_user_id', desc: 'The user who initiated the session. Only used when creating a new session; ignored if the session already exists. Must be a member of the channel.' + c.flag 'icon_emoji', desc: "Emoji to use as the agent's icon. Takes priority over icon_url. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope." + c.flag 'icon_url', desc: "URL to an image to use as the agent's icon. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope." + c.flag 'username', desc: 'Display name override for the agent (max 200 characters). Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.agents_sessions_setStatus(options)) + end + end + end + end + end +end diff --git a/bin/commands/apps_managed_permissions.rb b/bin/commands/apps_managed_permissions.rb new file mode 100644 index 00000000..343974b9 --- /dev/null +++ b/bin/commands/apps_managed_permissions.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'AppsManagedPermissions methods.' + command 'apps_managed_permissions' do |g| + g.desc "Set who can interact with a managed app. Lets the builder who created a managed app on a partner platform configure the app's permissions as themselves, using a user token from the manager app. Permissions can only be set before the app is installed: if the app is already installed, this method makes no change and returns the app's current permissions." + g.long_desc %( Set who can interact with a managed app. Lets the builder who created a managed app on a partner platform configure the app's permissions as themselves, using a user token from the manager app. Permissions can only be set before the app is installed: if the app is already installed, this method makes no change and returns the app's current permissions. ) + g.command 'set' do |c| + c.flag 'app_id', desc: 'Encoded ID of the managed app to configure.' + c.flag 'permissions', desc: "Who can interact with the app. Use everyone to allow all members, or app_owner to restrict access to the app's owner." + c.action do |_global_options, options, _args| + puts JSON.dump(@client.apps_managed_permissions_set(options)) + end + end + end + end + end +end diff --git a/bin/commands/assistant_threads.rb b/bin/commands/assistant_threads.rb index d9e00f47..94935b51 100644 --- a/bin/commands/assistant_threads.rb +++ b/bin/commands/assistant_threads.rb @@ -25,7 +25,7 @@ class App g.long_desc %( Set suggested prompts for the given assistant thread ) g.command 'setSuggestedPrompts' do |c| c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.' - c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.' + c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for. If not provided, the prompts will be set for the latest message in the channel.' c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.' c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.' c.action do |_global_options, options, _args| diff --git a/bin/commands/chat.rb b/bin/commands/chat.rb index 7c2d4c91..f07b8739 100644 --- a/bin/commands/chat.rb +++ b/bin/commands/chat.rb @@ -114,6 +114,7 @@ class App c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.' c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.' c.flag 'username', desc: "Set your bot's user name." + c.flag 'unfurl_app_links', desc: 'Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the unfurl_links setting.' c.action do |_global_options, options, _args| puts JSON.dump(@client.chat_postMessage(options)) end @@ -144,13 +145,13 @@ 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 thread or DM.' + c.flag 'channel', desc: 'An encoded ID that represents a channel, thread, or DM.' c.flag 'chunks', desc: 'Array of streaming chunks.' 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 'thread_ts', desc: "Provide another message's ts value to reply to. Omit it to stream a top-level message instead of a thread reply; this is only supported in channels where the whole channel is one session, such as Slack Code, and returns invalid_thread_ts elsewhere. Passing '0' is equivalent to omitting it." c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.' c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.' - c.flag 'task_display_mode', desc: "Specifies how tasks are displayed in the message. A timeline displays individual tasks with text in sequential order, plan displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and dense collapses consecutive tool calls into a single summarized task card." + c.flag 'task_display_mode', desc: 'Specifies how tasks are displayed in the message. timeline task updates render as individual task cards interleaved with streamed text. plan task updates render together in a plan block.' c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.' c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.' c.flag 'username', desc: "The bot's username to display." @@ -178,7 +179,7 @@ class App g.command 'unfurl' do |c| c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together. Required for public channels.' c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to. Required for public channels.' - c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels.' + c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the message, pointing to their unfurl blocks or message attachments. Required for public channels.' c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.' c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.' c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.' diff --git a/bin/commands/conversations.rb b/bin/commands/conversations.rb index 431f54c9..d7cbbfae 100644 --- a/bin/commands/conversations.rb +++ b/bin/commands/conversations.rb @@ -100,7 +100,7 @@ class App g.command 'invite' do |c| c.flag 'channel', desc: 'The ID of the public or private channel to invite user(s) to.' c.flag 'force', desc: 'When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.' - c.flag 'users', desc: 'A comma separated list of user IDs. Up to 100 users may be listed.' + c.flag 'users', desc: 'A comma separated list of user IDs. Up to 1000 users may be listed.' c.action do |_global_options, options, _args| puts JSON.dump(@client.conversations_invite(options)) end diff --git a/lib/slack/web/api/endpoints.rb b/lib/slack/web/api/endpoints.rb index 02e3430b..2b7e0fff 100644 --- a/lib/slack/web/api/endpoints.rb +++ b/lib/slack/web/api/endpoints.rb @@ -37,6 +37,7 @@ require_relative 'endpoints/admin_workflows_collaborators' require_relative 'endpoints/admin_workflows_permissions' require_relative 'endpoints/admin_workflows_triggers_types_permissions' +require_relative 'endpoints/agents_sessions' require_relative 'endpoints/api' require_relative 'endpoints/apps' require_relative 'endpoints/apps_activities' @@ -45,6 +46,7 @@ require_relative 'endpoints/apps_datastore' require_relative 'endpoints/apps_event_authorizations' require_relative 'endpoints/apps_icon' +require_relative 'endpoints/apps_managed_permissions' require_relative 'endpoints/apps_manifest' require_relative 'endpoints/apps_user_connection' require_relative 'endpoints/assistant_search' @@ -151,6 +153,7 @@ module Endpoints include AdminWorkflowsCollaborators include AdminWorkflowsPermissions include AdminWorkflowsTriggersTypesPermissions + include AgentsSessions include Api include Apps include AppsActivities @@ -159,6 +162,7 @@ module Endpoints include AppsDatastore include AppsEventAuthorizations include AppsIcon + include AppsManagedPermissions include AppsManifest include AppsUserConnection include AssistantSearch diff --git a/lib/slack/web/api/endpoints/admin_analytics_messages.rb b/lib/slack/web/api/endpoints/admin_analytics_messages.rb index ab652515..f6489db4 100644 --- a/lib/slack/web/api/endpoints/admin_analytics_messages.rb +++ b/lib/slack/web/api/endpoints/admin_analytics_messages.rb @@ -18,7 +18,7 @@ module AdminAnalyticsMessages # @option options [string] :cursor # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. # @option options [integer] :limit - # Maximum number of entries to return. The maximum limit is 100. + # Maximum number of entries to return. Defaults to 50 if not passed. Max allowed is 100. # @see https://api.slack.com/methods/admin.analytics.messages.activity # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.activity.json def admin_analytics_messages_activity(options = {}) @@ -43,7 +43,7 @@ def admin_analytics_messages_activity(options = {}) # @option options [string] :latest_ts # Most recent timestamp to include in the results. If not passed, defaults to current time. # @option options [string] :cursor - # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more details. + # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail. # @see https://api.slack.com/methods/admin.analytics.messages.metadata # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.metadata.json def admin_analytics_messages_metadata(options = {}) diff --git a/lib/slack/web/api/endpoints/admin_conversations.rb b/lib/slack/web/api/endpoints/admin_conversations.rb index bf021300..1f15963d 100644 --- a/lib/slack/web/api/endpoints/admin_conversations.rb +++ b/lib/slack/web/api/endpoints/admin_conversations.rb @@ -72,6 +72,21 @@ def admin_conversations_bulkSetExcludeFromSlackAi(options = {}) post('admin.conversations.bulkSetExcludeFromSlackAi', options) end + # + # Set properties on channels in bulk. + # + # @option options [array] :channel_ids + # An array of channel IDs on which to set the property. + # @option options [string] :property + # The property for this channel in a key value format. Only one property can be updated at a time. + # @see https://api.slack.com/methods/admin.conversations.bulkSetProperties + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkSetProperties.json + def admin_conversations_bulkSetProperties(options = {}) + raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil? + raise ArgumentError, 'Required arguments :property missing' if options[:property].nil? + post('admin.conversations.bulkSetProperties', options) + end + # # Convert a public channel to a private channel. # diff --git a/lib/slack/web/api/endpoints/admin_functions.rb b/lib/slack/web/api/endpoints/admin_functions.rb index 7cdd47ff..b74770ce 100644 --- a/lib/slack/web/api/endpoints/admin_functions.rb +++ b/lib/slack/web/api/endpoints/admin_functions.rb @@ -14,7 +14,7 @@ module AdminFunctions # @option options [array] :app_ids # Comma-separated array of app IDs to get functions for; max 50. # @option options [boolean] :include_non_distributed_functions - # Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app. + # Whether to also include functions that are not yet distributed to any users in the function list. This is needed for admins that are approving an app request and will only work if the team owns the app. # @option options [string] :cursor # Set cursor to next_cursor returned by the previous call to list items in the next page. # @option options [integer] :limit diff --git a/lib/slack/web/api/endpoints/admin_usergroups.rb b/lib/slack/web/api/endpoints/admin_usergroups.rb index 87597e26..ce66fd90 100644 --- a/lib/slack/web/api/endpoints/admin_usergroups.rb +++ b/lib/slack/web/api/endpoints/admin_usergroups.rb @@ -70,6 +70,21 @@ def admin_usergroups_removeChannels(options = {}) raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil? post('admin.usergroups.removeChannels', options) end + + # + # Remove one or more default workspaces from an organization-wide IDP Group or Admin Group. + # + # @option options [string] :usergroup_id + # An encoded usergroup (IDP Group) ID. + # @option options [array] :team_ids + # A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token. + # @see https://api.slack.com/methods/admin.usergroups.removeTeams + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeTeams.json + def admin_usergroups_removeTeams(options = {}) + raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil? + raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil? + post('admin.usergroups.removeTeams', options) + end end end end diff --git a/lib/slack/web/api/endpoints/admin_users.rb b/lib/slack/web/api/endpoints/admin_users.rb index 20d11e0e..48551033 100644 --- a/lib/slack/web/api/endpoints/admin_users.rb +++ b/lib/slack/web/api/endpoints/admin_users.rb @@ -37,6 +37,7 @@ def admin_users_assign(options = {}) # @see https://api.slack.com/methods/admin.users.getExpiration # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.getExpiration.json def admin_users_getExpiration(options = {}) + raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil? post('admin.users.getExpiration', options) end diff --git a/lib/slack/web/api/endpoints/admin_users_session.rb b/lib/slack/web/api/endpoints/admin_users_session.rb index bf531d08..72da3a9f 100644 --- a/lib/slack/web/api/endpoints/admin_users_session.rb +++ b/lib/slack/web/api/endpoints/admin_users_session.rb @@ -33,8 +33,6 @@ def admin_users_session_getSettings(options = {}) # # Revoke a single session for a user. The user will be forced to login to Slack. # - # @option options [Object] :team_id - # ID of the workspace that the session belongs to. # @option options [Object] :user_id # ID of the user that the session belongs to. # @option options [integer] :session_id diff --git a/lib/slack/web/api/endpoints/agents_sessions.rb b/lib/slack/web/api/endpoints/agents_sessions.rb new file mode 100644 index 00000000..5b9a007c --- /dev/null +++ b/lib/slack/web/api/endpoints/agents_sessions.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module AgentsSessions + # + # Rename an agent session. + # + # @option options [string] :channel_id + # ID of the channel containing the agent session. Required for public channels. + # @option options [string] :title + # New title for the agent session (1-200 characters). For a session channel, this also renames the channel. + # @option options [string] :thread_ts + # Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels. + # @see https://api.slack.com/methods/agents.sessions.rename + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.sessions/agents.sessions.rename.json + def agents_sessions_rename(options = {}) + raise ArgumentError, 'Required arguments :title missing' if options[:title].nil? + post('agents.sessions.rename', options) + end + + # + # Set an agent session's lifecycle status, creating the session if needed. + # + # @option options [string] :channel_id + # ID of the channel containing the agent session. Required for public channels. + # @option options [enum] :status + # The lifecycle status to set. + # @option options [string] :thread_ts + # Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels. + # @option options [string] :title + # Title for the agent session (max 200 characters). Only used when creating a new session; ignored if the session already exists. To rename an existing session, use agents.sessions.rename. + # @option options [string] :initiator_user_id + # The user who initiated the session. Only used when creating a new session; ignored if the session already exists. Must be a member of the channel. + # @option options [string] :icon_emoji + # Emoji to use as the agent's icon. Takes priority over icon_url. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope. + # @option options [string] :icon_url + # URL to an image to use as the agent's icon. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope. + # @option options [string] :username + # Display name override for the agent (max 200 characters). Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope. + # @see https://api.slack.com/methods/agents.sessions.setStatus + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.sessions/agents.sessions.setStatus.json + def agents_sessions_setStatus(options = {}) + raise ArgumentError, 'Required arguments :status missing' if options[:status].nil? + post('agents.sessions.setStatus', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/apps_managed_permissions.rb b/lib/slack/web/api/endpoints/apps_managed_permissions.rb new file mode 100644 index 00000000..2fc25869 --- /dev/null +++ b/lib/slack/web/api/endpoints/apps_managed_permissions.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module AppsManagedPermissions + # + # Set who can interact with a managed app. Lets the builder who created a managed app on a partner platform configure the app's permissions as themselves, using a user token from the manager app. Permissions can only be set before the app is installed: if the app is already installed, this method makes no change and returns the app's current permissions. + # + # @option options [Object] :app_id + # Encoded ID of the managed app to configure. + # @option options [enum] :permissions + # Who can interact with the app. Use everyone to allow all members, or app_owner to restrict access to the app's owner. + # @see https://api.slack.com/methods/apps.managed.permissions.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.managed.permissions/apps.managed.permissions.set.json + def apps_managed_permissions_set(options = {}) + raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil? + raise ArgumentError, 'Required arguments :permissions missing' if options[:permissions].nil? + post('apps.managed.permissions.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/assistant_threads.rb b/lib/slack/web/api/endpoints/assistant_threads.rb index e711b828..33829416 100644 --- a/lib/slack/web/api/endpoints/assistant_threads.rb +++ b/lib/slack/web/api/endpoints/assistant_threads.rb @@ -38,7 +38,7 @@ def assistant_threads_setStatus(options = {}) # @option options [Object] :channel_id # Channel ID containing the assistant thread. # @option options [string] :thread_ts - # Message timestamp of the thread to set suggested prompts for. + # Message timestamp of the thread to set suggested prompts for. If not provided, the prompts will be set for the latest message in the channel. # @option options [Object] :prompts # Each prompt should be supplied with its title and message attribute. # @option options [string] :title diff --git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index 20831c5e..09ff451e 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -22,7 +22,6 @@ module Chat def chat_appendStream(options = {}) raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil? raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil? - raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil? options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel] post('chat.appendStream', options) end @@ -194,6 +193,8 @@ def chat_postEphemeral(options = {}) # Pass false to disable unfurling of media content. # @option options [string] :username # Set your bot's user name. + # @option options [boolean] :unfurl_app_links + # Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the unfurl_links setting. # @see https://api.slack.com/methods/chat.postMessage # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json def chat_postMessage(options = {}) @@ -250,19 +251,19 @@ def chat_scheduleMessage(options = {}) # Starts a new streaming conversation. # # @option options [channel] :channel - # An encoded ID that represents a channel thread or DM. + # An encoded ID that represents a channel, thread, or DM. # @option options [array] :chunks # Array of streaming chunks. # @option options [string] :markdown_text # Accepts message text formatted in markdown. Limit this field to 12,000 characters. # @option options [string] :thread_ts - # Provide another message's ts value to reply to. Streamed messages should always be replies to a user request. + # Provide another message's ts value to reply to. Omit it to stream a top-level message instead of a thread reply; this is only supported in channels where the whole channel is one session, such as Slack Code, and returns invalid_thread_ts elsewhere. Passing "0" is equivalent to omitting it. # @option options [Object] :recipient_user_id # The encoded ID of the user to receive the streaming text. Required when streaming to channels. # @option options [string] :recipient_team_id # The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels. # @option options [enum] :task_display_mode - # Specifies how tasks are displayed in the message. A timeline displays individual tasks with text in sequential order, plan displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and dense collapses consecutive tool calls into a single summarized task card. + # Specifies how tasks are displayed in the message. timeline task updates render as individual task cards interleaved with streamed text. plan task updates render together in a plan block. # @option options [string] :icon_emoji # Emoji to use as the icon for this message. Overrides icon_url. # @option options [string] :icon_url @@ -273,7 +274,6 @@ def chat_scheduleMessage(options = {}) # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json def chat_startStream(options = {}) raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil? - raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil? options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel] post('chat.startStream', options) end @@ -311,7 +311,7 @@ def chat_stopStream(options = {}) # @option options [timestamp] :ts # Timestamp of the message to add unfurl behavior to. Required for public channels. # @option options [string] :unfurls - # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels. + # URL-encoded JSON map with keys set to URLs featured in the message, pointing to their unfurl blocks or message attachments. Required for public channels. # @option options [string] :user_auth_message # Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again. # @option options [boolean] :user_auth_required diff --git a/lib/slack/web/api/endpoints/conversations.rb b/lib/slack/web/api/endpoints/conversations.rb index 6cfde854..d01da4b7 100644 --- a/lib/slack/web/api/endpoints/conversations.rb +++ b/lib/slack/web/api/endpoints/conversations.rb @@ -154,7 +154,7 @@ def conversations_info(options = {}) # @option options [boolean] :force # When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false. # @option options [string] :users - # A comma separated list of user IDs. Up to 100 users may be listed. + # A comma separated list of user IDs. Up to 1000 users may be listed. # @see https://api.slack.com/methods/conversations.invite # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json def conversations_invite(options = {}) diff --git a/lib/slack/web/api/endpoints/users.rb b/lib/slack/web/api/endpoints/users.rb index 534590ee..b96991de 100644 --- a/lib/slack/web/api/endpoints/users.rb +++ b/lib/slack/web/api/endpoints/users.rb @@ -76,7 +76,6 @@ def users_identity(options = {}) # @see https://api.slack.com/methods/users.info # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.info.json def users_info(options = {}) - raise ArgumentError, 'Required arguments :user missing' if options[:user].nil? options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('users.info', options) end diff --git a/lib/slack/web/api/errors.rb b/lib/slack/web/api/errors.rb index e3298816..08aaf01e 100644 --- a/lib/slack/web/api/errors.rb +++ b/lib/slack/web/api/errors.rb @@ -29,12 +29,16 @@ class AppAclNotFound < SlackError; end class AppCannotJoinChannel < SlackError; end class AppManagementAppNotInstalledOnOrg < SlackError; end class AppMissingActionUrl < SlackError; end + class AppNotAdminApproved < SlackError; end class AppNotEligible < SlackError; end class AppNotEligibleForAutoInstall < SlackError; end class AppNotFound < SlackError; end class AppNotHosted < SlackError; end + class AppNotManaged < SlackError; end + class AppNotOrgInstalled < SlackError; end class AppNotOwnedByManagerApp < SlackError; end class AppNotSubscribed < SlackError; end + class AppOwnerNotFound < SlackError; end class AppRestrictedOrgWide < SlackError; end class ApprovalInactive < SlackError; end class ApprovalNotFound < SlackError; end @@ -47,6 +51,7 @@ class AuthMismatch < SlackError; end class AuthorizationNotFound < SlackError; end class AutoInstallRuleCreationFailed < SlackError; end class AutoProvisionFailure < SlackError; end + class AutoProvisionRequired < SlackError; end class BadClientSecret < SlackError; end class BadHandle < SlackError; end class BadImage < SlackError; end @@ -95,6 +100,7 @@ class CannotMoveLocalChannel < SlackError; end class CannotParse < SlackError; end class CannotParseAttachment < SlackError; end class CannotPrompt < SlackError; end + class CannotProvideBothMarkdownTextAndChunks < SlackError; end class CannotReplyToMessage < SlackError; end class CannotResetBot < SlackError; end class CannotResetPrimaryOwner < SlackError; end @@ -148,6 +154,7 @@ class ChannelOwnerRestriction < SlackError; end class ChannelSharedWithNonapprovedTeam < SlackError; end class ChannelTypeNotSupported < SlackError; end class ChannelsLimitExceeded < SlackError; end + class ClientIdMismatch < SlackError; end class ClientIdTokenMismatch < SlackError; end class CodeAlreadyUsed < SlackError; end class ColumnIdNotProvided < SlackError; end @@ -185,6 +192,7 @@ class DeleteNotAllowed < SlackError; end class DeprecatedEndpoint < SlackError; end class DescriptionTooLong < SlackError; end class DifferentTeamOwnsMessageMetadataForChannel < SlackError; end + class DisallowedAction < SlackError; end class DiscoverabilitySettingInvalid < SlackError; end class DomainTaken < SlackError; end class DraftAlreadyDeleted < SlackError; end @@ -203,6 +211,8 @@ class DynamicClientRegistrationNotSupported < SlackError; end class DynamicClientRegistrationRejected < SlackError; end class EditWindowClosed < SlackError; end class EkmAccessDenied < SlackError; end + class EmaDisabled < SlackError; end + class EmaIssuerMismatch < SlackError; end class EmailDoesNotMatch < SlackError; end class EmailNotVerified < SlackError; end class EmailTaken < SlackError; end @@ -211,6 +221,7 @@ class EmojiNotFound < SlackError; end class EndpointUnavailable < SlackError; end class EnterpriseIsRestricted < SlackError; end class EnterpriseNotFound < SlackError; end + class EnterpriseOnlyFeature < SlackError; end class EntityMetadataDoesNotMatchTrigger < SlackError; end class EntityNotFound < SlackError; end class ErrorAddingCollaborators < SlackError; end @@ -281,6 +292,7 @@ class FailedToValidateExpiration < SlackError; end class FailedToValidateTeam < SlackError; end class FailureRemovingEmoji < SlackError; end class FatalError < SlackError; end + class FeatureDisabled < SlackError; end class FeatureNotAvailable < SlackError; end class FeatureNotEnabled < SlackError; end class FetchMembersFailed < SlackError; end @@ -304,7 +316,6 @@ class ForbiddenHandle < SlackError; end class ForbiddenTeam < SlackError; end class FreeTeamCanvasTabAlreadyExists < SlackError; end class FreeTeamNotAllowed < SlackError; end - class FreeTeamsCannotCreateNonTabbedCanvases < SlackError; end class FreeTeamsCannotCreateStandaloneCanvases < SlackError; end class FreeTeamsCannotEditStandaloneCanvases < SlackError; end class FunctionExecutionNotFound < SlackError; end @@ -333,6 +344,7 @@ class InvalidArguments < SlackError; end class InvalidArrayArg < SlackError; end class InvalidAttachment < SlackError; end class InvalidAttachments < SlackError; end + class InvalidAudience < SlackError; end class InvalidAuth < SlackError; end class InvalidBlocks < SlackError; end class InvalidBlocksFormat < SlackError; end @@ -393,7 +405,6 @@ class InvalidNameSpecials < SlackError; end class InvalidNamedEntities < SlackError; end class InvalidOooMessage < SlackError; end class InvalidOptionId < SlackError; end - class InvalidOrgId < SlackError; end class InvalidParameters < SlackError; end class InvalidParentType < SlackError; end class InvalidPermission < SlackError; end @@ -426,6 +437,7 @@ class InvalidSortDir < SlackError; end class InvalidSource < SlackError; end class InvalidStartTime < SlackError; end class InvalidStartsWithAt < SlackError; end + class InvalidStatus < SlackError; end class InvalidTargetTeam < SlackError; end class InvalidTeam < SlackError; end class InvalidTeamId < SlackError; end @@ -487,7 +499,10 @@ class ListsDisabledUserTeam < SlackError; end class MalwareDetected < SlackError; end class ManagedAppLimitReached < SlackError; end class ManagedChannelNotSupported < SlackError; end + class ManagerAppNotEligible < SlackError; end class MarkdownTextConflict < SlackError; end + class MarkdownTextOrChunksRequired < SlackError; end + class MarkdownTextRequired < SlackError; end class MaxFileSharingExceeded < SlackError; end class MemberAnalyticsDisabled < SlackError; end class MemberLimitExceeded < SlackError; end @@ -532,6 +547,7 @@ class MissingStepIds < SlackError; end class MissingSubteamName < SlackError; end class MissingTargetTeam < SlackError; end class MissingTeam < SlackError; end + class MissingThreadTs < SlackError; end class MissingTrigger < SlackError; end class MissingTs < SlackError; end class MissingUnfurlId < SlackError; end @@ -554,6 +570,9 @@ class NamedEntitiesCannotBeEmpty < SlackError; end class NoAccess < SlackError; end class NoActiveSessions < SlackError; end class NoAliasSelected < SlackError; end + class NoAppScopesRequested < SlackError; end + class NoApprovedScopesRequested < SlackError; end + class NoAssertion < SlackError; end class NoBotUserForApp < SlackError; end class NoChannel < SlackError; end class NoChannelMemberships < SlackError; end @@ -593,7 +612,6 @@ class NotAllowedToCreateAutomationRule < SlackError; end class NotAllowedTokenType < SlackError; end class NotAnAdmin < SlackError; end class NotAnEnterprise < SlackError; end - class NotAnOwner < SlackError; end class NotAppAdmin < SlackError; end class NotArchived < SlackError; end class NotAuthed < SlackError; end @@ -614,7 +632,6 @@ class NotPinnable < SlackError; end class NotPinned < SlackError; end class NotReactable < SlackError; end class NotStarred < SlackError; end - class NotSubscribedToMessageStreamStopped < SlackError; end class NotSupported < SlackError; end class NotVisible < SlackError; end class OauthAuthorizationUrlMismatch < SlackError; end @@ -651,6 +668,7 @@ class PostingToGeneralChannelDenied < SlackError; end class PreviewFeatureNotAvailable < SlackError; end class PrimaryUsergroupNotFound < SlackError; end class ProfileSetFailed < SlackError; end + class PropertyNotAllowed < SlackError; end class ProvidersNotFound < SlackError; end class PublicFileTypeNotAllowed < SlackError; end class PublicVideoNotAllowed < SlackError; end @@ -707,6 +725,7 @@ class SocketModeNotEnabled < SlackError; end class SpecifyEnterpriseOrTeams < SlackError; end class StoppedByUser < SlackError; end class StorageLimitReached < SlackError; end + class StreamingModeMismatch < SlackError; end class StreamingStateConflict < SlackError; end class SubteamMaxUsersExceeded < SlackError; end class SudoRequired < SlackError; end @@ -726,6 +745,8 @@ class TeamsNotFound < SlackError; end class TemplateNotVisible < SlackError; end class ThreadLocked < SlackError; end class ThreadNotFound < SlackError; end + class ThreadTsNotAllowed < SlackError; end + class ThreadTsRequired < SlackError; end class TimeInPast < SlackError; end class TimeTooFar < SlackError; end class TokenAlreadyExchanged < SlackError; end @@ -749,6 +770,7 @@ class TooManyLinkedChannels < SlackError; end class TooManyMembers < SlackError; end class TooManyNamedEntities < SlackError; end class TooManyPins < SlackError; end + class TooManyProperties < SlackError; end class TooManyReactions < SlackError; end class TooManyRequests < SlackError; end class TooManyTabs < SlackError; end @@ -792,6 +814,7 @@ class UrlRestrictionNotSupported < SlackError; end class UserAlreadyDeleted < SlackError; end class UserAlreadyTeamMember < SlackError; end class UserAuthUrlMissing < SlackError; end + class UserCannotBeAddedToWorkspace < SlackError; end class UserCannotCreateChannel < SlackError; end class UserCannotManagePublicChannels < SlackError; end class UserCannotManageWorkspace < SlackError; end @@ -822,6 +845,7 @@ class ValidationErrors < SlackError; end class ViewTooLarge < SlackError; end class VisibilityIsNotNamedEntities < SlackError; end class WorkflowsExportCsvNotEnabled < SlackError; end + class WorkspaceNotEligible < SlackError; end ERROR_CLASSES = { 'access_denied' => AccessDenied, @@ -848,12 +872,16 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'app_cannot_join_channel' => AppCannotJoinChannel, 'app_management_app_not_installed_on_org' => AppManagementAppNotInstalledOnOrg, 'app_missing_action_url' => AppMissingActionUrl, + 'app_not_admin_approved' => AppNotAdminApproved, 'app_not_eligible' => AppNotEligible, 'app_not_eligible_for_auto_install' => AppNotEligibleForAutoInstall, 'app_not_found' => AppNotFound, 'app_not_hosted' => AppNotHosted, + 'app_not_managed' => AppNotManaged, + 'app_not_org_installed' => AppNotOrgInstalled, 'app_not_owned_by_manager_app' => AppNotOwnedByManagerApp, 'app_not_subscribed' => AppNotSubscribed, + 'app_owner_not_found' => AppOwnerNotFound, 'app_restricted_org_wide' => AppRestrictedOrgWide, 'approval_inactive' => ApprovalInactive, 'approval_not_found' => ApprovalNotFound, @@ -866,6 +894,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'authorization_not_found' => AuthorizationNotFound, 'auto_install_rule_creation_failed' => AutoInstallRuleCreationFailed, 'auto_provision_failure' => AutoProvisionFailure, + 'auto_provision_required' => AutoProvisionRequired, 'bad_client_secret' => BadClientSecret, 'bad_handle' => BadHandle, 'bad_image' => BadImage, @@ -914,6 +943,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'cannot_parse' => CannotParse, 'cannot_parse_attachment' => CannotParseAttachment, 'cannot_prompt' => CannotPrompt, + 'cannot_provide_both_markdown_text_and_chunks' => CannotProvideBothMarkdownTextAndChunks, 'cannot_reply_to_message' => CannotReplyToMessage, 'cannot_reset_bot' => CannotResetBot, 'cannot_reset_primary_owner' => CannotResetPrimaryOwner, @@ -967,6 +997,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'channel_shared_with_nonapproved_team' => ChannelSharedWithNonapprovedTeam, 'channel_type_not_supported' => ChannelTypeNotSupported, 'channels_limit_exceeded' => ChannelsLimitExceeded, + 'client_id_mismatch' => ClientIdMismatch, 'client_id_token_mismatch' => ClientIdTokenMismatch, 'code_already_used' => CodeAlreadyUsed, 'column_id_not_provided' => ColumnIdNotProvided, @@ -1004,6 +1035,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'deprecated_endpoint' => DeprecatedEndpoint, 'description_too_long' => DescriptionTooLong, 'different_team_owns_message_metadata_for_channel' => DifferentTeamOwnsMessageMetadataForChannel, + 'disallowed_action' => DisallowedAction, 'discoverability_setting_invalid' => DiscoverabilitySettingInvalid, 'domain_taken' => DomainTaken, 'draft_already_deleted' => DraftAlreadyDeleted, @@ -1022,6 +1054,8 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'dynamic_client_registration_rejected' => DynamicClientRegistrationRejected, 'edit_window_closed' => EditWindowClosed, 'ekm_access_denied' => EkmAccessDenied, + 'ema_disabled' => EmaDisabled, + 'ema_issuer_mismatch' => EmaIssuerMismatch, 'email_does_not_match' => EmailDoesNotMatch, 'email_not_verified' => EmailNotVerified, 'email_taken' => EmailTaken, @@ -1030,6 +1064,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'endpoint_unavailable' => EndpointUnavailable, 'enterprise_is_restricted' => EnterpriseIsRestricted, 'enterprise_not_found' => EnterpriseNotFound, + 'enterprise_only_feature' => EnterpriseOnlyFeature, 'entity_metadata_does_not_match_trigger' => EntityMetadataDoesNotMatchTrigger, 'entity_not_found' => EntityNotFound, 'error_adding_collaborators' => ErrorAddingCollaborators, @@ -1100,6 +1135,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'failed_to_validate_team' => FailedToValidateTeam, 'failure_removing_emoji' => FailureRemovingEmoji, 'fatal_error' => FatalError, + 'feature_disabled' => FeatureDisabled, 'feature_not_available' => FeatureNotAvailable, 'feature_not_enabled' => FeatureNotEnabled, 'fetch_members_failed' => FetchMembersFailed, @@ -1123,7 +1159,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'forbidden_team' => ForbiddenTeam, 'free_team_canvas_tab_already_exists' => FreeTeamCanvasTabAlreadyExists, 'free_team_not_allowed' => FreeTeamNotAllowed, - 'free_teams_cannot_create_non_tabbed_canvases' => FreeTeamsCannotCreateNonTabbedCanvases, 'free_teams_cannot_create_standalone_canvases' => FreeTeamsCannotCreateStandaloneCanvases, 'free_teams_cannot_edit_standalone_canvases' => FreeTeamsCannotEditStandaloneCanvases, 'function_execution_not_found' => FunctionExecutionNotFound, @@ -1152,6 +1187,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'invalid_array_arg' => InvalidArrayArg, 'invalid_attachment' => InvalidAttachment, 'invalid_attachments' => InvalidAttachments, + 'invalid_audience' => InvalidAudience, 'invalid_auth' => InvalidAuth, 'invalid_blocks' => InvalidBlocks, 'invalid_blocks_format' => InvalidBlocksFormat, @@ -1212,7 +1248,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'invalid_named_entities' => InvalidNamedEntities, 'invalid_ooo_message' => InvalidOooMessage, 'invalid_option_id' => InvalidOptionId, - 'invalid_org_id' => InvalidOrgId, 'invalid_parameters' => InvalidParameters, 'invalid_parent_type' => InvalidParentType, 'invalid_permission' => InvalidPermission, @@ -1245,6 +1280,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'invalid_source' => InvalidSource, 'invalid_start_time' => InvalidStartTime, 'invalid_starts_with_at' => InvalidStartsWithAt, + 'invalid_status' => InvalidStatus, 'invalid_target_team' => InvalidTargetTeam, 'invalid_team' => InvalidTeam, 'invalid_team_id' => InvalidTeamId, @@ -1306,7 +1342,10 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'malware_detected' => MalwareDetected, 'managed_app_limit_reached' => ManagedAppLimitReached, 'managed_channel_not_supported' => ManagedChannelNotSupported, + 'manager_app_not_eligible' => ManagerAppNotEligible, 'markdown_text_conflict' => MarkdownTextConflict, + 'markdown_text_or_chunks_required' => MarkdownTextOrChunksRequired, + 'markdown_text_required' => MarkdownTextRequired, 'max_file_sharing_exceeded' => MaxFileSharingExceeded, 'member_analytics_disabled' => MemberAnalyticsDisabled, 'member_limit_exceeded' => MemberLimitExceeded, @@ -1351,6 +1390,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'missing_subteam_name' => MissingSubteamName, 'missing_target_team' => MissingTargetTeam, 'missing_team' => MissingTeam, + 'missing_thread_ts' => MissingThreadTs, 'missing_trigger' => MissingTrigger, 'missing_ts' => MissingTs, 'missing_unfurl_id' => MissingUnfurlId, @@ -1373,6 +1413,9 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'no_access' => NoAccess, 'no_active_sessions' => NoActiveSessions, 'no_alias_selected' => NoAliasSelected, + 'no_app_scopes_requested' => NoAppScopesRequested, + 'no_approved_scopes_requested' => NoApprovedScopesRequested, + 'no_assertion' => NoAssertion, 'no_bot_user_for_app' => NoBotUserForApp, 'no_channel' => NoChannel, 'no_channel_memberships' => NoChannelMemberships, @@ -1412,7 +1455,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'not_allowed_token_type' => NotAllowedTokenType, 'not_an_admin' => NotAnAdmin, 'not_an_enterprise' => NotAnEnterprise, - 'not_an_owner' => NotAnOwner, 'not_app_admin' => NotAppAdmin, 'not_archived' => NotArchived, 'not_authed' => NotAuthed, @@ -1433,7 +1475,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'not_pinned' => NotPinned, 'not_reactable' => NotReactable, 'not_starred' => NotStarred, - 'not_subscribed_to_message_stream_stopped' => NotSubscribedToMessageStreamStopped, 'not_supported' => NotSupported, 'not_visible' => NotVisible, 'oauth_authorization_url_mismatch' => OauthAuthorizationUrlMismatch, @@ -1470,6 +1511,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'preview_feature_not_available' => PreviewFeatureNotAvailable, 'primary_usergroup_not_found' => PrimaryUsergroupNotFound, 'profile_set_failed' => ProfileSetFailed, + 'property_not_allowed' => PropertyNotAllowed, 'providers_not_found' => ProvidersNotFound, 'public_file_type_not_allowed' => PublicFileTypeNotAllowed, 'public_video_not_allowed' => PublicVideoNotAllowed, @@ -1526,6 +1568,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'specify_enterprise_or_teams' => SpecifyEnterpriseOrTeams, 'stopped_by_user' => StoppedByUser, 'storage_limit_reached' => StorageLimitReached, + 'streaming_mode_mismatch' => StreamingModeMismatch, 'streaming_state_conflict' => StreamingStateConflict, 'subteam_max_users_exceeded' => SubteamMaxUsersExceeded, 'sudo_required' => SudoRequired, @@ -1545,6 +1588,8 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'template_not_visible' => TemplateNotVisible, 'thread_locked' => ThreadLocked, 'thread_not_found' => ThreadNotFound, + 'thread_ts_not_allowed' => ThreadTsNotAllowed, + 'thread_ts_required' => ThreadTsRequired, 'time_in_past' => TimeInPast, 'time_too_far' => TimeTooFar, 'token_already_exchanged' => TokenAlreadyExchanged, @@ -1568,6 +1613,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'too_many_members' => TooManyMembers, 'too_many_named_entities' => TooManyNamedEntities, 'too_many_pins' => TooManyPins, + 'too_many_properties' => TooManyProperties, 'too_many_reactions' => TooManyReactions, 'too_many_requests' => TooManyRequests, 'too_many_tabs' => TooManyTabs, @@ -1611,6 +1657,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'user_already_deleted' => UserAlreadyDeleted, 'user_already_team_member' => UserAlreadyTeamMember, 'user_auth_url_missing' => UserAuthUrlMissing, + 'user_cannot_be_added_to_workspace' => UserCannotBeAddedToWorkspace, 'user_cannot_create_channel' => UserCannotCreateChannel, 'user_cannot_manage_public_channels' => UserCannotManagePublicChannels, 'user_cannot_manage_workspace' => UserCannotManageWorkspace, @@ -1641,6 +1688,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'view_too_large' => ViewTooLarge, 'visibility_is_not_named_entities' => VisibilityIsNotNamedEntities, 'workflows_export_csv_not_enabled' => WorkflowsExportCsvNotEnabled, + 'workspace_not_eligible' => WorkspaceNotEligible, }.freeze end end diff --git a/lib/slack/web/api/slack-api-ref b/lib/slack/web/api/slack-api-ref index 2895c4d2..d980b887 160000 --- a/lib/slack/web/api/slack-api-ref +++ b/lib/slack/web/api/slack-api-ref @@ -1 +1 @@ -Subproject commit 2895c4d2a06e45d67a3a27c3005a33f9d95d9168 +Subproject commit d980b887f601ac588c33f9b682ea11404c3a5d8a diff --git a/spec/slack/web/api/endpoints/admin_conversations_spec.rb b/spec/slack/web/api/endpoints/admin_conversations_spec.rb index 5e5db3ce..361e7804 100644 --- a/spec/slack/web/api/endpoints/admin_conversations_spec.rb +++ b/spec/slack/web/api/endpoints/admin_conversations_spec.rb @@ -36,6 +36,14 @@ expect { client.admin_conversations_bulkSetExcludeFromSlackAi(channel_ids: %q[["C12345", "C98765"]]) }.to raise_error ArgumentError, /Required arguments :exclude missing/ end end + context 'admin.conversations_bulkSetProperties' do + it 'requires channel_ids' do + expect { client.admin_conversations_bulkSetProperties(property: %q[{"exclude_from_slack_ai": true }]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/ + end + it 'requires property' do + expect { client.admin_conversations_bulkSetProperties(channel_ids: %q[]) }.to raise_error ArgumentError, /Required arguments :property missing/ + end + end context 'admin.conversations_convertToPrivate' do it 'requires channel_id' do expect { client.admin_conversations_convertToPrivate }.to raise_error ArgumentError, /Required arguments :channel_id missing/ diff --git a/spec/slack/web/api/endpoints/admin_usergroups_spec.rb b/spec/slack/web/api/endpoints/admin_usergroups_spec.rb index cc9cb1ae..39e7d2f8 100644 --- a/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +++ b/spec/slack/web/api/endpoints/admin_usergroups_spec.rb @@ -34,4 +34,12 @@ expect { client.admin_usergroups_removeChannels(usergroup_id: %q[S00000000]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/ end end + context 'admin.usergroups_removeTeams' do + it 'requires usergroup_id' do + expect { client.admin_usergroups_removeTeams(team_ids: %q[T12345678,T98765432]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/ + end + it 'requires team_ids' do + expect { client.admin_usergroups_removeTeams(usergroup_id: %q[S12345678]) }.to raise_error ArgumentError, /Required arguments :team_ids missing/ + end + end end diff --git a/spec/slack/web/api/endpoints/admin_users_spec.rb b/spec/slack/web/api/endpoints/admin_users_spec.rb index 96747ff4..44676a08 100644 --- a/spec/slack/web/api/endpoints/admin_users_spec.rb +++ b/spec/slack/web/api/endpoints/admin_users_spec.rb @@ -13,6 +13,11 @@ expect { client.admin_users_assign(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/ end end + context 'admin.users_getExpiration' do + it 'requires user_id' do + expect { client.admin_users_getExpiration }.to raise_error ArgumentError, /Required arguments :user_id missing/ + end + end context 'admin.users_invite' do it 'requires team_id' do expect { client.admin_users_invite(email: %q[joe@email.com], channel_ids: %q[C1A2B3C4D,C26Z25Y24]) }.to raise_error ArgumentError, /Required arguments :team_id missing/ diff --git a/spec/slack/web/api/endpoints/agents_sessions_spec.rb b/spec/slack/web/api/endpoints/agents_sessions_spec.rb new file mode 100644 index 00000000..3116c400 --- /dev/null +++ b/spec/slack/web/api/endpoints/agents_sessions_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::AgentsSessions do + let(:client) { Slack::Web::Client.new } + context 'agents.sessions_rename' do + it 'requires title' do + expect { client.agents_sessions_rename }.to raise_error ArgumentError, /Required arguments :title missing/ + end + end + context 'agents.sessions_setStatus' do + it 'requires status' do + expect { client.agents_sessions_setStatus }.to raise_error ArgumentError, /Required arguments :status missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/apps_managed_permissions_spec.rb b/spec/slack/web/api/endpoints/apps_managed_permissions_spec.rb new file mode 100644 index 00000000..86e7167a --- /dev/null +++ b/spec/slack/web/api/endpoints/apps_managed_permissions_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::AppsManagedPermissions do + let(:client) { Slack::Web::Client.new } + context 'apps.managed.permissions_set' do + it 'requires app_id' do + expect { client.apps_managed_permissions_set(permissions: %q[everyone]) }.to raise_error ArgumentError, /Required arguments :app_id missing/ + end + it 'requires permissions' do + expect { client.apps_managed_permissions_set(app_id: %q[]) }.to raise_error ArgumentError, /Required arguments :permissions missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/chat_spec.rb b/spec/slack/web/api/endpoints/chat_spec.rb index acafaac1..c727fd79 100644 --- a/spec/slack/web/api/endpoints/chat_spec.rb +++ b/spec/slack/web/api/endpoints/chat_spec.rb @@ -7,13 +7,10 @@ let(:client) { Slack::Web::Client.new } context 'chat_appendStream' do it 'requires channel' do - expect { client.chat_appendStream(ts: %q[], markdown_text: %q[**This is bold text**]) }.to raise_error ArgumentError, /Required arguments :channel missing/ + expect { client.chat_appendStream(ts: %q[]) }.to raise_error ArgumentError, /Required arguments :channel missing/ end it 'requires ts' do - expect { client.chat_appendStream(channel: %q[], markdown_text: %q[**This is bold text**]) }.to raise_error ArgumentError, /Required arguments :ts missing/ - end - it 'requires markdown_text' do - expect { client.chat_appendStream(channel: %q[], ts: %q[]) }.to raise_error ArgumentError, /Required arguments :markdown_text missing/ + expect { client.chat_appendStream(channel: %q[]) }.to raise_error ArgumentError, /Required arguments :ts missing/ end end context 'chat_command' do @@ -253,10 +250,7 @@ end context 'chat_startStream' do it 'requires channel' do - expect { client.chat_startStream(thread_ts: %q[1721609600.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/ - end - it 'requires thread_ts' do - expect { client.chat_startStream(channel: %q[]) }.to raise_error ArgumentError, /Required arguments :thread_ts missing/ + expect { client.chat_startStream }.to raise_error ArgumentError, /Required arguments :channel missing/ end end context 'chat_stopStream' do diff --git a/spec/slack/web/api/endpoints/slackLists_access_spec.rb b/spec/slack/web/api/endpoints/slackLists_access_spec.rb index 9845354c..ec743a64 100644 --- a/spec/slack/web/api/endpoints/slackLists_access_spec.rb +++ b/spec/slack/web/api/endpoints/slackLists_access_spec.rb @@ -12,7 +12,7 @@ end context 'slackLists.access_set' do it 'requires list_id' do - expect { client.slackLists_access_set(access_level: %q[]) }.to raise_error ArgumentError, /Required arguments :list_id missing/ + expect { client.slackLists_access_set(access_level: %q[read]) }.to raise_error ArgumentError, /Required arguments :list_id missing/ end it 'requires access_level' do expect { client.slackLists_access_set(list_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :access_level missing/ diff --git a/spec/slack/web/api/endpoints/users_spec.rb b/spec/slack/web/api/endpoints/users_spec.rb index 5a8c4633..ac618f30 100644 --- a/spec/slack/web/api/endpoints/users_spec.rb +++ b/spec/slack/web/api/endpoints/users_spec.rb @@ -5,11 +5,6 @@ RSpec.describe Slack::Web::Api::Endpoints::Users do let(:client) { Slack::Web::Client.new } - context 'users_info' do - it 'requires user' do - expect { client.users_info }.to raise_error ArgumentError, /Required arguments :user missing/ - end - end context 'users_lookupByEmail' do it 'requires email' do expect { client.users_lookupByEmail }.to raise_error ArgumentError, /Required arguments :email missing/