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,17 +9,17 @@ module Slack
9
9
  #
10
10
  # Adds members to the specified role with the specified scopes
11
11
  #
12
- # @option options [array] :entity_ids
13
- # List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
14
12
  # @option options [string] :role_id
15
13
  # ID of the role to which users will be assigned.
14
+ # @option options [array] :entity_ids
15
+ # List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
16
16
  # @option options [array] :user_ids
17
17
  # List of IDs from the users to be added to the given role.
18
18
  # @see https://api.slack.com/methods/admin.roles.addAssignments
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.addAssignments.json
20
20
  def admin_roles_addAssignments(options = {})
21
- raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
22
21
  raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
22
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
23
23
  raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
24
24
  post('admin.roles.addAssignments', options)
25
25
  end
@@ -29,12 +29,12 @@ module Slack
29
29
  #
30
30
  # @option options [string] :cursor
31
31
  # Set cursor to next_cursor returned by the previous call to list items in the next page.
32
- # @option options [array] :entity_ids
33
- # The entities for which the roles apply.
34
32
  # @option options [integer] :limit
35
33
  # The maximum number of items to return. Must be between 1 - 200 both inclusive.
36
34
  # @option options [array] :role_ids
37
35
  # collection of role ids to scope results by.
36
+ # @option options [array] :entity_ids
37
+ # The entities for which the roles apply.
38
38
  # @option options [string] :sort_dir
39
39
  # Sort direction. Default is descending on date_create, can be either ASC or DESC.
40
40
  # @see https://api.slack.com/methods/admin.roles.listAssignments
@@ -52,17 +52,17 @@ module Slack
52
52
  #
53
53
  # Removes a set of users from a role for the given scopes and entities
54
54
  #
55
- # @option options [array] :entity_ids
56
- # List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
57
55
  # @option options [string] :role_id
58
56
  # ID of the role to which users will be assigned.
57
+ # @option options [array] :entity_ids
58
+ # List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
59
59
  # @option options [array] :user_ids
60
60
  # List of IDs of the users whose roles will be revoked.
61
61
  # @see https://api.slack.com/methods/admin.roles.removeAssignments
62
62
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.removeAssignments.json
63
63
  def admin_roles_removeAssignments(options = {})
64
- raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
65
64
  raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
65
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
66
66
  raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
67
67
  post('admin.roles.removeAssignments', options)
68
68
  end
@@ -26,12 +26,12 @@ module Slack
26
26
  end
27
27
 
28
28
  #
29
- # List all teams on an Enterprise organization
29
+ # List all teams in an Enterprise organization
30
30
  #
31
- # @option options [string] :cursor
32
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
33
31
  # @option options [integer] :limit
34
32
  # The maximum number of items to return. Must be a positive integer no larger than 1000.
33
+ # @option options [string] :cursor
34
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
35
35
  # @see https://api.slack.com/methods/admin.teams.list
36
36
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json
37
37
  def admin_teams_list(options = {})
@@ -9,12 +9,11 @@ module Slack
9
9
  #
10
10
  # List all of the admins on a given workspace.
11
11
  #
12
- # @option options [Object] :team_id
13
- # .
14
- # @option options [string] :cursor
15
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
16
12
  # @option options [integer] :limit
17
13
  # The maximum number of items to return.
14
+ # @option options [string] :cursor
15
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
16
+ # @option options [Object] :team_id
18
17
  # @see https://api.slack.com/methods/admin.teams.admins.list
19
18
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.admins/admin.teams.admins.list.json
20
19
  def admin_teams_admins_list(options = {})
@@ -10,11 +10,10 @@ module Slack
10
10
  # List all of the owners on a given workspace.
11
11
  #
12
12
  # @option options [Object] :team_id
13
- # .
14
- # @option options [string] :cursor
15
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
16
13
  # @option options [integer] :limit
17
14
  # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
15
+ # @option options [string] :cursor
16
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
18
17
  # @see https://api.slack.com/methods/admin.teams.owners.list
19
18
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.owners/admin.teams.owners.list.json
20
19
  def admin_teams_owners_list(options = {})
@@ -10,7 +10,6 @@ module Slack
10
10
  # Fetch information about settings in a workspace
11
11
  #
12
12
  # @option options [Object] :team_id
13
- # .
14
13
  # @see https://api.slack.com/methods/admin.teams.settings.info
