Skip to content

Commit

Permalink
Update API from slack-api-ref@bc54564 (2023-12-20)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Dec 20, 2023
1 parent 5bec857 commit 7259f3a
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 36 deletions.
3 changes: 1 addition & 2 deletions bin/commands/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class App
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
c.flag 'parse', desc: 'Change how messages are treated. See below.'
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
c.flag 'service_team_id', desc: 'For a message posted in App Home, Team ID corresponding to the selected app installation.'
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.'
Expand All @@ -108,7 +107,7 @@ class App
g.long_desc %( Schedules a message to be sent to a channel. )
g.command 'scheduleMessage' do |c|
c.flag 'channel', desc: 'Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
c.flag 'post_at', desc: 'Unix EPOCH timestamp of time in future to send the message.'
c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
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 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
Expand Down
1 change: 1 addition & 0 deletions bin/commands/conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +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 'users', desc: 'A comma separated list of user IDs. Up to 1000 users may be listed.'
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.action do |_global_options, options, _args|
puts JSON.dump(@client.conversations_invite(options))
end
Expand Down
1 change: 0 additions & 1 deletion bin/commands/pins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class App
g.long_desc %( Pins an item to a channel. )
g.command 'add' do |c|
c.flag 'channel', desc: 'Channel to pin the messsage to. You must also include a timestamp when pinning messages.'
c.flag 'quip_component_id', desc: 'Component ID for the pins component that was inserted into the channel canvas, if any.'
c.flag 'timestamp', desc: 'Timestamp of the message to pin. You must also include the channel.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.pins_add(options))
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class App
g.desc 'Gets information about the current team.'
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 '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. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty."
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))
Expand Down
10 changes: 5 additions & 5 deletions bin/commands/usergroups_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class App
end
end

