slack-ruby-client 2.6.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +4 -10
  3. data/.github/workflows/update_api.yml +1 -1
  4. data/.rubocop_todo.yml +58 -71
  5. data/CHANGELOG.md +15 -0
  6. data/CONTRIBUTING.md +1 -1
  7. data/Gemfile +0 -9
  8. data/LICENSE.md +1 -1
  9. data/README.md +31 -220
  10. data/Rakefile +0 -1
  11. data/UPGRADING.md +4 -0
  12. data/bin/commands/admin_analytics.rb +1 -1
  13. data/bin/commands/admin_apps.rb +4 -4
  14. data/bin/commands/admin_apps_activities.rb +7 -7
  15. data/bin/commands/admin_apps_approved.rb +4 -4
  16. data/bin/commands/admin_apps_config.rb +3 -1
  17. data/bin/commands/admin_apps_requests.rb +5 -5
  18. data/bin/commands/admin_apps_restricted.rb +4 -4
  19. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  20. data/bin/commands/admin_auth_policy.rb +5 -5
  21. data/bin/commands/admin_barriers.rb +3 -3
  22. data/bin/commands/admin_conversations.rb +15 -15
  23. data/bin/commands/admin_conversations_ekm.rb +2 -2
  24. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  25. data/bin/commands/admin_emoji.rb +5 -5
  26. data/bin/commands/admin_functions.rb +1 -1
  27. data/bin/commands/admin_inviteRequests.rb +3 -3
  28. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  29. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  30. data/bin/commands/admin_roles.rb +3 -3
  31. data/bin/commands/admin_teams.rb +3 -3
  32. data/bin/commands/admin_teams_admins.rb +2 -2
  33. data/bin/commands/admin_teams_owners.rb +2 -2
  34. data/bin/commands/admin_teams_settings.rb +5 -5
  35. data/bin/commands/admin_usergroups.rb +4 -4
  36. data/bin/commands/admin_users.rb +12 -11
  37. data/bin/commands/admin_users_session.rb +6 -5
  38. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  39. data/bin/commands/admin_workflows.rb +6 -6
  40. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  41. data/bin/commands/apps_activities.rb +7 -7
  42. data/bin/commands/apps_auth_external.rb +1 -1
  43. data/bin/commands/apps_datastore.rb +12 -12
  44. data/bin/commands/apps_event_authorizations.rb +3 -3
  45. data/bin/commands/apps_manifest.rb +1 -1
  46. data/bin/commands/assistant_search.rb +18 -2
  47. data/bin/commands/assistant_threads.rb +2 -2
  48. data/bin/commands/auth.rb +1 -1
  49. data/bin/commands/auth_teams.rb +1 -1
  50. data/bin/commands/bookmarks.rb +6 -6
  51. data/bin/commands/calls.rb +5 -5
  52. data/bin/commands/canvases.rb +2 -2
  53. data/bin/commands/canvases_access.rb +1 -1
  54. data/bin/commands/chat.rb +23 -24
  55. data/bin/commands/conversations.rb +8 -8
  56. data/bin/commands/conversations_canvases.rb +1 -1
  57. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  58. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  59. data/bin/commands/dnd.rb +1 -1
  60. data/bin/commands/files.rb +5 -5
  61. data/bin/commands/files_remote.rb +1 -1
  62. data/bin/commands/functions.rb +1 -1
  63. data/bin/commands/functions_distributions_permissions.rb +15 -15
  64. data/bin/commands/functions_workflows_steps.rb +2 -2
  65. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  66. data/bin/commands/migration.rb +2 -2
  67. data/bin/commands/oauth_v2.rb +1 -1
  68. data/bin/commands/openid_connect.rb +1 -1
  69. data/bin/commands/reactions.rb +3 -3
  70. data/bin/commands/reminders.rb +2 -2
  71. data/bin/commands/rtm.rb +15 -0
  72. data/bin/commands/search.rb +4 -4
  73. data/bin/commands/slackLists.rb +37 -0
  74. data/bin/commands/slackLists_access.rb +34 -0
  75. data/bin/commands/slackLists_download.rb +31 -0
  76. data/bin/commands/slackLists_items.rb +76 -0
  77. data/bin/commands/team.rb +1 -1
  78. data/bin/commands/team_externalTeams.rb +4 -4
  79. data/bin/commands/usergroups.rb +10 -10
  80. data/bin/commands/usergroups_users.rb +5 -5
  81. data/bin/commands/users.rb +1 -1
  82. data/bin/commands/users_discoverableContacts.rb +1 -1
  83. data/bin/commands/views.rb +4 -4
  84. data/bin/commands/workflows_featured.rb +50 -0
  85. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  86. data/examples/files_upload_v2/files_upload_v2.rb +8 -0
  87. data/lib/slack/events/request.rb +1 -0
  88. data/lib/slack/version.rb +1 -1
  89. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  90. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  91. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  92. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  93. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  94. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  95. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  96. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  97. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  98. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  99. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  100. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  101. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  102. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  103. data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
  104. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  105. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  106. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  107. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  108. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  109. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  110. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  111. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  112. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  113. data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
  114. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  115. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  116. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  117. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  118. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  119. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  120. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  121. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  122. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  123. data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
  124. data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
  125. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  126. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  127. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  128. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  129. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  130. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  131. data/lib/slack/web/api/endpoints/chat.rb +53 -55
  132. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  133. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  134. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  135. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  136. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  137. data/lib/slack/web/api/endpoints/files.rb +11 -11
  138. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  139. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  140. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  141. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  142. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  143. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  144. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  145. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  146. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  147. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  148. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  149. data/lib/slack/web/api/endpoints/search.rb +8 -8
  150. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  151. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  152. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  153. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  154. data/lib/slack/web/api/endpoints/team.rb +3 -3
  155. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  156. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  157. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  158. data/lib/slack/web/api/endpoints/users.rb +2 -2
  159. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  160. data/lib/slack/web/api/endpoints/views.rb +9 -9
  161. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  162. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  163. data/lib/slack/web/api/endpoints.rb +10 -2
  164. data/lib/slack/web/api/errors.rb +88 -46
  165. data/lib/slack/web/api/helpers/files.rb +32 -22
  166. data/lib/slack/web/api/mixins/conversations.id.rb +14 -3
  167. data/lib/slack/web/api/mixins/users.id.rb +7 -3
  168. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  169. data/lib/slack-ruby-client.rb +0 -12
  170. data/lib/tasks/update.rake +0 -1
  171. data/lib/tasks/web.rake +0 -4
  172. data/slack-ruby-client.gemspec +1 -1
  173. metadata +19 -38
  174. data/.github/workflows/integration_test.yml +0 -45
  175. data/bin/commands/workflows.rb +0 -44
  176. data/examples/hi_real_time_and_web/Gemfile +0 -6
  177. data/examples/hi_real_time_and_web/hi.gif +0 -0
  178. data/examples/hi_real_time_and_web/hi.rb +0 -28
  179. data/examples/hi_real_time_async_async/Gemfile +0 -7
  180. data/examples/hi_real_time_async_async/Procfile +0 -2
  181. data/examples/hi_real_time_async_async/hi.rb +0 -41
  182. data/lib/slack/real_time/api/message.rb +0 -23
  183. data/lib/slack/real_time/api/message_id.rb +0 -15
  184. data/lib/slack/real_time/api/ping.rb +0 -19
  185. data/lib/slack/real_time/api/schema/event.json +0 -23
  186. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  187. data/lib/slack/real_time/api/typing.rb +0 -20
  188. data/lib/slack/real_time/client.rb +0 -271
  189. data/lib/slack/real_time/concurrency/async.rb +0 -142
  190. data/lib/slack/real_time/concurrency.rb +0 -8
  191. data/lib/slack/real_time/config.rb +0 -62
  192. data/lib/slack/real_time/models/base.rb +0 -11
  193. data/lib/slack/real_time/models/bot.rb +0 -9
  194. data/lib/slack/real_time/models/channel.rb +0 -13
  195. data/lib/slack/real_time/models/im.rb +0 -9
  196. data/lib/slack/real_time/models/mpim.rb +0 -9
  197. data/lib/slack/real_time/models/team.rb +0 -9
  198. data/lib/slack/real_time/models/user.rb +0 -9
  199. data/lib/slack/real_time/models.rb +0 -9
  200. data/lib/slack/real_time/socket.rb +0 -118
  201. data/lib/slack/real_time/stores/base.rb +0 -47
  202. data/lib/slack/real_time/stores/starter.rb +0 -449
  203. data/lib/slack/real_time/stores/store.rb +0 -624
  204. data/lib/slack/real_time/stores.rb +0 -5
  205. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  206. data/lib/tasks/real_time.rake +0 -81
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Look up an email address to see if someone is discoverable on Slack'
10
10
  g.long_desc %( Look up an email address to see if someone is discoverable on Slack )