15
14
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.info.json
16
15
  def admin_teams_settings_info(options = {})
@@ -21,45 +20,45 @@ module Slack
21
20
  #
22
21
  # Set the default channels of a workspace.
23
22
  #
24
- # @option options [array] :channel_ids
25
- # An array of channel IDs.
26
23
  # @option options [Object] :team_id
27
24
  # ID for the workspace to set the default channel for.
25
+ # @option options [array] :channel_ids
26
+ # An array of channel IDs.
28
27
  # @see https://api.slack.com/methods/admin.teams.settings.setDefaultChannels
29
28
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDefaultChannels.json
30
29
  def admin_teams_settings_setDefaultChannels(options = {})
31
- raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
32
30
  raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
31
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
33
32
  post('admin.teams.settings.setDefaultChannels', options)
34
33
  end
35
34
 
36
35
  #
37
36
  # Set the description of a given workspace.
38
37
  #
39
- # @option options [string] :description
40
- # The new description for the workspace.
41
38
  # @option options [Object] :team_id
42
39
  # ID for the workspace to set the description for.
40
+ # @option options [string] :description
41
+ # The new description for the workspace.
43
42
  # @see https://api.slack.com/methods/admin.teams.settings.setDescription
44
43
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDescription.json
45
44
  def admin_teams_settings_setDescription(options = {})
46
- raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
47
45
  raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
46
+ raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
48
47
  post('admin.teams.settings.setDescription', options)
49
48
  end
50
49
 
51
50
  #
52
51
  # An API method that allows admins to set the discoverability of a given workspace
53
52
  #
54
- # @option options [string] :discoverability
55
- # This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
56
53
  # @option options [Object] :team_id
57
54
  # The ID of the workspace to set discoverability on.
55
+ # @option options [string] :discoverability
56
+ # This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
58
57
  # @see https://api.slack.com/methods/admin.teams.settings.setDiscoverability
59
58
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDiscoverability.json
60
59
  def admin_teams_settings_setDiscoverability(options = {})
61
- raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
62
60
  raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
61
+ raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
63
62
  post('admin.teams.settings.setDiscoverability', options)
64
63
  end
65
64
 
@@ -81,15 +80,15 @@ module Slack
81
80
  #
82
81
  # Set the name of a given workspace.
83
82
  #
84
- # @option options [string] :name
85
- # The new name of the workspace.
86
83
  # @option options [Object] :team_id
87
84
  # ID for the workspace to set the name for.
85
+ # @option options [string] :name
86
+ # The new name of the workspace.
88
87
  # @see https://api.slack.com/methods/admin.teams.settings.setName
89
88
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setName.json
90
89
  def admin_teams_settings_setName(options = {})
91
- raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
92
90
  raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
91
+ raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
93
92
  post('admin.teams.settings.setName', options)
94
93
  end
95
94
  end
@@ -9,34 +9,34 @@ module Slack
9
9
  #
10
10
  # Add up to one hundred default channels to an IDP group.
11
11
  #
12
- # @option options [array] :channel_ids
13
- # Comma separated string of channel IDs.
14
12
  # @option options [string] :usergroup_id
15
13
  # ID of the IDP group to add default channels for.
16
14
  # @option options [string] :team_id
17
15
  # The workspace to add default channels in.
16
+ # @option options [array] :channel_ids
17
+ # Comma separated string of channel IDs.
18
18
  # @see https://api.slack.com/methods/admin.usergroups.addChannels
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addChannels.json
20
20
  def admin_usergroups_addChannels(options = {})
21
- raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
22
21
  raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
22
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
23
23
  post('admin.usergroups.addChannels', options)
24
24
  end
25
25
 
26
26
  #
27
27
  # Associate one or more default workspaces with an organization-wide IDP group.
28
28
  #
29
- # @option options [array] :team_ids
30
- # A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
31
29
  # @option options [string] :usergroup_id
32
30
  # An encoded usergroup (IDP Group) ID.
31
+ # @option options [array] :team_ids
32
+ # A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
33
33
  # @option options [boolean] :auto_provision
34
34
  # When true, this method automatically creates new workspace accounts for the IDP group members.
35
35
  # @see https://api.slack.com/methods/admin.usergroups.addTeams
36
36
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addTeams.json
37
37
  def admin_usergroups_addTeams(options = {})
