slack-ruby-client 2.6.0 → 3.0.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.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +4 -10
  3. data/.github/workflows/update_api.yml +1 -1
  4. data/.rubocop_todo.yml +58 -71
  5. data/CHANGELOG.md +15 -0
  6. data/CONTRIBUTING.md +1 -1
  7. data/Gemfile +0 -9
  8. data/LICENSE.md +1 -1
  9. data/README.md +31 -220
  10. data/Rakefile +0 -1
  11. data/UPGRADING.md +4 -0
  12. data/bin/commands/admin_analytics.rb +1 -1
  13. data/bin/commands/admin_apps.rb +4 -4
  14. data/bin/commands/admin_apps_activities.rb +7 -7
  15. data/bin/commands/admin_apps_approved.rb +4 -4
  16. data/bin/commands/admin_apps_config.rb +3 -1
  17. data/bin/commands/admin_apps_requests.rb +5 -5
  18. data/bin/commands/admin_apps_restricted.rb +4 -4
  19. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  20. data/bin/commands/admin_auth_policy.rb +5 -5
  21. data/bin/commands/admin_barriers.rb +3 -3
  22. data/bin/commands/admin_conversations.rb +15 -15
  23. data/bin/commands/admin_conversations_ekm.rb +2 -2
  24. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  25. data/bin/commands/admin_emoji.rb +5 -5
  26. data/bin/commands/admin_functions.rb +1 -1
  27. data/bin/commands/admin_inviteRequests.rb +3 -3
  28. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  29. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  30. data/bin/commands/admin_roles.rb +3 -3
  31. data/bin/commands/admin_teams.rb +3 -3
  32. data/bin/commands/admin_teams_admins.rb +2 -2
  33. data/bin/commands/admin_teams_owners.rb +2 -2
  34. data/bin/commands/admin_teams_settings.rb +5 -5
  35. data/bin/commands/admin_usergroups.rb +4 -4
  36. data/bin/commands/admin_users.rb +12 -11
  37. data/bin/commands/admin_users_session.rb +6 -5
  38. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  39. data/bin/commands/admin_workflows.rb +6 -6
  40. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  41. data/bin/commands/apps_activities.rb +7 -7
  42. data/bin/commands/apps_auth_external.rb +1 -1
  43. data/bin/commands/apps_datastore.rb +12 -12
  44. data/bin/commands/apps_event_authorizations.rb +3 -3
  45. data/bin/commands/apps_manifest.rb +1 -1
  46. data/bin/commands/assistant_search.rb +18 -2
  47. data/bin/commands/assistant_threads.rb +2 -2
  48. data/bin/commands/auth.rb +1 -1
  49. data/bin/commands/auth_teams.rb +1 -1
  50. data/bin/commands/bookmarks.rb +6 -6
  51. data/bin/commands/calls.rb +5 -5
  52. data/bin/commands/canvases.rb +2 -2
  53. data/bin/commands/canvases_access.rb +1 -1
  54. data/bin/commands/chat.rb +23 -24
  55. data/bin/commands/conversations.rb +8 -8
  56. data/bin/commands/conversations_canvases.rb +1 -1
  57. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  58. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  59. data/bin/commands/dnd.rb +1 -1
  60. data/bin/commands/files.rb +5 -5
  61. data/bin/commands/files_remote.rb +1 -1
  62. data/bin/commands/functions.rb +1 -1
  63. data/bin/commands/functions_distributions_permissions.rb +15 -15
  64. data/bin/commands/functions_workflows_steps.rb +2 -2
  65. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  66. data/bin/commands/migration.rb +2 -2
  67. data/bin/commands/oauth_v2.rb +1 -1
  68. data/bin/commands/openid_connect.rb +1 -1
  69. data/bin/commands/reactions.rb +3 -3
  70. data/bin/commands/reminders.rb +2 -2
  71. data/bin/commands/rtm.rb +15 -0
  72. data/bin/commands/search.rb +4 -4
  73. data/bin/commands/slackLists.rb +37 -0
  74. data/bin/commands/slackLists_access.rb +34 -0
  75. data/bin/commands/slackLists_download.rb +31 -0
  76. data/bin/commands/slackLists_items.rb +76 -0
  77. data/bin/commands/team.rb +1 -1
  78. data/bin/commands/team_externalTeams.rb +4 -4
  79. data/bin/commands/usergroups.rb +10 -10
  80. data/bin/commands/usergroups_users.rb +5 -5
  81. data/bin/commands/users.rb +1 -1
  82. data/bin/commands/users_discoverableContacts.rb +1 -1
  83. data/bin/commands/views.rb +4 -4
  84. data/bin/commands/workflows_featured.rb +50 -0
  85. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  86. data/examples/files_upload_v2/files_upload_v2.rb +8 -0
  87. data/lib/slack/events/request.rb +1 -0
  88. data/lib/slack/version.rb +1 -1
  89. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  90. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  91. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  92. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  93. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  94. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  95. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  96. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  97. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  98. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  99. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  100. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  101. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  102. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  103. data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
  104. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  105. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  106. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  107. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  108. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  109. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  110. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  111. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  112. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  113. data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
  114. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  115. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  116. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  117. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  118. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  119. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  120. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  121. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  122. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  123. data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
  124. data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
  125. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  126. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  127. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  128. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  129. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  130. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  131. data/lib/slack/web/api/endpoints/chat.rb +53 -55
  132. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  133. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  134. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  135. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  136. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  137. data/lib/slack/web/api/endpoints/files.rb +11 -11
  138. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  139. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  140. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  141. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  142. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  143. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  144. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  145. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  146. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  147. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  148. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  149. data/lib/slack/web/api/endpoints/search.rb +8 -8
  150. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  151. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  152. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  153. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  154. data/lib/slack/web/api/endpoints/team.rb +3 -3
  155. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  156. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  157. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  158. data/lib/slack/web/api/endpoints/users.rb +2 -2
  159. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  160. data/lib/slack/web/api/endpoints/views.rb +9 -9
  161. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  162. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  163. data/lib/slack/web/api/endpoints.rb +10 -2
  164. data/lib/slack/web/api/errors.rb +88 -46
  165. data/lib/slack/web/api/helpers/files.rb +32 -22
  166. data/lib/slack/web/api/mixins/conversations.id.rb +14 -3
  167. data/lib/slack/web/api/mixins/users.id.rb +7 -3
  168. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  169. data/lib/slack-ruby-client.rb +0 -12
  170. data/lib/tasks/update.rake +0 -1
  171. data/lib/tasks/web.rake +0 -4
  172. data/slack-ruby-client.gemspec +1 -1
  173. metadata +19 -38
  174. data/.github/workflows/integration_test.yml +0 -45
  175. data/bin/commands/workflows.rb +0 -44
  176. data/examples/hi_real_time_and_web/Gemfile +0 -6
  177. data/examples/hi_real_time_and_web/hi.gif +0 -0
  178. data/examples/hi_real_time_and_web/hi.rb +0 -28
  179. data/examples/hi_real_time_async_async/Gemfile +0 -7
  180. data/examples/hi_real_time_async_async/Procfile +0 -2
  181. data/examples/hi_real_time_async_async/hi.rb +0 -41
  182. data/lib/slack/real_time/api/message.rb +0 -23
  183. data/lib/slack/real_time/api/message_id.rb +0 -15
  184. data/lib/slack/real_time/api/ping.rb +0 -19
  185. data/lib/slack/real_time/api/schema/event.json +0 -23
  186. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  187. data/lib/slack/real_time/api/typing.rb +0 -20
  188. data/lib/slack/real_time/client.rb +0 -271
  189. data/lib/slack/real_time/concurrency/async.rb +0 -142
  190. data/lib/slack/real_time/concurrency.rb +0 -8
  191. data/lib/slack/real_time/config.rb +0 -62
  192. data/lib/slack/real_time/models/base.rb +0 -11
  193. data/lib/slack/real_time/models/bot.rb +0 -9
  194. data/lib/slack/real_time/models/channel.rb +0 -13
  195. data/lib/slack/real_time/models/im.rb +0 -9
  196. data/lib/slack/real_time/models/mpim.rb +0 -9
  197. data/lib/slack/real_time/models/team.rb +0 -9
  198. data/lib/slack/real_time/models/user.rb +0 -9
  199. data/lib/slack/real_time/models.rb +0 -9
  200. data/lib/slack/real_time/socket.rb +0 -118
  201. data/lib/slack/real_time/stores/base.rb +0 -47
  202. data/lib/slack/real_time/stores/starter.rb +0 -449
  203. data/lib/slack/real_time/stores/store.rb +0 -624
  204. data/lib/slack/real_time/stores.rb +0 -5
  205. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  206. data/lib/tasks/real_time.rake +0 -81