11
11
  g.command 'lookup' do |c|
12
- c.flag 'email', desc: '.'
12
+ c.flag 'email', desc: ''
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump(@client.users_discoverableContacts_lookup(options))
15
15
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Open a view for a user.'
10
10
  g.long_desc %( Open a view for a user. )
11
11
  g.command 'open' do |c|
12
- c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
13
12
  c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.'
14
13
  c.flag 'interactivity_pointer', desc: 'Exchange an interactivity pointer to post to the user.'
14
+ c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.views_open(options))
17
17
  end
@@ -31,9 +31,9 @@ module Slack
31
31
  g.desc 'Push a view onto the stack of a root view.'
32
32
  g.long_desc %( Push a view onto the stack of a root view. )
33
33
  g.command 'push' do |c|
34
- c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
35
34
  c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.'
36
35
  c.flag 'interactivity_pointer', desc: 'Exchange an interactivity pointer to post to the user.'
36
+ c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
37
37
  c.action do |_global_options, options, _args|
38
38
  puts JSON.dump(@client.views_push(options))
39
39
  end
@@ -42,9 +42,9 @@ module Slack
42
42
  g.desc 'Update an existing view.'
43
43
  g.long_desc %( Update an existing view. )
44
44
  g.command 'update' do |c|
45
- c.flag 'view', desc: 'A view object. This must be a JSON-encoded string.'
46
- c.flag 'external_id', desc: 'A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either view_id or external_id is required.'
47
45
  c.flag 'view_id', desc: 'A unique identifier of the view to be updated. Either view_id or external_id is required.'
