slack-ruby-client 2.7.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 (198) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +3 -10
  3. data/.rubocop_todo.yml +45 -67
  4. data/CHANGELOG.md +7 -0
  5. data/Gemfile +0 -9
  6. data/LICENSE.md +1 -1
  7. data/README.md +16 -219
  8. data/Rakefile +0 -1
  9. data/UPGRADING.md +4 -0
  10. data/bin/commands/admin_analytics.rb +1 -1
  11. data/bin/commands/admin_apps.rb +4 -4
  12. data/bin/commands/admin_apps_activities.rb +7 -7
  13. data/bin/commands/admin_apps_approved.rb +4 -4
  14. data/bin/commands/admin_apps_config.rb +3 -1
  15. data/bin/commands/admin_apps_requests.rb +5 -5
  16. data/bin/commands/admin_apps_restricted.rb +4 -4
  17. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  18. data/bin/commands/admin_auth_policy.rb +5 -5
  19. data/bin/commands/admin_barriers.rb +3 -3
  20. data/bin/commands/admin_conversations.rb +15 -15
  21. data/bin/commands/admin_conversations_ekm.rb +2 -2
  22. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  23. data/bin/commands/admin_emoji.rb +5 -5
  24. data/bin/commands/admin_functions.rb +1 -1
  25. data/bin/commands/admin_inviteRequests.rb +3 -3
  26. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  27. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  28. data/bin/commands/admin_roles.rb +3 -3
  29. data/bin/commands/admin_teams.rb +3 -3
  30. data/bin/commands/admin_teams_admins.rb +2 -2
  31. data/bin/commands/admin_teams_owners.rb +2 -2
  32. data/bin/commands/admin_teams_settings.rb +5 -5
  33. data/bin/commands/admin_usergroups.rb +4 -4
  34. data/bin/commands/admin_users.rb +12 -11
  35. data/bin/commands/admin_users_session.rb +6 -5
  36. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  37. data/bin/commands/admin_workflows.rb +6 -6
  38. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  39. data/bin/commands/apps_activities.rb +7 -7
  40. data/bin/commands/apps_auth_external.rb +1 -1
  41. data/bin/commands/apps_datastore.rb +12 -12
  42. data/bin/commands/apps_event_authorizations.rb +3 -3
  43. data/bin/commands/apps_manifest.rb +1 -1
  44. data/bin/commands/assistant_search.rb +18 -2
  45. data/bin/commands/assistant_threads.rb +2 -2
  46. data/bin/commands/auth.rb +1 -1
  47. data/bin/commands/auth_teams.rb +1 -1
  48. data/bin/commands/bookmarks.rb +6 -6
  49. data/bin/commands/calls.rb +5 -5
  50. data/bin/commands/canvases.rb +2 -2
  51. data/bin/commands/canvases_access.rb +1 -1
  52. data/bin/commands/chat.rb +23 -24
  53. data/bin/commands/conversations.rb +8 -8
  54. data/bin/commands/conversations_canvases.rb +1 -1
  55. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  56. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  57. data/bin/commands/dnd.rb +1 -1
  58. data/bin/commands/files.rb +5 -5
  59. data/bin/commands/files_remote.rb +1 -1
  60. data/bin/commands/functions.rb +1 -1
  61. data/bin/commands/functions_distributions_permissions.rb +15 -15
  62. data/bin/commands/functions_workflows_steps.rb +2 -2
  63. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  64. data/bin/commands/migration.rb +2 -2
  65. data/bin/commands/oauth_v2.rb +1 -1
  66. data/bin/commands/openid_connect.rb +1 -1
  67. data/bin/commands/reactions.rb +3 -3
  68. data/bin/commands/reminders.rb +2 -2
  69. data/bin/commands/rtm.rb +15 -0
  70. data/bin/commands/search.rb +4 -4
  71. data/bin/commands/slackLists.rb +37 -0
  72. data/bin/commands/slackLists_access.rb +34 -0
  73. data/bin/commands/slackLists_download.rb +31 -0
  74. data/bin/commands/slackLists_items.rb +76 -0
  75. data/bin/commands/team.rb +1 -1
  76. data/bin/commands/team_externalTeams.rb +4 -4
  77. data/bin/commands/usergroups.rb +10 -10
  78. data/bin/commands/usergroups_users.rb +5 -5
  79. data/bin/commands/users.rb +1 -1
  80. data/bin/commands/users_discoverableContacts.rb +1 -1
  81. data/bin/commands/views.rb +4 -4
  82. data/bin/commands/workflows_featured.rb +50 -0
  83. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  84. data/lib/slack/version.rb +1 -1
  85. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  86. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  87. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  88. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  89. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  90. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  91. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  92. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  93. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  94. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  95. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  96. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  97. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  98. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  99. data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
  100. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  101. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  102. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  103. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  104. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  105. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  106. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  107. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  108. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  109. data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
  110. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  111. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  112. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  113. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  114. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  115. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  116. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  117. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  118. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  119. data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
  120. data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
  121. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  122. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  123. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  124. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  125. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  126. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  127. data/lib/slack/web/api/endpoints/chat.rb +53 -55
  128. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  129. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  130. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  131. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  132. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  133. data/lib/slack/web/api/endpoints/files.rb +11 -11
  134. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  135. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  136. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  137. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  138. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  139. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  140. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  141. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  142. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  143. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  144. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  145. data/lib/slack/web/api/endpoints/search.rb +8 -8
  146. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  147. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  148. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  149. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  150. data/lib/slack/web/api/endpoints/team.rb +3 -3
  151. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  152. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  153. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  154. data/lib/slack/web/api/endpoints/users.rb +2 -2
  155. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  156. data/lib/slack/web/api/endpoints/views.rb +9 -9
  157. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  158. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  159. data/lib/slack/web/api/endpoints.rb +10 -2
  160. data/lib/slack/web/api/errors.rb +88 -46
  161. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  162. data/lib/slack-ruby-client.rb +0 -12
  163. data/lib/tasks/update.rake +0 -1
  164. data/lib/tasks/web.rake +0 -4
  165. metadata +12 -35
  166. data/.github/workflows/integration_test.yml +0 -45
  167. data/bin/commands/workflows.rb +0 -44
  168. data/examples/hi_real_time_and_web/Gemfile +0 -6
  169. data/examples/hi_real_time_and_web/hi.gif +0 -0
  170. data/examples/hi_real_time_and_web/hi.rb +0 -28
  171. data/examples/hi_real_time_async_async/Gemfile +0 -7
  172. data/examples/hi_real_time_async_async/Procfile +0 -2
  173. data/examples/hi_real_time_async_async/hi.rb +0 -41
  174. data/lib/slack/real_time/api/message.rb +0 -23
  175. data/lib/slack/real_time/api/message_id.rb +0 -15
  176. data/lib/slack/real_time/api/ping.rb +0 -19
  177. data/lib/slack/real_time/api/schema/event.json +0 -23
  178. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  179. data/lib/slack/real_time/api/typing.rb +0 -20
  180. data/lib/slack/real_time/client.rb +0 -271
  181. data/lib/slack/real_time/concurrency/async.rb +0 -142
  182. data/lib/slack/real_time/concurrency.rb +0 -8
  183. data/lib/slack/real_time/config.rb +0 -62
  184. data/lib/slack/real_time/models/base.rb +0 -11
  185. data/lib/slack/real_time/models/bot.rb +0 -9
  186. data/lib/slack/real_time/models/channel.rb +0 -13
  187. data/lib/slack/real_time/models/im.rb +0 -9
  188. data/lib/slack/real_time/models/mpim.rb +0 -9
  189. data/lib/slack/real_time/models/team.rb +0 -9
  190. data/lib/slack/real_time/models/user.rb +0 -9
  191. data/lib/slack/real_time/models.rb +0 -9
  192. data/lib/slack/real_time/socket.rb +0 -118
  193. data/lib/slack/real_time/stores/base.rb +0 -47
  194. data/lib/slack/real_time/stores/starter.rb +0 -449
  195. data/lib/slack/real_time/stores/store.rb +0 -624
  196. data/lib/slack/real_time/stores.rb +0 -5
  197. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  198. data/lib/tasks/real_time.rake +0 -81