38
- raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
39
38
  raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
39
+ raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
40
40
  post('admin.usergroups.addTeams', options)
41
41
  end
42
42
 
@@ -45,10 +45,10 @@ module Slack
45
45
  #
46
46
  # @option options [Object] :usergroup_id
47
47
  # ID of the IDP group to list default channels for.
48
- # @option options [boolean] :include_num_members
49
- # Flag to include or exclude the count of members per channel.
50
48
  # @option options [string] :team_id
51
49
  # ID of the the workspace.
50
+ # @option options [boolean] :include_num_members
51
+ # Flag to include or exclude the count of members per channel.
52
52
  # @see https://api.slack.com/methods/admin.usergroups.listChannels
53
53
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.listChannels.json
54
54
  def admin_usergroups_listChannels(options = {})
@@ -59,15 +59,15 @@ module Slack
59
59
  #
60
60
  # Remove one or more default channels from an org-level IDP group (user group).
61
61
  #
62
- # @option options [array] :channel_ids
63
- # Comma-separated string of channel IDs.
64
62
  # @option options [string] :usergroup_id
65
63
  # ID of the IDP Group.
64
+ # @option options [array] :channel_ids
65
+ # Comma-separated string of channel IDs.
66
66
  # @see https://api.slack.com/methods/admin.usergroups.removeChannels
67
67
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeChannels.json
68
68
  def admin_usergroups_removeChannels(options = {})
69
- raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
70
69
  raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
70
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
71
71
  post('admin.usergroups.removeChannels', options)
72
72
  end
73
73
  end
@@ -13,12 +13,12 @@ module Slack
13
13
  # The ID (T1234) of the workspace.
14
14
  # @option options [Object] :user_id
15
15
  # The ID of the user to add to the workspace.
16
- # @option options [string] :channel_ids
17
- # Comma separated values of channel IDs to add user in the new workspace.
18
16
  # @option options [boolean] :is_restricted
19
17
  # True if user should be added to the workspace as a guest.
20
18
  # @option options [boolean] :is_ultra_restricted
21
19
  # True if user should be added to the workspace as a single-channel guest.
20
+ # @option options [string] :channel_ids
21
+ # Comma separated values of channel IDs to add user in the new workspace.
22
22
  # @see https://api.slack.com/methods/admin.users.assign
23
23
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.assign.json
24
24
  def admin_users_assign(options = {})
@@ -30,48 +30,50 @@ module Slack
30
30
  #
31
31
  # Invite a user to a workspace.
32
32
  #
33
- # @option options [string] :channel_ids
34
- # A comma-separated list of channel_ids for this user to join. At least one channel is required.
35
- # @option options [string] :email
36
- # The email address of the person to invite.
37
33
  # @option options [Object] :team_id
38
34
  # The ID (T1234) of the workspace.
35
+ # @option options [string] :email
36
+ # The email address of the person to invite.
37
+ # @option options [string] :channel_ids
38
+ # A comma-separated list of channel_ids for this user to join. At least one channel is required.
39
39
  # @option options [string] :custom_message
40
40
  # An optional message to send to the user in the invite email.
41
- # @option options [boolean] :email_password_policy_enabled
42
- # Allow invited user to sign in via email and password. Only available for Enterprise Grid teams via admin invite.
43
- # @option options [string] :guest_expiration_ts
44
- # 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.
45
- # @option options [boolean] :is_restricted
46
- # Is this user a multi-channel guest user? (default: false).
47
- # @option options [boolean] :is_ultra_restricted
48
- # Is this user a single channel guest user? (default: false).
49
41
  # @option options [string] :real_name
50
42
  # Full name of the user.
51
43
  # @option options [boolean] :resend
52
44
  # 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).
45
+ # @option options [boolean] :is_restricted
46
+ # Is this user a multi-channel guest user? (default: false).
47
+ # @option options [boolean] :is_ultra_restricted
48
+ # Is this user a single channel guest user? (default: false).
49
+ # @option options [string] :guest_expiration_ts
50
+ # 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.
51
+ # @option options [boolean] :email_password_policy_enabled
52
+ # Allow invited user to sign in via email and password. Only available for Enterprise org teams via admin invite.
53
53
  # @see https://api.slack.com/methods/admin.users.invite
54
54
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.invite.json
55
55
  def admin_users_invite(options = {})