46
+ c.flag 'external_id', desc: 'A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either view_id or external_id is required.'
47
+ c.flag 'view', desc: 'A view object. This must be a JSON-encoded string.'
48
48
  c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
49
49
  c.action do |_global_options, options, _args|
50
50
  puts JSON.dump(@client.views_update(options))
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'WorkflowsFeatured methods.'
8
+ command 'workflows_featured' do |g|
9
+ g.desc 'Add featured workflows to a channel.'
10
+ g.long_desc %( Add featured workflows to a channel. )
11
+ g.command 'add' do |c|
12
+ c.flag 'channel_id', desc: 'Channel to add featured workflow in.'
13
+ c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs to add; max 15.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.workflows_featured_add(options))
16
+ end
17
+ end
18
+
19
+ g.desc 'List the featured workflows for specified channels.'
20
+ g.long_desc %( List the featured workflows for specified channels. )
21
+ g.command 'list' do |c|
22
+ c.flag 'channel_ids', desc: 'Comma-separated array of channel IDs to list featured workflows for.'
23
+ c.action do |_global_options, options, _args|
24
+ puts JSON.dump(@client.workflows_featured_list(options))
25
+ end
26
+ end
27
+
28
+ g.desc 'Remove featured workflows from a channel.'
29
+ g.long_desc %( Remove featured workflows from a channel. )
30
+ g.command 'remove' do |c|
31
+ c.flag 'channel_id', desc: 'Channel to remove featured workflow from.'
32
+ c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs to remove; max 15.'
33
+ c.action do |_global_options, options, _args|
34
+ puts JSON.dump(@client.workflows_featured_remove(options))
35
+ end
36
+ end
37
+
38
+ g.desc 'Set featured workflows for a channel.'
39
+ g.long_desc %( Set featured workflows for a channel. )
40
+ g.command 'set' do |c|
41
+ c.flag 'channel_id', desc: 'Channel to set featured workflows in.'
42
+ c.flag 'trigger_ids', desc: 'Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15.'
43
+ c.action do |_global_options, options, _args|
44
+ puts JSON.dump(@client.workflows_featured_set(options))
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -10,10 +10,10 @@ module Slack
10
10
  g.long_desc %( Allows users to run a trigger that has its permission type set to named_entities )