@@ -36,8 +36,8 @@ module Slack
36
36
  g.desc 'Move public or private channels in bulk.'
37
37
  g.long_desc %( Move public or private channels in bulk. )
38
38
  g.command 'bulkMove' do |c|
39
- c.flag 'channel_ids', desc: 'An array of channel IDs.'
40
39
  c.flag 'target_team_id', desc: 'Target team ID.'
40
+ c.flag 'channel_ids', desc: 'An array of channel IDs.'
41
41
  c.action do |_global_options, options, _args|
42
42
  puts JSON.dump(@client.admin_conversations_bulkMove(options))
43
43
  end
@@ -65,9 +65,9 @@ module Slack
65
65
  g.desc 'Create a public or private channel-based conversation.'
66
66
  g.long_desc %( Create a public or private channel-based conversation. )
67
67
  g.command 'create' do |c|
68
- c.flag 'is_private', desc: 'When true, creates a private channel instead of a public channel.'
69
68
  c.flag 'name', desc: 'Name of the public or private channel to create.'
70
69
  c.flag 'description', desc: 'Description of the public or private channel to create.'
70
+ c.flag 'is_private', desc: 'When true, creates a private channel instead of a public channel.'
71
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
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
73
  c.action do |_global_options, options, _args|
@@ -99,7 +99,7 @@ module Slack
99
99
  g.long_desc %( Disconnect a connected channel from one or more workspaces. )
100
100
  g.command 'disconnectShared' do |c|
101
101
  c.flag 'channel_id', desc: 'The channel to be disconnected from some workspaces.'