g.desc 'Update the list of users for a User Group.'
g.long_desc %( Update the list of users for a User Group. )
g.desc 'Update the list of users for a user group.'
g.long_desc %( Update the list of users for a user group. )
g.command 'update' do |c|
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the User Group.'
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
c.flag 'usergroup', desc: 'The encoded ID of the user group to update.'
c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the user group.'
c.flag 'include_count', desc: 'Include the number of users in the user group.'
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.usergroups_users_update(options))
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/admin_apps_activities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module AdminAppsActivities
# The earliest timestamp of the log to retrieve (epoch microseconds).
# @option options [string] :min_log_level
# The minimum log level of the log events to be returned. Defaults to info. Acceptable values (in order of relative importance from smallest to largest) are trace, debug, info, warn, error and fatal.
# @option options [string] :sort_direction
# @option options [enum] :sort_direction
# The direction you want the data sorted by (always by timestamp).
# @option options [string] :source
# The source of log events to be returned. Acceptable values are slack and developer.
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/admin_apps_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def admin_apps_config_lookup(options = {})
# The encoded app ID to set the app config for.
# @option options [object] :domain_restrictions
# Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.
# @option options [string] :workflow_auth_strategy
# @option options [enum] :workflow_auth_strategy
# The workflow auth permission. Can be one of builder_choice or end_user_only.
# @see https://api.slack.com/methods/admin.apps.config.set
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.config/admin.apps.config.set.json
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/admin_functions_permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def admin_functions_permissions_lookup(options = {})
#
# @option options [string] :function_id
# The function ID to set permissions for.
# @option options [string] :visibility
# @option options [enum] :visibility
# The function visibility.
# @option options [array] :user_ids
# List of user IDs to allow for named_entities visibility.
Expand Down
6 changes: 3 additions & 3 deletions lib/slack/web/api/endpoints/admin_workflows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ module AdminWorkflows
# Number of trigger IDs to fetch for each workflow; default is 0.
# @option options [string] :query
# A search query to filter for workflow name or description.
# @option options [string] :sort
# @option options [enum] :sort
# The field used to sort the returned workflows.
# @option options [string] :sort_dir
# @option options [enum] :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 [string] :source
# @option options [enum] :source
# Source of workflow creation, either from code or workflow builder.
# @see https://api.slack.com/methods/admin.workflows.search
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows/admin.workflows.search.json
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/apps_activities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module AppsActivities
# The earliest timestamp of the log to retrieve (epoch microseconds).
# @option options [string] :min_log_level
# The minimum log level of the log events to be returned. Defaults to 'info'. Acceptable values (in order of relative importance from smallest to largest) are ('trace', 'debug', 'info', 'warn', 'error', 'fatal').
# @option options [string] :sort_direction
# @option options [enum] :sort_direction
# The direction you want the data sorted by (always by timestamp).
# @option options [string] :source
# The source of log events to be returned. Acceptable values are ('slack', 'developer').
Expand Down
8 changes: 3 additions & 5 deletions lib/slack/web/api/endpoints/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ def chat_postEphemeral(options = {})
# Change how messages are treated. See below.
# @option options [boolean] :reply_broadcast
# Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
# @option options [string] :service_team_id
# For a message posted in App Home, Team ID corresponding to the selected app installation.
# @option options [string] :thread_ts
# Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead.
# @option options [boolean] :unfurl_links
Expand All @@ -181,7 +179,7 @@ def chat_postMessage(options = {})
# @option options [channel] :channel
# Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.
# @option options [integer] :post_at
# Unix EPOCH timestamp of time in future to send the message.
# Unix timestamp representing the future time the message should post to Slack.
# @option options [string] :attachments
# A JSON-based array of structured attachments, presented as a URL-encoded string.
# @option options [blocks[] as string] :blocks
Expand All @@ -194,7 +192,7 @@ def chat_postMessage(options = {})
# Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
# @option options [string] :metadata
# 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.
# @option options [string] :parse
# @option options [enum] :parse
# Change how messages are treated. See chat.postMessage.
# @option options [boolean] :reply_broadcast
# Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
Expand Down Expand Up @@ -223,7 +221,7 @@ def chat_scheduleMessage(options = {})
# Timestamp of the message to add unfurl behavior to.
# @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.
# @option options [string] :source
# @option options [enum] :source
# The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.
# @option options [string] :unfurl_id
# The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.
Expand Down
2 changes: 2 additions & 0 deletions lib/slack/web/api/endpoints/conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def conversations_info(options = {})
# The ID of the public or private channel to invite user(s) to.
# @option options [string] :users
# A comma separated list of user IDs. Up to 1000 users may be listed.
# @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.
# @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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module OpenidConnect
# Issued when you created your application.
# @option options [string] :code
# The code param returned via the OAuth callback.
# @option options [string] :grant_type
# @option options [enum] :grant_type
# The grant_type param as described in the OAuth spec.
# @option options [string] :redirect_uri
# This must match the originally submitted URI (if one was sent).
Expand Down
2 changes: 0 additions & 2 deletions lib/slack/web/api/endpoints/pins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module Pins
#
# @option options [channel] :channel
# Channel to pin the messsage to. You must also include a timestamp when pinning messages.
# @option options [string] :quip_component_id
# Component ID for the pins component that was inserted into the channel canvas, if any.
# @option options [string] :timestamp
# Timestamp of the message to pin. You must also include the channel.
# @see https://api.slack.com/methods/pins.add
Expand Down
6 changes: 3 additions & 3 deletions lib/slack/web/api/endpoints/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Search
# Pass a value of true to enable query highlight markers (see below).
# @option options [string] :sort
# Return matches sorted by either score or timestamp.
# @option options [string] :sort_dir
# @option options [enum] :sort_dir
# Change sort direction to ascending (asc) or descending (desc).
# @option options [string] :team_id
# encoded team id to search in, required if org token is used.
Expand All @@ -35,7 +35,7 @@ def search_all(options = {})
# Pass a value of true to enable query highlight markers (see below).
# @option options [string] :sort
# Return matches sorted by either score or timestamp.
# @option options [string] :sort_dir
# @option options [enum] :sort_dir
# Change sort direction to ascending (asc) or descending (desc).
# @option options [string] :team_id
# encoded team id to search in, required if org token is used.
Expand All @@ -57,7 +57,7 @@ def search_files(options = {})
# Pass a value of true to enable query highlight markers (see below).
# @option options [string] :sort
# Return matches sorted by either score or timestamp.
# @option options [string] :sort_dir
# @option options [enum] :sort_dir
# Change sort direction to ascending (asc) or descending (desc).
# @option options [string] :team_id
# encoded team id to search in, required if org token is used.
Expand Down
4 changes: 2 additions & 2 deletions lib/slack/web/api/endpoints/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def team_billableInfo(options = {})
# Gets information about the current team.
#
# @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.
# 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. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty.
# @option options [string] :team
# Team to get info about; if omitted, will return information about the current team.
# @see https://api.slack.com/methods/team.info
Expand All @@ -71,7 +71,7 @@ def team_info(options = {})
#
# @option options [string] :app_id
# Filter logs to this Slack app. Defaults to all logs.
# @option options [string] :change_type
# @option options [enum] :change_type
# Filter logs with this change type. Possible values are added, removed, enabled, disabled, and updated. Defaults to all logs.
# @option options [string] :service_id
# Filter logs to this service. Defaults to all logs.
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/team_profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module TeamProfile
#
# Retrieve a team's profile.
#
# @option options [string] :visibility
# @option options [enum] :visibility
# Filter by visibility.
# @see https://api.slack.com/methods/team.profile.get
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.profile/team.profile.get.json
Expand Down
8 changes: 4 additions & 4 deletions lib/slack/web/api/endpoints/usergroups_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def usergroups_users_list(options = {})
end