11
11
  g.command 'add' do |c|
12
12
  c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
13
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
13
14
  c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
14
- c.flag 'org_ids', desc: 'List of encoded organization IDs.'
15
15
  c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
16
- c.flag 'user_ids', desc: 'List of encoded user IDs.'
16
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
17
17
  c.action do |_global_options, options, _args|
18
18
  puts JSON.dump(@client.workflows_triggers_permissions_add(options))
19
19
  end
@@ -32,10 +32,10 @@ module Slack
32
32
  g.long_desc %( Revoke an entity's access to a trigger that has its permission type set to named_entities )
33
33
  g.command 'remove' do |c|
34
34
  c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
35
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
35
36
  c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
36
- c.flag 'org_ids', desc: 'List of encoded organization IDs.'
37
37
  c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
38
- c.flag 'user_ids', desc: 'List of encoded user IDs.'
38
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
39
39
  c.action do |_global_options, options, _args|
40
40
  puts JSON.dump(@client.workflows_triggers_permissions_remove(options))
41
41
  end
@@ -44,12 +44,12 @@ module Slack
44
44
  g.desc 'Set the permission type for who can run a trigger'
45
45
  g.long_desc %( Set the permission type for who can run a trigger )
46
46
  g.command 'set' do |c|
47
- c.flag 'permission_type', desc: 'The type of permission that defines who can run a trigger.'
48
47
  c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
48
+ c.flag 'permission_type', desc: 'The type of permission that defines who can run a trigger.'
49
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
49
50
  c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
50
- c.flag 'org_ids', desc: 'List of encoded organization IDs.'
51
51
  c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
52
- c.flag 'user_ids', desc: 'List of encoded user IDs.'
52
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
53
53
  c.action do |_global_options, options, _args|
54
54
  puts JSON.dump(@client.workflows_triggers_permissions_set(options))
55
55
  end
@@ -35,3 +35,11 @@ puts client.files_upload_v2(
35
35
  content: SecureRandom.hex,
36
36
  channel_id: channel_id
37
37
  ).files.first.permalink_public
38
+
39
+ client.files_upload_v2(
40
+ files: [
41
+ { filename: 'files_upload_v2_to_general_first_file.txt', content: SecureRandom.hex },
42
+ { filename: 'files_upload_v2_to_general_second_file.txt', content: SecureRandom.hex }
43
+ ],
44
+ channels: ['#general']
45
+ ).files.each { |file| puts file.permalink_public }
@@ -55,6 +55,7 @@ module Slack
55
55
  # Returns true if the signature coming from Slack is valid.
56
56
  def valid?
57
57
  raise MissingSigningSecret unless signing_secret
58
+ raise InvalidSignature unless signature
58
59
 
59
60
  digest = OpenSSL::Digest.new('SHA256')
60
61
  signature_basestring = [version, timestamp, body].join(':')
data/lib/slack/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Slack
3
- VERSION = '2.6.0'
3
+ VERSION = '3.0.0'
4
4
  end
@@ -9,10 +9,10 @@ module Slack
9
9
  #
10
10
  # Retrieve analytics data for a given date, presented as a compressed JSON file
11
11
  #
12
- # @option options [string] :type
13
- # The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).
14
12
  # @option options [date] :date
15
13
  # Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC. Required unless metadata_only is set to true.
14
+ # @option options [string] :type
15
+ # The type of analytics to retrieve. The options are currently limited to member (for Enterprise org member analytics) and public_channel (for public channel analytics).
16
16
  # @option options [boolean] :metadata_only
17
17
  # Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.
18
18
  # @see https://api.slack.com/methods/admin.analytics.getFile
@@ -11,12 +11,12 @@ module Slack
11
11
  #
12
12
  # @option options [string] :app_id
13
13
  # The id of the app to approve.
14
- # @option options [Object] :enterprise_id
15
- # The ID of the enterprise to approve the app on.
16
14
  # @option options [string] :request_id
17
15
  # The id of the request to approve.
18
16
  # @option options [Object] :team_id
19
17
  # The ID of the workspace to approve the app on.
18
+ # @option options [Object] :enterprise_id
19
+ # The ID of the enterprise to approve the app on.
20
20
  # @see https://api.slack.com/methods/admin.apps.approve
21
21
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.approve.json
22
22
  def admin_apps_approve(options = {})
@@ -28,10 +28,10 @@ module Slack
28
28
  #
29
29
  # @option options [string] :app_id
30
30
  # The id of the app whose resolution you want to clear/undo.
31
- # @option options [Object] :enterprise_id
32
- # The enterprise to clear the app resolution from.
33
31
  # @option options [Object] :team_id
34
32
  # The workspace to clear the app resolution from.
33
+ # @option options [Object] :enterprise_id
34
+ # The enterprise to clear the app resolution from.
35
35
  # @see https://api.slack.com/methods/admin.apps.clearResolution
36
36
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.clearResolution.json
37
37
  def admin_apps_clearResolution(options = {})
@@ -44,12 +44,12 @@ module Slack
44
44
  #
45
45
  # @option options [string] :app_id
46
46
  # The id of the app to restrict.
47
- # @option options [Object] :enterprise_id
48
- # The ID of the enterprise to approve the app on.
49
47
  # @option options [string] :request_id
50
48
  # The id of the request to restrict.
51
49
  # @option options [Object] :team_id
52
50
  # The ID of the workspace to approve the app on.
51
+ # @option options [Object] :enterprise_id
52
+ # The ID of the enterprise to approve the app on.
53
53
  # @see https://api.slack.com/methods/admin.apps.restrict
54
54
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.restrict.json
55
55
  def admin_apps_restrict(options = {})
@@ -61,10 +61,10 @@ module Slack
61
61
  #
62
62
  # @option options [string] :app_id
63
63
  # The ID of the app to uninstall.
64
- # @option options [string] :enterprise_id
65
- # The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.
66
64
  # @option options [string] :team_ids
67
65
  # IDs of the teams to uninstall from (max 100). With an org-level token, this or enterprise_id is required.
66
+ # @option options [string] :enterprise_id
67
+ # The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.
68
68
  # @see https://api.slack.com/methods/admin.apps.uninstall
69
69
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.uninstall.json
70
70
  def admin_apps_uninstall(options = {})
@@ -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 and 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 and 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 and 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 and 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/admin.apps.activities.list
39
39
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.activities/admin.apps.activities.list.json
40
40
  def admin_apps_activities_list(options = {})
@@ -9,16 +9,14 @@ module Slack
9
9
  #
10
10
  # List approved apps for an org or workspace.
11
11
  #
12
- # @option options [boolean] :certified
13
- # Limit the results to only include certified apps. When false, no certified apps will appear in the result.
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] :enterprise_id
17
- # .
18
12
  # @option options [integer] :limit