102
- c.flag 'leaving_team_ids', desc: 'team IDs getting removed from the channel, optional if there are only two teams in the channel.'
102
+ c.flag 'leaving_team_ids', desc: 'Used for disconnecting a team from a shared channel. Only one team ID may be passed at a time.'
103
103
  c.action do |_global_options, options, _args|
104
104
  puts JSON.dump(@client.admin_conversations_disconnectShared(options))
105
105
  end
@@ -137,8 +137,8 @@ module Slack
137
137
  g.desc 'Invite a user to a public or private channel.'
138
138
  g.long_desc %( Invite a user to a public or private channel. )
139
139
  g.command 'invite' do |c|
140
- c.flag 'channel_id', desc: 'The channel that the users will be invited to.'
141
140
  c.flag 'user_ids', desc: 'The users to invite.'
141
+ c.flag 'channel_id', desc: 'The channel that the users will be invited to.'
142
142
  c.action do |_global_options, options, _args|
143
143
  puts JSON.dump(@client.admin_conversations_invite(options))
144
144
  end
@@ -158,11 +158,11 @@ module Slack
158
158
  g.desc 'Returns channels on the given team using the filters.'
159
159
  g.long_desc %( Returns channels on the given team using the filters. )
160
160
  g.command 'lookup' do |c|
161
- c.flag 'last_message_activity_before', desc: 'Filter by public channels where the most recent message was sent before last_message_activity.'
162
161
  c.flag 'team_ids', desc: 'Array of team IDs to filter by.'
162
+ c.flag 'max_member_count', desc: 'Filter by public channels with member count equal to or less than the specified number.'
163
+ c.flag 'last_message_activity_before', desc: 'Filter by public channels where the most recent message was sent before last_message_activity.'
163
164
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned in the previous call, to fetch the next page.'
164
165
  c.flag 'limit', desc: 'Maximum number of results.'
165
- c.flag 'max_member_count', desc: 'Filter by public channels with member count equal to or less than the specified number.'
166
166
  c.action do |_global_options, options, _args|
167
167
  puts JSON.dump(@client.admin_conversations_lookup(options))
168
168
  end
@@ -181,7 +181,7 @@ module Slack
181
181
  g.long_desc %( Rename a public or private channel. )
182
182
  g.command 'rename' do |c|
183
183
  c.flag 'channel_id', desc: 'The channel to rename.'
184
- c.flag 'name', desc: '.'
184
+ c.flag 'name', desc: ''
185
185
  c.action do |_global_options, options, _args|
186
186
  puts JSON.dump(@client.admin_conversations_rename(options))
187
187
  end
@@ -190,14 +190,14 @@ module Slack
190
190
  g.desc 'Search for public or private channels in an Enterprise organization.'
191
191
  g.long_desc %( Search for public or private channels in an Enterprise organization. )
192
192
  g.command 'search' do |c|
193
+ c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
193
194
  c.flag 'connected_team_ids', desc: 'Array of encoded team IDs, signifying the external orgs to search through.'
194
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
195
- c.flag 'limit', desc: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
196
195
  c.flag 'query', desc: 'Name of the the channel to query by.'
196
+ c.flag 'limit', desc: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
197
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
197
198
  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.'
198
- 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.'
199
+ 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 .'
199
200
  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).'
200
- c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
201
201
  c.flag 'total_count_only', desc: 'Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.'
202
202
  c.action do |_global_options, options, _args|
203
203
  puts JSON.dump(@client.admin_conversations_search(options))
@@ -224,13 +224,13 @@ module Slack
224
224
  end
225
225
  end
226
226
 
227
- g.desc 'Set the workspaces in an Enterprise grid org that connect to a public or private channel.'
228
- g.long_desc %( Set the workspaces in an Enterprise grid org that connect to a public or private channel. )
227
+ g.desc 'Set the workspaces in an Enterprise org that connect to a public or private channel.'
228
+ g.long_desc %( Set the workspaces in an Enterprise org that connect to a public or private channel. )
229
229
  g.command 'setTeams' do |c|
230
230
  c.flag 'channel_id', desc: 'The encoded channel_id to add or remove to workspaces.'
231
- c.flag 'org_channel', desc: 'True if channel has to be converted to an org channel.'
232
- 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.'
233
231
  c.flag 'team_id', desc: 'The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.'
232
+ 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.'
233
+ c.flag 'org_channel', desc: 'True if channel has to be converted to an org channel.'
234
234
  c.action do |_global_options, options, _args|
235
235
  puts JSON.dump(@client.admin_conversations_setTeams(options))
236
236
  end
@@ -10,9 +10,9 @@ module Slack
10
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
11
  g.command 'listOriginalConnectedChannelInfo' do |c|
12
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
13
  c.flag 'team_ids', desc: 'A comma-separated list of the workspaces to which the channels you would like returned belong.'
14
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
15
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.admin_conversations_ekm_listOriginalConnectedChannelInfo(options))
18
18
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Add an allowlist of IDP groups for accessing a channel'
10
10
  g.long_desc %( Add an allowlist of IDP groups for accessing a channel )
11
11
  g.command 'addGroup' do |c|
12
- c.flag 'channel_id', desc: 'The channel to link this group to.'
13
- c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.'
14
12
  c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
