Skip to content

Commit

Permalink
Update API from slack-api-ref@0d3f0b6 (2023-07-26)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jul 26, 2023
1 parent cdd322e commit e4c3afc
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 60 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [#481](https://github.com/slack-ruby-client/pulls/481): Update API from [slack-api-ref@7c22d0b](https://github.com/slack-ruby/slack-api-ref/commit/7c22d0b) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
* [#488](https://github.com/slack-ruby-client/pulls/488): Update API from [slack-api-ref@a45def2](https://github.com/slack-ruby/slack-api-ref/commit/a45def2) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
* [#490](https://github.com/slack-ruby/slack-ruby-client/pull/490): Add changelog uri to gemspec - [@MatheusRich](https://github.com/MatheusRich).
* [#489](https://github.com/slack-ruby-client/pulls/489): Update API from [slack-api-ref@0d3f0b6](https://github.com/slack-ruby/slack-api-ref/commit/0d3f0b6) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
* Your contribution here.

### 2.1.0 (2023/03/17)
Expand Down
16 changes: 0 additions & 16 deletions bin/commands/admin_conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,6 @@ class App
end
end

g.desc 'Search for public or private channels in an Enterprise organization.'
g.long_desc %( Search for public or private channels in an Enterprise organization. )
g.command 'search' do |c|
c.flag 'connected_team_ids', desc: 'Array of encoded team IDs, signifying the external orgs to search through.'
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: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
c.flag 'query', desc: 'Name of the the channel to query by.'
c.flag 'search_channel_types', desc: 'The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.'
c.flag 'sort', desc: 'Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.'
c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_conversations_search(options))
end
end

g.desc 'Set the posting permissions for a public or private channel.'
g.long_desc %( Set the posting permissions for a public or private channel. )
g.command 'setConversationPrefs' do |c|
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/admin_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class App
c.flag 'is_restricted', desc: 'Is this user a multi-channel guest user? (default: false).'
c.flag 'is_ultra_restricted', desc: 'Is this user a single channel guest user? (default: false).'
c.flag 'real_name', desc: 'Full name of the user.'
c.flag 'resend', desc: 'Allow this invite to be resent in the future if a user has not signed up yet. (default: false).'
c.flag 'resend', desc: 'Allow this invite to be resent in the future if a user has not signed up yet. Resending can only be done via the UI and has no expiration. (default: false).'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_users_invite(options))
end
Expand Down
31 changes: 0 additions & 31 deletions lib/slack/web/api/endpoints/admin_conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,37 +245,6 @@ def admin_conversations_rename(options = {})
post('admin.conversations.rename', options)
end

#
# Search for public or private channels in an Enterprise organization.
#
# @option options [array] :connected_team_ids
# Array of encoded team IDs, signifying the external orgs to search through.
# @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
# Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
# @option options [string] :query
# Name of the the channel to query by.
# @option options [array] :search_channel_types
# The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.
# @option options [string] :sort
# Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.
# @option options [string] :sort_dir
# Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).
# @option options [array] :team_ids
# Comma separated string of team IDs, signifying the internal workspaces to search through.
# @see https://api.slack.com/methods/admin.conversations.search
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.search.json
def admin_conversations_search(options = {})
if block_given?
Pagination::Cursor.new(self, :admin_conversations_search, options).each do |page|
yield page
end
else
post('admin.conversations.search', options)
end
end

#
# Set the posting permissions for a public or private channel.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/admin_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def admin_users_assign(options = {})
# @option options [string] :real_name
# Full name of the user.
# @option options [boolean] :resend
# Allow this invite to be resent in the future if a user has not signed up yet. (default: false).
# Allow this invite to be resent in the future if a user has not signed up yet. Resending can only be done via the UI and has no expiration. (default: false).
# @see https://api.slack.com/methods/admin.users.invite
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.invite.json
def admin_users_invite(options = {})
Expand Down
10 changes: 0 additions & 10 deletions lib/slack/web/api/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class ChannelOwnerRestriction < SlackError; end
class ChannelTypeNotSupported < SlackError; end
class ClientIdTokenMismatch < SlackError; end
class CodeAlreadyUsed < SlackError; end
class ConnectedTeamPassedInIsNotTopLevelTeam < SlackError; end
class ConnectionLimitExceeded < SlackError; end
class ConnectionLimitExceededPending < SlackError; end
class CouldNotArchiveChannel < SlackError; end
Expand Down Expand Up @@ -173,7 +172,6 @@ class ExchangedTriggerId < SlackError; end
class ExpiredTriggerId < SlackError; end
class ExternalChannelMigrating < SlackError; end
class ExternalLimitedRestriction < SlackError; end
class ExternalTeamNotConnectedToThisOrg < SlackError; end
class ExternallySharedOrDisconnectedChannel < SlackError; end
class FailToGetTeamsForRestrictedUser < SlackError; end
class FailedAddingCollaborator < SlackError; end
Expand Down Expand Up @@ -306,9 +304,7 @@ class InvalidRoleForUser < SlackError; end
class InvalidRoleId < SlackError; end
class InvalidScheduledMessageId < SlackError; end
class InvalidScopes < SlackError; end
class InvalidSearchChannelType < SlackError; end
class InvalidSort < SlackError; end
class InvalidSortDir < SlackError; end
class InvalidSource < SlackError; end
class InvalidStartTime < SlackError; end
class InvalidStepStatus < SlackError; end
Expand Down Expand Up @@ -594,7 +590,6 @@ class UserIsRestricted < SlackError; end
class UserIsUltraRestricted < SlackError; end
class UserMustBeAdmin < SlackError; end
class UserMustBeInWorkspace < SlackError; end
class UserNotAMemberOfThisWorkspace < SlackError; end
class UserNotFound < SlackError; end
class UserNotInChannel < SlackError; end
class UserNotVisible < SlackError; end
Expand Down Expand Up @@ -720,7 +715,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'channel_type_not_supported' => ChannelTypeNotSupported,
'client_id_token_mismatch' => ClientIdTokenMismatch,
'code_already_used' => CodeAlreadyUsed,
'connected_team_passed_in_is_not_top_level_team' => ConnectedTeamPassedInIsNotTopLevelTeam,
'connection_limit_exceeded' => ConnectionLimitExceeded,
'connection_limit_exceeded_pending' => ConnectionLimitExceededPending,
'could_not_archive_channel' => CouldNotArchiveChannel,
Expand Down Expand Up @@ -778,7 +772,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'expired_trigger_id' => ExpiredTriggerId,
'external_channel_migrating' => ExternalChannelMigrating,
'external_limited_restriction' => ExternalLimitedRestriction,
'external_team_not_connected_to_this_org' => ExternalTeamNotConnectedToThisOrg,
'externally_shared_or_disconnected_channel' => ExternallySharedOrDisconnectedChannel,
'fail_to_get_teams_for_restricted_user' => FailToGetTeamsForRestrictedUser,
'failed_adding_collaborator' => FailedAddingCollaborator,
Expand Down Expand Up @@ -911,9 +904,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'invalid_role_id' => InvalidRoleId,
'invalid_scheduled_message_id' => InvalidScheduledMessageId,
'invalid_scopes' => InvalidScopes,
'invalid_search_channel_type' => InvalidSearchChannelType,
'invalid_sort' => InvalidSort,
'invalid_sort_dir' => InvalidSortDir,
'invalid_source' => InvalidSource,
'invalid_start_time' => InvalidStartTime,
'invalid_step_status' => InvalidStepStatus,
Expand Down Expand Up @@ -1199,7 +1190,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'user_is_ultra_restricted' => UserIsUltraRestricted,
'user_must_be_admin' => UserMustBeAdmin,
'user_must_be_in_workspace' => UserMustBeInWorkspace,
'user_not_a_member_of_this_workspace' => UserNotAMemberOfThisWorkspace,
'user_not_found' => UserNotFound,
'user_not_in_channel' => UserNotInChannel,
'user_not_visible' => UserNotVisible,
Expand Down

0 comments on commit e4c3afc

Please sign in to comment.