19
13
  # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
14
+ # @option options [string] :cursor
15
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
20
16
  # @option options [Object] :team_id
21
- # .
17
+ # @option options [Object] :enterprise_id
18
+ # @option options [boolean] :certified
19
+ # Limit the results to only include certified apps. When false, no certified apps will appear in the result.
22
20
  # @see https://api.slack.com/methods/admin.apps.approved.list
23
21
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.approved/admin.apps.approved.list.json
24
22
  def admin_apps_approved_list(options = {})
@@ -11,10 +11,11 @@ module Slack
11
11
  #
12
12
  # @option options [array] :app_ids
13
13
  # An array of app IDs to get app configs for.
14
+ # @option options [array] :rich_link_preview_types
15
+ # return apps with the corresponding rich link preview layouts.
14
16
  # @see https://api.slack.com/methods/admin.apps.config.lookup
15
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.config/admin.apps.config.lookup.json
16
18
  def admin_apps_config_lookup(options = {})
17
- raise ArgumentError, 'Required arguments :app_ids missing' if options[:app_ids].nil?
18
19
  post('admin.apps.config.lookup', options)
19
20
  end
20
21
 
@@ -23,10 +24,12 @@ module Slack
23
24
  #
24
25
  # @option options [Object] :app_id
25
26
  # The encoded app ID to set the app config for.