13
+ c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.'
14
+ c.flag 'channel_id', desc: 'The channel to link this group to.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_conversations_restrictAccess_addGroup(options))
17
17
  end
@@ -20,7 +20,7 @@ module Slack
20
20
  g.desc 'List all IDP Groups linked to a channel'
21
21
  g.long_desc %( List all IDP Groups linked to a channel )
22
22
  g.command 'listGroups' do |c|
23
- c.flag 'channel_id', desc: '.'
23
+ c.flag 'channel_id', desc: ''
24
24
  c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
25
25
  c.action do |_global_options, options, _args|
26
26
  puts JSON.dump(@client.admin_conversations_restrictAccess_listGroups(options))
@@ -30,9 +30,9 @@ module Slack
30
30
  g.desc 'Remove a linked IDP group linked from a private channel'
31
31
  g.long_desc %( Remove a linked IDP group linked from a private channel )
32
32
  g.command 'removeGroup' do |c|
33
- c.flag 'channel_id', desc: 'The channel to remove the linked group from.'
34
- c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.'
35
33
  c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
34
+ c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.'
35
+ c.flag 'channel_id', desc: 'The channel to remove the linked group from.'
36
36
  c.action do |_global_options, options, _args|
37
37
  puts JSON.dump(@client.admin_conversations_restrictAccess_removeGroup(options))
38
38
  end
@@ -19,15 +19,15 @@ module Slack
19
19
  g.desc 'Add an emoji alias.'
20
20
  g.long_desc %( Add an emoji alias. )
21
21
  g.command 'addAlias' do |c|
22
- c.flag 'alias_for', desc: 'Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.'
23
22
  c.flag 'name', desc: 'The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.'
23
+ c.flag 'alias_for', desc: 'Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.'
24
24
  c.action do |_global_options, options, _args|
25
25
  puts JSON.dump(@client.admin_emoji_addAlias(options))
26
26
  end
27
27
  end
28
28
 
29
- g.desc 'List emoji for an Enterprise Grid organization.'
30
- g.long_desc %( List emoji for an Enterprise Grid organization. )
29
+ g.desc 'List emoji for an Enterprise organization.'
30
+ g.long_desc %( List emoji for an Enterprise organization. )
31
31
  g.command 'list' do |c|
32
32
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
33
33
  c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
@@ -36,8 +36,8 @@ module Slack
36
36
  end
37
37
  end
38
38
 
39
- g.desc 'Remove an emoji across an Enterprise Grid organization'
40
- g.long_desc %( Remove an emoji across an Enterprise Grid organization )
39
+ g.desc 'Remove an emoji across an Enterprise organization'
40
+ g.long_desc %( Remove an emoji across an Enterprise organization )
41
41
  g.command 'remove' do |c|
42
42
  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.'
43
43
  c.action do |_global_options, options, _args|
@@ -9,10 +9,10 @@ module Slack
9
9
  g.desc 'Look up functions by a set of apps'
10
10
  g.long_desc %( Look up functions by a set of apps )
11
11
  g.command 'list' do |c|
12
+ c.flag 'team_id', desc: 'The team context to retrieve functions from.'
12
13
  c.flag 'app_ids', desc: 'Comma-separated array of app IDs to get functions for; max 50.'
13
14
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
15
  c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.'
15
- c.flag 'team_id', desc: 'The team context to retrieve functions from.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.admin_functions_list(options))
18
18
  end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Approve a workspace invite request.'
10
10
  g.long_desc %( Approve a workspace invite request. )
11
11
  g.command 'approve' do |c|
12
- c.flag 'invite_request_id', desc: 'ID of the request to invite.'
13
12
  c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
13
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
14
14
  c.action do |_global_options, options, _args|
15
15
  puts JSON.dump(@client.admin_inviteRequests_approve(options))
16
16
  end
@@ -19,8 +19,8 @@ module Slack
19
19
  g.desc 'Deny a workspace invite request.'
20
20
  g.long_desc %( Deny a workspace invite request. )
21
21
  g.command 'deny' do |c|
22
- c.flag 'invite_request_id', desc: 'ID of the request to invite.'
23
22
  c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
23
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
24
24
  c.action do |_global_options, options, _args|
25
25
  puts JSON.dump(@client.admin_inviteRequests_deny(options))
26
26
  end
@@ -29,9 +29,9 @@ module Slack
29
29
  g.desc 'List all pending workspace invite requests.'
30
30
  g.long_desc %( List all pending workspace invite requests. )
31
31
  g.command 'list' do |c|
32
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
32
33
  c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
33
34
  c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
34
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
35
35
  c.action do |_global_options, options, _args|
36
36
  puts JSON.dump(@client.admin_inviteRequests_list(options))
37
37
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'List all approved workspace invite requests.'
10
10
  g.long_desc %( List all approved workspace invite requests. )
11
11
  g.command 'list' do |c|
12
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
12
13
  c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
13
14
  c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
14
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_inviteRequests_approved_list(options))
17
17
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'List all denied workspace invite requests.'
10
10
  g.long_desc %( List all denied workspace invite requests. )
11
11
  g.command 'list' do |c|
12
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
12
13
  c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous api response.'
13
14
  c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.'
14
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_inviteRequests_denied_list(options))
17
17
  end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Adds members to the specified role with the specified scopes'
