slack-ruby-client 3.2.0 → 3.4.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 +11 -2
- data/.github/workflows/danger.yml +10 -2
- data/.github/workflows/lint.yml +21 -6
- data/.github/workflows/release.yml +27 -0
- data/.github/workflows/test.yml +0 -0
- data/.github/workflows/update_api.yml +86 -6
- data/.gitignore +1 -0
- data/.gitmodules +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +94 -1
- data/.rubocop_todo.yml +13 -2
- data/.ruby-version +0 -0
- data/.spellcheck.txt +256 -0
- data/AGENTS.md +12 -0
- data/CHANGELOG.md +50 -0
- data/CONTRIBUTING.md +59 -59
- data/Dangerfile +0 -0
- data/Gemfile +33 -5
- data/LICENSE.md +1 -1
- data/README.md +139 -104
- data/RELEASING.md +20 -58
- data/Rakefile +29 -3
- data/SECURITY.md +1 -1
- data/UPGRADING.md +48 -40
- data/benchmarks/events.rb +26 -0
- data/benchmarks/formatting.rb +17 -0
- data/benchmarks/support.rb +67 -0
- data/benchmarks/web_client.rb +28 -0
- data/bin/commands/admin_analytics.rb +0 -0
- data/bin/commands/admin_analytics_members.rb +39 -0
- data/bin/commands/admin_analytics_messages.rb +4 -4
- data/bin/commands/admin_analytics_slackbot.rb +33 -0
- 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 +23 -3
- 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_slackbot_skills.rb +56 -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 +11 -2
- data/bin/commands/admin_users_access.rb +31 -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_conversations.rb +122 -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 +10 -7
- 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 +1 -1
- 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 +7 -0
- data/bin/commands/slackLists_items.rb +2 -1
- data/bin/commands/slackbot_skills.rb +71 -0
- data/bin/commands/slackbot_skills_library.rb +29 -0
- data/bin/commands/stars.rb +0 -0
- data/bin/commands/team.rb +1 -0
- data/bin/commands/team_billing.rb +0 -0
- data/bin/commands/team_externalTeams.rb +1 -1
- 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 +4 -3
- 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 +5 -4
- 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 +29 -20
- 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_members.rb +66 -0
- data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_analytics_slackbot.rb +54 -0
- 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 +32 -2
- 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_slackbot_skills.rb +84 -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 +14 -1
- data/lib/slack/web/api/endpoints/admin_users_access.rb +40 -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_conversations.rb +186 -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 +14 -10
- 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 +1 -1
- 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 +14 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +3 -1
- data/lib/slack/web/api/endpoints/slackbot_skills.rb +107 -0
- data/lib/slack/web/api/endpoints/slackbot_skills_library.rb +36 -0
- data/lib/slack/web/api/endpoints/stars.rb +0 -0
- data/lib/slack/web/api/endpoints/team.rb +2 -0
- data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +1 -1
- 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 +24 -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 +384 -10
- 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 +2 -1
- 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/script/release.rb +33 -0
- data/slack-ruby-client.gemspec +1 -3
- data/slack.png +0 -0
- metadata +41 -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
|
|
@@ -27,6 +27,18 @@ module Slack
|
|
|
27
27
|
post('admin.users.assign', options)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
#
|
|
31
|
+
# Deactivate a user from an enterprise organization and all its workspaces.
|
|
32
|
+
#
|
|
33
|
+
# @option options [string] :user_id
|
|
34
|
+
# The ID of the user to deactivate.
|
|
35
|
+
# @see https://api.slack.com/methods/admin.users.deactivate
|
|
36
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.deactivate.json
|
|
37
|
+
def admin_users_deactivate(options = {})
|
|
38
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
|
39
|
+
post('admin.users.deactivate', options)
|
|
40
|
+
end
|
|
41
|
+
|
|
30
42
|
#
|
|
31
43
|
# Fetches the expiration timestamp for a guest
|
|
32
44
|
#
|
|
@@ -37,6 +49,7 @@ module Slack
|
|
|
37
49
|
# @see https://api.slack.com/methods/admin.users.getExpiration
|
|
38
50
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.getExpiration.json
|
|
39
51
|
def admin_users_getExpiration(options = {})
|
|
52
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
|
40
53
|
post('admin.users.getExpiration', options)
|
|
41
54
|
end
|
|
42
55
|
|
|
@@ -166,7 +179,7 @@ module Slack
|
|
|
166
179
|
end
|
|
167
180
|
|
|
168
181
|
#
|
|
169
|
-
# Set an existing guest user, admin user, or owner to be a regular user.
|
|
182
|
+
# Set an existing guest user, admin user, or owner to be a regular user. When team_id is an organization, the user is also set to a regular user on every workspace where they are a workspace owner, including workspaces where they were an owner before becoming an org admin or owner.
|
|
170
183
|
#
|
|
171
184
|
# @option options [Object] :team_id
|
|
172
185
|
# The ID of the workspace or organization.
|
|
@@ -0,0 +1,40 @@
|
|
|
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 AdminUsersAccess
|
|
9
|
+
#
|
|
10
|
+
# Pause access across the organization for up to 1,000 frontline members. Success means the request was queued, not that all updates have completed.
|
|
11
|
+
#
|
|
12
|
+
# @option options [array] :user_ids
|
|
13
|
+
# IDs of frontline members in the authenticated organization. Valid users are queued; rejected IDs are returned in invalid_users.
|
|
14
|
+
# @option options [string] :reason
|
|
15
|
+
# Optional explanation for the access change.
|
|
16
|
+
# @see https://api.slack.com/methods/admin.users.access.pause
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.access/admin.users.access.pause.json
|
|
18
|
+
def admin_users_access_pause(options = {})
|
|
19
|
+
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
|
20
|
+
post('admin.users.access.pause', options)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# Resume access across the organization for up to 1,000 frontline members. Success means the request was queued, not that all updates have completed.
|
|
25
|
+
#
|
|
26
|
+
# @option options [array] :user_ids
|
|
27
|
+
# IDs of frontline members in the authenticated organization. Valid users are queued; rejected IDs are returned in invalid_users.
|
|
28
|
+
# @option options [string] :reason
|
|
29
|
+
# Optional explanation for the access change.
|
|
30
|
+
# @see https://api.slack.com/methods/admin.users.access.resume
|
|
31
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.access/admin.users.access.resume.json
|
|
32
|
+
def admin_users_access_resume(options = {})
|
|
33
|
+
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
|
34
|
+
post('admin.users.access.resume', options)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -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,186 @@
|
|
|
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 AgentsConversations
|
|
9
|
+
#
|
|
10
|
+
# Archive a code channel.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :channel_id
|
|
13
|
+
# ID of the code channel to archive.
|
|
14
|
+
# @option options [string] :summary_message_ts
|
|
15
|
+
# Timestamp of a message in the code channel to share back as a thread reply on the origin message. Requires the channel to have an origin_link set.
|
|
16
|
+
# @see https://api.slack.com/methods/agents.conversations.archive
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.archive.json
|
|
18
|
+
def agents_conversations_archive(options = {})
|
|
19
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
20
|
+
post('agents.conversations.archive', options)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# Create a dedicated code channel for an agent session.
|
|
25
|
+
#
|
|
26
|
+
# @option options [string] :team_id
|
|
27
|
+
# Encoded team id to create the channel in. Required for org tokens when origin_channel_id is not provided. When omitted, the workspace is derived from the origin channel.
|
|
28
|
+
# @option options [string] :session_id
|
|
29
|
+
# An opaque identifier for the agent session. When provided, the call is idempotent: if a channel already exists for this session_id, it is returned instead of creating a new one.
|
|
30
|
+
# @option options [string] :name
|
|
31
|
+
# A friendly display name for the code channel. Optional when origin_channel_id and origin_message_ts are provided — in that case the channel is named from the origin message and re-titled automatically. Required when no origin link is given.
|
|
32
|
+
# @option options [boolean] :is_private
|
|
33
|
+
# Whether the code channel is private. When omitted, the channel matches the privacy of origin_channel_id, or is public if no origin is given. An explicit value is always honored, even if it differs from the origin channel's privacy: passing false creates a public channel from a private origin.
|
|
34
|
+
# @option options [string] :origin_channel_id
|
|
35
|
+
# The channel ID where the agent session was initiated from. Must be provided together with origin_message_ts. The channel must be accessible to the calling user and must not be externally shared (Slack Connect). When team_id is omitted with an org token, the channel is created in the same workspace as this origin channel.
|
|
36
|
+
# @option options [string] :origin_message_ts
|
|
37
|
+
# The message timestamp in the origin channel that started the agent session. Must be provided together with origin_channel_id. The author of this message is automatically invited to the newly created code channel.
|
|
38
|
+
# @see https://api.slack.com/methods/agents.conversations.create
|
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.create.json
|
|
40
|
+
def agents_conversations_create(options = {})
|
|
41
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
|
42
|
+
post('agents.conversations.create', options)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
#
|
|
46
|
+
# Fetch a canvas attached to a code channel.
|
|
47
|
+
#
|
|
48
|
+
# @option options [channel] :channel
|
|
49
|
+
# ID of the agent session channel the canvas belongs to.
|
|
50
|
+
# @option options [Object] :canvas_id
|
|
51
|
+
# Encoded ID of the canvas to fetch.
|
|
52
|
+
# @option options [enum] :content_format
|
|
53
|
+
# Format to render the canvas content in. Defaults to markdown.
|
|
54
|
+
# @option options [boolean] :include_resolved
|
|
55
|
+
# Whether to include resolved comment threads in the response. Defaults to false.
|
|
56
|
+
# @see https://api.slack.com/methods/agents.conversations.getCanvas
|
|
57
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.getCanvas.json
|
|
58
|
+
def agents_conversations_getCanvas(options = {})
|
|
59
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
60
|
+
raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
|
|
61
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
62
|
+
post('agents.conversations.getCanvas', options)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
#
|
|
66
|
+
# List the views currently attached to a code channel.
|
|
67
|
+
#
|
|
68
|
+
# @option options [string] :channel_id
|
|
69
|
+
# ID of the code channel to list views for.
|
|
70
|
+
# @see https://api.slack.com/methods/agents.conversations.listViews
|
|
71
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.listViews.json
|
|
72
|
+
def agents_conversations_listViews(options = {})
|
|
73
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
74
|
+
post('agents.conversations.listViews', options)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
#
|
|
78
|
+
# Remove a view from a code channel.
|
|
79
|
+
#
|
|
80
|
+
# @option options [string] :channel_id
|
|
81
|
+
# ID of the code channel to remove the view from.
|
|
82
|
+
# @option options [string] :view_key
|
|
83
|
+
# Agent-assigned key of the view to remove. Provide exactly one of view_key or view_id.
|
|
84
|
+
# @option options [string] :view_id
|
|
85
|
+
# Encoded channel tab ID of the view to remove. Provide exactly one of view_key or view_id.
|
|
86
|
+
# @see https://api.slack.com/methods/agents.conversations.removeView
|
|
87
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.removeView.json
|
|
88
|
+
def agents_conversations_removeView(options = {})
|
|
89
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
90
|
+
post('agents.conversations.removeView', options)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
#
|
|
94
|
+
# Replace the full markdown content of a plan canvas attached to a code channel.
|
|
95
|
+
#
|
|
96
|
+
# @option options [channel] :channel
|
|
97
|
+
# ID of the agent session channel the canvas is attached to.
|
|
98
|
+
# @option options [Object] :canvas_id
|
|
99
|
+
# Encoded ID of the canvas whose content to replace.
|
|
100
|
+
# @option options [string] :content
|
|
101
|
+
# The full new canvas content as markdown. The server diffs this against the current content and applies only the changed sections.
|
|
102
|
+
# @see https://api.slack.com/methods/agents.conversations.setCanvasContent
|
|
103
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.setCanvasContent.json
|
|
104
|
+
def agents_conversations_setCanvasContent(options = {})
|
|
105
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
106
|
+
raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
|
|
107
|
+
raise ArgumentError, 'Required arguments :content missing' if options[:content].nil?
|
|
108
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
109
|
+
post('agents.conversations.setCanvasContent', options)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
#
|
|
113
|
+
# Register the set of agent-defined slash commands for the calling agent in a code channel.
|
|
114
|
+
#
|
|
115
|
+
# @option options [string] :channel_id
|
|
116
|
+
# ID of the code channel to register commands for.
|
|
117
|
+
# @option options [array] :commands
|
|
118
|
+
# Full set of commands to register for the calling agent in this channel, replacing that agent's previously registered set. Pass an empty array to clear the agent's commands. At most 10 commands may exist across all agents in the channel; names must be unique within the set and must not collide with builtin Slack commands.
|
|
119
|
+
# @see https://api.slack.com/methods/agents.conversations.setCommands
|
|
120
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.setCommands.json
|
|
121
|
+
def agents_conversations_setCommands(options = {})
|
|
122
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
123
|
+
raise ArgumentError, 'Required arguments :commands missing' if options[:commands].nil?
|
|
124
|
+
post('agents.conversations.setCommands', options)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
#
|
|
128
|
+
# Set properties on a code channel.
|
|
129
|
+
#
|
|
130
|
+
# @option options [string] :channel_id
|
|
131
|
+
# ID of the code channel to update.
|
|
132
|
+
# @option options [string] :title
|
|
133
|
+
# New display title for the agent session.
|
|
134
|
+
# @option options [enum] :status
|
|
135
|
+
# New status for the agent session.
|
|
136
|
+
# @option options [object] :code_channel
|
|
137
|
+
# Code channel properties to set. Only provided fields are updated.
|
|
138
|
+
# @option options [object] :agent_resource
|
|
139
|
+
# Agent resource properties to set. Only provided fields are updated.
|
|
140
|
+
# @see https://api.slack.com/methods/agents.conversations.setProperties
|
|
141
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.setProperties.json
|
|
142
|
+
def agents_conversations_setProperties(options = {})
|
|
143
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
144
|
+
post('agents.conversations.setProperties', options)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
#
|
|
148
|
+
# Create or update a view in a code channel.
|
|
149
|
+
#
|
|
150
|
+
# @option options [string] :channel_id
|
|
151
|
+
# ID of the code channel to render the view in.
|
|
152
|
+
# @option options [Object] :type
|
|
153
|
+
# The kind of view to create or update. Defaults to html. Determines which other arguments are required: html and diff require content, block_kit requires blocks, and canvas requires canvas_id.
|
|
154
|
+
# @option options [string] :view_key
|
|
155
|
+
# Agent-assigned stable identity for the view (e.g. the source file path on the agent's machine). Used as the upsert key: calls with the same view_key update the same view. Required for html, block_kit, and canvas views; ignored for diff (a diff view is a per-channel singleton).
|
|
156
|
+
# @option options [string] :content
|
|
157
|
+
# View content. For html, a full self-contained HTML document; for diff, raw unified diff text. Capped at 1,000,000 bytes; larger content returns content_too_large. The cap is enforced by the handler (not schema maxLength) so the documented error code actually surfaces instead of a generic argument-validation failure. Required when type is html or diff.
|
|
158
|
+
# @option options [Object] :blocks
|
|
159
|
+
# Block Kit blocks to render in the view tab. Required when type is block_kit; ignored otherwise.
|
|
160
|
+
# @option options [Object] :canvas_id
|
|
161
|
+
# Encoded ID of the canvas to attach as the view. Required when type is canvas; ignored otherwise.
|
|
162
|
+
# @option options [enum] :access_level
|
|
163
|
+
# For canvas views: access level granted to the channel for the canvas tab. Defaults to write. Use comment to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text.
|
|
164
|
+
# @option options [string] :agent_content_hash
|
|
165
|
+
# For canvas views: hash of the canvas-derived markdown the agent last wrote, recorded so the agent can later detect human edits to the canvas. Opaque to the server.
|
|
166
|
+
# @option options [string] :base_branch
|
|
167
|
+
# For diff views: base branch name for display purposes.
|
|
168
|
+
# @option options [string] :head_branch
|
|
169
|
+
# For diff views: head branch name for display purposes.
|
|
170
|
+
# @option options [string] :name
|
|
171
|
+
# Display label for the view tab. Preferred over the legacy label argument (name wins if both are supplied). Defaults to the last path segment of view_key, stripped of any .html or .htm extension.
|
|
172
|
+
# @option options [string] :label
|
|
173
|
+
# Deprecated alias for name. Display label for the view tab. Defaults to the last path segment of view_key, stripped of any .html or .htm extension.
|
|
174
|
+
# @option options [object] :csp
|
|
175
|
+
# Content-Security-Policy domain declarations for the view. Domains are validated server-side (https:// only, no private or internal hosts) and persisted.
|
|
176
|
+
# @see https://api.slack.com/methods/agents.conversations.setView
|
|
177
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/agents.conversations/agents.conversations.setView.json
|
|
178
|
+
def agents_conversations_setView(options = {})
|
|
179
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
180
|
+
post('agents.conversations.setView', options)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -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, using a user token or bot 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
|