26
- # @option options [object] :domain_restrictions
27
- # Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.
28
27
  # @option options [enum] :workflow_auth_strategy
29
28
  # The workflow auth permission. Can be one of builder_choice or end_user_only.
29
+ # @option options [enum] :rich_link_preview_type
30
+ # Indicates the app-level override for rich link preview. Unsupported for free teams.
31
+ # @option options [object] :domain_restrictions
32
+ # Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.
30
33
  # @see https://api.slack.com/methods/admin.apps.config.set
31
34
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.config/admin.apps.config.set.json
32
35
  def admin_apps_config_set(options = {})
@@ -11,10 +11,10 @@ module Slack
11
11
  #
12
12
  # @option options [string] :request_id
13
13
  # The id of the request to cancel.
14
- # @option options [Object] :enterprise_id
15
- # The ID of the enterprise where this request belongs.
16
14
  # @option options [Object] :team_id
17
15
  # The ID of the workspace where this request belongs.
16
+ # @option options [Object] :enterprise_id
17
+ # The ID of the enterprise where this request belongs.
18
18
  # @see https://api.slack.com/methods/admin.apps.requests.cancel
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.requests/admin.apps.requests.cancel.json
20
20
  def admin_apps_requests_cancel(options = {})
@@ -25,16 +25,14 @@ module Slack
25
25
  #
26
26
  # List app requests for a team/workspace.
27
27
  #
28
- # @option options [boolean] :certified
29
- # Include requests for certified apps.
30
- # @option options [string] :cursor
31
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
32
- # @option options [Object] :enterprise_id
33
- # .
34
28
  # @option options [integer] :limit
35
29
  # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
30
+ # @option options [string] :cursor
31
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
36
32
  # @option options [Object] :team_id
37
- # .
33
+ # @option options [Object] :enterprise_id
34
+ # @option options [boolean] :certified
35
+ # Include requests for certified apps.
38
36
  # @see https://api.slack.com/methods/admin.apps.requests.list
39
37
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.requests/admin.apps.requests.list.json
40
38
  def admin_apps_requests_list(options = {})
@@ -9,16 +9,14 @@ module Slack
9
9
  #
10
10
  # List restricted apps for an org or workspace.
11
11
  #
12
- # @option options [boolean] :certified
13
- # Limit the results to only include certified apps. When false, no certified apps will appear in the result.
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] :enterprise_id
17
- # .
18
12
  # @option options [integer] :limit
19
13
  # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
14
+ # @option options [string] :cursor
15
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
20
16
  # @option options [Object] :team_id
21
- # .
17
+ # @option options [Object] :enterprise_id
18
+ # @option options [boolean] :certified
19
+ # Limit the results to only include certified apps. When false, no certified apps will appear in the result.
22
20
  # @see https://api.slack.com/methods/admin.apps.restricted.list
23
21
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.restricted/admin.apps.restricted.list.json
24
22
  def admin_apps_restricted_list(options = {})
@@ -7,7 +7,7 @@ module Slack
7
7
  module Endpoints
8
8
  module AdminAuditAnomalyAllow
9
9
  #
10
- # API to allow enterprise grid admins to read the allow list of IP blocks and ASNs from the enterprise configuration.
10
+ # API to allow Enterprise org admins to read the allow list of IP blocks and ASNs from the enterprise configuration.
11
11
  #
12
12
  # @see https://api.slack.com/methods/admin.audit.anomaly.allow.getItem