#
# Update the list of users for a User Group.
# Update the list of users for a user group.
#
# @option options [string] :usergroup
# The encoded ID of the User Group to update.
# The encoded ID of the user group to update.
# @option options [array] :users
# A comma separated string of encoded user IDs that represent the entire list of users for the User Group.
# A comma separated string of encoded user IDs that represent the entire list of users for the user group.
# @option options [boolean] :include_count
# Include the number of users in the User Group.
# Include the number of users in the user group.
# @option options [string] :team_id
# encoded team id where the user group exists, required if org token is used.
# @see https://api.slack.com/methods/usergroups.users.update
Expand Down
2 changes: 1 addition & 1 deletion lib/slack/web/api/endpoints/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def users_setPhoto(options = {})
#
# Manually sets user presence.
#
# @option options [string] :presence
# @option options [enum] :presence
# Either auto or away.
# @see https://api.slack.com/methods/users.setPresence
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setPresence.json
Expand Down
2 changes: 2 additions & 0 deletions lib/slack/web/api/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ApprovalInactive < SlackError; end
class ApprovalNotFound < SlackError; end
class AsUserNotSupported < SlackError; end
class AtLeastOneSessionSettingRequired < SlackError; end
class AttachmentPayloadLimitExceeded < SlackError; end
class AuthMismatch < SlackError; end
class AuthorizationNotFound < SlackError; end
class AutoProvisionFailure < SlackError; end
Expand Down Expand Up @@ -649,6 +650,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end
'approval_not_found' => ApprovalNotFound,
'as_user_not_supported' => AsUserNotSupported,
'at_least_one_session_setting_required' => AtLeastOneSessionSettingRequired,
'attachment_payload_limit_exceeded' => AttachmentPayloadLimitExceeded,
'auth_mismatch' => AuthMismatch,
'authorization_not_found' => AuthorizationNotFound,
'auto_provision_failure' => AutoProvisionFailure,
Expand Down

0 comments on commit 7259f3a

Please sign in to comment.