Skip to content

Commit cd39ecd

Browse files
authored
Merge pull request #356 from dblock/api-update
Updated Slack API.
2 parents 911d7a8 + 611a394 commit cd39ecd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+721
-97
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
### 0.16.0 (Next)
22

3-
* [#348](https://github.com/slack-ruby/slack-ruby-client/pull/348): Added `admin_conversations_archive`, `admin_conversations_convertToPrivate`, `admin_conversations_create`, `admin_conversations_delete`, `admin_conversations_disconnectShared`, `admin_conversations_getConversationPrefs`, `admin_conversations_getTeams`, `admin_conversations_invite`, `admin_conversations_rename`, `admin_conversations_search`, `admin_conversations_setConversationPrefs`, `admin_conversations_unarchive`, `admin_conversations_ekm_listOriginalConnectedChannelInfo`, `admin_users_session_invalidate`, `apps_event_authorizations_list`, `conversations_mark`, `workflows_stepCompleted`, `workflows_stepFailed`, `workflows_updateStep` endpoints - [@wasabigeek](https://github.com/wasabigeek).
43
* [#350](https://github.com/slack-ruby/slack-ruby-client/pull/350): Handle server errors such as timouts & non-json responses (see [Upgrading to 0.16.0](UPGRADING.md#upgrading-to--0160)) - [@ojab](https://github.com/ojab).
54
* [#354](https://github.com/slack-ruby/slack-ruby-client/pull/354): Rewind body after checking request signature - [@sunny](https://github.com/sunny).
6-
* [#355](https://github.com/slack-ruby/slack-ruby-client/pull/355): Remove celluloid code - [@wasabigeek](https://github.com/wasabigeek).
5+
* [#355](https://github.com/slack-ruby/slack-ruby-client/pull/355): Removed celluloid concurrency support - [@wasabigeek](https://github.com/wasabigeek).
6+
* [#356](https://github.com/slack-ruby/slack-ruby-client/pull/356): Added `admin_apps_clearResolution`, `admin_conversations_getCustomRetention`, `admin_conversations_removeCustomRetention`, `admin_conversations_setCustomRetention` and `admin_users_session_list` endpoints - [@dblock](https://github.com/dblock).
7+
* [#348](https://github.com/slack-ruby/slack-ruby-client/pull/348): Added `admin_conversations_archive`, `admin_conversations_convertToPrivate`, `admin_conversations_create`, `admin_conversations_delete`, `admin_conversations_disconnectShared`, `admin_conversations_getConversationPrefs`, `admin_conversations_getTeams`, `admin_conversations_invite`, `admin_conversations_rename`, `admin_conversations_search`, `admin_conversations_setConversationPrefs`, `admin_conversations_unarchive`, `admin_conversations_ekm_listOriginalConnectedChannelInfo`, `admin_users_session_invalidate`, `apps_event_authorizations_list`, `conversations_mark`, `workflows_stepCompleted`, `workflows_stepFailed` and `workflows_updateStep` endpoints - [@wasabigeek](https://github.com/wasabigeek).
78
* Your contribution here.
89

910
### 0.15.1 (2020/9/3)

bin/commands.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# frozen_string_literal: true
22
# This file was auto-generated by lib/tasks/web.rake
33

4+
require 'commands/admin_analytics'
45
require 'commands/admin_apps'
56
require 'commands/admin_apps_approved'
67
require 'commands/admin_apps_requests'
78
require 'commands/admin_apps_restricted'
9+
require 'commands/admin_barriers'
810
require 'commands/admin_conversations'
911
require 'commands/admin_conversations_ekm'
1012
require 'commands/admin_conversations_restrictAccess'
@@ -22,12 +24,14 @@
2224
require 'commands/admin_users_session'
2325
require 'commands/api'
2426
require 'commands/apps'
27+
require 'commands/apps_connections'
2528
require 'commands/apps_event_authorizations'
2629
require 'commands/apps_permissions'
2730
require 'commands/apps_permissions_resources'
2831
require 'commands/apps_permissions_scopes'
2932
require 'commands/apps_permissions_users'
3033
require 'commands/auth'
34+
require 'commands/auth_teams'
3135
require 'commands/bots'
3236
require 'commands/calls'
3337
require 'commands/calls_participants'

bin/commands/admin_analytics.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
# This file was auto-generated by lib/tasks/web.rake
3+
4+
desc 'AdminAnalytics methods.'
5+
command 'admin_analytics' do |g|
6+
g.desc 'Retrieve analytics data for a given date, presented as a compressed JSON file'
7+
g.long_desc %( Retrieve analytics data for a given date, presented as a compressed JSON file )
8+
g.command 'getFile' do |c|
9+
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member.'
10+
c.flag 'date', desc: 'Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC.'
11+
c.action do |_global_options, options, _args|
12+
puts JSON.dump($client.admin_analytics_getFile(options))
13+
end
14+
end
15+
end

bin/commands/admin_apps.rb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,32 @@
77
g.long_desc %( Approve an app for installation on a workspace. )
88
g.command 'approve' do |c|
99
c.flag 'app_id', desc: 'The id of the app to approve.'
10+
c.flag 'enterprise_id', desc: 'The ID of the enterprise to approve the app on.'
1011
c.flag 'request_id', desc: 'The id of the request to approve.'
11-
c.flag 'team_id', desc: '.'
12+
c.flag 'team_id', desc: 'The ID of the workspace to approve the app on.'
1213
c.action do |_global_options, options, _args|
1314
puts JSON.dump($client.admin_apps_approve(options))
1415
end
1516
end
1617

18+
g.desc 'Clear an app resolution'
19+
g.long_desc %( Clear an app resolution )
20+
g.command 'clearResolution' do |c|
21+
c.flag 'app_id', desc: 'The id of the app whose resolution you want to clear/undo.'
22+
c.flag 'enterprise_id', desc: 'The enterprise to clear the app resolution from.'
23+
c.flag 'team_id', desc: 'The workspace to clear the app resolution from.'
24+
c.action do |_global_options, options, _args|
25+
puts JSON.dump($client.admin_apps_clearResolution(options))
26+
end
27+
end
28+
1729
g.desc 'Restrict an app for installation on a workspace.'
1830
g.long_desc %( Restrict an app for installation on a workspace. )
1931
g.command 'restrict' do |c|
2032
c.flag 'app_id', desc: 'The id of the app to restrict.'
33+
c.flag 'enterprise_id', desc: 'The ID of the enterprise to approve the app on.'
2134
c.flag 'request_id', desc: 'The id of the request to restrict.'
22-
c.flag 'team_id', desc: '.'
35+
c.flag 'team_id', desc: 'The ID of the workspace to approve the app on.'
2336
c.action do |_global_options, options, _args|
2437
puts JSON.dump($client.admin_apps_restrict(options))
2538
end

bin/commands/admin_barriers.rb

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# frozen_string_literal: true
2+
# This file was auto-generated by lib/tasks/web.rake
3+
4+
desc 'AdminBarriers methods.'
5+
command 'admin_barriers' do |g|
6+
g.desc 'Create an Information Barrier'
7+
g.long_desc %( Create an Information Barrier )
8+
g.command 'create' do |c|
9+
c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.'
10+
c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.'
11+
c.flag 'restricted_subjects', desc: 'What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.'
12+
c.action do |_global_options, options, _args|
13+
puts JSON.dump($client.admin_barriers_create(options))
14+
end
15+
end
16+
17+
g.desc 'Delete an existing Information Barrier'
18+
g.long_desc %( Delete an existing Information Barrier )
19+
g.command 'delete' do |c|
20+
c.flag 'barrier_id', desc: "The ID of the barrier you're trying to delete."
21+
c.action do |_global_options, options, _args|
22+
puts JSON.dump($client.admin_barriers_delete(options))
23+
end
24+
end
25+
26+
g.desc 'Get all Information Barriers for your organization'
27+
g.long_desc %( Get all Information Barriers for your organization )
28+
g.command 'list' do |c|
29+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
30+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
31+
c.action do |_global_options, options, _args|
32+
puts JSON.dump($client.admin_barriers_list(options))
33+
end
34+
end
35+
36+
g.desc 'Update an existing Information Barrier'
37+
g.long_desc %( Update an existing Information Barrier )
38+
g.command 'update' do |c|
39+
c.flag 'barrier_id', desc: "The ID of the barrier you're trying to modify."
40+
c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.'
41+
c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.'
42+
c.flag 'restricted_subjects', desc: 'What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.'
43+
c.action do |_global_options, options, _args|
44+
puts JSON.dump($client.admin_barriers_update(options))
45+
end
46+
end
47+
end

bin/commands/admin_conversations.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@
6262
end
6363
end
6464

65+
g.desc "This API endpoint can be used by any admin to get a channel's retention policy."
66+
g.long_desc %( This API endpoint can be used by any admin to get a channel's retention policy. )
67+
g.command 'getCustomRetention' do |c|
68+
c.flag 'channel_id', desc: 'The channel to get the retention policy for.'
69+
c.action do |_global_options, options, _args|
70+
puts JSON.dump($client.admin_conversations_getCustomRetention(options))
71+
end
72+
end
73+
6574
g.desc 'Get all the workspaces a given public or private channel is connected to within this Enterprise org.'
6675
g.long_desc %( Get all the workspaces a given public or private channel is connected to within this Enterprise org. )
6776
g.command 'getTeams' do |c|
@@ -83,6 +92,15 @@
8392
end
8493
end
8594

95+
g.desc "This API endpoint can be used by any admin to remove a channel's retention policy."
96+
g.long_desc %( This API endpoint can be used by any admin to remove a channel's retention policy. )
97+
g.command 'removeCustomRetention' do |c|
98+
c.flag 'channel_id', desc: 'The channel to set the retention policy for.'
99+
c.action do |_global_options, options, _args|
100+
puts JSON.dump($client.admin_conversations_removeCustomRetention(options))
101+
end
102+
end
103+
86104
g.desc 'Rename a public or private channel.'
87105
g.long_desc %( Rename a public or private channel. )
88106
g.command 'rename' do |c|
@@ -118,6 +136,16 @@
118136
end
119137
end
120138

139+
g.desc "This API endpoint can be used by any admin to set a channel's retention policy."
140+
g.long_desc %( This API endpoint can be used by any admin to set a channel's retention policy. )
141+
g.command 'setCustomRetention' do |c|
142+
c.flag 'channel_id', desc: 'The channel to set the retention policy for.'
143+
c.flag 'duration_days', desc: 'The message retention duration in days to set for this channel.'
144+
c.action do |_global_options, options, _args|
145+
puts JSON.dump($client.admin_conversations_setCustomRetention(options))
146+
end
147+
end
148+
121149
g.desc 'Set the workspaces in an Enterprise grid org that connect to a public or private channel.'
122150
g.long_desc %( Set the workspaces in an Enterprise grid org that connect to a public or private channel. )
123151
g.command 'setTeams' do |c|

bin/commands/admin_conversations_restrictAccess.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
# This file was auto-generated by lib/tasks/web.rake
33

4-
desc 'AdminConversationsRestrictaccess methods.'
4+
desc 'Add and remove user groups from conversations.'
55
command 'admin_conversations_restrictAccess' do |g|
66
g.desc 'Add an allowlist of IDP groups for accessing a channel'
77
g.long_desc %( Add an allowlist of IDP groups for accessing a channel )

bin/commands/admin_conversations_whitelist.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
# This file was auto-generated by lib/tasks/web.rake
33

4-
desc 'AdminConversationsWhitelist methods.'
4+
desc 'Add and remove user groups from conversations. Use admin.conversations.* equivalents instead.'
55
command 'admin_conversations_whitelist' do |g|
66
g.desc 'Add an allowlist of IDP groups for accessing a channel'
77
g.long_desc %( Add an allowlist of IDP groups for accessing a channel )

bin/commands/admin_emoji.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
g.desc 'Add an emoji.'
77
g.long_desc %( Add an emoji. )
88
g.command 'add' do |c|
9-
c.flag 'name', desc: 'The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.'
9+
c.flag 'name', desc: 'The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.'
1010
c.flag 'url', desc: 'The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.'
1111
c.action do |_global_options, options, _args|
1212
puts JSON.dump($client.admin_emoji_add(options))

bin/commands/admin_usergroups.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
desc 'AdminUsergroups methods.'
55
command 'admin_usergroups' do |g|
6-
g.desc 'Add one or more default channels to an IDP group.'
7-
g.long_desc %( Add one or more default channels to an IDP group. )
6+
g.desc 'Add up to one hundred default channels to an IDP group.'
7+
g.long_desc %( Add up to one hundred default channels to an IDP group. )
88
g.command 'addChannels' do |c|
99
c.flag 'channel_ids', desc: 'Comma separated string of channel IDs.'
1010
c.flag 'usergroup_id', desc: 'ID of the IDP group to add default channels for.'

0 commit comments

Comments
 (0)