13
13
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.audit.anomaly.allow/admin.audit.anomaly.allow.getItem.json
@@ -16,12 +16,12 @@ module Slack
16
16
  end
17
17
 
18
18
  #
19
- # API to allow enterprise grid admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.
19
+ # API to allow Enterprise org admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.
20
20
  #
21
- # @option options [array] :trusted_asns
22
- # allow list of Autonomous System Numbers (ASN) in the enterprise grid configuarion.
23
21
  # @option options [array] :trusted_cidr
24
- # allow list of IPv4 addressses using cidr notation in the enterprise grid configuarion.
22
+ # allow list of IPv4 addresses using cidr notation in the Enterprise organization configuration.
23
+ # @option options [array] :trusted_asns
24
+ # allow list of Autonomous System Numbers (ASN) in the Enterprise organization configuration.
25
25
  # @see https://api.slack.com/methods/admin.audit.anomaly.allow.updateItem
26
26
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.audit.anomaly.allow/admin.audit.anomaly.allow.updateItem.json
27
27
  def admin_audit_anomaly_allow_updateItem(options = {})
@@ -9,18 +9,18 @@ module Slack
9
9
  #
10
10
  # Assign entities to a particular authentication policy.
11
11
  #
12
- # @option options [array] :entity_ids
13
- # Array of IDs to assign to the policy.
14
- # @option options [Object] :entity_type
15
- # The type of entity to assign to the policy. Currently, USER is supported.
16
12
  # @option options [string] :policy_name
17
13
  # The name of the authentication policy to assign the entities to. Currently, email_password is the only policy that may be used with this method.
14
+ # @option options [Object] :entity_type
15
+ # The type of entity to assign to the policy. Currently, USER is supported.
16
+ # @option options [array] :entity_ids
17
+ # Array of IDs to assign to the policy.
18
18
  # @see https://api.slack.com/methods/admin.auth.policy.assignEntities
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.assignEntities.json
20
20
  def admin_auth_policy_assignEntities(options = {})
21
- raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
22
- raise ArgumentError, 'Required arguments :entity_type missing' if options[:entity_type].nil?
23
21
  raise ArgumentError, 'Required arguments :policy_name missing' if options[:policy_name].nil?
22
+ raise ArgumentError, 'Required arguments :entity_type missing' if options[:entity_type].nil?
23
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
24
24
  post('admin.auth.policy.assignEntities', options)
25
25
  end
26
26
 
@@ -29,12 +29,12 @@ module Slack
29
29
  #
30
30
  # @option options [string] :policy_name
31
31
  # The name of the policy to fetch entities for. Currently, email_password is the only policy that may be used with this method.
32
- # @option options [string] :cursor
33
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
34
32
  # @option options [Object] :entity_type
35
33
  # The type of entity to assign to the policy. Currently, USER is supported.
36
34
  # @option options [integer] :limit
37
35
  # The maximum number of items to return. Must be between 1 and 1000, both inclusive.
36
+ # @option options [string] :cursor
37
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
38
38
  # @see https://api.slack.com/methods/admin.auth.policy.getEntities
39
39
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.getEntities.json
40
40
  def admin_auth_policy_getEntities(options = {})
@@ -51,18 +51,18 @@ module Slack
51
51
  #
52
52
  # Remove specified entities from a specified authentication policy.
53
53
  #
54
- # @option options [array] :entity_ids
55
- # Encoded IDs of the entities you'd like to remove from the policy.
56
- # @option options [Object] :entity_type
57
- # The type of entity to assign to the policy. Currently, USER is supported.
58
54
  # @option options [string] :policy_name
59
55
  # The name of the policy to remove entities from. Currently, email_password is the only policy that may be used with this method.
56
+ # @option options [Object] :entity_type
57
+ # The type of entity to assign to the policy. Currently, USER is supported.
58
+ # @option options [array] :entity_ids
59
+ # Encoded IDs of the entities you'd like to remove from the policy.
60
60
  # @see https://api.slack.com/methods/admin.auth.policy.removeEntities