@@ -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
@@ -10,8 +10,8 @@ module Slack
10
10
  g.long_desc %( Delete external auth tokens only on the Slack side )
11
11
  g.command 'delete' do |c|
12
12
  c.flag 'app_id', desc: 'The id of the app whose tokens you want to delete.'
13
- c.flag 'external_token_id', desc: 'The id of the token that you want to delete.'
14
13
  c.flag 'provider_key', desc: 'The provider key of the provider whose tokens you want to delete.'
14
+ c.flag 'external_token_id', desc: 'The id of the token that you want to delete.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_auth_external_delete(options))
17
17
  end
@@ -11,7 +11,7 @@ module Slack
11
11
  g.command 'bulkDelete' do |c|
12
12
  c.flag 'datastore', desc: 'name of the datastore.'
13
13
  c.flag 'ids', desc: 'IDs of items to be deleted.'
14
- c.flag 'app_id', desc: '.'
14
+ c.flag 'app_id', desc: ''
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_datastore_bulkDelete(options))
17
17
  end
@@ -22,7 +22,7 @@ module Slack
22
22
  g.command 'bulkGet' do |c|
23
23
  c.flag 'datastore', desc: 'name of the datastore.'
24
24
  c.flag 'ids', desc: "items' ids."
25
- c.flag 'app_id', desc: '.'
25
+ c.flag 'app_id', desc: ''
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.apps_datastore_bulkGet(options))
28
28
  end
