Skip to content

Commit

Permalink
Update API from slack-api-ref@0d3f0b6 (2023-08-03)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Aug 3, 2023
1 parent cdd322e commit c019e81
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
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
6 changes: 3 additions & 3 deletions bin/commands/conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class App
c.flag 'channel_name', desc: 'Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take.'
c.flag 'channel_id', desc: "ID of the channel that you'd like to accept. Must provide either invite_id or channel_id."
c.flag 'free_trial_accepted', desc: "Whether you'd like to use your workspace's free trial to begin using Slack Connect."
c.flag 'invite_id', desc: 'See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.'
c.flag 'invite_id', desc: "ID of the invite that you'd like to accept. Must provide either invite_id or channel_id. See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation."
c.flag 'is_private', desc: 'Whether the channel should be private.'
c.flag 'team_id', desc: 'The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the team_id argument is required.'
c.action do |_global_options, options, _args|
Expand Down Expand Up @@ -109,9 +109,9 @@ class App
g.long_desc %( Sends an invitation to a Slack Connect channel )
g.command 'inviteShared' do |c|
c.flag 'channel', desc: "ID of the channel on your team that you'd like to share."
c.flag 'emails', desc: 'Optional email to receive this invite. Either emails or user_ids must be provided.'
c.flag 'emails', desc: 'Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
c.flag 'external_limited', desc: 'Optional boolean on whether invite is to a external limited member. Defaults to true.'
c.flag 'user_ids', desc: 'Optional user_id to receive this invite. Either emails or user_ids must be provided.'
c.flag 'user_ids', desc: 'Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.conversations_inviteShared(options))
end
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class App
g.long_desc %( Gets information about the current team. )
g.command 'info' do |c|
c.flag 'domain', desc: 'Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself.'
c.flag 'team', desc: 'Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels.'
c.flag 'team', desc: 'Team to get info about; if omitted, will return information about the current team.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.team_info(options))
end
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
6 changes: 3 additions & 3 deletions lib/slack/web/api/endpoints/conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Conversations
# @option options [boolean] :free_trial_accepted
# Whether you'd like to use your workspace's free trial to begin using Slack Connect.
# @option options [Object] :invite_id
# See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.
# ID of the invite that you'd like to accept. Must provide either invite_id or channel_id. See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.
# @option options [boolean] :is_private
# Whether the channel should be private.
# @option options [Object] :team_id
Expand Down Expand Up @@ -168,11 +168,11 @@ def conversations_invite(options = {})
# @option options [channel] :channel
# ID of the channel on your team that you'd like to share.
# @option options [array] :emails
# Optional email to receive this invite. Either emails or user_ids must be provided.
# Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
# @option options [boolean] :external_limited
# Optional boolean on whether invite is to a external limited member. Defaults to true.
# @option options [array] :user_ids
# Optional user_id to receive this invite. Either emails or user_ids must be provided.
# Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
# @see https://api.slack.com/methods/conversations.inviteShared
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.inviteShared.json
def conversations_inviteShared(options = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def team_billableInfo(options = {})
# @option options [string] :domain
# Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself.
# @option options [string] :team
# Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels.
# Team to get info about; if omitted, will return information about the current team.
# @see https://api.slack.com/methods/team.info
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.info.json
def team_info(options = {})
Expand Down
4 changes: 2 additions & 2 deletions lib/slack/web/api/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Web
module Api
module Errors
class AccessDenied < SlackError; end
class AccessTokenExchangeFailed < SlackError; end
class Accesslimited < SlackError; end
class AccountInactive < SlackError; end
class ActionAlreadyInProgress < SlackError; end
Expand Down Expand Up @@ -594,7 +595,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 All @@ -611,6 +611,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end

ERROR_CLASSES = {
'access_denied' => AccessDenied,
'access_token_exchange_failed' => AccessTokenExchangeFailed,
'accesslimited' => Accesslimited,
'account_inactive' => AccountInactive,
'action_already_in_progress' => ActionAlreadyInProgress,
Expand Down Expand Up @@ -1199,7 +1200,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 c019e81

Please sign in to comment.