From 6217b51bc4dc210b2ca25fd49630e9e45541007b Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Sat, 29 Apr 2023 22:44:54 -0400 Subject: [PATCH 1/2] Force push with a GHA. --- .github/workflows/update_api.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update_api.yml b/.github/workflows/update_api.yml index d3c46aa7..b4035350 100644 --- a/.github/workflows/update_api.yml +++ b/.github/workflows/update_api.yml @@ -61,15 +61,14 @@ jobs: include: CHANGELOG.md find: "\\* Your contribution here." replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby-client/pulls/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here." - - name: push - uses: dblock/commit@edcd15e90878df73c18a5bbdcd5755f10be8baa0 - with: - github-token: ${{ steps.github_app_token.outputs.token }} - push-branch: 'automated-api-update' - commit-message: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }}) - commit-amend: true - force-add: true - force-push: true - files: CHANGELOG.md - name: slack-ruby-ci-bot - email: noreply@github.com + - name: Commit and Push + run: | + git config --local user.name 'slack-ruby-ci-bot' + git config --local user.email 'noreply@github.com' + git config --local --unset-all http.https://github.com/.extraheader || true + AUTH=$(echo -n "x-access-token:${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}" | base64) + echo "::add-mask::$AUTH" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic x-access-token:$AUTH" + git add CHANGELOG.md + git commit --amend --no-edit + git push origin automated-api-update -f From 561e03ce46fdb48df3df9b6de4b50540c2df8a74 Mon Sep 17 00:00:00 2001 From: slack-ruby-ci-bot Date: Sun, 30 Apr 2023 03:12:00 +0000 Subject: [PATCH 2/2] Update API from slack-api-ref@878be8f (2023-04-30) --- bin/commands/apps_auth_external.rb | 32 +++++++++++++++ bin/commands/chat.rb | 12 +++--- bin/commands/functions_workflows_steps.rb | 3 +- .../functions_workflows_steps_responses.rb | 3 +- bin/commands/stars.rb | 4 +- bin/commands/users.rb | 2 +- lib/slack/web/api/endpoints.rb | 2 + .../web/api/endpoints/apps_auth_external.rb | 41 +++++++++++++++++++ lib/slack/web/api/endpoints/chat.rb | 12 +++--- .../endpoints/functions_workflows_steps.rb | 4 +- .../functions_workflows_steps_responses.rb | 4 +- lib/slack/web/api/endpoints/stars.rb | 2 +- lib/slack/web/api/endpoints/users.rb | 2 +- lib/slack/web/api/errors.rb | 26 ++++++++++-- lib/slack/web/api/slack-api-ref | 2 +- .../api/endpoints/apps_auth_external_spec.rb | 13 ++++++ 16 files changed, 138 insertions(+), 26 deletions(-) create mode 100644 bin/commands/apps_auth_external.rb create mode 100644 lib/slack/web/api/endpoints/apps_auth_external.rb create mode 100644 spec/slack/web/api/endpoints/apps_auth_external_spec.rb diff --git a/bin/commands/apps_auth_external.rb b/bin/commands/apps_auth_external.rb new file mode 100644 index 00000000..c104cb5e --- /dev/null +++ b/bin/commands/apps_auth_external.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'AppsAuthExternal methods.' + command 'apps_auth_external' do |g| + g.desc 'Delete external auth tokens only on the Slack side' + g.long_desc %( Delete external auth tokens only on the Slack side ) + g.command 'delete' do |c| + c.flag 'app_id', desc: 'The id of the app whose tokens you want to delete.' + c.flag 'external_token_id', desc: 'The id of the token that you want to delete.' + c.flag 'provider_key', desc: 'The provider key of the provider whose tokens you want to delete.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.apps_auth_external_delete(options)) + end + end + + g.desc 'Get the access token for the provided token ID' + g.long_desc %( Get the access token for the provided token ID ) + g.command 'get' do |c| + c.flag 'external_token_id', desc: 'The id of the token you want to get the token for.' + c.flag 'force_refresh', desc: 'Always refresh existing token before returning even when the token has not expired.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.apps_auth_external_get(options)) + end + end + end + end + end +end diff --git a/bin/commands/chat.rb b/bin/commands/chat.rb index 7afbfc45..33936f24 100644 --- a/bin/commands/chat.rb +++ b/bin/commands/chat.rb @@ -68,12 +68,12 @@ class App c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.' c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.' c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' - c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' - c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' + c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.' + c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.' c.flag 'link_names', desc: 'Find and link channel names and usernames.' c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.' c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread." - c.flag 'username', desc: "Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below." + c.flag 'username', desc: "Set your bot's user name." c.action do |_global_options, options, _args| puts JSON.dump(@client.chat_postEphemeral(options)) end @@ -87,8 +87,8 @@ class App c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.' c.flag 'text', desc: 'The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications.' c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic Slack apps. See authorship below.' - c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' - c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.' + c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.' + c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.' c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.' 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.' c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.' @@ -97,7 +97,7 @@ class App c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead." 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. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below." + c.flag 'username', desc: "Set your bot's user name." c.action do |_global_options, options, _args| puts JSON.dump(@client.chat_postMessage(options)) end diff --git a/bin/commands/functions_workflows_steps.rb b/bin/commands/functions_workflows_steps.rb index 19ffda3f..eb4e63ff 100644 --- a/bin/commands/functions_workflows_steps.rb +++ b/bin/commands/functions_workflows_steps.rb @@ -9,8 +9,9 @@ class App g.desc "List the steps of a specific function of a workflow's versions" g.long_desc %( List the steps of a specific function of a workflow's versions ) g.command 'list' do |c| - c.flag 'function_id', desc: '.' + c.flag 'function_id', desc: 'The ID of the function to query.' c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.' + c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.' c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.' c.action do |_global_options, options, _args| puts JSON.dump(@client.functions_workflows_steps_list(options)) diff --git a/bin/commands/functions_workflows_steps_responses.rb b/bin/commands/functions_workflows_steps_responses.rb index 04bf9ffd..43b62ec8 100644 --- a/bin/commands/functions_workflows_steps_responses.rb +++ b/bin/commands/functions_workflows_steps_responses.rb @@ -9,8 +9,9 @@ class App g.desc 'Download form responses of a workflow' g.long_desc %( Download form responses of a workflow ) g.command 'export' do |c| - c.flag 'step_id', desc: '.' + c.flag 'step_id', desc: 'The ID of the OpenForm step to export.' c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.' + c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.' c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.' c.action do |_global_options, options, _args| puts JSON.dump(@client.functions_workflows_steps_responses_export(options)) diff --git a/bin/commands/stars.rb b/bin/commands/stars.rb index fccacbb3..a4936018 100644 --- a/bin/commands/stars.rb +++ b/bin/commands/stars.rb @@ -18,8 +18,8 @@ class App end end - g.desc "List a user's saved items, formerly known as _stars_." - g.long_desc %( List a user's saved items, formerly known as _stars_. ) + g.desc "List a user's saved items, formerly known as stars." + g.long_desc %( List a user's saved items, formerly known as stars. ) g.command 'list' do |c| c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details." c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached." diff --git a/bin/commands/users.rb b/bin/commands/users.rb index 92a2eeaa..3553b096 100644 --- a/bin/commands/users.rb +++ b/bin/commands/users.rb @@ -11,7 +11,7 @@ class App g.command 'conversations' do |c| 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.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.' - c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000." + c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer with a max value of 999." c.flag 'team_id', desc: 'encoded team id to list conversations in, required if org token is used.' c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.' c.flag 'user', desc: "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership." diff --git a/lib/slack/web/api/endpoints.rb b/lib/slack/web/api/endpoints.rb index 379ef434..baf3d22a 100644 --- a/lib/slack/web/api/endpoints.rb +++ b/lib/slack/web/api/endpoints.rb @@ -27,6 +27,7 @@ require_relative 'endpoints/admin_users_unsupportedVersions' require_relative 'endpoints/api' require_relative 'endpoints/apps' +require_relative 'endpoints/apps_auth_external' require_relative 'endpoints/apps_connections' require_relative 'endpoints/apps_datastore' require_relative 'endpoints/apps_event_authorizations' @@ -105,6 +106,7 @@ module Endpoints include AdminUsersUnsupportedversions include Api include Apps + include AppsAuthExternal include AppsConnections include AppsDatastore include AppsEventAuthorizations diff --git a/lib/slack/web/api/endpoints/apps_auth_external.rb b/lib/slack/web/api/endpoints/apps_auth_external.rb new file mode 100644 index 00000000..193a3ac8 --- /dev/null +++ b/lib/slack/web/api/endpoints/apps_auth_external.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module AppsAuthExternal + # + # Delete external auth tokens only on the Slack side + # + # @option options [string] :app_id + # The id of the app whose tokens you want to delete. + # @option options [string] :external_token_id + # The id of the token that you want to delete. + # @option options [string] :provider_key + # The provider key of the provider whose tokens you want to delete. + # @see https://api.slack.com/methods/apps.auth.external.delete + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.auth.external/apps.auth.external.delete.json + def apps_auth_external_delete(options = {}) + post('apps.auth.external.delete', options) + end + + # + # Get the access token for the provided token ID + # + # @option options [string] :external_token_id + # The id of the token you want to get the token for. + # @option options [boolean] :force_refresh + # Always refresh existing token before returning even when the token has not expired. + # @see https://api.slack.com/methods/apps.auth.external.get + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.auth.external/apps.auth.external.get.json + def apps_auth_external_get(options = {}) + raise ArgumentError, 'Required arguments :external_token_id missing' if options[:external_token_id].nil? + post('apps.auth.external.get', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index bf202f1e..4f5f7ab8 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -107,9 +107,9 @@ def chat_meMessage(options = {}) # @option options [blocks[] as string] :blocks # A JSON-based array of structured blocks, presented as a URL-encoded string. # @option options [string] :icon_emoji - # Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # Emoji to use as the icon for this message. Overrides icon_url. # @option options [string] :icon_url - # URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # URL to an image to use as the icon for this message. # @option options [boolean] :link_names # Find and link channel names and usernames. # @option options [string] :parse @@ -117,7 +117,7 @@ def chat_meMessage(options = {}) # @option options [string] :thread_ts # Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread. # @option options [string] :username - # Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # Set your bot's user name. # @see https://api.slack.com/methods/chat.postEphemeral # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json def chat_postEphemeral(options = {}) @@ -143,9 +143,9 @@ def chat_postEphemeral(options = {}) # @option options [boolean] :as_user # (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic Slack apps. See authorship below. # @option options [string] :icon_emoji - # Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # Emoji to use as the icon for this message. Overrides icon_url. # @option options [string] :icon_url - # URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # URL to an image to use as the icon for this message. # @option options [boolean] :link_names # Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead. # @option options [string] :metadata @@ -163,7 +163,7 @@ def chat_postEphemeral(options = {}) # @option options [boolean] :unfurl_media # Pass false to disable unfurling of media content. # @option options [string] :username - # Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # Set your bot's user name. # @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 = {}) diff --git a/lib/slack/web/api/endpoints/functions_workflows_steps.rb b/lib/slack/web/api/endpoints/functions_workflows_steps.rb index c75f74b5..2f7f8443 100644 --- a/lib/slack/web/api/endpoints/functions_workflows_steps.rb +++ b/lib/slack/web/api/endpoints/functions_workflows_steps.rb @@ -10,9 +10,11 @@ module FunctionsWorkflowsSteps # List the steps of a specific function of a workflow's versions # # @option options [string] :function_id - # . + # The ID of the function to query. # @option options [string] :workflow # The workflow encoded ID or workflow reference. + # @option options [string] :workflow_app_id + # The app tied to the workflow reference. # @option options [string] :workflow_id # The workflow ID, starts with Wf*. # @see https://api.slack.com/methods/functions.workflows.steps.list diff --git a/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb b/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb index 5500b03d..e6d435d1 100644 --- a/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +++ b/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb @@ -10,9 +10,11 @@ module FunctionsWorkflowsStepsResponses # Download form responses of a workflow # # @option options [string] :step_id - # . + # The ID of the OpenForm step to export. # @option options [string] :workflow # The workflow encoded ID or workflow reference. + # @option options [string] :workflow_app_id + # The app tied to the workflow reference. # @option options [string] :workflow_id # The workflow ID, starts with Wf*. # @see https://api.slack.com/methods/functions.workflows.steps.responses.export diff --git a/lib/slack/web/api/endpoints/stars.rb b/lib/slack/web/api/endpoints/stars.rb index 9cfbf744..730503fa 100644 --- a/lib/slack/web/api/endpoints/stars.rb +++ b/lib/slack/web/api/endpoints/stars.rb @@ -25,7 +25,7 @@ def stars_add(options = {}) end # - # List a user's saved items, formerly known as _stars_. + # List a user's saved items, formerly known as stars. # # @option options [string] :cursor # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. diff --git a/lib/slack/web/api/endpoints/users.rb b/lib/slack/web/api/endpoints/users.rb index 8f34a613..302404e4 100644 --- a/lib/slack/web/api/endpoints/users.rb +++ b/lib/slack/web/api/endpoints/users.rb @@ -14,7 +14,7 @@ module Users # @option options [boolean] :exclude_archived # Set to true to exclude archived channels from the list. # @option options [number] :limit - # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000. + # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer with a max value of 999. # @option options [string] :team_id # encoded team id to list conversations in, required if org token is used. # @option options [string] :types diff --git a/lib/slack/web/api/errors.rb b/lib/slack/web/api/errors.rb index e90a596e..de602d41 100644 --- a/lib/slack/web/api/errors.rb +++ b/lib/slack/web/api/errors.rb @@ -81,7 +81,6 @@ class CannotPrompt < SlackError; end class CannotResetBot < SlackError; end class CannotResetPrimaryOwner < SlackError; end class CannotResolveAlias < SlackError; end - class CannotSetBothNumMinutesAndIsIndefinite < SlackError; end class CannotSetThisGuestToRegularAtTeamLevel < SlackError; end class CannotShareCrossWorkspaceChannel < SlackError; end class CannotShareMandatoryChannel < SlackError; end @@ -102,6 +101,7 @@ class CantLeaveGeneral < SlackError; end class CantUpdateMessage < SlackError; end class CanvasDisabledFileTeam < SlackError; end class CanvasDisabledUserTeam < SlackError; end + class CanvasGloballyDisabled < SlackError; end class ChannelArchived < SlackError; end class ChannelCannotBeUnshared < SlackError; end class ChannelCanvasDeleted < SlackError; end @@ -314,6 +314,7 @@ class InvalidTargetTeam < SlackError; end class InvalidTeam < SlackError; end class InvalidTeamId < SlackError; end class InvalidTeamIds < SlackError; end + class InvalidThreadTs < SlackError; end class InvalidTime < SlackError; end class InvalidTimestamp < SlackError; end class InvalidTitle < SlackError; end @@ -342,6 +343,7 @@ class InviteeCantSeeChannel < SlackError; end class InvitorCannotSeeChannel < SlackError; end class IsArchived < SlackError; end class IsBot < SlackError; end + class IsIdpManaged < SlackError; end class IsInactive < SlackError; end class IsPendingConnectedToOrg < SlackError; end class LastMember < SlackError; end @@ -355,6 +357,7 @@ class MalwareDetected < SlackError; end class ManagedChannelNotSupported < SlackError; end class MemberAnalyticsDisabled < SlackError; end class MemberLimitExceeded < SlackError; end + class MessageLimitExceeded < SlackError; end class MessageNotFound < SlackError; end class MessageTooLong < SlackError; end class MessagesTabDisabled < SlackError; end @@ -363,6 +366,7 @@ class MetadataNotAvailable < SlackError; end class MetadataOnlyDoesNotSupportDate < SlackError; end class MetadataTooLarge < SlackError; end class MethodDeprecated < SlackError; end + class MethodNotSupported < SlackError; end class MethodNotSupportedForChannelType < SlackError; end class MigrationInProgress < SlackError; end class MissingArgs < SlackError; end @@ -389,6 +393,7 @@ class MustProvideTeamDomain < SlackError; end class MustProvideTeamName < SlackError; end class MustRevokeAccess < SlackError; end class NameAlreadyExists < SlackError; end + class NameNotAllowed < SlackError; end class NameTaken < SlackError; end class NameTakenInOrg < SlackError; end class NameTooLong < SlackError; end @@ -404,12 +409,14 @@ class NoLocalUserOnTeam < SlackError; end class NoPermission < SlackError; end class NoPin < SlackError; end class NoReaction < SlackError; end + class NoRefreshToken < SlackError; end class NoResolutionFound < SlackError; end class NoScopes < SlackError; end class NoSuchSubteam < SlackError; end class NoTeamIdsGiven < SlackError; end class NoTeamsToDisconnect < SlackError; end class NoText < SlackError; end + class NoTokensFound < SlackError; end class NoUser < SlackError; end class NoUsersProvided < SlackError; end class NoValidChannels < SlackError; end @@ -465,6 +472,7 @@ class PostingToGeneralChannelDenied < SlackError; end class PreviewFeatureNotAvailable < SlackError; end class PrimaryUsergroupNotFound < SlackError; end class ProfileSetFailed < SlackError; end + class ProvidersNotFound < SlackError; end class PublicVideoNotAllowed < SlackError; end class PublishedAppOnly < SlackError; end class PushLimitReached < SlackError; end @@ -496,7 +504,6 @@ class SlackConnectCanvasSharingBlocked < SlackError; end class SlackConnectClipSharingBlocked < SlackError; end class SlackConnectFileLinkSharingBlocked < SlackError; end class SlackConnectFileUploadSharingBlocked < SlackError; end - class SlackConnectTeamBlocked < SlackError; end class SnippetTooLarge < SlackError; end class SnoozeEndFailed < SlackError; end class SnoozeFailed < SlackError; end @@ -521,6 +528,7 @@ class TimeInPast < SlackError; end class TimeTooFar < SlackError; end class TokenAlreadyExchanged < SlackError; end class TokenExpired < SlackError; end + class TokenNotFound < SlackError; end class TokenRevoked < SlackError; end class TokenRotationNotEnabled < SlackError; end class TooLarge < SlackError; end @@ -547,6 +555,7 @@ class TooManyUsers < SlackError; end class TriggerExchanged < SlackError; end class TriggerExpired < SlackError; end class TwoFactorSetupRequired < SlackError; end + class UnableToDelete < SlackError; end class UnableToFetchCustomEmojis < SlackError; end class UnableToLinkIdpGroupAndChannel < SlackError; end class UnableToProcessPostRequest < SlackError; end @@ -671,7 +680,6 @@ class ViewTooLarge < SlackError; end 'cannot_reset_bot' => CannotResetBot, 'cannot_reset_primary_owner' => CannotResetPrimaryOwner, 'cannot_resolve_alias' => CannotResolveAlias, - 'cannot_set_both_num_minutes_and_is_indefinite' => CannotSetBothNumMinutesAndIsIndefinite, 'cannot_set_this_guest_to_regular_at_team_level' => CannotSetThisGuestToRegularAtTeamLevel, 'cannot_share_cross_workspace_channel' => CannotShareCrossWorkspaceChannel, 'cannot_share_mandatory_channel' => CannotShareMandatoryChannel, @@ -692,6 +700,7 @@ class ViewTooLarge < SlackError; end 'cant_update_message' => CantUpdateMessage, 'canvas_disabled_file_team' => CanvasDisabledFileTeam, 'canvas_disabled_user_team' => CanvasDisabledUserTeam, + 'canvas_globally_disabled' => CanvasGloballyDisabled, 'channel_archived' => ChannelArchived, 'channel_cannot_be_unshared' => ChannelCannotBeUnshared, 'channel_canvas_deleted' => ChannelCanvasDeleted, @@ -904,6 +913,7 @@ class ViewTooLarge < SlackError; end 'invalid_team' => InvalidTeam, 'invalid_team_id' => InvalidTeamId, 'invalid_team_ids' => InvalidTeamIds, + 'invalid_thread_ts' => InvalidThreadTs, 'invalid_time' => InvalidTime, 'invalid_timestamp' => InvalidTimestamp, 'invalid_title' => InvalidTitle, @@ -932,6 +942,7 @@ class ViewTooLarge < SlackError; end 'invitor_cannot_see_channel' => InvitorCannotSeeChannel, 'is_archived' => IsArchived, 'is_bot' => IsBot, + 'is_idp_managed' => IsIdpManaged, 'is_inactive' => IsInactive, 'is_pending_connected_to_org' => IsPendingConnectedToOrg, 'last_member' => LastMember, @@ -945,6 +956,7 @@ class ViewTooLarge < SlackError; end 'managed_channel_not_supported' => ManagedChannelNotSupported, 'member_analytics_disabled' => MemberAnalyticsDisabled, 'member_limit_exceeded' => MemberLimitExceeded, + 'message_limit_exceeded' => MessageLimitExceeded, 'message_not_found' => MessageNotFound, 'message_too_long' => MessageTooLong, 'messages_tab_disabled' => MessagesTabDisabled, @@ -953,6 +965,7 @@ class ViewTooLarge < SlackError; end 'metadata_only_does_not_support_date' => MetadataOnlyDoesNotSupportDate, 'metadata_too_large' => MetadataTooLarge, 'method_deprecated' => MethodDeprecated, + 'method_not_supported' => MethodNotSupported, 'method_not_supported_for_channel_type' => MethodNotSupportedForChannelType, 'migration_in_progress' => MigrationInProgress, 'missing_args' => MissingArgs, @@ -979,6 +992,7 @@ class ViewTooLarge < SlackError; end 'must_provide_team_name' => MustProvideTeamName, 'must_revoke_access' => MustRevokeAccess, 'name_already_exists' => NameAlreadyExists, + 'name_not_allowed' => NameNotAllowed, 'name_taken' => NameTaken, 'name_taken_in_org' => NameTakenInOrg, 'name_too_long' => NameTooLong, @@ -994,12 +1008,14 @@ class ViewTooLarge < SlackError; end 'no_permission' => NoPermission, 'no_pin' => NoPin, 'no_reaction' => NoReaction, + 'no_refresh_token' => NoRefreshToken, 'no_resolution_found' => NoResolutionFound, 'no_scopes' => NoScopes, 'no_such_subteam' => NoSuchSubteam, 'no_team_ids_given' => NoTeamIdsGiven, 'no_teams_to_disconnect' => NoTeamsToDisconnect, 'no_text' => NoText, + 'no_tokens_found' => NoTokensFound, 'no_user' => NoUser, 'no_users_provided' => NoUsersProvided, 'no_valid_channels' => NoValidChannels, @@ -1055,6 +1071,7 @@ class ViewTooLarge < SlackError; end 'preview_feature_not_available' => PreviewFeatureNotAvailable, 'primary_usergroup_not_found' => PrimaryUsergroupNotFound, 'profile_set_failed' => ProfileSetFailed, + 'providers_not_found' => ProvidersNotFound, 'public_video_not_allowed' => PublicVideoNotAllowed, 'published_app_only' => PublishedAppOnly, 'push_limit_reached' => PushLimitReached, @@ -1086,7 +1103,6 @@ class ViewTooLarge < SlackError; end 'slack_connect_clip_sharing_blocked' => SlackConnectClipSharingBlocked, 'slack_connect_file_link_sharing_blocked' => SlackConnectFileLinkSharingBlocked, 'slack_connect_file_upload_sharing_blocked' => SlackConnectFileUploadSharingBlocked, - 'slack_connect_team_blocked' => SlackConnectTeamBlocked, 'snippet_too_large' => SnippetTooLarge, 'snooze_end_failed' => SnoozeEndFailed, 'snooze_failed' => SnoozeFailed, @@ -1111,6 +1127,7 @@ class ViewTooLarge < SlackError; end 'time_too_far' => TimeTooFar, 'token_already_exchanged' => TokenAlreadyExchanged, 'token_expired' => TokenExpired, + 'token_not_found' => TokenNotFound, 'token_revoked' => TokenRevoked, 'token_rotation_not_enabled' => TokenRotationNotEnabled, 'too_large' => TooLarge, @@ -1137,6 +1154,7 @@ class ViewTooLarge < SlackError; end 'trigger_exchanged' => TriggerExchanged, 'trigger_expired' => TriggerExpired, 'two_factor_setup_required' => TwoFactorSetupRequired, + 'unable_to_delete' => UnableToDelete, 'unable_to_fetch_custom_emojis' => UnableToFetchCustomEmojis, 'unable_to_link_idp_group_and_channel' => UnableToLinkIdpGroupAndChannel, 'unable_to_process_post_request' => UnableToProcessPostRequest, diff --git a/lib/slack/web/api/slack-api-ref b/lib/slack/web/api/slack-api-ref index 878be8fe..a29b5209 160000 --- a/lib/slack/web/api/slack-api-ref +++ b/lib/slack/web/api/slack-api-ref @@ -1 +1 @@ -Subproject commit 878be8fe506e4bde7254ed8a2949e3712e72f9a1 +Subproject commit a29b5209dc53c3735fd19dc0a120ea2501ada111 diff --git a/spec/slack/web/api/endpoints/apps_auth_external_spec.rb b/spec/slack/web/api/endpoints/apps_auth_external_spec.rb new file mode 100644 index 00000000..8f45d51a --- /dev/null +++ b/spec/slack/web/api/endpoints/apps_auth_external_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::AppsAuthExternal do + let(:client) { Slack::Web::Client.new } + context 'apps.auth.external_get' do + it 'requires external_token_id' do + expect { client.apps_auth_external_get }.to raise_error ArgumentError, /Required arguments :external_token_id missing/ + end + end +end