@@ -33,7 +33,7 @@ module Slack
33
33
  g.command 'bulkPut' do |c|
34
34
  c.flag 'datastore', desc: 'name of the datastore.'
35
35
  c.flag 'items', desc: 'attribute names and values of the items; limit of 25.'
36
- c.flag 'app_id', desc: '.'
36
+ c.flag 'app_id', desc: ''
37
37
  c.action do |_global_options, options, _args|
38
38
  puts JSON.dump(@client.apps_datastore_bulkPut(options))
39
39
  end
@@ -43,10 +43,10 @@ module Slack
43
43
  g.long_desc %( Count the number of items in a datastore that match a query )
44
44
  g.command 'count' do |c|
45
45
  c.flag 'datastore', desc: 'Name of the datastore.'
46
- c.flag 'app_id', desc: 'Required if calling with user token.'
47
- c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
46
+ c.flag 'expression', desc: 'A query filter expression.'
48
47
  c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
49
48
  c.flag 'expression_values', desc: 'A map of values referenced in expression.'
49
+ c.flag 'app_id', desc: 'Required if calling with user token.'
50
50
  c.action do |_global_options, options, _args|
51
51
  puts JSON.dump(@client.apps_datastore_count(options))
52
52
  end
@@ -57,7 +57,7 @@ module Slack
57
57
  g.command 'delete' do |c|
58
58
  c.flag 'datastore', desc: 'name of the datastore.'
59
59
  c.flag 'id', desc: 'item id.'
60
- c.flag 'app_id', desc: '.'
60
+ c.flag 'app_id', desc: ''
61
61
  c.action do |_global_options, options, _args|
62
62
  puts JSON.dump(@client.apps_datastore_delete(options))
63
63
  end
@@ -68,7 +68,7 @@ module Slack
68
68
  g.command 'get' do |c|
69
69
  c.flag 'datastore', desc: 'name of the datastore.'
70
70
  c.flag 'id', desc: 'item id.'
71
- c.flag 'app_id', desc: '.'
71
+ c.flag 'app_id', desc: ''
72
72
  c.action do |_global_options, options, _args|
73
73
  puts JSON.dump(@client.apps_datastore_get(options))
74
74
  end
@@ -79,7 +79,7 @@ module Slack
79
79
  g.command 'put' do |c|
80
80
  c.flag 'datastore', desc: 'name of the datastore.'
81
81
  c.flag 'item', desc: 'attribute names and values of the item.'
82
- c.flag 'app_id', desc: '.'
82
+ c.flag 'app_id', desc: ''
83
83
  c.action do |_global_options, options, _args|
84
84
  puts JSON.dump(@client.apps_datastore_put(options))
85
85
  end
@@ -89,11 +89,11 @@ module Slack
89
89
  g.long_desc %( Query a datastore for items )
90
90
  g.command 'query' do |c|
91
91
  c.flag 'datastore', desc: 'Name of the datastore.'
92
- c.flag 'app_id', desc: 'Required if calling with user token.'
93
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
94
- c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
92
+ c.flag 'expression', desc: 'A query filter expression.'
95
93
  c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
96
94
  c.flag 'expression_values', desc: 'A map of values referenced in expression.'
95
+ c.flag 'app_id', desc: 'Required if calling with user token.'
96
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
97
97
  c.flag 'limit', desc: 'The maximum number of items to evaluate for a given request (not necessarily the number of matching items). If the given request dataset size exceeds 1 MB before reaching the limit, the returned item count will likely be less than the limit. In any case where there are more items available beyond an imposed limit, a next_cursor value will be provided for use in subsequent requests.'
98
98
  c.action do |_global_options, options, _args|
99
99
  puts JSON.dump(@client.apps_datastore_query(options))
@@ -105,7 +105,7 @@ module Slack
105
105
  g.command 'update' do |c|