56
- raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
57
- raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
58
56
  raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
57
+ raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
58
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
59
59
  post('admin.users.invite', options)
60
60
  end
61
61
 
62
62
  #
63
63
  # List users on a workspace
64
64
  #
65
+ # @option options [Object] :team_id
66
+ # The ID (T1234) of a workspace. Filters results to just the specified workspace.
65
67
  # @option options [string] :cursor
66
68
  # Set cursor to next_cursor returned by the previous call to list items in the next page.
67
- # @option options [boolean] :include_deactivated_user_workspaces
68
- # 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.
69
69
  # @option options [boolean] :is_active
70
70
  # If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.
71
+ # @option options [boolean] :include_deactivated_user_workspaces
72
+ # 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.
73
+ # @option options [boolean] :only_guests
74
+ # If true, returns only guests and their expiration dates that belong to the team_id.
71
75
  # @option options [integer] :limit
72
76
  # Limit for how many users to be retrieved per page.
73
- # @option options [Object] :team_id
74
- # The ID (T1234) of a workspace. Filters results to just the specified workspace.
75
77
  # @see https://api.slack.com/methods/admin.users.list
76
78
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.list.json
77
79
  def admin_users_list(options = {})
@@ -117,17 +119,17 @@ module Slack
117
119
  #
118
120
  # Set an expiration for a guest user
119
121
  #
120
- # @option options [integer] :expiration_ts
121
- # Epoch timestamp in seconds when guest account should be disabled.
122
- # @option options [string] :user_id
123
- # The ID of the user to set an expiration for.
124
122
  # @option options [Object] :team_id
125
123
  # The ID (T1234) of the workspace.
124
+ # @option options [string] :user_id
125
+ # The ID of the user to set an expiration for.
126
+ # @option options [integer] :expiration_ts
127
+ # Epoch timestamp in seconds when guest account should be disabled.
126
128
  # @see https://api.slack.com/methods/admin.users.setExpiration
127
129
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setExpiration.json
128
130
  def admin_users_setExpiration(options = {})
129
- raise ArgumentError, 'Required arguments :expiration_ts missing' if options[:expiration_ts].nil?
130
131
  raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
132
+ raise ArgumentError, 'Required arguments :expiration_ts missing' if options[:expiration_ts].nil?
131
133
  post('admin.users.setExpiration', options)
132
134
  end
133
135
 
@@ -33,13 +33,16 @@ module Slack
33
33
  #
34
34
  # Revoke a single session for a user. The user will be forced to login to Slack.
35
35
  #
36
- # @option options [integer] :session_id
37
- # ID of the session to invalidate.
36
+ # @option options [Object] :team_id
37
+ # ID of the workspace that the session belongs to.
38
38
  # @option options [Object] :user_id
39
39
  # ID of the user that the session belongs to.
40
+ # @option options [integer] :session_id
41
+ # ID of the session to invalidate.
40
42
  # @see https://api.slack.com/methods/admin.users.session.invalidate
41
43
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.invalidate.json
42
44
  def admin_users_session_invalidate(options = {})
45
+ raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
43
46
  raise ArgumentError, 'Required arguments :session_id missing' if options[:session_id].nil?
44
47
  post('admin.users.session.invalidate', options)
45
48
  end
@@ -47,14 +50,14 @@ module Slack
47
50
  #
48
51
  # List active user sessions for an organization
49
52
  #
50
- # @option options [string] :cursor
51
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
52
- # @option options [integer] :limit
53
- # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
54
53
  # @option options [string] :team_id
55
54
  # 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.
56
55
  # @option options [string] :user_id
57
56
  # 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.
57
+ # @option options [integer] :limit
58
+ # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
59
+ # @option options [string] :cursor
60
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
58
61
  # @see https://api.slack.com/methods/admin.users.session.list
59
62
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.list.json
60
63
  def admin_users_session_list(options = {})
@@ -87,7 +90,7 @@ module Slack
87
90
  # Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users
88
91
  #
89
92
  # @option options [array] :user_ids
90
- # The ID of the user to wipe sessions for.
93
+ # The list of up to 1,000 user IDs to wipe sessions for.
91
94
  # @option options [boolean] :mobile_only
92
95
  # Only expire mobile sessions (default: false).
93
96
  # @option options [boolean] :web_only
