slack-ruby-client 3.1.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/.github/prompts/changelog-entries.prompt.yml +32 -0
- data/.github/workflows/danger-comment.yml +11 -0
- data/.github/workflows/danger.yml +13 -0
- data/.github/workflows/lint.yml +3 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/update_api.yml +94 -16
- data/.rubocop.yml +2 -1
- data/.rubocop_todo.yml +18 -4
- data/AGENTS.md +12 -0
- data/CHANGELOG.md +43 -1
- data/CONTRIBUTING.md +10 -1
- data/Dangerfile +4 -1
- data/Gemfile +20 -5
- data/README.md +47 -2
- data/RELEASING.md +2 -2
- data/Rakefile +7 -3
- data/UPGRADING.md +16 -0
- data/bin/commands/admin_analytics_messages.rb +36 -0
- data/bin/commands/admin_apps.rb +3 -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_conversations.rb +20 -0
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_functions_permissions.rb +1 -0
- data/bin/commands/admin_usergroups.rb +74 -0
- data/bin/commands/admin_users.rb +10 -8
- data/bin/commands/admin_users_session.rb +0 -1
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
- data/bin/commands/agents_sessions.rb +38 -0
- data/bin/commands/apps_icon.rb +22 -0
- data/bin/commands/apps_managed_permissions.rb +21 -0
- data/bin/commands/apps_manifest.rb +7 -6
- data/bin/commands/apps_user_connection.rb +21 -0
- data/bin/commands/assistant_search.rb +3 -2
- data/bin/commands/assistant_threads.rb +6 -3
- data/bin/commands/blocks.rb +22 -0
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/canvases.rb +12 -2
- data/bin/commands/chat.rb +17 -7
- data/bin/commands/conversations.rb +2 -2
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/entity.rb +27 -0
- data/bin/commands/files.rb +5 -2
- data/bin/commands/oauth_v2.rb +22 -0
- data/bin/commands/oauth_v2_user.rb +27 -0
- data/bin/commands/openid_connect.rb +1 -0
- data/bin/commands/slackLists_download.rb +6 -0
- data/bin/commands/slackLists_items.rb +1 -0
- data/bin/commands/users.rb +3 -2
- data/bin/commands/views.rb +1 -0
- data/bin/slack +5 -1
- data/examples/files_upload_v2/files_upload_v2.rb +1 -1
- data/examples/hi_web/hi.rb +1 -1
- data/examples/new_ticket/new_ticket.rb +1 -1
- data/examples/oauth_v2/oauth_v2.rb +6 -6
- data/lib/slack/events/config.rb +1 -1
- data/lib/slack/events/request.rb +2 -2
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +6 -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_conversations.rb +30 -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 +2 -1
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +111 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +11 -6
- data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -2
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
- data/lib/slack/web/api/endpoints/agents_sessions.rb +54 -0
- data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
- data/lib/slack/web/api/endpoints/apps_managed_permissions.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
- data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +3 -1
- data/lib/slack/web/api/endpoints/assistant_threads.rb +9 -4
- data/lib/slack/web/api/endpoints/blocks.rb +28 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
- data/lib/slack/web/api/endpoints/canvases.rb +16 -2
- data/lib/slack/web/api/endpoints/chat.rb +39 -17
- data/lib/slack/web/api/endpoints/conversations.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/entity.rb +48 -0
- data/lib/slack/web/api/endpoints/files.rb +8 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +35 -0
- data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -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/users.rb +3 -2
- data/lib/slack/web/api/endpoints/views.rb +1 -0
- data/lib/slack/web/api/endpoints.rb +20 -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 +230 -6
- data/lib/slack/web/api/helpers/files.rb +2 -2
- data/lib/slack/web/api/mixins/conversations.id.rb +2 -1
- data/lib/slack/web/api/mixins/ids.id.rb +3 -1
- data/lib/slack/web/api/mixins/users.id.rb +2 -1
- data/lib/slack/web/api/mixins/users.search.rb +1 -1
- data/lib/slack/web/api/patches/files.default-filename.patch +12 -0
- data/lib/slack/web/api/templates/method.erb +3 -1
- data/lib/slack/web/api/templates/method_spec.erb +32 -3
- data/lib/slack/web/client.rb +29 -0
- data/lib/slack/web/faraday/request.rb +22 -2
- data/lib/tasks/web.rake +5 -2
- data/slack-ruby-client.gemspec +0 -1
- metadata +32 -19
- data/.github/workflows/pr_lint.yml +0 -21
- data/Gemfile.danger +0 -6
|
@@ -0,0 +1,46 @@
|
|
|
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 AdminAppsMcpServersPermissions
|
|
9
|
+
#
|
|
10
|
+
# List MCP servers for an app with their access control permissions
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :app_id
|
|
13
|
+
# Encoded ID of the app.
|
|
14
|
+
# @see https://api.slack.com/methods/admin.apps.mcp.servers.permissions.list
|
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.mcp.servers.permissions/admin.apps.mcp.servers.permissions.list.json
|
|
16
|
+
def admin_apps_mcp_servers_permissions_list(options = {})
|
|
17
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
18
|
+
post('admin.apps.mcp.servers.permissions.list', options)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Set the access control permission for who can use an MCP server
|
|
23
|
+
#
|
|
24
|
+
# @option options [string] :app_id
|
|
25
|
+
# Encoded ID of the app.
|
|
26
|
+
# @option options [string] :server_id
|
|
27
|
+
# Encoded ID of the MCP server.
|
|
28
|
+
# @option options [enum] :permission_type
|
|
29
|
+
# The type of permission that defines who can use this MCP server.
|
|
30
|
+
# @option options [array] :user_ids
|
|
31
|
+
# List of user IDs to set for named_entities or named_entities_exclude.
|
|
32
|
+
# @option options [array] :usergroup_ids
|
|
33
|
+
# List of encoded usergroup IDs.
|
|
34
|
+
# @see https://api.slack.com/methods/admin.apps.mcp.servers.permissions.set
|
|
35
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.mcp.servers.permissions/admin.apps.mcp.servers.permissions.set.json
|
|
36
|
+
def admin_apps_mcp_servers_permissions_set(options = {})
|
|
37
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
38
|
+
raise ArgumentError, 'Required arguments :server_id missing' if options[:server_id].nil?
|
|
39
|
+
raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil?
|
|
40
|
+
post('admin.apps.mcp.servers.permissions.set', options)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
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 AdminAppsPermissions
|
|
9
|
+
#
|
|
10
|
+
# Grant permission for entities to access an app that has its permission type set to named_entities
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :app_id
|
|
13
|
+
# Encoded ID of the app.
|
|
14
|
+
# @option options [array] :user_ids
|
|
15
|
+
# List of user IDs to allow for named_entities visibility.
|
|
16
|
+
# @option options [array] :usergroup_ids
|
|
17
|
+
# List of encoded usergroup IDs.
|
|
18
|
+
# @option options [array] :channel_ids
|
|
19
|
+
# List of encoded channel IDs to add to the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method.
|
|
20
|
+
# @see https://api.slack.com/methods/admin.apps.permissions.add
|
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.add.json
|
|
22
|
+
def admin_apps_permissions_add(options = {})
|
|
23
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
24
|
+
post('admin.apps.permissions.add', options)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
#
|
|
28
|
+
# Returns the permission type of an app and if applicable, includes the entities that have been granted access
|
|
29
|
+
#
|
|
30
|
+
# @option options [string] :app_id
|
|
31
|
+
# Encoded ID of the app.
|
|
32
|
+
# @see https://api.slack.com/methods/admin.apps.permissions.list
|
|
33
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.list.json
|
|
34
|
+
def admin_apps_permissions_list(options = {})
|
|
35
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
36
|
+
post('admin.apps.permissions.list', options)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# Revoke an entity's access to an app that has its permission type set to named_entities
|
|
41
|
+
#
|
|
42
|
+
# @option options [string] :app_id
|
|
43
|
+
# Encoded ID of the app.
|
|
44
|
+
# @option options [array] :user_ids
|
|
45
|
+
# List of user IDs whose named_entities access will be revoked.
|
|
46
|
+
# @option options [array] :usergroup_ids
|
|
47
|
+
# List of encoded usergroup IDs.
|
|
48
|
+
# @option options [array] :channel_ids
|
|
49
|
+
# List of encoded channel IDs to remove from the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method.
|
|
50
|
+
# @see https://api.slack.com/methods/admin.apps.permissions.remove
|
|
51
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.remove.json
|
|
52
|
+
def admin_apps_permissions_remove(options = {})
|
|
53
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
54
|
+
post('admin.apps.permissions.remove', options)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
#
|
|
58
|
+
# Set the permission type for who can access an app
|
|
59
|
+
#
|
|
60
|
+
# @option options [string] :app_id
|
|
61
|
+
# Encoded ID of the app.
|
|
62
|
+
# @option options [enum] :permission_type
|
|
63
|
+
# The type of permission that defines who can access the app.
|
|
64
|
+
# @option options [array] :user_ids
|
|
65
|
+
# List of user IDs to allow for named_entities visibility.
|
|
66
|
+
# @option options [array] :usergroup_ids
|
|
67
|
+
# List of encoded usergroup IDs.
|
|
68
|
+
# @option options [enum] :channel_restriction_mode
|
|
69
|
+
# The mode that defines where the app can be used in channels.
|
|
70
|
+
# @option options [array] :channel_ids
|
|
71
|
+
# List of encoded channel IDs for channel restrictions. Semantics depend on channel_restriction_mode: allowlist for specific_channels, exclusion list for all_channels_except.
|
|
72
|
+
# @see https://api.slack.com/methods/admin.apps.permissions.set
|
|
73
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.permissions/admin.apps.permissions.set.json
|
|
74
|
+
def admin_apps_permissions_set(options = {})
|
|
75
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
76
|
+
raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil?
|
|
77
|
+
post('admin.apps.permissions.set', options)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -57,6 +57,36 @@ module Slack
|
|
|
57
57
|
post('admin.conversations.bulkMove', options)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
#
|
|
61
|
+
# Exclude channels from Slack AI in bulk.
|
|
62
|
+
#
|
|
63
|
+
# @option options [array] :channel_ids
|
|
64
|
+
# An array of channel IDs to exclude from Slack AI.
|
|
65
|
+
# @option options [boolean] :exclude
|
|
66
|
+
# Whether the channels should be excluded from Slack AI.
|
|
67
|
+
# @see https://api.slack.com/methods/admin.conversations.bulkSetExcludeFromSlackAi
|
|
68
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkSetExcludeFromSlackAi.json
|
|
69
|
+
def admin_conversations_bulkSetExcludeFromSlackAi(options = {})
|
|
70
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
|
71
|
+
raise ArgumentError, 'Required arguments :exclude missing' if options[:exclude].nil?
|
|
72
|
+
post('admin.conversations.bulkSetExcludeFromSlackAi', options)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
#
|
|
76
|
+
# Set properties on channels in bulk.
|
|
77
|
+
#
|
|
78
|
+
# @option options [array] :channel_ids
|
|
79
|
+
# An array of channel IDs on which to set the property.
|
|
80
|
+
# @option options [string] :property
|
|
81
|
+
# The property for this channel in a key value format. Only one property can be updated at a time.
|
|
82
|
+
# @see https://api.slack.com/methods/admin.conversations.bulkSetProperties
|
|
83
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkSetProperties.json
|
|
84
|
+
def admin_conversations_bulkSetProperties(options = {})
|
|
85
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
|
86
|
+
raise ArgumentError, 'Required arguments :property missing' if options[:property].nil?
|
|
87
|
+
post('admin.conversations.bulkSetProperties', options)
|
|
88
|
+
end
|
|
89
|
+
|
|
60
90
|
#
|
|
61
91
|
# Convert a public channel to a private channel.
|
|
62
92
|
#
|
|
@@ -17,7 +17,6 @@ module Slack
|
|
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.add.json
|
|
18
18
|
def admin_emoji_add(options = {})
|
|
19
19
|
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
|
20
|
-
raise ArgumentError, 'Required arguments :url missing' if options[:url].nil?
|
|
21
20
|
post('admin.emoji.add', options)
|
|
22
21
|
end
|
|
23
22
|
|
|
@@ -14,7 +14,7 @@ module Slack
|
|
|
14
14
|
# @option options [array] :app_ids
|
|
15
15
|
# Comma-separated array of app IDs to get functions for; max 50.
|
|
16
16
|
# @option options [boolean] :include_non_distributed_functions
|
|
17
|
-
# Whether to also include functions that are not yet distributed to any users in the function
|
|
17
|
+
# Whether to also include functions that are not yet distributed to any users in the function list. This is needed for admins that are approving an app request and will only work if the team owns the app.
|
|
18
18
|
# @option options [string] :cursor
|
|
19
19
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
|
20
20
|
# @option options [integer] :limit
|
|
@@ -27,11 +27,12 @@ module Slack
|
|
|
27
27
|
# The function visibility.
|
|
28
28
|
# @option options [array] :user_ids
|
|
29
29
|
# List of user IDs to allow for named_entities visibility.
|
|
30
|
+
# @option options [array] :permissions
|
|
31
|
+
# Array of permissions for the function.
|
|
30
32
|
# @see https://api.slack.com/methods/admin.functions.permissions.set
|
|
31
33
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.set.json
|
|
32
34
|
def admin_functions_permissions_set(options = {})
|
|
33
35
|
raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
|
|
34
|
-
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
|
|
35
36
|
post('admin.functions.permissions.set', options)
|
|
36
37
|
end
|
|
37
38
|
end
|
|
@@ -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
|
|
|
@@ -85,6 +86,10 @@ module Slack
|
|
|
85
86
|
# Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.
|
|
86
87
|
# @option options [boolean] :only_guests
|
|
87
88
|
# If true, returns only guests and their expiration dates that belong to the team_id.
|
|
89
|
+
# @option options [boolean] :include_admins
|
|
90
|
+
# If true, only admin users will be returned (excludes owners). Returns all admins and owners when combined with include_owners. Cannot be used together with only_guests.
|
|
91
|
+
# @option options [boolean] :include_owners
|
|
92
|
+
# If true, only owner users will be returned. Cannot be used together with only_guests.
|
|
88
93
|
# @option options [integer] :limit
|
|
89
94
|
# Limit for how many users to be retrieved per page.
|
|
90
95
|
# @see https://api.slack.com/methods/admin.users.list
|
|
@@ -115,10 +120,10 @@ module Slack
|
|
|
115
120
|
end
|
|
116
121
|
|
|
117
122
|
#
|
|
118
|
-
# Set an existing regular user or owner to be a workspace admin.
|
|
123
|
+
# Set an existing regular user or owner to be a workspace or org admin.
|
|
119
124
|
#
|
|
120
125
|
# @option options [Object] :team_id
|
|
121
|
-
# The ID
|
|
126
|
+
# The ID of the workspace or organization.
|
|
122
127
|
# @option options [string] :user_id
|
|
123
128
|
# The ID of the user to designate as an admin.
|
|
124
129
|
# @see https://api.slack.com/methods/admin.users.setAdmin
|
|
@@ -147,12 +152,12 @@ module Slack
|
|
|
147
152
|
end
|
|
148
153
|
|
|
149
154
|
#
|
|
150
|
-
# Set an existing regular user or admin to be a workspace owner.
|
|
155
|
+
# Set an existing regular user or admin to be a workspace or org owner.
|
|
151
156
|
#
|
|
152
157
|
# @option options [Object] :team_id
|
|
153
|
-
# The ID
|
|
158
|
+
# The ID of the workspace or organization.
|
|
154
159
|
# @option options [Object] :user_id
|
|
155
|
-
#
|
|
160
|
+
# ID of the user to promote to owner.
|
|
156
161
|
# @see https://api.slack.com/methods/admin.users.setOwner
|
|
157
162
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setOwner.json
|
|
158
163
|
def admin_users_setOwner(options = {})
|
|
@@ -165,7 +170,7 @@ module Slack
|
|
|
165
170
|
# Set an existing guest user, admin user, or owner to be a regular user.
|
|
166
171
|
#
|
|
167
172
|
# @option options [Object] :team_id
|
|
168
|
-
# The ID
|
|
173
|
+
# The ID of the workspace or organization.
|
|
169
174
|
# @option options [string] :user_id
|
|
170
175
|
# The ID of the user to designate as a regular user.
|
|
171
176
|
# @see https://api.slack.com/methods/admin.users.setRegular
|
|
@@ -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
|
|
@@ -7,10 +7,10 @@ module Slack
|
|
|
7
7
|
module Endpoints
|
|
8
8
|
module AdminWorkflowsTriggersTypesPermissions
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# List the permissions for using each trigger type.
|
|
11
11
|
#
|
|
12
12
|
# @option options [array] :trigger_type_ids
|
|
13
|
-
# The trigger
|
|
13
|
+
# The trigger type IDs for which to get the permissions.
|
|
14
14
|
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup
|
|
15
15
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json
|
|
16
16
|
def admin_workflows_triggers_types_permissions_lookup(options = {})
|
|
@@ -27,11 +27,11 @@ module Slack
|
|
|
27
27
|
# The function visibility.
|
|
28
28
|
# @option options [array] :user_ids
|
|
29
29
|
# List of user IDs to allow for named_entities visibility.
|
|
30
|
+
# @option options [object] :permissions
|
|
30
31
|
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set
|
|
31
32
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json
|
|
32
33
|
def admin_workflows_triggers_types_permissions_set(options = {})
|
|
33
34
|
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
|
|
34
|
-
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
|
|
35
35
|
post('admin.workflows.triggers.types.permissions.set', options)
|
|
36
36
|
end
|
|
37
37
|
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
|
|
@@ -0,0 +1,28 @@
|
|
|
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 AppsIcon
|
|
9
|
+
#
|
|
10
|
+
# Sets the app icon
|
|
11
|
+
#
|
|
12
|
+
# @option options [Object] :app_id
|
|
13
|
+
# The ID of the app whose icon you want to set.
|
|
14
|
+
# @option options [file] :file
|
|
15
|
+
# File contents via multipart/form-data.
|
|
16
|
+
# @option options [string] :url
|
|
17
|
+
# URL of a publicly hosted image.
|
|
18
|
+
# @see https://api.slack.com/methods/apps.icon.set
|
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.icon/apps.icon.set.json
|
|
20
|
+
def apps_icon_set(options = {})
|
|
21
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
|
22
|
+
post('apps.icon.set', options)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -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
|
|
@@ -11,6 +11,8 @@ module Slack
|
|
|
11
11
|
#
|
|
12
12
|
# @option options [string] :manifest
|
|
13
13
|
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.
|
|
14
|
+
# @option options [string] :team_id
|
|
15
|
+
# When called with an org token, which specific team to create app on.
|
|
14
16
|
# @see https://api.slack.com/methods/apps.manifest.create
|
|
15
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.create.json
|
|
16
18
|
def apps_manifest_create(options = {})
|
|
@@ -20,7 +22,7 @@ module Slack
|
|
|
20
22
|
end
|
|
21
23
|
|
|
22
24
|
#
|
|
23
|
-
# Permanently deletes an app created through app manifests
|
|
25
|
+
# Permanently deletes an app created through app manifests. When called with a manager app token, this method can only delete apps that were created by that manager app.
|
|
24
26
|
#
|
|
25
27
|
# @option options [Object] :app_id
|
|
26
28
|
# The ID of the app you want to delete.
|
|
@@ -32,7 +34,7 @@ module Slack
|
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
#
|
|
35
|
-
# Export an app manifest from an existing app
|
|
37
|
+
# Export an app manifest from an existing app. When called with a manager app token, this method can only export apps that were created by that manager app.
|
|
36
38
|
#
|
|
37
39
|
# @option options [Object] :app_id
|
|
38
40
|
# The ID of the app whose configuration you want to export as a manifest.
|
|
@@ -44,7 +46,7 @@ module Slack
|
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
#
|
|
47
|
-
# Update an app from an app manifest
|
|
49
|
+
# Update an app from an app manifest. When called with a manager app token, this method can only update apps that were created by that manager app.
|
|
48
50
|
#
|
|
49
51
|
# @option options [string] :manifest
|
|
50
52
|
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely _replaces_ any previous configuration, manifest must contain both unmodified and modified fields.
|
|
@@ -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 AppsUserConnection
|
|
9
|
+
#
|
|
10
|
+
# Updates the connection status between a user and an app.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :user_id
|
|
13
|
+
# The ID of the user for the status update.
|
|
14
|
+
# @option options [enum] :status
|
|
15
|
+
# The status that should be set for the user.
|
|
16
|
+
# @see https://api.slack.com/methods/apps.user.connection.update
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.user.connection/apps.user.connection.update.json
|
|
18
|
+
def apps_user_connection_update(options = {})
|
|
19
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
|
20
|
+
raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
|
|
21
|
+
post('apps.user.connection.update', options)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -7,7 +7,7 @@ module Slack
|
|
|
7
7
|
module Endpoints
|
|
8
8
|
module AssistantSearch
|
|
9
9
|
#
|
|
10
|
-
# Searches messages across your Slack organization
|
|
10
|
+
# Searches messages, files, channels and users across your Slack organization.
|
|
11
11
|
#
|
|
12
12
|
# @option options [string] :query
|
|
13
13
|
# User prompt or search query.
|
|
@@ -47,6 +47,8 @@ module Slack
|
|
|
47
47
|
# A string containing only modifiers in the format of modifier:value. Search results returned will match the modifier value. For now modifiers only affect term clauses.
|
|
48
48
|
# @option options [boolean] :include_archived_channels
|
|
49
49
|
# Whether to include archived channels in the search results.
|
|
50
|
+
# @option options [boolean] :disable_semantic_search
|
|
51
|
+
# Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false.
|
|
50
52
|
# @see https://api.slack.com/methods/assistant.search.context
|
|
51
53
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json
|
|
52
54
|
def assistant_search_context(options = {})
|