10
10
  g.long_desc %( Adds members to the specified role with the specified scopes )
11
11
  g.command 'addAssignments' do |c|
12
- c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.'
13
12
  c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
13
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.'
14
14
  c.flag 'user_ids', desc: 'List of IDs from the users to be added to the given role.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_roles_addAssignments(options))
@@ -21,9 +21,9 @@ module Slack
21
21
  g.long_desc %( Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities )
22
22
  g.command 'listAssignments' do |c|
23
23
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
24
- c.flag 'entity_ids', desc: 'The entities for which the roles apply.'
25
24
  c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 200 both inclusive.'
26
25
  c.flag 'role_ids', desc: 'collection of role ids to scope results by.'
26
+ c.flag 'entity_ids', desc: 'The entities for which the roles apply.'
27
27
  c.flag 'sort_dir', desc: 'Sort direction. Default is descending on date_create, can be either ASC or DESC.'
28
28
  c.action do |_global_options, options, _args|
29
29
  puts JSON.dump(@client.admin_roles_listAssignments(options))
@@ -33,8 +33,8 @@ module Slack
33
33
  g.desc 'Removes a set of users from a role for the given scopes and entities'
34
34
  g.long_desc %( Removes a set of users from a role for the given scopes and entities )
35
35
  g.command 'removeAssignments' do |c|
36
- c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.'
37
36
  c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
37
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.'
38
38
  c.flag 'user_ids', desc: 'List of IDs of the users whose roles will be revoked.'
39
39
  c.action do |_global_options, options, _args|
40
40
  puts JSON.dump(@client.admin_roles_removeAssignments(options))
@@ -18,11 +18,11 @@ module Slack
18
18
  end
19
19
  end
20
20
 
21
- g.desc 'List all teams on an Enterprise organization'
22
- g.long_desc %( List all teams on an Enterprise organization )
21
+ g.desc 'List all teams in an Enterprise organization'
22
+ g.long_desc %( List all teams in an Enterprise organization )
23
23
  g.command 'list' do |c|
24
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
25
24
  c.flag 'limit', desc: 'The maximum number of items to return. Must be a positive integer no larger than 1000.'
25
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.admin_teams_list(options))
28
28
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'List all of the admins on a given workspace.'
10
10
  g.long_desc %( List all of the admins on a given workspace. )
11
11
  g.command 'list' do |c|
12
- c.flag 'team_id', desc: '.'
13
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
12
  c.flag 'limit', desc: 'The maximum number of items to return.'
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 'team_id', desc: ''
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_teams_admins_list(options))
17
17
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'List all of the owners on a given workspace.'
10
10
  g.long_desc %( List all of the owners on a given workspace. )
11
11
  g.command 'list' do |c|
12
- c.flag 'team_id', desc: '.'
13
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
12
+ c.flag 'team_id', desc: ''
14
13
  c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
14
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_teams_owners_list(options))
17
17
  end
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Fetch information about settings in a workspace'
10
10
  g.long_desc %( Fetch information about settings in a workspace )
11
11
  g.command 'info' do |c|
12
- c.flag 'team_id', desc: '.'
12
+ c.flag 'team_id', desc: ''
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump(@client.admin_teams_settings_info(options))
15
15
  end
@@ -18,8 +18,8 @@ module Slack
18
18
  g.desc 'Set the default channels of a workspace.'
19
19
  g.long_desc %( Set the default channels of a workspace. )
20
20
  g.command 'setDefaultChannels' do |c|
21
- c.flag 'channel_ids', desc: 'An array of channel IDs.'
22
21
  c.flag 'team_id', desc: 'ID for the workspace to set the default channel for.'
22
+ c.flag 'channel_ids', desc: 'An array of channel IDs.'
23
23
  c.action do |_global_options, options, _args|
24
24
  puts JSON.dump(@client.admin_teams_settings_setDefaultChannels(options))
25
25
  end
@@ -28,8 +28,8 @@ module Slack
28
28
  g.desc 'Set the description of a given workspace.'
29
29
  g.long_desc %( Set the description of a given workspace. )
30
30
  g.command 'setDescription' do |c|
31
- c.flag 'description', desc: 'The new description for the workspace.'
32
31
  c.flag 'team_id', desc: 'ID for the workspace to set the description for.'
32
+ c.flag 'description', desc: 'The new description for the workspace.'
33
33
  c.action do |_global_options, options, _args|
34
34
  puts JSON.dump(@client.admin_teams_settings_setDescription(options))
35
35
  end
@@ -38,8 +38,8 @@ module Slack
38
38
  g.desc 'An API method that allows admins to set the discoverability of a given workspace'
39
39
  g.long_desc %( An API method that allows admins to set the discoverability of a given workspace )
40
40
  g.command 'setDiscoverability' do |c|
41
- c.flag 'discoverability', desc: "This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted."
42
41
  c.flag 'team_id', desc: 'The ID of the workspace to set discoverability on.'
42
+ c.flag 'discoverability', desc: "This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted."
43
43
  c.action do |_global_options, options, _args|
44
44
  puts JSON.dump(@client.admin_teams_settings_setDiscoverability(options))
45
45
  end
@@ -58,8 +58,8 @@ module Slack
58
58
  g.desc 'Set the name of a given workspace.'