106
106
  c.flag 'datastore', desc: 'name of the datastore.'
107
107
  c.flag 'item', desc: 'attribute names and values to be updated.'
108
- c.flag 'app_id', desc: '.'
108
+ c.flag 'app_id', desc: ''
109
109
  c.action do |_global_options, options, _args|
110
110
  puts JSON.dump(@client.apps_datastore_update(options))
111
111
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.'
10
10
  g.long_desc %( Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to. )
11
11
  g.command 'list' do |c|
12
- c.flag 'event_context', desc: '.'
13
- c.flag 'cursor', desc: '.'
14
- c.flag 'limit', desc: '.'
12
+ c.flag 'event_context', desc: ''
13
+ c.flag 'cursor', desc: ''
14
+ c.flag 'limit', desc: ''
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_event_authorizations_list(options))
17
17
  end
@@ -36,8 +36,8 @@ module Slack
36
36
  g.desc 'Update an app from an app manifest'
37
37
  g.long_desc %( Update an app from an app manifest )
38
38
  g.command 'update' do |c|
39
+ c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely _replaces_ any previous configuration, manifest must contain both unmodified and modified fields.'
39
40
  c.flag 'app_id', desc: 'The ID of the app whose configuration you want to update.'
40
- c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.'
41
41
  c.action do |_global_options, options, _args|
42
42
  puts JSON.dump(@client.apps_manifest_update(options))
43
43
  end
@@ -12,15 +12,31 @@ module Slack
12
12
  c.flag 'query', desc: 'User prompt or search query.'
13
13
  c.flag 'action_token', desc: 'Send action_token as received in a message event.'
14
14
  c.flag 'channel_types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
15
- c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files.'
15
+ c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files, channels, users.'
16
+ c.flag 'include_bots', desc: 'If you want the results to include bots.'
17
+ c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
18
+ c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
19
+ c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
16
20
  c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
17
21
  c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.'
18
- c.flag 'include_bots', desc: 'If you want the results to include bots.'
19
22
  c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
23
+ c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
24
+ c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
25
+ c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
26
+ c.flag 'highlight', desc: 'Whether to highlight the search query in the results. Defaults to false if unspecified.'
27
+ c.flag 'term_clauses', desc: 'A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).'
20
28
  c.action do |_global_options, options, _args|
21
29
  puts JSON.dump(@client.assistant_search_context(options))
22
30
  end
23
31
  end
32
+
33
+ g.desc 'Returns search capabilities on a given team.'
34
+ g.long_desc %( Returns search capabilities on a given team. )
35
+ g.command 'info' do |c|
36
+ c.action do |_global_options, options, _args|
37
+ puts JSON.dump(@client.assistant_search_info(options))
38
+ end
39
+ end
24
40
  end
25
41
  end
26
42
  end
@@ -10,8 +10,8 @@ module Slack
10
10
  g.long_desc %( Set the status for an AI assistant thread. )
11
11
  g.command 'setStatus' do |c|
12
12
  c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
13
- c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
14
13
  c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
14
+ c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.assistant_threads_setStatus(options))
17
17
  end
@@ -21,8 +21,8 @@ module Slack
21
21
  g.long_desc %( Set suggested prompts for the given assistant thread )
22
22
  g.command 'setSuggestedPrompts' do |c|
23
23
  c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
24
- c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
25
24
  c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
25
+ c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
26
26
  c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
27
27
  c.action do |_global_options, options, _args|
28
28
  puts JSON.dump(@client.assistant_threads_setSuggestedPrompts(options))
data/bin/commands/auth.rb CHANGED
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Revokes a token.'
10
10
  g.long_desc %( Revokes a token. )
11
11
  g.command 'revoke' do |c|
12
- c.flag 'test', desc: 'Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.'
12
+ c.flag 'test', desc: 'Setting this parameter to 1 triggers a _testing mode_ where the specified token will not actually be revoked.'
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump(@client.auth_revoke(options))
15
15
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Obtain a full list of workspaces your org-wide app has been approved for.'
10
10
  g.long_desc %( Obtain a full list of workspaces your org-wide app has been approved for. )
11
11
  g.command 'list' do |c|
12
+ c.flag 'limit', desc: 'The maximum number of workspaces to return. Must be a positive integer no larger than 1000.'
12
13
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
13
14
  c.flag 'include_icon', desc: 'Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace.'
14
- c.flag 'limit', desc: 'The maximum number of workspaces to return. Must be a positive integer no larger than 1000.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.auth_teams_list(options))
17
17
  end