@@ -104,10 +107,10 @@ module Slack
104
107
  #
105
108
  # @option options [array] :user_ids
106
109
  # The list of up to 1,000 user IDs to apply the session settings for.
107
- # @option options [boolean] :desktop_app_browser_quit
108
- # Terminate the session when the client—either the desktop app or a browser window—is closed.
109
110
  # @option options [integer] :duration
110
111
  # 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).
112
+ # @option options [boolean] :desktop_app_browser_quit
113
+ # Terminate the session when the client—either the desktop app or a browser window—is closed.
111
114
  # @see https://api.slack.com/methods/admin.users.session.setSettings
112
115
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.setSettings.json
113
116
  def admin_users_session_setSettings(options = {})
@@ -9,10 +9,10 @@ module Slack
9
9
  #
10
10
  # Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.
11
11
  #
12
- # @option options [integer] :date_end_of_support
13
- # 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
12
  # @option options [integer] :date_sessions_started
15
13
  # Unix timestamp of a date to start looking for user sessions. If not provided will start six months ago.
14
+ # @option options [integer] :date_end_of_support
15
+ # Unix timestamp of the date of past or upcoming end of support cycles. If not provided will include all announced end of support cycles.
16
16
  # @see https://api.slack.com/methods/admin.users.unsupportedVersions.export
17
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.unsupportedVersions/admin.users.unsupportedVersions.export.json
18
18
  def admin_users_unsupportedVersions_export(options = {})
@@ -9,34 +9,34 @@ module Slack
9
9
  #
10
10
  # Search workflows within the team or enterprise
11
11
  #
12
+ # @option options [string] :query
13
+ # A search query to filter for workflow name or description.
12
14
  # @option options [Object] :app_id
13
15
  # The parent app ID for which to return workflows.
14
- # @option options [array] :collaborator_ids
15
- # Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.
16
16
  # @option options [string] :cursor
17
17
  # Set cursor to next_cursor returned by the previous call to list items in the next page.
18
- # @option options [boolean] :is_sales_elevate
19
- # Filter workflows by their Sales Elevate status.
20
18
  # @option options [integer] :limit
21
19
  # The number of results that will be returned by the API on each invocation.
22
20
  # @option options [boolean] :no_collaborators
23
21
  # Only include workflows with no collaborators in the result; default is false.
22
+ # @option options [array] :collaborator_ids
23
+ # Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.
24
24
  # @option options [integer] :num_trigger_ids
25
25
  # Number of trigger IDs to fetch for each workflow; default is 10.
26
- # @option options [enum] :publish_status
27
- # Filter workflows by their published status.
28
- # @option options [string] :query
29
- # A search query to filter for workflow name or description.
26
+ # @option options [boolean] :is_sales_elevate
27
+ # Filter workflows by their Sales Elevate status.
28
+ # @option options [enum] :source
29
+ # Source of workflow creation, either from code or workflow builder.
30
30
  # @option options [enum] :sort
31
31
  # The field used to sort the returned workflows.
32
32
  # @option options [enum] :sort_dir
33
33
  # 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).
34
- # @option options [enum] :source
35
- # Source of workflow creation, either from code or workflow builder.
36
- # @option options [array] :step_function_ids
37
- # Only include workflows that use all of the provided step function ids.
38
34
  # @option options [string] :trigger_type_id
39
35
  # Only include workflows with this trigger type.
36
+ # @option options [enum] :publish_status
37
+ # Filter workflows by their published status.
38
+ # @option options [array] :step_function_ids
39
+ # Only include workflows that use all of the provided step function ids.
40
40
  # @see https://api.slack.com/methods/admin.workflows.search
41
41
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows/admin.workflows.search.json
42
42
  def admin_workflows_search(options = {})
@@ -9,30 +9,30 @@ module Slack
9
9
  #
10
10
  # Add collaborators to workflows within the team or enterprise
11
11
  #
12
- # @option options [array] :collaborator_ids
13
- # Array of collaborators (encoded user IDs) to add; max 50.
14
12
  # @option options [array] :workflow_ids
15
13
  # Array of workflow IDs to edit; max 50.
14
+ # @option options [array] :collaborator_ids
15
+ # Array of collaborators (encoded user IDs) to add; max 50.
16
16
  # @see https://api.slack.com/methods/admin.workflows.collaborators.add