59
59
  g.long_desc %( Set the name of a given workspace. )
60
60
  g.command 'setName' do |c|
61
- c.flag 'name', desc: 'The new name of the workspace.'
62
61
  c.flag 'team_id', desc: 'ID for the workspace to set the name for.'
62
+ c.flag 'name', desc: 'The new name of the workspace.'
63
63
  c.action do |_global_options, options, _args|
64
64
  puts JSON.dump(@client.admin_teams_settings_setName(options))
65
65
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Add up to one hundred default channels to an IDP group.'
10
10
  g.long_desc %( Add up to one hundred default channels to an IDP group. )
11
11
  g.command 'addChannels' do |c|
12
- c.flag 'channel_ids', desc: 'Comma separated string of channel IDs.'
13
12
  c.flag 'usergroup_id', desc: 'ID of the IDP group to add default channels for.'
14
13
  c.flag 'team_id', desc: 'The workspace to add default channels in.'
14
+ c.flag 'channel_ids', desc: 'Comma separated string of channel IDs.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.admin_usergroups_addChannels(options))
17
17
  end
@@ -20,8 +20,8 @@ module Slack
20
20
  g.desc 'Associate one or more default workspaces with an organization-wide IDP group.'
21
21
  g.long_desc %( Associate one or more default workspaces with an organization-wide IDP group. )
22
22
  g.command 'addTeams' do |c|
23
- c.flag 'team_ids', desc: 'A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.'
24
23
  c.flag 'usergroup_id', desc: 'An encoded usergroup (IDP Group) ID.'
24
+ c.flag 'team_ids', desc: 'A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.'
25
25
  c.flag 'auto_provision', desc: 'When true, this method automatically creates new workspace accounts for the IDP group members.'
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.admin_usergroups_addTeams(options))
@@ -32,8 +32,8 @@ module Slack
32
32
  g.long_desc %( List the channels linked to an org-level IDP group (user group). )
33
33
  g.command 'listChannels' do |c|
34
34
  c.flag 'usergroup_id', desc: 'ID of the IDP group to list default channels for.'
35
- c.flag 'include_num_members', desc: 'Flag to include or exclude the count of members per channel.'
36
35
  c.flag 'team_id', desc: 'ID of the the workspace.'
36
+ c.flag 'include_num_members', desc: 'Flag to include or exclude the count of members per channel.'
37
37
  c.action do |_global_options, options, _args|
38
38
  puts JSON.dump(@client.admin_usergroups_listChannels(options))
39
39
  end
@@ -42,8 +42,8 @@ module Slack
42
42
  g.desc 'Remove one or more default channels from an org-level IDP group (user group).'
43
43
  g.long_desc %( Remove one or more default channels from an org-level IDP group (user group). )
44
44
  g.command 'removeChannels' do |c|
45
- c.flag 'channel_ids', desc: 'Comma-separated string of channel IDs.'
46
45
  c.flag 'usergroup_id', desc: 'ID of the IDP Group.'
46
+ c.flag 'channel_ids', desc: 'Comma-separated string of channel IDs.'
47
47
  c.action do |_global_options, options, _args|
48
48
  puts JSON.dump(@client.admin_usergroups_removeChannels(options))
49
49
  end
@@ -11,9 +11,9 @@ module Slack
11
11
  g.command 'assign' do |c|
12
12
  c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
13
13
  c.flag 'user_id', desc: 'The ID of the user to add to the workspace.'
14
- c.flag 'channel_ids', desc: 'Comma separated values of channel IDs to add user in the new workspace.'
15
14
  c.flag 'is_restricted', desc: 'True if user should be added to the workspace as a guest.'
16
15
  c.flag 'is_ultra_restricted', desc: 'True if user should be added to the workspace as a single-channel guest.'
16
+ c.flag 'channel_ids', desc: 'Comma separated values of channel IDs to add user in the new workspace.'
17
17
  c.action do |_global_options, options, _args|
18
18
  puts JSON.dump(@client.admin_users_assign(options))
19
19
  end
@@ -22,16 +22,16 @@ module Slack
22
22
  g.desc 'Invite a user to a workspace.'
23
23
  g.long_desc %( Invite a user to a workspace. )
24
24
  g.command 'invite' do |c|
25
- c.flag 'channel_ids', desc: 'A comma-separated list of channel_ids for this user to join. At least one channel is required.'
26
- c.flag 'email', desc: 'The email address of the person to invite.'
27
25
  c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
26
+ c.flag 'email', desc: 'The email address of the person to invite.'
27
+ c.flag 'channel_ids', desc: 'A comma-separated list of channel_ids for this user to join. At least one channel is required.'
28
28
  c.flag 'custom_message', desc: 'An optional message to send to the user in the invite email.'
29
- c.flag 'email_password_policy_enabled', desc: 'Allow invited user to sign in via email and password. Only available for Enterprise Grid teams via admin invite.'
30
- c.flag 'guest_expiration_ts', desc: 'Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.'
31
- c.flag 'is_restricted', desc: 'Is this user a multi-channel guest user? (default: false).'
32
- c.flag 'is_ultra_restricted', desc: 'Is this user a single channel guest user? (default: false).'
33
29
  c.flag 'real_name', desc: 'Full name of the user.'