61
61
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.auth.policy/admin.auth.policy.removeEntities.json
62
62
  def admin_auth_policy_removeEntities(options = {})
63
- raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
64
- raise ArgumentError, 'Required arguments :entity_type missing' if options[:entity_type].nil?
65
63
  raise ArgumentError, 'Required arguments :policy_name missing' if options[:policy_name].nil?
64
+ raise ArgumentError, 'Required arguments :entity_type missing' if options[:entity_type].nil?
65
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
66
66
  post('admin.auth.policy.removeEntities', options)
67
67
  end
68
68
  end
@@ -9,17 +9,17 @@ module Slack
9
9
  #
10
10
  # Create an Information Barrier
11
11
  #
12
- # @option options [array] :barriered_from_usergroup_ids
13
- # A list of IDP Groups ids that the primary usergroup is to be barriered from.
14
12
  # @option options [Object] :primary_usergroup_id
15
13
  # The id of the primary IDP Group.
14
+ # @option options [array] :barriered_from_usergroup_ids
15
+ # A list of IDP Groups ids that the primary usergroup is to be barriered from.
16
16
  # @option options [array] :restricted_subjects
17
17
  # What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.
18
18
  # @see https://api.slack.com/methods/admin.barriers.create
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.create.json
20
20
  def admin_barriers_create(options = {})
21
- raise ArgumentError, 'Required arguments :barriered_from_usergroup_ids missing' if options[:barriered_from_usergroup_ids].nil?
22
21
  raise ArgumentError, 'Required arguments :primary_usergroup_id missing' if options[:primary_usergroup_id].nil?
22
+ raise ArgumentError, 'Required arguments :barriered_from_usergroup_ids missing' if options[:barriered_from_usergroup_ids].nil?
23
23
  raise ArgumentError, 'Required arguments :restricted_subjects missing' if options[:restricted_subjects].nil?
24
24
  post('admin.barriers.create', options)
25
25
  end
@@ -39,10 +39,10 @@ module Slack
39
39
  #
40
40
  # Get all Information Barriers for your organization
41
41
  #
42
- # @option options [string] :cursor
43
- # Set cursor to next_cursor returned by the previous call to list items in the next page.
44
42
  # @option options [integer] :limit
45
43
  # The maximum number of items to return. Must be between 1 - 1000 both inclusive.
44
+ # @option options [string] :cursor
45
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
46
46
  # @see https://api.slack.com/methods/admin.barriers.list
47
47
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.list.json
48
48
  def admin_barriers_list(options = {})
@@ -60,18 +60,18 @@ module Slack
60
60
  #
61
61
  # @option options [Object] :barrier_id
62
62
  # The ID of the barrier you're trying to modify.
63
- # @option options [array] :barriered_from_usergroup_ids
64
- # A list of IDP Groups ids that the primary usergroup is to be barriered from.
65
63
  # @option options [Object] :primary_usergroup_id
66
64
  # The id of the primary IDP Group.
65
+ # @option options [array] :barriered_from_usergroup_ids
66
+ # A list of IDP Groups ids that the primary usergroup is to be barriered from.
67
67
  # @option options [array] :restricted_subjects
68
68
  # What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.
69
69
  # @see https://api.slack.com/methods/admin.barriers.update
70
70
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.barriers/admin.barriers.update.json
71
71
  def admin_barriers_update(options = {})
72
72
  raise ArgumentError, 'Required arguments :barrier_id missing' if options[:barrier_id].nil?
73
- raise ArgumentError, 'Required arguments :barriered_from_usergroup_ids missing' if options[:barriered_from_usergroup_ids].nil?
74
73
  raise ArgumentError, 'Required arguments :primary_usergroup_id missing' if options[:primary_usergroup_id].nil?
74
+ raise ArgumentError, 'Required arguments :barriered_from_usergroup_ids missing' if options[:barriered_from_usergroup_ids].nil?
75
75
  raise ArgumentError, 'Required arguments :restricted_subjects missing' if options[:restricted_subjects].nil?
76
76
  post('admin.barriers.update', options)
77
77
  end