@@ -11,11 +11,11 @@ module Slack
11
11
  g.command 'add' do |c|
12
12
  c.flag 'channel_id', desc: 'Channel to add bookmark in.'
13
13
  c.flag 'title', desc: 'Title for the bookmark.'
14
+ c.flag 'link', desc: 'Link to bookmark.'
14
15
  c.flag 'type', desc: 'Type of the bookmark i.e link.'
15
- c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
16
16
  c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
17
17
  c.flag 'entity_id', desc: 'ID of the entity being bookmarked. Only applies to message and file types.'
18
- c.flag 'link', desc: 'Link to bookmark.'
18
+ c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
19
19
  c.flag 'parent_id', desc: "Id of this bookmark's parent."
20
20
  c.action do |_global_options, options, _args|
21
21
  puts JSON.dump(@client.bookmarks_add(options))
@@ -25,11 +25,11 @@ module Slack
25
25
  g.desc 'Edit bookmark.'
26
26
  g.long_desc %( Edit bookmark. )
27
27
  g.command 'edit' do |c|
28
- c.flag 'bookmark_id', desc: 'Bookmark to update.'
29
28
  c.flag 'channel_id', desc: 'Channel to update bookmark in.'
30
- c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
31
- c.flag 'link', desc: 'Link to bookmark.'
29
+ c.flag 'bookmark_id', desc: 'Bookmark to update.'
32
30
  c.flag 'title', desc: 'Title for the bookmark.'
31
+ c.flag 'link', desc: 'Link to bookmark.'
32
+ c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
33
33
  c.action do |_global_options, options, _args|
34
34
  puts JSON.dump(@client.bookmarks_edit(options))
35
35
  end
@@ -47,8 +47,8 @@ module Slack
47
47
  g.desc 'Remove bookmark from the channel.'
48
48
  g.long_desc %( Remove bookmark from the channel. )
49
49
  g.command 'remove' do |c|
50
- c.flag 'bookmark_id', desc: 'Bookmark to remove.'
51
50
  c.flag 'channel_id', desc: 'Channel to remove bookmark.'
51
+ c.flag 'bookmark_id', desc: 'Bookmark to remove.'
52
52
  c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
53
53
  c.action do |_global_options, options, _args|
54
54
  puts JSON.dump(@client.bookmarks_remove(options))
@@ -10,12 +10,12 @@ module Slack
10
10
  g.long_desc %( Registers a new Call. )
11
11
  g.command 'add' do |c|
12
12
  c.flag 'external_unique_id', desc: 'An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.'
13
+ c.flag 'external_display_id', desc: 'An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.'
13
14
  c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
14
- c.flag 'created_by', desc: 'The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.'
15
- c.flag 'date_start', desc: 'Unix timestamp of the call start time.'
16
15
  c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
17
- c.flag 'external_display_id', desc: 'An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.'
16
+ c.flag 'date_start', desc: 'Unix timestamp of the call start time.'
18
17
  c.flag 'title', desc: 'The name of the Call.'
18
+ c.flag 'created_by', desc: 'The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.'
19
19
  c.flag 'users', desc: 'The list of users to register as participants in the Call. Read more on how to specify users here.'
20
20
  c.action do |_global_options, options, _args|
21
21
  puts JSON.dump(@client.calls_add(options))
@@ -45,9 +45,9 @@ module Slack
45
45
  g.long_desc %( Updates information about a Call. )
46
46
  g.command 'update' do |c|
47
47
  c.flag 'id', desc: 'id returned by the calls.add method.'
48
- c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
49
- c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
50
48
  c.flag 'title', desc: 'The name of the Call.'
49
+ c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
50
+ c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
51
51
  c.action do |_global_options, options, _args|
52
52
  puts JSON.dump(@client.calls_update(options))
53
53
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Create canvas for a user'
10
10
  g.long_desc %( Create canvas for a user )
11
11
  g.command 'create' do |c|
12
- c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.'
13
- c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
12
  c.flag 'title', desc: 'Title of the newly created canvas.'
13
+ c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
+ c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.canvases_create(options))
17
17
  end
@@ -20,8 +20,8 @@ module Slack
20
20
  g.desc 'Sets the access level to a canvas for specified entities'
21
21
  g.long_desc %( Sets the access level to a canvas for specified entities )
22
22
  g.command 'set' do |c|
23
- c.flag 'access_level', desc: 'Desired level of access.'
24
23
  c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
24
+ c.flag 'access_level', desc: 'Desired level of access.'
25
25
  c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
26
26
  c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
27
27
  c.action do |_global_options, options, _args|