34
30
  c.flag 'resend', desc: 'Allow this invite to be resent in the future if a user has not signed up yet. Resending can only be done via the UI and has no expiration. (default: false).'
31
+ c.flag 'is_restricted', desc: 'Is this user a multi-channel guest user? (default: false).'
32
+ c.flag 'is_ultra_restricted', desc: 'Is this user a single channel guest user? (default: false).'
33
+ c.flag 'guest_expiration_ts', desc: 'Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.'
34
+ c.flag 'email_password_policy_enabled', desc: 'Allow invited user to sign in via email and password. Only available for Enterprise org teams via admin invite.'
35
35
  c.action do |_global_options, options, _args|
36
36
  puts JSON.dump(@client.admin_users_invite(options))
37
37
  end
@@ -40,11 +40,12 @@ module Slack
40
40
  g.desc 'List users on a workspace'
41
41
  g.long_desc %( List users on a workspace )
42
42
  g.command 'list' do |c|
43
+ c.flag 'team_id', desc: 'The ID (T1234) of a workspace. Filters results to just the specified workspace.'
43
44
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
44
- c.flag 'include_deactivated_user_workspaces', desc: '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.'
45
45
  c.flag 'is_active', desc: 'If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.'
46
+ c.flag 'include_deactivated_user_workspaces', desc: '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.'
47
+ c.flag 'only_guests', desc: 'If true, returns only guests and their expiration dates that belong to the team_id.'
46
48
  c.flag 'limit', desc: 'Limit for how many users to be retrieved per page.'
47
- c.flag 'team_id', desc: 'The ID (T1234) of a workspace. Filters results to just the specified workspace.'
48
49
  c.action do |_global_options, options, _args|
49
50
  puts JSON.dump(@client.admin_users_list(options))
50
51
  end
@@ -73,9 +74,9 @@ module Slack
73
74
  g.desc 'Set an expiration for a guest user'
74
75
  g.long_desc %( Set an expiration for a guest user )
75
76
  g.command 'setExpiration' do |c|
76
- c.flag 'expiration_ts', desc: 'Epoch timestamp in seconds when guest account should be disabled.'
77
- c.flag 'user_id', desc: 'The ID of the user to set an expiration for.'
78
77
  c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
78
+ c.flag 'user_id', desc: 'The ID of the user to set an expiration for.'
79
+ c.flag 'expiration_ts', desc: 'Epoch timestamp in seconds when guest account should be disabled.'
79
80
  c.action do |_global_options, options, _args|
80
81
  puts JSON.dump(@client.admin_users_setExpiration(options))
81
82
  end
@@ -27,8 +27,9 @@ module Slack
27
27
  g.desc 'Revoke a single session for a user. The user will be forced to login to Slack.'
28
28
  g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
29
29
  g.command 'invalidate' do |c|
30
- c.flag 'session_id', desc: 'ID of the session to invalidate.'
30
+ c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
31
31
  c.flag 'user_id', desc: 'ID of the user that the session belongs to.'
32
+ c.flag 'session_id', desc: 'ID of the session to invalidate.'
32
33
  c.action do |_global_options, options, _args|
33
34
  puts JSON.dump(@client.admin_users_session_invalidate(options))
34
35
  end
@@ -37,10 +38,10 @@ module Slack
37
38
  g.desc 'List active user sessions for an organization'
38
39
  g.long_desc %( List active user sessions for an organization )
39
40
  g.command 'list' do |c|
40
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
41
- c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
42
41
  c.flag 'team_id', desc: "The ID of the workspace you'd like active sessions for. If you pass a team_id, you'll need to pass a user_id as well."
43
42
  c.flag 'user_id', desc: "The ID of user you'd like active sessions for. If you pass a user_id, you'll need to pass a team_id as well."
43
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
44
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
44
45
  c.action do |_global_options, options, _args|
45
46
  puts JSON.dump(@client.admin_users_session_list(options))
46
47
  end
@@ -60,7 +61,7 @@ module Slack
60
61
  g.desc 'Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users'
61
62
  g.long_desc %( Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users )
62
63
  g.command 'resetBulk' do |c|
63
- c.flag 'user_ids', desc: 'The ID of the user to wipe sessions for.'
64
+ c.flag 'user_ids', desc: 'The list of up to 1,000 user IDs to wipe sessions for.'
64
65
  c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
65
66
  c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
66
67
  c.action do |_global_options, options, _args|
@@ -72,8 +73,8 @@ module Slack
72
73
  g.long_desc %( Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users. )
73
74
  g.command 'setSettings' do |c|
74
75
  c.flag 'user_ids', desc: 'The list of up to 1,000 user IDs to apply the session settings for.'
75
- c.flag 'desktop_app_browser_quit', desc: 'Terminate the session when the client—either the desktop app or a browser window—is closed.'
76
76
  c.flag 'duration', desc: "The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session)."
77
+ c.flag 'desktop_app_browser_quit', desc: 'Terminate the session when the client—either the desktop app or a browser window—is closed.'
77
78
  c.action do |_global_options, options, _args|
78
79
  puts JSON.dump(@client.admin_users_session_setSettings(options))
79
80
  end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.'
10
10
  g.long_desc %( Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file. )
11
11
  g.command 'export' do |c|
