slack-ruby-client 0.17.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +65 -31
- data/.travis.yml +1 -0
- data/CHANGELOG.md +10 -0
- data/CONTRIBUTING.md +3 -3
- data/README.md +5 -5
- data/RELEASING.md +1 -1
- data/UPGRADING.md +42 -0
- data/bin/commands/admin_apps.rb +11 -0
- data/bin/commands/admin_apps_requests.rb +1 -0
- data/bin/commands/admin_auth_policy.rb +39 -0
- data/bin/commands/admin_conversations.rb +10 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +1 -1
- data/bin/commands/admin_users.rb +1 -0
- data/bin/commands/admin_users_session.rb +40 -0
- data/bin/commands/apps_manifest.rb +51 -0
- data/bin/commands/chat.rb +9 -6
- data/bin/commands/conversations.rb +59 -2
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +2 -1
- data/bin/commands/oauth.rb +0 -13
- data/bin/commands/oauth_v2.rb +13 -1
- data/bin/commands/openid_connect.rb +27 -0
- data/bin/commands/pins.rb +2 -2
- data/bin/commands/reminders.rb +6 -0
- data/bin/commands/rtm.rb +2 -2
- data/bin/commands/search.rb +2 -1
- data/bin/commands/stars.rb +7 -6
- data/bin/commands/team_billing.rb +13 -0
- data/bin/commands/team_preferences.rb +13 -0
- data/bin/commands/tooling_tokens.rb +14 -0
- data/bin/commands/usergroups.rb +1 -1
- data/bin/commands/users.rb +1 -1
- data/bin/commands/views.rb +1 -1
- data/bin/commands.rb +6 -8
- data/lib/slack/config.rb +1 -2
- data/lib/slack/events/request.rb +3 -1
- data/lib/slack/real_time/client.rb +4 -5
- data/lib/slack/real_time/concurrency/async.rb +6 -8
- data/lib/slack/real_time/socket.rb +1 -2
- data/lib/slack/real_time/stores/base.rb +1 -6
- data/lib/slack/real_time/stores/starter.rb +6 -3
- data/lib/slack/real_time/stores/store.rb +5 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_apps.rb +21 -5
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +4 -2
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_conversations.rb +38 -24
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_emoji.rb +9 -9
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +10 -10
- data/lib/slack/web/api/endpoints/admin_users.rb +20 -18
- data/lib/slack/web/api/endpoints/admin_users_session.rb +65 -9
- data/lib/slack/web/api/endpoints/api.rb +1 -1
- data/lib/slack/web/api/endpoints/apps.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +3 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +75 -0
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/bots.rb +2 -2
- data/lib/slack/web/api/endpoints/calls.rb +15 -15
- data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
- data/lib/slack/web/api/endpoints/chat.rb +60 -54
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations.rb +115 -25
- data/lib/slack/web/api/endpoints/dialog.rb +2 -2
- data/lib/slack/web/api/endpoints/dnd.rb +4 -5
- data/lib/slack/web/api/endpoints/files.rb +16 -14
- data/lib/slack/web/api/endpoints/files_comments.rb +1 -1
- data/lib/slack/web/api/endpoints/files_remote.rb +20 -20
- data/lib/slack/web/api/endpoints/migration.rb +3 -3
- data/lib/slack/web/api/endpoints/oauth.rb +5 -27
- data/lib/slack/web/api/endpoints/oauth_v2.rb +24 -6
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +4 -4
- data/lib/slack/web/api/endpoints/reactions.rb +12 -12
- data/lib/slack/web/api/endpoints/reminders.rb +17 -5
- data/lib/slack/web/api/endpoints/rtm.rb +10 -10
- data/lib/slack/web/api/endpoints/search.rb +24 -16
- data/lib/slack/web/api/endpoints/stars.rb +11 -9
- data/lib/slack/web/api/endpoints/team.rb +8 -8
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +19 -19
- data/lib/slack/web/api/endpoints/usergroups_users.rb +7 -7
- data/lib/slack/web/api/endpoints/users.rb +16 -16
- data/lib/slack/web/api/endpoints/users_profile.rb +4 -4
- data/lib/slack/web/api/endpoints/views.rb +12 -12
- data/lib/slack/web/api/endpoints/workflows.rb +9 -9
- data/lib/slack/web/api/endpoints.rb +12 -18
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -4
- data/lib/slack/web/api/errors.rb +200 -8
- data/lib/slack/web/api/mixins.rb +0 -2
- data/lib/slack/web/api/patches/chat.1.patch +1 -2
- data/lib/slack/web/api/templates/endpoints.erb +0 -2
- data/lib/slack/web/faraday/request.rb +2 -1
- data/lib/slack/web/faraday/response/raise_error.rb +1 -1
- data/lib/slack/web/faraday/response/wrap_error.rb +2 -2
- data/lib/slack/web/pagination/cursor.rb +1 -5
- data/lib/slack-ruby-client.rb +1 -1
- data/slack-ruby-client.gemspec +2 -3
- data/spec/fixtures/slack/web/429_error.yml +50 -54
- data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
- data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
- data/spec/fixtures/slack/web/conversations_info.yml +133 -9
- data/spec/fixtures/slack/web/conversations_setTopic.yml +42 -27
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +89 -59
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +131 -86
- data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
- data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
- data/spec/fixtures/slack/web/rtm_start.yml +771 -60
- data/spec/fixtures/slack/web/users_info.yml +153 -69
- data/spec/fixtures/slack/web/users_list.yml +102 -41
- data/spec/fixtures/slack/web/views_open_error.yml +49 -42
- data/spec/slack/real_time/client_spec.rb +17 -21
- data/spec/slack/real_time/event_handlers/bot_spec.rb +1 -1
- data/spec/slack/real_time/event_handlers/channel_spec.rb +1 -1
- data/spec/slack/real_time/event_handlers/im_spec.rb +5 -5
- data/spec/slack/real_time/event_handlers/user_spec.rb +2 -2
- data/spec/slack/slack_spec.rb +3 -1
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +14 -9
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +22 -2
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +8 -8
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +4 -6
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -5
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +6 -3
- data/spec/slack/web/api/endpoints/{im_spec.rb → openid_connect_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/{mpim_spec.rb → team_billing_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → team_preferences_spec.rb} +1 -1
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
- data/spec/slack/web/api/error_spec.rb +5 -7
- data/spec/slack/web/api/errors/slack_error_spec.rb +21 -26
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +1 -1
- data/spec/slack/web/api/pagination/cursor_spec.rb +1 -3
- data/spec/slack/web/client_spec.rb +7 -6
- data/spec/slack/web/faraday/request_spec.rb +80 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/support/real_time/connected_client.rb +1 -7
- data/spec/support/vcr.rb +33 -2
- metadata +28 -144
- data/lib/slack/web/api/errors/internal_error.rb +0 -14
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/channels.id.rb +0 -25
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -25
- data/spec/fixtures/slack/web/503_error.yml +0 -14
- data/spec/fixtures/slack/web/channels_info.yml +0 -139
- data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -19
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -109
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -43
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -43
@@ -9,11 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Approve an app for installation on a workspace.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :app_id
|
13
13
|
# The id of the app to approve.
|
14
14
|
# @option options [Object] :enterprise_id
|
15
15
|
# The ID of the enterprise to approve the app on.
|
16
|
-
# @option options [
|
16
|
+
# @option options [string] :request_id
|
17
17
|
# The id of the request to approve.
|
18
18
|
# @option options [Object] :team_id
|
19
19
|
# The ID of the workspace to approve the app on.
|
@@ -26,7 +26,7 @@ module Slack
|
|
26
26
|
#
|
27
27
|
# Clear an app resolution
|
28
28
|
#
|
29
|
-
# @option options [
|
29
|
+
# @option options [string] :app_id
|
30
30
|
# The id of the app whose resolution you want to clear/undo.
|
31
31
|
# @option options [Object] :enterprise_id
|
32
32
|
# The enterprise to clear the app resolution from.
|
@@ -42,11 +42,11 @@ module Slack
|
|
42
42
|
#
|
43
43
|
# Restrict an app for installation on a workspace.
|
44
44
|
#
|
45
|
-
# @option options [
|
45
|
+
# @option options [string] :app_id
|
46
46
|
# The id of the app to restrict.
|
47
47
|
# @option options [Object] :enterprise_id
|
48
48
|
# The ID of the enterprise to approve the app on.
|
49
|
-
# @option options [
|
49
|
+
# @option options [string] :request_id
|
50
50
|
# The id of the request to restrict.
|
51
51
|
# @option options [Object] :team_id
|
52
52
|
# The ID of the workspace to approve the app on.
|
@@ -55,6 +55,22 @@ module Slack
|
|
55
55
|
def admin_apps_restrict(options = {})
|
56
56
|
post('admin.apps.restrict', options)
|
57
57
|
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Uninstall an app from one or many workspaces, or an entire enterprise organization.
|
61
|
+
#
|
62
|
+
# @option options [string] :app_id
|
63
|
+
# The ID of the app to uninstall.
|
64
|
+
# @option options [string] :enterprise_id
|
65
|
+
# The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.
|
66
|
+
# @option options [string] :team_ids
|
67
|
+
# IDs of the teams to uninstall from (max 100). With an org-level token, this or enterprise_id is required.
|
68
|
+
# @see https://api.slack.com/methods/admin.apps.uninstall
|
69
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.uninstall.json
|
70
|
+
def admin_apps_uninstall(options = {})
|
71
|
+
throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
|
72
|
+
post('admin.apps.uninstall', options)
|
73
|
+
end
|
58
74
|
end
|
59
75
|
end
|
60
76
|
end
|
@@ -9,11 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List approved apps for an org or workspace.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :cursor
|
13
13
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
14
14
|
# @option options [Object] :enterprise_id
|
15
15
|
# .
|
16
|
-
# @option options [
|
16
|
+
# @option options [integer] :limit
|
17
17
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
18
|
# @option options [Object] :team_id
|
19
19
|
# .
|
@@ -9,9 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List app requests for a team/workspace.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :cursor
|
13
13
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
14
|
-
# @option options [Object] :
|
14
|
+
# @option options [Object] :enterprise_id
|
15
|
+
# .
|
16
|
+
# @option options [integer] :limit
|
15
17
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
16
18
|
# @option options [Object] :team_id
|
17
19
|
# .
|
@@ -9,11 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List restricted apps for an org or workspace.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :cursor
|
13
13
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
14
14
|
# @option options [Object] :enterprise_id
|
15
15
|
# .
|
16
|
-
# @option options [
|
16
|
+
# @option options [integer] :limit
|
17
17
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
18
|
# @option options [Object] :team_id
|
19
19
|
# .
|
@@ -0,0 +1,72 @@
|
|
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 AdminAuthPolicy
|
9
|
+
#
|
10
|
+
# Assign entities to a particular authentication policy.
|
11
|
+
#
|
12
|
+
# @option options [array] :entity_ids
|
13
|
+
# Array of IDs to assign to the policy.
|
14
|
+
# @option options [Object] :entity_type
|
15
|
+
# The type of entity to assign to the policy. Currently, USER is supported.
|
16
|
+
# @option options [string] :policy_name
|
17
|
+
# The name of the authentication policy to assign the entities to. Currently, email_password is the only policy that may be used with this method.
|
18
|
+
# @see https://api.slack.com/methods/admin.auth.policy.assignEntities
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.assignEntities.json
|
20
|
+
def admin_auth_policy_assignEntities(options = {})
|
21
|
+
throw ArgumentError.new('Required arguments :entity_ids missing') if options[:entity_ids].nil?
|
22
|
+
throw ArgumentError.new('Required arguments :entity_type missing') if options[:entity_type].nil?
|
23
|
+
throw ArgumentError.new('Required arguments :policy_name missing') if options[:policy_name].nil?
|
24
|
+
post('admin.auth.policy.assignEntities', options)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Fetch all the entities assigned to a particular authentication policy by name.
|
29
|
+
#
|
30
|
+
# @option options [string] :policy_name
|
31
|
+
# The name of the policy to fetch entities for. Currently, email_password is the only policy that may be used with this method.
|
32
|
+
# @option options [string] :cursor
|
33
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
34
|
+
# @option options [Object] :entity_type
|
35
|
+
# The type of entity to assign to the policy. Currently, USER is supported.
|
36
|
+
# @option options [integer] :limit
|
37
|
+
# The maximum number of items to return. Must be between 1 and 1000, both inclusive.
|
38
|
+
# @see https://api.slack.com/methods/admin.auth.policy.getEntities
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.getEntities.json
|
40
|
+
def admin_auth_policy_getEntities(options = {})
|
41
|
+
throw ArgumentError.new('Required arguments :policy_name missing') if options[:policy_name].nil?
|
42
|
+
if block_given?
|
43
|
+
Pagination::Cursor.new(self, :admin_auth_policy_getEntities, options).each do |page|
|
44
|
+
yield page
|
45
|
+
end
|
46
|
+
else
|
47
|
+
post('admin.auth.policy.getEntities', options)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Remove specified entities from a specified authentication policy.
|
53
|
+
#
|
54
|
+
# @option options [array] :entity_ids
|
55
|
+
# Encoded IDs of the entities you'd like to remove from the policy.
|
56
|
+
# @option options [Object] :entity_type
|
57
|
+
# The type of entity to assign to the policy. Currently, USER is supported.
|
58
|
+
# @option options [string] :policy_name
|
59
|
+
# The name of the policy to remove entities from. Currently, email_password is the only policy that may be used with this method.
|
60
|
+
# @see https://api.slack.com/methods/admin.auth.policy.removeEntities
|
61
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.removeEntities.json
|
62
|
+
def admin_auth_policy_removeEntities(options = {})
|
63
|
+
throw ArgumentError.new('Required arguments :entity_ids missing') if options[:entity_ids].nil?
|
64
|
+
throw ArgumentError.new('Required arguments :entity_type missing') if options[:entity_type].nil?
|
65
|
+
throw ArgumentError.new('Required arguments :policy_name missing') if options[:policy_name].nil?
|
66
|
+
post('admin.auth.policy.removeEntities', options)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -9,11 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Create an Information Barrier
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [array] :barriered_from_usergroup_ids
|
13
13
|
# A list of IDP Groups ids that the primary usergroup is to be barriered from.
|
14
14
|
# @option options [Object] :primary_usergroup_id
|
15
15
|
# The id of the primary IDP Group.
|
16
|
-
# @option options [
|
16
|
+
# @option options [array] :restricted_subjects
|
17
17
|
# What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.
|
18
18
|
# @see https://api.slack.com/methods/admin.barriers.create
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.create.json
|
@@ -39,9 +39,9 @@ module Slack
|
|
39
39
|
#
|
40
40
|
# Get all Information Barriers for your organization
|
41
41
|
#
|
42
|
-
# @option options [
|
42
|
+
# @option options [string] :cursor
|
43
43
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
44
|
-
# @option options [
|
44
|
+
# @option options [integer] :limit
|
45
45
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
46
46
|
# @see https://api.slack.com/methods/admin.barriers.list
|
47
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.list.json
|
@@ -60,11 +60,11 @@ module Slack
|
|
60
60
|
#
|
61
61
|
# @option options [Object] :barrier_id
|
62
62
|
# The ID of the barrier you're trying to modify.
|
63
|
-
# @option options [
|
63
|
+
# @option options [array] :barriered_from_usergroup_ids
|
64
64
|
# A list of IDP Groups ids that the primary usergroup is to be barriered from.
|
65
65
|
# @option options [Object] :primary_usergroup_id
|
66
66
|
# The id of the primary IDP Group.
|
67
|
-
# @option options [
|
67
|
+
# @option options [array] :restricted_subjects
|
68
68
|
# What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.
|
69
69
|
# @see https://api.slack.com/methods/admin.barriers.update
|
70
70
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.update.json
|
@@ -33,13 +33,13 @@ module Slack
|
|
33
33
|
#
|
34
34
|
# Create a public or private channel-based conversation.
|
35
35
|
#
|
36
|
-
# @option options [
|
36
|
+
# @option options [boolean] :is_private
|
37
37
|
# When true, creates a private channel instead of a public channel.
|
38
|
-
# @option options [
|
38
|
+
# @option options [string] :name
|
39
39
|
# Name of the public or private channel to create.
|
40
|
-
# @option options [
|
40
|
+
# @option options [string] :description
|
41
41
|
# Description of the public or private channel to create.
|
42
|
-
# @option options [
|
42
|
+
# @option options [boolean] :org_wide
|
43
43
|
# When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel.
|
44
44
|
# @option options [Object] :team_id
|
45
45
|
# The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.
|
@@ -63,6 +63,20 @@ module Slack
|
|
63
63
|
post('admin.conversations.delete', options)
|
64
64
|
end
|
65
65
|
|
66
|
+
#
|
67
|
+
# Disconnect a connected channel from one or more workspaces.
|
68
|
+
#
|
69
|
+
# @option options [Object] :channel_id
|
70
|
+
# The channel to be disconnected from some workspaces.
|
71
|
+
# @option options [array] :leaving_team_ids
|
72
|
+
# team IDs getting removed from the channel, optional if there are only two teams in the channel.
|
73
|
+
# @see https://api.slack.com/methods/admin.conversations.disconnectShared
|
74
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.disconnectShared.json
|
75
|
+
def admin_conversations_disconnectShared(options = {})
|
76
|
+
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
|
77
|
+
post('admin.conversations.disconnectShared', options)
|
78
|
+
end
|
79
|
+
|
66
80
|
#
|
67
81
|
# Get conversation preferences for a public or private channel.
|
68
82
|
#
|
@@ -78,7 +92,7 @@ module Slack
|
|
78
92
|
#
|
79
93
|
# This API endpoint can be used by any admin to get a channel's retention policy.
|
80
94
|
#
|
81
|
-
# @option options [
|
95
|
+
# @option options [string] :channel_id
|
82
96
|
# The channel to get the retention policy for.
|
83
97
|
# @see https://api.slack.com/methods/admin.conversations.getCustomRetention
|
84
98
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getCustomRetention.json
|
@@ -92,9 +106,9 @@ module Slack
|
|
92
106
|
#
|
93
107
|
# @option options [Object] :channel_id
|
94
108
|
# The channel to determine connected workspaces within the organization for.
|
95
|
-
# @option options [
|
109
|
+
# @option options [string] :cursor
|
96
110
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
97
|
-
# @option options [
|
111
|
+
# @option options [integer] :limit
|
98
112
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
99
113
|
# @see https://api.slack.com/methods/admin.conversations.getTeams
|
100
114
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getTeams.json
|
@@ -114,7 +128,7 @@ module Slack
|
|
114
128
|
#
|
115
129
|
# @option options [Object] :channel_id
|
116
130
|
# The channel that the users will be invited to.
|
117
|
-
# @option options [
|
131
|
+
# @option options [array] :user_ids
|
118
132
|
# The users to invite.
|
119
133
|
# @see https://api.slack.com/methods/admin.conversations.invite
|
120
134
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.invite.json
|
@@ -127,7 +141,7 @@ module Slack
|
|
127
141
|
#
|
128
142
|
# This API endpoint can be used by any admin to remove a channel's retention policy.
|
129
143
|
#
|
130
|
-
# @option options [
|
144
|
+
# @option options [string] :channel_id
|
131
145
|
# The channel to set the retention policy for.
|
132
146
|
# @see https://api.slack.com/methods/admin.conversations.removeCustomRetention
|
133
147
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.removeCustomRetention.json
|
@@ -141,7 +155,7 @@ module Slack
|
|
141
155
|
#
|
142
156
|
# @option options [Object] :channel_id
|
143
157
|
# The channel to rename.
|
144
|
-
# @option options [
|
158
|
+
# @option options [string] :name
|
145
159
|
# .
|
146
160
|
# @see https://api.slack.com/methods/admin.conversations.rename
|
147
161
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.rename.json
|
@@ -154,19 +168,19 @@ module Slack
|
|
154
168
|
#
|
155
169
|
# Search for public or private channels in an Enterprise organization.
|
156
170
|
#
|
157
|
-
# @option options [
|
171
|
+
# @option options [string] :cursor
|
158
172
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
159
|
-
# @option options [
|
173
|
+
# @option options [integer] :limit
|
160
174
|
# Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
|
161
|
-
# @option options [
|
175
|
+
# @option options [string] :query
|
162
176
|
# Name of the the channel to query by.
|
163
|
-
# @option options [
|
177
|
+
# @option options [array] :search_channel_types
|
164
178
|
# The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.
|
165
|
-
# @option options [
|
179
|
+
# @option options [string] :sort
|
166
180
|
# Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.
|
167
|
-
# @option options [
|
181
|
+
# @option options [string] :sort_dir
|
168
182
|
# Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).
|
169
|
-
# @option options [
|
183
|
+
# @option options [array] :team_ids
|
170
184
|
# Comma separated string of team IDs, signifying the workspaces to search through.
|
171
185
|
# @see https://api.slack.com/methods/admin.conversations.search
|
172
186
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.search.json
|
@@ -183,9 +197,9 @@ module Slack
|
|
183
197
|
#
|
184
198
|
# Set the posting permissions for a public or private channel.
|
185
199
|
#
|
186
|
-
# @option options [
|
200
|
+
# @option options [string] :channel_id
|
187
201
|
# The channel to set the prefs for.
|
188
|
-
# @option options [
|
202
|
+
# @option options [string] :prefs
|
189
203
|
# The prefs for this channel in a stringified JSON format.
|
190
204
|
# @see https://api.slack.com/methods/admin.conversations.setConversationPrefs
|
191
205
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setConversationPrefs.json
|
@@ -198,9 +212,9 @@ module Slack
|
|
198
212
|
#
|
199
213
|
# This API endpoint can be used by any admin to set a channel's retention policy.
|
200
214
|
#
|
201
|
-
# @option options [
|
215
|
+
# @option options [string] :channel_id
|
202
216
|
# The channel to set the retention policy for.
|
203
|
-
# @option options [
|
217
|
+
# @option options [integer] :duration_days
|
204
218
|
# The message retention duration in days to set for this channel.
|
205
219
|
# @see https://api.slack.com/methods/admin.conversations.setCustomRetention
|
206
220
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setCustomRetention.json
|
@@ -213,11 +227,11 @@ module Slack
|
|
213
227
|
#
|
214
228
|
# Set the workspaces in an Enterprise grid org that connect to a public or private channel.
|
215
229
|
#
|
216
|
-
# @option options [
|
230
|
+
# @option options [string] :channel_id
|
217
231
|
# The encoded channel_id to add or remove to workspaces.
|
218
|
-
# @option options [
|
232
|
+
# @option options [boolean] :org_channel
|
219
233
|
# True if channel has to be converted to an org channel.
|
220
|
-
# @option options [
|
234
|
+
# @option options [array] :target_team_ids
|
221
235
|
# A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
|
222
236
|
# @option options [Object] :team_id
|
223
237
|
# The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
|
@@ -9,13 +9,13 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :channel_ids
|
13
13
|
# A comma-separated list of channels to filter to.
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :cursor
|
15
15
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
-
# @option options [
|
16
|
+
# @option options [integer] :limit
|
17
17
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
|
-
# @option options [
|
18
|
+
# @option options [string] :team_ids
|
19
19
|
# A comma-separated list of the workspaces to which the channels you would like returned belong.
|
20
20
|
# @see https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo
|
21
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.ekm/admin.conversations.ekm.listOriginalConnectedChannelInfo.json
|
@@ -9,9 +9,9 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Add an emoji.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :name
|
13
13
|
# The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :url
|
15
15
|
# The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.
|
16
16
|
# @see https://api.slack.com/methods/admin.emoji.add
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.add.json
|
@@ -24,9 +24,9 @@ module Slack
|
|
24
24
|
#
|
25
25
|
# Add an emoji alias.
|
26
26
|
#
|
27
|
-
# @option options [
|
27
|
+
# @option options [string] :alias_for
|
28
28
|
# The alias of the emoji.
|
29
|
-
# @option options [
|
29
|
+
# @option options [string] :name
|
30
30
|
# The name of the emoji to be aliased. Colons (:myemoji:) around the value are not required, although they may be included.
|
31
31
|
# @see https://api.slack.com/methods/admin.emoji.addAlias
|
32
32
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.addAlias.json
|
@@ -39,9 +39,9 @@ module Slack
|
|
39
39
|
#
|
40
40
|
# List emoji for an Enterprise Grid organization.
|
41
41
|
#
|
42
|
-
# @option options [
|
42
|
+
# @option options [string] :cursor
|
43
43
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
44
|
-
# @option options [
|
44
|
+
# @option options [integer] :limit
|
45
45
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
46
46
|
# @see https://api.slack.com/methods/admin.emoji.list
|
47
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.list.json
|
@@ -58,7 +58,7 @@ module Slack
|
|
58
58
|
#
|
59
59
|
# Remove an emoji across an Enterprise Grid organization
|
60
60
|
#
|
61
|
-
# @option options [
|
61
|
+
# @option options [string] :name
|
62
62
|
# The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.
|
63
63
|
# @see https://api.slack.com/methods/admin.emoji.remove
|
64
64
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.remove.json
|
@@ -70,9 +70,9 @@ module Slack
|
|
70
70
|
#
|
71
71
|
# Rename an emoji.
|
72
72
|
#
|
73
|
-
# @option options [
|
73
|
+
# @option options [string] :name
|
74
74
|
# The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.
|
75
|
-
# @option options [
|
75
|
+
# @option options [string] :new_name
|
76
76
|
# The new name of the emoji.
|
77
77
|
# @see https://api.slack.com/methods/admin.emoji.rename
|
78
78
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.rename.json
|
@@ -9,9 +9,9 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Approve a workspace invite request.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :invite_request_id
|
13
13
|
# ID of the request to invite.
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :team_id
|
15
15
|
# ID for the workspace where the invite request was made.
|
16
16
|
# @see https://api.slack.com/methods/admin.inviteRequests.approve
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.approve.json
|
@@ -23,9 +23,9 @@ module Slack
|
|
23
23
|
#
|
24
24
|
# Deny a workspace invite request.
|
25
25
|
#
|
26
|
-
# @option options [
|
26
|
+
# @option options [string] :invite_request_id
|
27
27
|
# ID of the request to invite.
|
28
|
-
# @option options [
|
28
|
+
# @option options [string] :team_id
|
29
29
|
# ID for the workspace where the invite request was made.
|
30
30
|
# @see https://api.slack.com/methods/admin.inviteRequests.deny
|
31
31
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.deny.json
|
@@ -37,11 +37,11 @@ module Slack
|
|
37
37
|
#
|
38
38
|
# List all pending workspace invite requests.
|
39
39
|
#
|
40
|
-
# @option options [
|
40
|
+
# @option options [string] :cursor
|
41
41
|
# Value of the next_cursor field sent as part of the previous API response.
|
42
|
-
# @option options [
|
42
|
+
# @option options [integer] :limit
|
43
43
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
44
|
-
# @option options [
|
44
|
+
# @option options [string] :team_id
|
45
45
|
# ID for the workspace where the invite requests were made.
|
46
46
|
# @see https://api.slack.com/methods/admin.inviteRequests.list
|
47
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.list.json
|
@@ -9,11 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all approved workspace invite requests.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :cursor
|
13
13
|
# Value of the next_cursor field sent as part of the previous API response.
|
14
|
-
# @option options [
|
14
|
+
# @option options [integer] :limit
|
15
15
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
16
|
-
# @option options [
|
16
|
+
# @option options [string] :team_id
|
17
17
|
# ID for the workspace where the invite requests were made.
|
18
18
|
# @see https://api.slack.com/methods/admin.inviteRequests.approved.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests.approved/admin.inviteRequests.approved.list.json
|
@@ -9,9 +9,9 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all denied workspace invite requests.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :cursor
|
13
13
|
# Value of the next_cursor field sent as part of the previous api response.
|
14
|
-
# @option options [
|
14
|
+
# @option options [integer] :limit
|
15
15
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.
|
16
16
|
# @option options [Object] :team_id
|
17
17
|
# ID for the workspace where the invite requests were made.
|
@@ -9,13 +9,13 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Create an Enterprise team.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :team_domain
|
13
13
|
# Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :team_name
|
15
15
|
# Team name (for example, Slack Softball Team).
|
16
|
-
# @option options [
|
16
|
+
# @option options [string] :team_description
|
17
17
|
# Description for the team.
|
18
|
-
# @option options [
|
18
|
+
# @option options [string] :team_discoverability
|
19
19
|
# Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted.
|
20
20
|
# @see https://api.slack.com/methods/admin.teams.create
|
21
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.create.json
|
@@ -28,9 +28,9 @@ module Slack
|
|
28
28
|
#
|
29
29
|
# List all teams on an Enterprise organization
|
30
30
|
#
|
31
|
-
# @option options [
|
31
|
+
# @option options [string] :cursor
|
32
32
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
33
|
-
# @option options [
|
33
|
+
# @option options [integer] :limit
|
34
34
|
# The maximum number of items to return. Must be between 1 - 100 both inclusive.
|
35
35
|
# @see https://api.slack.com/methods/admin.teams.list
|
36
36
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json
|
@@ -11,9 +11,9 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [Object] :team_id
|
13
13
|
# .
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :cursor
|
15
15
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
-
# @option options [
|
16
|
+
# @option options [integer] :limit
|
17
17
|
# The maximum number of items to return.
|
18
18
|
# @see https://api.slack.com/methods/admin.teams.admins.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.admins/admin.teams.admins.list.json
|
@@ -11,9 +11,9 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [Object] :team_id
|
13
13
|
# .
|
14
|
-
# @option options [
|
14
|
+
# @option options [string] :cursor
|
15
15
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
-
# @option options [
|
16
|
+
# @option options [integer] :limit
|
17
17
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
18
|
# @see https://api.slack.com/methods/admin.teams.owners.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.owners/admin.teams.owners.list.json
|
@@ -21,7 +21,7 @@ module Slack
|
|
21
21
|
#
|
22
22
|
# Set the default channels of a workspace.
|
23
23
|
#
|
24
|
-
# @option options [
|
24
|
+
# @option options [array] :channel_ids
|
25
25
|
# An array of channel IDs.
|
26
26
|
# @option options [Object] :team_id
|
27
27
|
# ID for the workspace to set the default channel for.
|
@@ -36,7 +36,7 @@ module Slack
|
|
36
36
|
#
|
37
37
|
# Set the description of a given workspace.
|
38
38
|
#
|
39
|
-
# @option options [
|
39
|
+
# @option options [string] :description
|
40
40
|
# The new description for the workspace.
|
41
41
|
# @option options [Object] :team_id
|
42
42
|
# ID for the workspace to set the description for.
|
@@ -51,7 +51,7 @@ module Slack
|
|
51
51
|
#
|
52
52
|
# An API method that allows admins to set the discoverability of a given workspace
|
53
53
|
#
|
54
|
-
# @option options [
|
54
|
+
# @option options [string] :discoverability
|
55
55
|
# This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
|
56
56
|
# @option options [Object] :team_id
|
57
57
|
# The ID of the workspace to set discoverability on.
|
@@ -66,7 +66,7 @@ module Slack
|
|
66
66
|
#
|
67
67
|
# Sets the icon of a workspace.
|
68
68
|
#
|
69
|
-
# @option options [
|
69
|
+
# @option options [string] :image_url
|
70
70
|
# Image URL for the icon.
|
71
71
|
# @option options [Object] :team_id
|
72
72
|
# ID for the workspace to set the icon for.
|
@@ -81,7 +81,7 @@ module Slack
|
|
81
81
|
#
|
82
82
|
# Set the name of a given workspace.
|
83
83
|
#
|
84
|
-
# @option options [
|
84
|
+
# @option options [string] :name
|
85
85
|
# The new name of the workspace.
|
86
86
|
# @option options [Object] :team_id
|
87
87
|
# ID for the workspace to set the name for.
|