slack-ruby-client 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.coveralls.yml +0 -0
- data/.github/FUNDING.yml +0 -0
- data/.github/dependabot.yml +0 -0
- data/.github/prompts/changelog-entries.prompt.yml +32 -0
- data/.github/workflows/danger-comment.yml +0 -0
- data/.github/workflows/danger.yml +0 -0
- data/.github/workflows/lint.yml +2 -0
- data/.github/workflows/test.yml +0 -0
- data/.github/workflows/update_api.yml +86 -6
- data/.gitignore +0 -0
- data/.gitmodules +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +2 -1
- data/.rubocop_todo.yml +13 -2
- data/.ruby-version +0 -0
- data/AGENTS.md +12 -0
- data/CHANGELOG.md +33 -0
- data/CONTRIBUTING.md +10 -1
- data/Dangerfile +0 -0
- data/Gemfile +17 -5
- data/LICENSE.md +0 -0
- data/README.md +47 -2
- data/RELEASING.md +2 -2
- data/Rakefile +7 -3
- data/SECURITY.md +0 -0
- data/UPGRADING.md +12 -0
- data/bin/commands/admin_analytics.rb +0 -0
- data/bin/commands/admin_analytics_messages.rb +2 -2
- data/bin/commands/admin_apps.rb +0 -0
- data/bin/commands/admin_apps_activities.rb +0 -0
- data/bin/commands/admin_apps_approved.rb +0 -0
- data/bin/commands/admin_apps_config.rb +0 -0
- data/bin/commands/admin_apps_mcp_servers.rb +21 -0
- data/bin/commands/admin_apps_mcp_servers_permissions.rb +33 -0
- data/bin/commands/admin_apps_permissions.rb +58 -0
- data/bin/commands/admin_apps_requests.rb +0 -0
- data/bin/commands/admin_apps_restricted.rb +0 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
- data/bin/commands/admin_auth_policy.rb +0 -0
- data/bin/commands/admin_barriers.rb +0 -0
- data/bin/commands/admin_conversations.rb +12 -2
- data/bin/commands/admin_conversations_ekm.rb +0 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
- data/bin/commands/admin_emoji.rb +0 -0
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_functions_permissions.rb +0 -0
- data/bin/commands/admin_inviteRequests.rb +0 -0
- data/bin/commands/admin_inviteRequests_approved.rb +0 -0
- data/bin/commands/admin_inviteRequests_denied.rb +0 -0
- data/bin/commands/admin_roles.rb +0 -0
- data/bin/commands/admin_teams.rb +0 -0
- data/bin/commands/admin_teams_admins.rb +0 -0
- data/bin/commands/admin_teams_owners.rb +0 -0
- data/bin/commands/admin_teams_settings.rb +0 -0
- data/bin/commands/admin_usergroups.rb +74 -0
- data/bin/commands/admin_users.rb +0 -0
- data/bin/commands/admin_users_session.rb +0 -1
- data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
- data/bin/commands/admin_workflows.rb +0 -0
- data/bin/commands/admin_workflows_collaborators.rb +0 -0
- data/bin/commands/admin_workflows_permissions.rb +0 -0
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +0 -0
- data/bin/commands/agents_sessions.rb +38 -0
- data/bin/commands/api.rb +0 -0
- data/bin/commands/apps.rb +0 -0
- data/bin/commands/apps_activities.rb +0 -0
- data/bin/commands/apps_auth_external.rb +0 -0
- data/bin/commands/apps_connections.rb +0 -0
- data/bin/commands/apps_datastore.rb +0 -0
- data/bin/commands/apps_event_authorizations.rb +0 -0
- data/bin/commands/apps_icon.rb +0 -0
- data/bin/commands/apps_managed_permissions.rb +21 -0
- data/bin/commands/apps_manifest.rb +0 -0
- data/bin/commands/apps_user_connection.rb +0 -0
- data/bin/commands/assistant_search.rb +0 -0
- data/bin/commands/assistant_threads.rb +1 -1
- data/bin/commands/auth.rb +0 -0
- data/bin/commands/auth_teams.rb +0 -0
- data/bin/commands/blocks.rb +0 -0
- data/bin/commands/bookmarks.rb +0 -0
- data/bin/commands/bots.rb +0 -0
- data/bin/commands/calls.rb +0 -0
- data/bin/commands/calls_participants.rb +0 -0
- data/bin/commands/canvases.rb +12 -2
- data/bin/commands/canvases_access.rb +0 -0
- data/bin/commands/canvases_sections.rb +0 -0
- data/bin/commands/chat.rb +9 -6
- data/bin/commands/chat_scheduledMessages.rb +0 -0
- data/bin/commands/conversations.rb +1 -1
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
- data/bin/commands/conversations_requestSharedInvite.rb +0 -0
- data/bin/commands/dialog.rb +0 -0
- data/bin/commands/dnd.rb +0 -0
- data/bin/commands/emoji.rb +0 -0
- data/bin/commands/entity.rb +27 -0
- data/bin/commands/files.rb +3 -0
- data/bin/commands/files_comments.rb +0 -0
- data/bin/commands/files_remote.rb +0 -0
- data/bin/commands/functions.rb +0 -0
- data/bin/commands/functions_distributions_permissions.rb +0 -0
- data/bin/commands/functions_workflows_steps.rb +0 -0
- data/bin/commands/functions_workflows_steps_responses.rb +0 -0
- data/bin/commands/migration.rb +0 -0
- data/bin/commands/oauth.rb +0 -0
- data/bin/commands/oauth_v2.rb +21 -0
- data/bin/commands/oauth_v2_user.rb +0 -0
- data/bin/commands/openid_connect.rb +0 -0
- data/bin/commands/pins.rb +0 -0
- data/bin/commands/reactions.rb +0 -0
- data/bin/commands/reminders.rb +0 -0
- data/bin/commands/rtm.rb +0 -0
- data/bin/commands/search.rb +0 -0
- data/bin/commands/slackLists.rb +0 -0
- data/bin/commands/slackLists_access.rb +0 -0
- data/bin/commands/slackLists_download.rb +6 -0
- data/bin/commands/slackLists_items.rb +1 -0
- data/bin/commands/stars.rb +0 -0
- data/bin/commands/team.rb +0 -0
- data/bin/commands/team_billing.rb +0 -0
- data/bin/commands/team_externalTeams.rb +0 -0
- data/bin/commands/team_preferences.rb +0 -0
- data/bin/commands/team_profile.rb +0 -0
- data/bin/commands/tooling_tokens.rb +0 -0
- data/bin/commands/usergroups.rb +0 -0
- data/bin/commands/usergroups_users.rb +0 -0
- data/bin/commands/users.rb +1 -0
- data/bin/commands/users_admin.rb +0 -0
- data/bin/commands/users_discoverableContacts.rb +0 -0
- data/bin/commands/users_prefs.rb +0 -0
- data/bin/commands/users_profile.rb +0 -0
- data/bin/commands/views.rb +0 -0
- data/bin/commands/workflows_featured.rb +0 -0
- data/bin/commands/workflows_triggers_permissions.rb +0 -0
- data/bin/slack +5 -1
- data/examples/files_upload_v2/.env.example +0 -0
- data/examples/files_upload_v2/Gemfile +0 -0
- data/examples/files_upload_v2/README.md +0 -0
- data/examples/files_upload_v2/files_upload_v2.rb +1 -1
- data/examples/hi_web/Gemfile +0 -0
- data/examples/hi_web/hi.gif +0 -0
- data/examples/hi_web/hi.rb +1 -1
- data/examples/new_ticket/Gemfile +0 -0
- data/examples/new_ticket/new_ticket.rb +1 -1
- data/examples/oauth_v2/.env.example +0 -0
- data/examples/oauth_v2/Gemfile +0 -0
- data/examples/oauth_v2/README.md +0 -0
- data/examples/oauth_v2/oauth_v2.rb +6 -6
- data/lib/slack/config.rb +0 -0
- data/lib/slack/events/config.rb +1 -1
- data/lib/slack/events/request.rb +2 -2
- data/lib/slack/logger.rb +0 -0
- data/lib/slack/messages/formatting.rb +0 -0
- data/lib/slack/messages/message.rb +0 -0
- data/lib/slack/utils/security.rb +0 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers.rb +31 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers_permissions.rb +46 -0
- data/lib/slack/web/api/endpoints/admin_apps_permissions.rb +83 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +16 -1
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -1
- data/lib/slack/web/api/endpoints/admin_functions.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +111 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +1 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -2
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/agents_sessions.rb +54 -0
- data/lib/slack/web/api/endpoints/api.rb +0 -0
- data/lib/slack/web/api/endpoints/apps.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_icon.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_managed_permissions.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_user_connection.rb +0 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +0 -0
- data/lib/slack/web/api/endpoints/assistant_threads.rb +1 -1
- data/lib/slack/web/api/endpoints/auth.rb +0 -0
- data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
- data/lib/slack/web/api/endpoints/blocks.rb +0 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +0 -0
- data/lib/slack/web/api/endpoints/bots.rb +0 -0
- data/lib/slack/web/api/endpoints/calls.rb +0 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
- data/lib/slack/web/api/endpoints/canvases.rb +16 -2
- data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
- data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
- data/lib/slack/web/api/endpoints/chat.rb +13 -9
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
- data/lib/slack/web/api/endpoints/dialog.rb +0 -0
- data/lib/slack/web/api/endpoints/dnd.rb +0 -0
- data/lib/slack/web/api/endpoints/emoji.rb +0 -0
- data/lib/slack/web/api/endpoints/entity.rb +48 -0
- data/lib/slack/web/api/endpoints/files.rb +7 -0
- data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
- data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
- data/lib/slack/web/api/endpoints/functions.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
- data/lib/slack/web/api/endpoints/migration.rb +0 -0
- data/lib/slack/web/api/endpoints/oauth.rb +0 -0
- data/lib/slack/web/api/endpoints/oauth_v2.rb +33 -0
- data/lib/slack/web/api/endpoints/oauth_v2_user.rb +0 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +0 -0
- data/lib/slack/web/api/endpoints/pins.rb +0 -0
- data/lib/slack/web/api/endpoints/reactions.rb +0 -0
- data/lib/slack/web/api/endpoints/reminders.rb +0 -0
- data/lib/slack/web/api/endpoints/rtm.rb +0 -0
- data/lib/slack/web/api/endpoints/search.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +12 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +2 -0
- data/lib/slack/web/api/endpoints/stars.rb +0 -0
- data/lib/slack/web/api/endpoints/team.rb +0 -0
- data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
- data/lib/slack/web/api/endpoints/users.rb +2 -1
- data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
- data/lib/slack/web/api/endpoints/views.rb +0 -0
- data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints.rb +10 -0
- data/lib/slack/web/api/error.rb +0 -0
- data/lib/slack/web/api/errors/server_error.rb +1 -1
- data/lib/slack/web/api/errors/slack_error.rb +1 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -1
- data/lib/slack/web/api/errors.rb +126 -8
- data/lib/slack/web/api/helpers/files.rb +2 -2
- data/lib/slack/web/api/helpers.rb +0 -0
- data/lib/slack/web/api/mixins/conversations.id.rb +2 -1
- data/lib/slack/web/api/mixins/ids.id.rb +0 -0
- data/lib/slack/web/api/mixins/users.id.json +0 -0
- data/lib/slack/web/api/mixins/users.id.rb +2 -1
- data/lib/slack/web/api/mixins/users.search.json +0 -0
- data/lib/slack/web/api/mixins/users.search.rb +1 -1
- data/lib/slack/web/api/mixins.rb +0 -0
- data/lib/slack/web/api/options.rb +0 -0
- data/lib/slack/web/api/patches/.gitkeep +0 -0
- data/lib/slack/web/api/patches/files.default-filename.patch +12 -0
- data/lib/slack/web/api/schema/group.json +0 -0
- data/lib/slack/web/api/schema/method.json +0 -0
- data/lib/slack/web/api/templates/command.erb +0 -0
- data/lib/slack/web/api/templates/endpoints.erb +0 -0
- data/lib/slack/web/api/templates/errors.erb +0 -0
- data/lib/slack/web/api/templates/method.erb +0 -0
- data/lib/slack/web/api/templates/method_spec.erb +0 -0
- data/lib/slack/web/client.rb +29 -0
- data/lib/slack/web/config.rb +0 -0
- data/lib/slack/web/faraday/connection.rb +0 -0
- data/lib/slack/web/faraday/options.rb +0 -0
- data/lib/slack/web/faraday/request.rb +22 -2
- data/lib/slack/web/faraday/response/raise_error.rb +0 -0
- data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
- data/lib/slack/web/pagination/cursor.rb +0 -0
- data/lib/slack-ruby-client.rb +0 -0
- data/lib/slack.rb +0 -0
- data/lib/slack_ruby_client.rb +0 -0
- data/lib/tasks/git.rake +0 -0
- data/lib/tasks/update.rake +0 -0
- data/lib/tasks/web.rake +0 -0
- data/slack-ruby-client.gemspec +0 -1
- data/slack.png +0 -0
- metadata +20 -17
|
@@ -40,6 +40,52 @@ module Slack
|
|
|
40
40
|
post('admin.usergroups.addTeams', options)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
#
|
|
44
|
+
# Add members to an existing organizational usergroup. This method is only available to Enterprise Grid organizations.
|
|
45
|
+
#
|
|
46
|
+
# @option options [string] :id
|
|
47
|
+
# ID of the usergroup to add users to.
|
|
48
|
+
# @option options [array] :users
|
|
49
|
+
# The encoded user IDs to add to the usergroup, provided as a JSON array or a comma-separated string.
|
|
50
|
+
# @see https://api.slack.com/methods/admin.usergroups.addUsers
|
|
51
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addUsers.json
|
|
52
|
+
def admin_usergroups_addUsers(options = {})
|
|
53
|
+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
54
|
+
raise ArgumentError, 'Required arguments :users missing' if options[:users].nil?
|
|
55
|
+
options = encode_options_as_json(options, %i[users])
|
|
56
|
+
post('admin.usergroups.addUsers', options)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
#
|
|
60
|
+
# Create a new organizational usergroup. This method is only available to Enterprise Grid organizations.
|
|
61
|
+
#
|
|
62
|
+
# @option options [string] :name
|
|
63
|
+
# Unique name for the usergroup.
|
|
64
|
+
# @option options [string] :handle
|
|
65
|
+
# Optional handle used to mention the usergroup in channel, must be unique.
|
|
66
|
+
# @option options [string] :purpose
|
|
67
|
+
# Optional purpose that describes what the usergroup is about.
|
|
68
|
+
# @option options [boolean] :is_visible
|
|
69
|
+
# Configure whether or not this usergroup should be visible in the client.
|
|
70
|
+
# @see https://api.slack.com/methods/admin.usergroups.create
|
|
71
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.create.json
|
|
72
|
+
def admin_usergroups_create(options = {})
|
|
73
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
|
74
|
+
post('admin.usergroups.create', options)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
#
|
|
78
|
+
# Fetch an organizational usergroup.
|
|
79
|
+
#
|
|
80
|
+
# @option options [string] :id
|
|
81
|
+
# ID of the usergroup to fetch.
|
|
82
|
+
# @see https://api.slack.com/methods/admin.usergroups.fetch
|
|
83
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.fetch.json
|
|
84
|
+
def admin_usergroups_fetch(options = {})
|
|
85
|
+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
86
|
+
post('admin.usergroups.fetch', options)
|
|
87
|
+
end
|
|
88
|
+
|
|
43
89
|
#
|
|
44
90
|
# List the channels linked to an org-level IDP group (user group).
|
|
45
91
|
#
|
|
@@ -70,6 +116,71 @@ module Slack
|
|
|
70
116
|
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
|
71
117
|
post('admin.usergroups.removeChannels', options)
|
|
72
118
|
end
|
|
119
|
+
|
|
120
|
+
#
|
|
121
|
+
# Remove one or more default workspaces from an organization-wide IDP Group or Admin Group.
|
|
122
|
+
#
|
|
123
|
+
# @option options [string] :usergroup_id
|
|
124
|
+
# An encoded usergroup (IDP Group) ID.
|
|
125
|
+
# @option options [array] :team_ids
|
|
126
|
+
# A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
|
|
127
|
+
# @see https://api.slack.com/methods/admin.usergroups.removeTeams
|
|
128
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeTeams.json
|
|
129
|
+
def admin_usergroups_removeTeams(options = {})
|
|
130
|
+
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
|
131
|
+
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
|
132
|
+
post('admin.usergroups.removeTeams', options)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
#
|
|
136
|
+
# Remove members from an existing organizational usergroup. This method is only available to Enterprise Grid organizations.
|
|
137
|
+
#
|
|
138
|
+
# @option options [string] :id
|
|
139
|
+
# ID of the usergroup to remove users from.
|
|
140
|
+
# @option options [array] :users
|
|
141
|
+
# The encoded user IDs to remove from the usergroup, provided as a JSON array or a comma-separated string.
|
|
142
|
+
# @see https://api.slack.com/methods/admin.usergroups.removeUsers
|
|
143
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeUsers.json
|
|
144
|
+
def admin_usergroups_removeUsers(options = {})
|
|
145
|
+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
146
|
+
raise ArgumentError, 'Required arguments :users missing' if options[:users].nil?
|
|
147
|
+
options = encode_options_as_json(options, %i[users])
|
|
148
|
+
post('admin.usergroups.removeUsers', options)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
#
|
|
152
|
+
# Update one or more properties of an existing organizational usergroup.
|
|
153
|
+
#
|
|
154
|
+
# @option options [string] :id
|
|
155
|
+
# ID of the usergroup to update.
|
|
156
|
+
# @option options [string] :name
|
|
157
|
+
# The name of the group.
|
|
158
|
+
# @option options [string] :handle
|
|
159
|
+
# The handle used for mentioning the group in a channel, must be unique.
|
|
160
|
+
# @option options [string] :description
|
|
161
|
+
# The usergroup's purpose or description.
|
|
162
|
+
# @option options [boolean] :is_visible
|
|
163
|
+
# Configure whether or not this usergroup should be visible in the client.
|
|
164
|
+
# @see https://api.slack.com/methods/admin.usergroups.update
|
|
165
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.update.json
|
|
166
|
+
def admin_usergroups_update(options = {})
|
|
167
|
+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
168
|
+
post('admin.usergroups.update', options)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
#
|
|
172
|
+
# Add members to an existing organizational usergroup in bulk via CSV upload. This method is only available to Enterprise Grid organizations.
|
|
173
|
+
#
|
|
174
|
+
# @option options [string] :id
|
|
175
|
+
# ID of the usergroup to upload users to.
|
|
176
|
+
# @option options [file] :file
|
|
177
|
+
# Csv of users to upload in format member id, email.
|
|
178
|
+
# @see https://api.slack.com/methods/admin.usergroups.uploadUsers
|
|
179
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.uploadUsers.json
|
|
180
|
+
def admin_usergroups_uploadUsers(options = {})
|
|
181
|
+
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
182
|
+
post('admin.usergroups.uploadUsers', options)
|
|
183
|
+
end
|
|
73
184
|
end
|
|
74
185
|
end
|
|
75
186
|
end
|
|
@@ -37,6 +37,7 @@ module Slack
|
|
|
37
37
|
# @see https://api.slack.com/methods/admin.users.getExpiration
|
|
38
38
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.getExpiration.json
|
|
39
39
|
def admin_users_getExpiration(options = {})
|
|
40
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
|
40
41
|
post('admin.users.getExpiration', options)
|
|
41
42
|
end
|
|
42
43
|
|
|
@@ -33,8 +33,6 @@ module Slack
|
|
|
33
33
|
#
|
|
34
34
|
# Revoke a single session for a user. The user will be forced to login to Slack.
|
|
35
35
|
#
|
|
36
|
-
# @option options [Object] :team_id
|
|
37
|
-
# ID of the workspace that the session belongs to.
|
|
38
36
|
# @option options [Object] :user_id
|
|
39
37
|
# ID of the user that the session belongs to.
|
|
40
38
|
# @option options [integer] :session_id
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Web
|
|
6
|
+
module Api
|
|
7
|
+
module Endpoints
|
|
8
|
+
module AgentsSessions
|
|
9
|
+
#
|
|
10
|
+
# Rename an agent session.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :channel_id
|
|
13
|
+
# ID of the channel containing the agent session. Required for public channels.
|
|
14
|
+
# @option options [string] :title
|
|
15
|
+
# New title for the agent session (1-200 characters). For a session channel, this also renames the channel.
|
|
16
|
+
# @option options [string] :thread_ts
|
|
17
|
+
# 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.
|
|
18
|
+
# @see https://api.slack.com/methods/agents.sessions.rename
|
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.sessions/agents.sessions.rename.json
|
|
20
|
+
def agents_sessions_rename(options = {})
|
|
21
|
+
raise ArgumentError, 'Required arguments :title missing' if options[:title].nil?
|
|
22
|
+
post('agents.sessions.rename', options)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Set an agent session's lifecycle status, creating the session if needed.
|
|
27
|
+
#
|
|
28
|
+
# @option options [string] :channel_id
|
|
29
|
+
# ID of the channel containing the agent session. Required for public channels.
|
|
30
|
+
# @option options [enum] :status
|
|
31
|
+
# The lifecycle status to set.
|
|
32
|
+
# @option options [string] :thread_ts
|
|
33
|
+
# 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.
|
|
34
|
+
# @option options [string] :title
|
|
35
|
+
# 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.
|
|
36
|
+
# @option options [string] :initiator_user_id
|
|
37
|
+
# 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.
|
|
38
|
+
# @option options [string] :icon_emoji
|
|
39
|
+
# 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.
|
|
40
|
+
# @option options [string] :icon_url
|
|
41
|
+
# 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.
|
|
42
|
+
# @option options [string] :username
|
|
43
|
+
# 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.
|
|
44
|
+
# @see https://api.slack.com/methods/agents.sessions.setStatus
|
|
45
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.sessions/agents.sessions.setStatus.json
|
|
46
|
+
def agents_sessions_setStatus(options = {})
|
|
47
|
+
raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
|
|
48
|
+
post('agents.sessions.setStatus', options)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Web
|
|
6
|
+
module Api
|
|
7
|
+
module Endpoints
|
|
8
|
+
module AppsManagedPermissions
|
|
9
|
+
#
|
|
10
|
+
# 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.
|
|
11
|
+
#
|
|
12
|
+
# @option options [Object] :app_id
|
|
13
|
+
# Encoded ID of the managed app to configure.
|
|
14
|
+
# @option options [enum] :permissions
|
|
15
|
+
# Who can interact with the app. Use everyone to allow all members, or app_owner to restrict access to the app's owner.
|
|
16
|
+
# @see https://api.slack.com/methods/apps.managed.permissions.set
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.managed.permissions/apps.managed.permissions.set.json
|
|
18
|
+
def apps_managed_permissions_set(options = {})
|
|
19
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
20
|
+
raise ArgumentError, 'Required arguments :permissions missing' if options[:permissions].nil?
|
|
21
|
+
post('apps.managed.permissions.set', options)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -38,7 +38,7 @@ module Slack
|
|
|
38
38
|
# @option options [Object] :channel_id
|
|
39
39
|
# Channel ID containing the assistant thread.
|
|
40
40
|
# @option options [string] :thread_ts
|
|
41
|
-
# Message timestamp of the thread to set suggested prompts for.
|
|
41
|
+
# 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.
|
|
42
42
|
# @option options [Object] :prompts
|
|
43
43
|
# Each prompt should be supplied with its title and message attribute.
|
|
44
44
|
# @option options [string] :title
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,7 +12,7 @@ module Slack
|
|
|
12
12
|
# @option options [string] :title
|
|
13
13
|
# Title of the newly created canvas.
|
|
14
14
|
# @option options [Object] :document_content
|
|
15
|
-
# Structure describing the type and value of the content to create.
|
|
15
|
+
# Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).
|
|
16
16
|
# @option options [string] :channel_id
|
|
17
17
|
# Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.
|
|
18
18
|
# @see https://api.slack.com/methods/canvases.create
|
|
@@ -39,7 +39,7 @@ module Slack
|
|
|
39
39
|
# @option options [Object] :canvas_id
|
|
40
40
|
# Encoded ID of the canvas.
|
|
41
41
|
# @option options [array] :changes
|
|
42
|
-
# List of changes to apply on the specified canvas.
|
|
42
|
+
# List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters).
|
|
43
43
|
# @see https://api.slack.com/methods/canvases.edit
|
|
44
44
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.edit.json
|
|
45
45
|
def canvases_edit(options = {})
|
|
@@ -47,6 +47,20 @@ module Slack
|
|
|
47
47
|
raise ArgumentError, 'Required arguments :changes missing' if options[:changes].nil?
|
|
48
48
|
post('canvases.edit', options)
|
|
49
49
|
end
|
|
50
|
+
|
|
51
|
+
#
|
|
52
|
+
# Get the content of a canvas as markdown (default) or HTML.
|
|
53
|
+
#
|
|
54
|
+
# @option options [Object] :canvas_id
|
|
55
|
+
# Encoded ID of the canvas.
|
|
56
|
+
# @option options [enum] :content_type
|
|
57
|
+
# Format in which to return the canvas content. Defaults to markdown.
|
|
58
|
+
# @see https://api.slack.com/methods/canvases.getContent
|
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.getContent.json
|
|
60
|
+
def canvases_getContent(options = {})
|
|
61
|
+
raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
|
|
62
|
+
post('canvases.getContent', options)
|
|
63
|
+
end
|
|
50
64
|
end
|
|
51
65
|
end
|
|
52
66
|
end
|
|
File without changes
|
|
File without changes
|
|
@@ -22,7 +22,6 @@ module Slack
|
|
|
22
22
|
def chat_appendStream(options = {})
|
|
23
23
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
24
24
|
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
25
|
-
raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
|
|
26
25
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
27
26
|
post('chat.appendStream', options)
|
|
28
27
|
end
|
|
@@ -131,6 +130,8 @@ module Slack
|
|
|
131
130
|
# Find and link channel names and usernames.
|
|
132
131
|
# @option options [string] :markdown_text
|
|
133
132
|
# Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.
|
|
133
|
+
# @option options [string] :metadata
|
|
134
|
+
# JSON object with an entities array of work object entity metadata, presented as a URL-encoded string. Only entity metadata is supported: ephemeral messages are not persisted and never dispatch message_metadata_* events, so event_type/event_payload message metadata is ignored here. Each entity requires entity_type, entity_payload, external_ref, and url.
|
|
134
135
|
# @option options [string] :parse
|
|
135
136
|
# Change how messages are treated. Defaults to none. See below.
|
|
136
137
|
# @option options [string] :text
|
|
@@ -149,7 +150,7 @@ module Slack
|
|
|
149
150
|
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
|
|
150
151
|
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
151
152
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
|
152
|
-
options = encode_options_as_json(options, %i[attachments blocks])
|
|
153
|
+
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
153
154
|
post('chat.postEphemeral', options)
|
|
154
155
|
end
|
|
155
156
|
|
|
@@ -192,6 +193,8 @@ module Slack
|
|
|
192
193
|
# Pass false to disable unfurling of media content.
|
|
193
194
|
# @option options [string] :username
|
|
194
195
|
# Set your bot's user name.
|
|
196
|
+
# @option options [boolean] :unfurl_app_links
|
|
197
|
+
# 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.
|
|
195
198
|
# @see https://api.slack.com/methods/chat.postMessage
|
|
196
199
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
|
|
197
200
|
def chat_postMessage(options = {})
|
|
@@ -248,19 +251,19 @@ module Slack
|
|
|
248
251
|
# Starts a new streaming conversation.
|
|
249
252
|
#
|
|
250
253
|
# @option options [channel] :channel
|
|
251
|
-
# An encoded ID that represents a channel thread or DM.
|
|
254
|
+
# An encoded ID that represents a channel, thread, or DM.
|
|
252
255
|
# @option options [array] :chunks
|
|
253
|
-
# Array of streaming chunks.
|
|
256
|
+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
|
|
254
257
|
# @option options [string] :markdown_text
|
|
255
258
|
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
256
259
|
# @option options [string] :thread_ts
|
|
257
|
-
# Provide another message's ts value to reply to.
|
|
260
|
+
# 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.
|
|
258
261
|
# @option options [Object] :recipient_user_id
|
|
259
262
|
# The encoded ID of the user to receive the streaming text. Required when streaming to channels.
|
|
260
263
|
# @option options [string] :recipient_team_id
|
|
261
264
|
# The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
|
|
262
265
|
# @option options [enum] :task_display_mode
|
|
263
|
-
# Specifies how tasks are displayed in the message.
|
|
266
|
+
# 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.
|
|
264
267
|
# @option options [string] :icon_emoji
|
|
265
268
|
# Emoji to use as the icon for this message. Overrides icon_url.
|
|
266
269
|
# @option options [string] :icon_url
|
|
@@ -271,7 +274,6 @@ module Slack
|
|
|
271
274
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
|
|
272
275
|
def chat_startStream(options = {})
|
|
273
276
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
274
|
-
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
|
275
277
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
276
278
|
post('chat.startStream', options)
|
|
277
279
|
end
|
|
@@ -282,7 +284,7 @@ module Slack
|
|
|
282
284
|
# @option options [channel] :channel
|
|
283
285
|
# An encoded ID that represents a channel, private group, or DM.
|
|
284
286
|
# @option options [array] :chunks
|
|
285
|
-
# Array of streaming chunks.
|
|
287
|
+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
|
|
286
288
|
# @option options [timestamp] :ts
|
|
287
289
|
# The timestamp of the streaming message.
|
|
288
290
|
# @option options [string] :markdown_text
|
|
@@ -291,6 +293,8 @@ module Slack
|
|
|
291
293
|
# A list of blocks that will be rendered at the bottom of the finalized message.
|
|
292
294
|
# @option options [string] :metadata
|
|
293
295
|
# 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.
|
|
296
|
+
# @option options [enum] :session_status
|
|
297
|
+
# The session status to set after stopping the stream.
|
|
294
298
|
# @see https://api.slack.com/methods/chat.stopStream
|
|
295
299
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
|
|
296
300
|
def chat_stopStream(options = {})
|
|
@@ -309,7 +313,7 @@ module Slack
|
|
|
309
313
|
# @option options [timestamp] :ts
|
|
310
314
|
# Timestamp of the message to add unfurl behavior to. Required for public channels.
|
|
311
315
|
# @option options [string] :unfurls
|
|
312
|
-
# URL-encoded JSON map with keys set to URLs featured in the
|
|
316
|
+
# 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.
|
|
313
317
|
# @option options [string] :user_auth_message
|
|
314
318
|
# 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.
|
|
315
319
|
# @option options [boolean] :user_auth_required
|
|
File without changes
|
|
@@ -154,7 +154,7 @@ module Slack
|
|
|
154
154
|
# @option options [boolean] :force
|
|
155
155
|
# When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.
|
|
156
156
|
# @option options [string] :users
|
|
157
|
-
# A comma separated list of user IDs. Up to
|
|
157
|
+
# A comma separated list of user IDs. Up to 1000 users may be listed.
|
|
158
158
|
# @see https://api.slack.com/methods/conversations.invite
|
|
159
159
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json
|
|
160
160
|
def conversations_invite(options = {})
|
|
@@ -12,7 +12,7 @@ module Slack
|
|
|
12
12
|
# @option options [string] :channel_id
|
|
13
13
|
# Channel ID of the channel the canvas will be tabbed in.
|
|
14
14
|
# @option options [Object] :document_content
|
|
15
|
-
# Structure describing the type and value of the content to create.
|
|
15
|
+
# Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).
|
|
16
16
|
# @option options [string] :title
|
|
17
17
|
# Title of the newly created canvas.
|
|
18
18
|
# @see https://api.slack.com/methods/conversations.canvases.create
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,6 +6,54 @@ module Slack
|
|
|
6
6
|
module Api
|
|
7
7
|
module Endpoints
|
|
8
8
|
module Entity
|
|
9
|
+
#
|
|
10
|
+
# Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :trigger_id
|
|
13
|
+
# A reference to the original user action that initiated the comment mutation.
|
|
14
|
+
# @option options [object] :comment
|
|
15
|
+
# The full comment data. Required for edit and post actions. See the comment schema for the full list of properties.
|
|
16
|
+
# @option options [string] :error
|
|
17
|
+
# Error message if the action failed in the app. When present, signals that the mutation could not be completed.
|
|
18
|
+
# @see https://api.slack.com/methods/entity.acknowledgeCommentAction
|
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.acknowledgeCommentAction.json
|
|
20
|
+
def entity_acknowledgeCommentAction(options = {})
|
|
21
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
22
|
+
post('entity.acknowledgeCommentAction', options)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client.
|
|
27
|
+
#
|
|
28
|
+
# @option options [array] :comments
|
|
29
|
+
# Array of comments to present to the user. See the comment schema for the full list of properties.
|
|
30
|
+
# @option options [string] :cursor
|
|
31
|
+
# App supplied cursor used for pagination, will be sent in the next request for comments.
|
|
32
|
+
# @option options [boolean] :can_post_comment
|
|
33
|
+
# Indicates whether the user has permissions to post comments.
|
|
34
|
+
# @option options [string] :trigger_id
|
|
35
|
+
# A reference to the original user action that initiated the request.
|
|
36
|
+
# @option options [string] :delete_action_id
|
|
37
|
+
# The block action id that will be sent when a delete request is initiated for a comment.
|
|
38
|
+
# @option options [boolean] :user_auth_required
|
|
39
|
+
# Set to true (or 1) to indicate that the user must authenticate to see the comments data.
|
|
40
|
+
# @option options [string] :user_auth_url
|
|
41
|
+
# A custom URL to which users are directed for authentication if required.
|
|
42
|
+
# @option options [Object] :error
|
|
43
|
+
# @see https://api.slack.com/methods/entity.presentComments
|
|
44
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.presentComments.json
|
|
45
|
+
def entity_presentComments(options = {})
|
|
46
|
+
raise ArgumentError, 'Required arguments :comments missing' if options[:comments].nil?
|
|
47
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
48
|
+
if block_given?
|
|
49
|
+
Pagination::Cursor.new(self, :entity_presentComments, options).each do |page|
|
|
50
|
+
yield page
|
|
51
|
+
end
|
|
52
|
+
else
|
|
53
|
+
post('entity.presentComments', options)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
9
57
|
#
|
|
10
58
|
# Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.
|
|
11
59
|
#
|
|
@@ -21,6 +21,12 @@ module Slack
|
|
|
21
21
|
# The message text introducing the file in specified channels.
|
|
22
22
|
# @option options [string] :blocks
|
|
23
23
|
# A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.
|
|
24
|
+
# @option options [string] :username
|
|
25
|
+
# Set your bot's user name for the file share message. Requires the chat:write.customize scope.
|
|
26
|
+
# @option options [string] :icon_url
|
|
27
|
+
# URL to an image to use as the icon for the file share message. Requires the chat:write.customize scope.
|
|
28
|
+
# @option options [string] :icon_emoji
|
|
29
|
+
# Emoji to use as the icon for the file share message. Overrides icon_url. Requires the chat:write.customize scope.
|
|
24
30
|
# @see https://api.slack.com/methods/files.completeUploadExternal
|
|
25
31
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
|
|
26
32
|
def files_completeUploadExternal(options = {})
|
|
@@ -186,6 +192,7 @@ module Slack
|
|
|
186
192
|
# @see https://api.slack.com/methods/files.upload
|
|
187
193
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json
|
|
188
194
|
def files_upload(options = {})
|
|
195
|
+
options = options.merge(filename: 'file') if options[:file] && !options[:filename]
|
|
189
196
|
post('files.upload', options)
|
|
190
197
|
end
|
|
191
198
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -31,6 +31,39 @@ module Slack
|
|
|
31
31
|
post('oauth.v2.access', options)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
#
|
|
35
|
+
# Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change.
|
|
36
|
+
#
|
|
37
|
+
# @option options [string] :client_id
|
|
38
|
+
# Issued when you created your application. Must be the app the token being rotated was issued to.
|
|
39
|
+
# @option options [string] :client_secret
|
|
40
|
+
# Issued when you created your application.
|
|
41
|
+
# @see https://api.slack.com/methods/oauth.v2.beginShortTokenRotation
|
|
42
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.beginShortTokenRotation.json
|
|
43
|
+
def oauth_v2_beginShortTokenRotation(options = {})
|
|
44
|
+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
|
|
45
|
+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
|
|
46
|
+
post('oauth.v2.beginShortTokenRotation', options)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
#
|
|
50
|
+
# Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process.
|
|
51
|
+
#
|
|
52
|
+
# @option options [string] :client_id
|
|
53
|
+
# Issued when you created your application. Must be the app the token being rotated was issued to.
|
|
54
|
+
# @option options [string] :client_secret
|
|
55
|
+
# Issued when you created your application.
|
|
56
|
+
# @option options [string] :new_token
|
|
57
|
+
# The new xoxp token returned by oauth.v2.beginShortTokenRotation.
|
|
58
|
+
# @see https://api.slack.com/methods/oauth.v2.completeShortTokenRotation
|
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.completeShortTokenRotation.json
|
|
60
|
+
def oauth_v2_completeShortTokenRotation(options = {})
|
|
61
|
+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
|
|
62
|
+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
|
|
63
|
+
raise ArgumentError, 'Required arguments :new_token missing' if options[:new_token].nil?
|
|
64
|
+
post('oauth.v2.completeShortTokenRotation', options)
|
|
65
|
+
end
|
|
66
|
+
|
|
34
67
|
#
|
|
35
68
|
# Exchanges a legacy access token for a new expiring access token and refresh token
|
|
36
69
|
#
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|