17
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.collaborators/admin.workflows.collaborators.add.json
18
18
  def admin_workflows_collaborators_add(options = {})
19
- raise ArgumentError, 'Required arguments :collaborator_ids missing' if options[:collaborator_ids].nil?
20
19
  raise ArgumentError, 'Required arguments :workflow_ids missing' if options[:workflow_ids].nil?
20
+ raise ArgumentError, 'Required arguments :collaborator_ids missing' if options[:collaborator_ids].nil?
21
21
  post('admin.workflows.collaborators.add', options)
22
22
  end
23
23
 
24
24
  #
25
25
  # Remove collaborators from workflows within the team or enterprise
26
26
  #
27
- # @option options [array] :collaborator_ids
28
- # Array of collaborators (encoded user IDs) to remove; max 50.
29
27
  # @option options [array] :workflow_ids
30
28
  # Array of workflow IDs to edit; max 50.
29
+ # @option options [array] :collaborator_ids
30
+ # Array of collaborators (encoded user IDs) to remove; max 50.
31
31
  # @see https://api.slack.com/methods/admin.workflows.collaborators.remove
32
32
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.collaborators/admin.workflows.collaborators.remove.json
33
33
  def admin_workflows_collaborators_remove(options = {})
34
- raise ArgumentError, 'Required arguments :collaborator_ids missing' if options[:collaborator_ids].nil?
35
34
  raise ArgumentError, 'Required arguments :workflow_ids missing' if options[:workflow_ids].nil?
35
+ raise ArgumentError, 'Required arguments :collaborator_ids missing' if options[:collaborator_ids].nil?
36
36
  post('admin.workflows.collaborators.remove', options)
37
37
  end
38
38
  end
@@ -11,30 +11,30 @@ module Slack
11
11
  #
12
12
  # @option options [Object] :app_id
13
13
  # The id of the app to get activities from.
14
- # @option options [string] :component_id
15
- # The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for worflows.
16
- # @option options [string] :component_type
17
- # The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables').
14
+ # @option options [string] :team_id
15
+ # The team who owns this log.
18
16
  # @option options [string] :cursor
19
17
  # 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.
20
18
  # @option options [integer] :limit
21
19
  # The maximum number of items to return.
22
- # @option options [string] :log_event_type
23
- # The event type of log events to be returned.
24
- # @option options [integer] :max_date_created
25
- # The latest timestamp of the log to retrieve (epoch microseconds).
26
- # @option options [integer] :min_date_created
27
- # The earliest timestamp of the log to retrieve (epoch microseconds).
28
20
  # @option options [string] :min_log_level
29
21
  # 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').
30
- # @option options [enum] :sort_direction
31
- # The direction you want the data sorted by (always by timestamp).
22
+ # @option options [string] :log_event_type
23
+ # The event type of log events to be returned.
32
24
  # @option options [string] :source
33
25
  # The source of log events to be returned. Acceptable values are ('slack', 'developer').
34
- # @option options [string] :team_id
35
- # The team who owns this log.
26
+ # @option options [string] :component_type
27
+ # The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables').
28
+ # @option options [string] :component_id
29
+ # The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for workflows.
36
30
  # @option options [string] :trace_id
37
31
  # The trace id of log events to be returned.
32
+ # @option options [integer] :min_date_created
33
+ # The earliest timestamp of the log to retrieve (epoch microseconds).
34
+ # @option options [integer] :max_date_created
35
+ # The latest timestamp of the log to retrieve (epoch microseconds).
36
+ # @option options [enum] :sort_direction
37
+ # The direction you want the data sorted by (always by timestamp).
38
38
  # @see https://api.slack.com/methods/apps.activities.list
39
39
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.activities/apps.activities.list.json
40
40
  def apps_activities_list(options = {})
@@ -11,10 +11,10 @@ module Slack
11
11
  #
12
12
  # @option options [string] :app_id
13
13
  # The id of the app whose tokens you want to delete.
14
- # @option options [string] :external_token_id
15
- # The id of the token that you want to delete.
16
14
  # @option options [string] :provider_key
17
15
  # The provider key of the provider whose tokens you want to delete.
16
+ # @option options [string] :external_token_id
17
+ # The id of the token that you want to delete.
18
18
  # @see https://api.slack.com/methods/apps.auth.external.delete
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.auth.external/apps.auth.external.delete.json
20
20
  def apps_auth_external_delete(options = {})