slack-ruby-client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/integration_test.yml +19 -0
- data/.github/workflows/pr_lint.yml +1 -1
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/README.md +18 -14
- data/SECURITY.md +9 -0
- data/bin/commands/admin_analytics.rb +16 -10
- data/bin/commands/admin_apps.rb +48 -42
- data/bin/commands/admin_apps_approved.rb +17 -11
- data/bin/commands/admin_apps_requests.rb +27 -21
- data/bin/commands/admin_apps_restricted.rb +17 -11
- data/bin/commands/admin_audit_anomaly_allow.rb +22 -16
- data/bin/commands/admin_auth_policy.rb +37 -31
- data/bin/commands/admin_barriers.rb +44 -38
- data/bin/commands/admin_conversations.rb +221 -165
- data/bin/commands/admin_conversations_ekm.rb +17 -11
- data/bin/commands/admin_conversations_restrictAccess.rb +35 -29
- data/bin/commands/admin_emoji.rb +50 -44
- data/bin/commands/admin_inviteRequests.rb +34 -28
- data/bin/commands/admin_inviteRequests_approved.rb +16 -10
- data/bin/commands/admin_inviteRequests_denied.rb +16 -10
- data/bin/commands/admin_roles.rb +46 -0
- data/bin/commands/admin_teams.rb +26 -20
- data/bin/commands/admin_teams_admins.rb +16 -10
- data/bin/commands/admin_teams_owners.rb +16 -10
- data/bin/commands/admin_teams_settings.rb +59 -53
- data/bin/commands/admin_usergroups.rb +45 -39
- data/bin/commands/admin_users.rb +91 -85
- data/bin/commands/admin_users_session.rb +72 -66
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -9
- data/bin/commands/api.rb +14 -8
- data/bin/commands/apps.rb +15 -9
- data/bin/commands/apps_connections.rb +13 -7
- data/bin/commands/apps_event_authorizations.rb +16 -10
- data/bin/commands/apps_manifest.rb +48 -42
- data/bin/commands/auth.rb +21 -15
- data/bin/commands/auth_teams.rb +16 -10
- data/bin/commands/bookmarks.rb +50 -44
- data/bin/commands/bots.rb +15 -9
- data/bin/commands/calls.rb +49 -43
- data/bin/commands/calls_participants.rb +24 -18
- data/bin/commands/chat.rb +150 -144
- data/bin/commands/chat_scheduledMessages.rb +19 -13
- data/bin/commands/conversations.rb +233 -227
- data/bin/commands/dialog.rb +15 -9
- data/bin/commands/dnd.rb +46 -40
- data/bin/commands/emoji.rb +14 -7
- data/bin/commands/files.rb +110 -105
- data/bin/commands/files_comments.rb +15 -9
- data/bin/commands/files_remote.rb +73 -67
- data/bin/commands/functions_workflows_steps.rb +22 -0
- data/bin/commands/functions_workflows_steps_responses.rb +22 -0
- data/bin/commands/migration.rb +16 -10
- data/bin/commands/oauth.rb +18 -12
- data/bin/commands/oauth_v2.rb +28 -22
- data/bin/commands/openid_connect.rb +26 -20
- data/bin/commands/pins.rb +33 -26
- data/bin/commands/reactions.rb +52 -46
- data/bin/commands/reminders.rb +53 -47
- data/bin/commands/rtm.rb +15 -9
- data/bin/commands/search.rb +43 -37
- data/bin/commands/stars.rb +38 -32
- data/bin/commands/team.rb +47 -39
- data/bin/commands/team_billing.rb +13 -7
- data/bin/commands/team_preferences.rb +13 -7
- data/bin/commands/team_profile.rb +14 -8
- data/bin/commands/tooling_tokens.rb +14 -8
- data/bin/commands/usergroups.rb +64 -58
- data/bin/commands/usergroups_users.rb +27 -21
- data/bin/commands/users.rb +111 -105
- data/bin/commands/users_admin.rb +28 -22
- data/bin/commands/users_prefs.rb +13 -7
- data/bin/commands/users_profile.rb +26 -20
- data/bin/commands/views.rb +47 -41
- data/bin/commands/workflows.rb +36 -30
- data/bin/slack +48 -43
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
- data/lib/slack/web/api/endpoints/chat.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/emoji.rb +2 -0
- data/lib/slack/web/api/endpoints/files.rb +0 -2
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +28 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +28 -0
- data/lib/slack/web/api/endpoints/pins.rb +2 -0
- data/lib/slack/web/api/endpoints/team.rb +11 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +1 -1
- data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +6 -0
- data/lib/slack/web/api/errors.rb +62 -0
- data/lib/slack/web/api/templates/command.erb +18 -12
- data/lib/tasks/web.rake +0 -6
- data/slack-ruby-client.gemspec +0 -1
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +30 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +13 -0
- metadata +13 -19
- data/bin/commands.rb +0 -69
- data/lib/slack/web/api/templates/commands.erb +0 -6
@@ -1,47 +1,53 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'AdminBarriers methods.'
|
8
|
+
command 'admin_barriers' do |g|
|
9
|
+
g.desc 'Create an Information Barrier'
|
10
|
+
g.long_desc %( Create an Information Barrier )
|
11
|
+
g.command 'create' do |c|
|
12
|
+
c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.'
|
13
|
+
c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.'
|
14
|
+
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.'
|
15
|
+
c.action do |_global_options, options, _args|
|
16
|
+
puts JSON.dump(@client.admin_barriers_create(options))
|
17
|
+
end
|
18
|
+
end
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
g.desc 'Delete an existing Information Barrier'
|
21
|
+
g.long_desc %( Delete an existing Information Barrier )
|
22
|
+
g.command 'delete' do |c|
|
23
|
+
c.flag 'barrier_id', desc: "The ID of the barrier you're trying to delete."
|
24
|
+
c.action do |_global_options, options, _args|
|
25
|
+
puts JSON.dump(@client.admin_barriers_delete(options))
|
26
|
+
end
|
27
|
+
end
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
g.desc 'Get all Information Barriers for your organization'
|
30
|
+
g.long_desc %( Get all Information Barriers for your organization )
|
31
|
+
g.command 'list' do |c|
|
32
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
33
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
34
|
+
c.action do |_global_options, options, _args|
|
35
|
+
puts JSON.dump(@client.admin_barriers_list(options))
|
36
|
+
end
|
37
|
+
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
g.desc 'Update an existing Information Barrier'
|
40
|
+
g.long_desc %( Update an existing Information Barrier )
|
41
|
+
g.command 'update' do |c|
|
42
|
+
c.flag 'barrier_id', desc: "The ID of the barrier you're trying to modify."
|
43
|
+
c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.'
|
44
|
+
c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.'
|
45
|
+
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.'
|
46
|
+
c.action do |_global_options, options, _args|
|
47
|
+
puts JSON.dump(@client.admin_barriers_update(options))
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
45
51
|
end
|
46
52
|
end
|
47
53
|
end
|
@@ -1,171 +1,227 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'AdminConversations methods.'
|
8
|
+
command 'admin_conversations' do |g|
|
9
|
+
g.desc 'Archive a public or private channel.'
|
10
|
+
g.long_desc %( Archive a public or private channel. )
|
11
|
+
g.command 'archive' do |c|
|
12
|
+
c.flag 'channel_id', desc: 'The channel to archive.'
|
13
|
+
c.action do |_global_options, options, _args|
|
14
|
+
puts JSON.dump(@client.admin_conversations_archive(options))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
g.desc 'Archive public or private channels in bulk.'
|
19
|
+
g.long_desc %( Archive public or private channels in bulk. )
|
20
|
+
g.command 'bulkArchive' do |c|
|
21
|
+
c.flag 'channel_ids', desc: 'An array of channel IDs to archive.'
|
22
|
+
c.action do |_global_options, options, _args|
|
23
|
+
puts JSON.dump(@client.admin_conversations_bulkArchive(options))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
g.desc 'Delete public or private channels in bulk'
|
28
|
+
g.long_desc %( Delete public or private channels in bulk )
|
29
|
+
g.command 'bulkDelete' do |c|
|
30
|
+
c.flag 'channel_ids', desc: 'An array of channel IDs.'
|
31
|
+
c.action do |_global_options, options, _args|
|
32
|
+
puts JSON.dump(@client.admin_conversations_bulkDelete(options))
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
g.desc 'Move public or private channels in bulk.'
|
37
|
+
g.long_desc %( Move public or private channels in bulk. )
|
38
|
+
g.command 'bulkMove' do |c|
|
39
|
+
c.flag 'channel_ids', desc: 'An array of channel IDs.'
|
40
|
+
c.flag 'target_team_id', desc: 'Target team ID.'
|
41
|
+
c.action do |_global_options, options, _args|
|
42
|
+
puts JSON.dump(@client.admin_conversations_bulkMove(options))
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
g.desc 'Convert a public channel to a private channel.'
|
47
|
+
g.long_desc %( Convert a public channel to a private channel. )
|
48
|
+
g.command 'convertToPrivate' do |c|
|
49
|
+
c.flag 'channel_id', desc: 'The channel to convert to private.'
|
50
|
+
c.flag 'name', desc: 'Name of private channel to create. Only respected when converting an MPIM.'
|
51
|
+
c.action do |_global_options, options, _args|
|
52
|
+
puts JSON.dump(@client.admin_conversations_convertToPrivate(options))
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
g.desc 'Convert a private channel to a public channel.'
|
57
|
+
g.long_desc %( Convert a private channel to a public channel. )
|
58
|
+
g.command 'convertToPublic' do |c|
|
59
|
+
c.flag 'channel_id', desc: 'The channel to convert to public.'
|
60
|
+
c.action do |_global_options, options, _args|
|
61
|
+
puts JSON.dump(@client.admin_conversations_convertToPublic(options))
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
g.desc 'Create a public or private channel-based conversation.'
|
66
|
+
g.long_desc %( Create a public or private channel-based conversation. )
|
67
|
+
g.command 'create' do |c|
|
68
|
+
c.flag 'is_private', desc: 'When true, creates a private channel instead of a public channel.'
|
69
|
+
c.flag 'name', desc: 'Name of the public or private channel to create.'
|
70
|
+
c.flag 'description', desc: 'Description of the public or private channel to create.'
|
71
|
+
c.flag 'org_wide', desc: '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.'
|
72
|
+
c.flag 'team_id', desc: 'The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.'
|
73
|
+
c.action do |_global_options, options, _args|
|
74
|
+
puts JSON.dump(@client.admin_conversations_create(options))
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
g.desc 'Delete a public or private channel.'
|
79
|
+
g.long_desc %( Delete a public or private channel. )
|
80
|
+
g.command 'delete' do |c|
|
81
|
+
c.flag 'channel_id', desc: 'The channel to delete.'
|
82
|
+
c.action do |_global_options, options, _args|
|
83
|
+
puts JSON.dump(@client.admin_conversations_delete(options))
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
g.desc 'Disconnect a connected channel from one or more workspaces.'
|
88
|
+
g.long_desc %( Disconnect a connected channel from one or more workspaces. )
|
89
|
+
g.command 'disconnectShared' do |c|
|
90
|
+
c.flag 'channel_id', desc: 'The channel to be disconnected from some workspaces.'
|
91
|
+
c.flag 'leaving_team_ids', desc: 'team IDs getting removed from the channel, optional if there are only two teams in the channel.'
|
92
|
+
c.action do |_global_options, options, _args|
|
93
|
+
puts JSON.dump(@client.admin_conversations_disconnectShared(options))
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
g.desc 'Get conversation preferences for a public or private channel.'
|
98
|
+
g.long_desc %( Get conversation preferences for a public or private channel. )
|
99
|
+
g.command 'getConversationPrefs' do |c|
|
100
|
+
c.flag 'channel_id', desc: 'The channel to get preferences for.'
|
101
|
+
c.action do |_global_options, options, _args|
|
102
|
+
puts JSON.dump(@client.admin_conversations_getConversationPrefs(options))
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
g.desc "This API endpoint can be used by any admin to get a conversation's retention policy."
|
107
|
+
g.long_desc %( This API endpoint can be used by any admin to get a conversation's retention policy. )
|
108
|
+
g.command 'getCustomRetention' do |c|
|
109
|
+
c.flag 'channel_id', desc: 'The conversation to get the retention policy for.'
|
110
|
+
c.action do |_global_options, options, _args|
|
111
|
+
puts JSON.dump(@client.admin_conversations_getCustomRetention(options))
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
g.desc 'Get all the workspaces a given public or private channel is connected to within this Enterprise org.'
|
116
|
+
g.long_desc %( Get all the workspaces a given public or private channel is connected to within this Enterprise org. )
|
117
|
+
g.command 'getTeams' do |c|
|
118
|
+
c.flag 'channel_id', desc: 'The channel to determine connected workspaces within the organization for.'
|
119
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
120
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
121
|
+
c.action do |_global_options, options, _args|
|
122
|
+
puts JSON.dump(@client.admin_conversations_getTeams(options))
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
g.desc 'Invite a user to a public or private channel.'
|
127
|
+
g.long_desc %( Invite a user to a public or private channel. )
|
128
|
+
g.command 'invite' do |c|
|
129
|
+
c.flag 'channel_id', desc: 'The channel that the users will be invited to.'
|
130
|
+
c.flag 'user_ids', desc: 'The users to invite.'
|
131
|
+
c.action do |_global_options, options, _args|
|
132
|
+
puts JSON.dump(@client.admin_conversations_invite(options))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
g.desc 'Returns channels on the given team using the filters.'
|
137
|
+
g.long_desc %( Returns channels on the given team using the filters. )
|
138
|
+
g.command 'lookup' do |c|
|
139
|
+
c.flag 'last_message_activity_before', desc: 'Filter by public channels where the most recent message was sent before last_message_activity.'
|
140
|
+
c.flag 'team_ids', desc: 'Array of team IDs to filter by.'
|
141
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned in the previous call, to fetch the next page.'
|
142
|
+
c.flag 'limit', desc: 'Maximum number of results.'
|
143
|
+
c.flag 'max_member_count', desc: 'Filter by public channels with member count equal to or less than the specified number.'
|
144
|
+
c.action do |_global_options, options, _args|
|
145
|
+
puts JSON.dump(@client.admin_conversations_lookup(options))
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
g.desc "This API endpoint can be used by any admin to remove a conversation's retention policy."
|
150
|
+
g.long_desc %( This API endpoint can be used by any admin to remove a conversation's retention policy. )
|
151
|
+
g.command 'removeCustomRetention' do |c|
|
152
|
+
c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
|
153
|
+
c.action do |_global_options, options, _args|
|
154
|
+
puts JSON.dump(@client.admin_conversations_removeCustomRetention(options))
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
g.desc 'Rename a public or private channel.'
|
159
|
+
g.long_desc %( Rename a public or private channel. )
|
160
|
+
g.command 'rename' do |c|
|
161
|
+
c.flag 'channel_id', desc: 'The channel to rename.'
|
162
|
+
c.flag 'name', desc: '.'
|
163
|
+
c.action do |_global_options, options, _args|
|
164
|
+
puts JSON.dump(@client.admin_conversations_rename(options))
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
g.desc 'Search for public or private channels in an Enterprise organization.'
|
169
|
+
g.long_desc %( Search for public or private channels in an Enterprise organization. )
|
170
|
+
g.command 'search' do |c|
|
171
|
+
c.flag 'connected_team_ids', desc: 'Array of encoded team IDs, signifying the external orgs to search through.'
|
172
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
173
|
+
c.flag 'limit', desc: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
|
174
|
+
c.flag 'query', desc: 'Name of the the channel to query by.'
|
175
|
+
c.flag 'search_channel_types', desc: '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.'
|
176
|
+
c.flag 'sort', desc: '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.'
|
177
|
+
c.flag 'sort_dir', desc: '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).'
|
178
|
+
c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
|
179
|
+
c.action do |_global_options, options, _args|
|
180
|
+
puts JSON.dump(@client.admin_conversations_search(options))
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
g.desc 'Set the posting permissions for a public or private channel.'
|
185
|
+
g.long_desc %( Set the posting permissions for a public or private channel. )
|
186
|
+
g.command 'setConversationPrefs' do |c|
|
187
|
+
c.flag 'channel_id', desc: 'The channel to set the prefs for.'
|
188
|
+
c.flag 'prefs', desc: 'The prefs for this channel in a stringified JSON format.'
|
189
|
+
c.action do |_global_options, options, _args|
|
190
|
+
puts JSON.dump(@client.admin_conversations_setConversationPrefs(options))
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
g.desc "This API endpoint can be used by any admin to set a conversation's retention policy."
|
195
|
+
g.long_desc %( This API endpoint can be used by any admin to set a conversation's retention policy. )
|
196
|
+
g.command 'setCustomRetention' do |c|
|
197
|
+
c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
|
198
|
+
c.flag 'duration_days', desc: 'The message retention duration in days to set for this conversation.'
|
199
|
+
c.action do |_global_options, options, _args|
|
200
|
+
puts JSON.dump(@client.admin_conversations_setCustomRetention(options))
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
g.desc 'Set the workspaces in an Enterprise grid org that connect to a public or private channel.'
|
205
|
+
g.long_desc %( Set the workspaces in an Enterprise grid org that connect to a public or private channel. )
|
206
|
+
g.command 'setTeams' do |c|
|
207
|
+
c.flag 'channel_id', desc: 'The encoded channel_id to add or remove to workspaces.'
|
208
|
+
c.flag 'org_channel', desc: 'True if channel has to be converted to an org channel.'
|
209
|
+
c.flag 'target_team_ids', desc: 'A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.'
|
210
|
+
c.flag 'team_id', desc: 'The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.'
|
211
|
+
c.action do |_global_options, options, _args|
|
212
|
+
puts JSON.dump(@client.admin_conversations_setTeams(options))
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
g.desc 'Unarchive a public or private channel.'
|
217
|
+
g.long_desc %( Unarchive a public or private channel. )
|
218
|
+
g.command 'unarchive' do |c|
|
219
|
+
c.flag 'channel_id', desc: 'The channel to unarchive.'
|
220
|
+
c.action do |_global_options, options, _args|
|
221
|
+
puts JSON.dump(@client.admin_conversations_unarchive(options))
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
169
225
|
end
|
170
226
|
end
|
171
227
|
end
|
@@ -1,17 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'AdminConversationsEkm methods.'
|
8
|
+
command 'admin_conversations_ekm' do |g|
|
9
|
+
g.desc '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.'
|
10
|
+
g.long_desc %( 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
|
+
g.command 'listOriginalConnectedChannelInfo' do |c|
|
12
|
+
c.flag 'channel_ids', desc: 'A comma-separated list of channels to filter to.'
|
13
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
14
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
15
|
+
c.flag 'team_ids', desc: 'A comma-separated list of the workspaces to which the channels you would like returned belong.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.admin_conversations_ekm_listOriginalConnectedChannelInfo(options))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
15
21
|
end
|
16
22
|
end
|
17
23
|
end
|