12
- c.flag 'date_end_of_support', desc: 'Unix timestamp of the date of past or upcoming end of support cycles. If not provided will include all announced end of support cycles.'
13
12
  c.flag 'date_sessions_started', desc: 'Unix timestamp of a date to start looking for user sessions. If not provided will start six months ago.'
13
+ c.flag 'date_end_of_support', desc: 'Unix timestamp of the date of past or upcoming end of support cycles. If not provided will include all announced end of support cycles.'
14
14
  c.action do |_global_options, options, _args|
15
15
  puts JSON.dump(@client.admin_users_unsupportedVersions_export(options))
16
16
  end
@@ -9,20 +9,20 @@ module Slack
9
9
  g.desc 'Search workflows within the team or enterprise'
10
10
  g.long_desc %( Search workflows within the team or enterprise )
11
11
  g.command 'search' do |c|
12
+ c.flag 'query', desc: 'A search query to filter for workflow name or description.'
12
13
  c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
13
- c.flag 'collaborator_ids', desc: 'Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.'
14
14
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
15
- c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
16
15
  c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
17
16
  c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
17
+ c.flag 'collaborator_ids', desc: 'Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.'
18
18
  c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 10.'
19
- c.flag 'publish_status', desc: 'Filter workflows by their published status.'
20
- c.flag 'query', desc: 'A search query to filter for workflow name or description.'
19
+ c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
20
+ c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
21
21
  c.flag 'sort', desc: 'The field used to sort the returned workflows.'
22
22
  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).'
23
- c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
24
- c.flag 'step_function_ids', desc: 'Only include workflows that use all of the provided step function ids.'
25
23
  c.flag 'trigger_type_id', desc: 'Only include workflows with this trigger type.'
24
+ c.flag 'publish_status', desc: 'Filter workflows by their published status.'
25
+ c.flag 'step_function_ids', desc: 'Only include workflows that use all of the provided step function ids.'
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.admin_workflows_search(options))
28
28
  end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Add collaborators to workflows within the team or enterprise'
10
10
  g.long_desc %( Add collaborators to workflows within the team or enterprise )
11
11
  g.command 'add' do |c|
12
- c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to add; max 50.'
13
12
  c.flag 'workflow_ids', desc: 'Array of workflow IDs to edit; max 50.'
13
+ c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to add; max 50.'
14
14
  c.action do |_global_options, options, _args|
15
15
  puts JSON.dump(@client.admin_workflows_collaborators_add(options))
16
16
  end
@@ -19,8 +19,8 @@ module Slack
19
19
  g.desc 'Remove collaborators from workflows within the team or enterprise'
20
20
  g.long_desc %( Remove collaborators from workflows within the team or enterprise )
21
21
  g.command 'remove' do |c|
22
- c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to remove; max 50.'
23
22
  c.flag 'workflow_ids', desc: 'Array of workflow IDs to edit; max 50.'
23
+ c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to remove; max 50.'
24
24
  c.action do |_global_options, options, _args|
25
25
  puts JSON.dump(@client.admin_workflows_collaborators_remove(options))
26
26
  end
@@ -10,18 +10,18 @@ module Slack
10
10
  g.long_desc %( Get logs for a specified app )
11
11
  g.command 'list' do |c|
12
12
  c.flag 'app_id', desc: 'The id of the app to get activities from.'
13
- c.flag 'component_id', desc: "The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for worflows."
14
- c.flag 'component_type', desc: "The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables')."
13
+ c.flag 'team_id', desc: 'The team who owns this log.'
15
14
  c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail."
16
15
  c.flag 'limit', desc: 'The maximum number of items to return.'
17
- c.flag 'log_event_type', desc: 'The event type of log events to be returned.'
18
- c.flag 'max_date_created', desc: 'The latest timestamp of the log to retrieve (epoch microseconds).'
19
- c.flag 'min_date_created', desc: 'The earliest timestamp of the log to retrieve (epoch microseconds).'
20
16
  c.flag 'min_log_level', desc: "The minimum log level of the log events to be returned. Defaults to 'info'. Acceptable values (in order of relative importance from smallest to largest) are ('trace', 'debug', 'info', 'warn', 'error', 'fatal')."
21
- c.flag 'sort_direction', desc: 'The direction you want the data sorted by (always by timestamp).'
17
+ c.flag 'log_event_type', desc: 'The event type of log events to be returned.'
22
18
  c.flag 'source', desc: "The source of log events to be returned. Acceptable values are ('slack', 'developer')."
23
- c.flag 'team_id', desc: 'The team who owns this log.'
19
+ c.flag 'component_type', desc: "The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables')."
20
+ c.flag 'component_id', desc: "The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for workflows."
24
21
  c.flag 'trace_id', desc: 'The trace id of log events to be returned.'
22
+ c.flag 'min_date_created', desc: 'The earliest timestamp of the log to retrieve (epoch microseconds).'
23
+ c.flag 'max_date_created', desc: 'The latest timestamp of the log to retrieve (epoch microseconds).'
24
+ c.flag 'sort_direction', desc: 'The direction you want the data sorted by (always by timestamp).'
25
25
  c.action do |_global_options, options, _args|
26
26
  puts JSON.dump(@client.apps_activities_list(options))
27
27
  end