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
@@ -13,14 +13,14 @@ module Slack
13
13
  # Creator defined GUID for the file.
14
14
  # @option options [string] :external_url
15
15
  # URL of the remote file.
16
- # @option options [string] :title
17
- # Title of the file being shared.
18
16
  # @option options [string] :filetype
19
17
  # type of file.
20
18
  # @option options [Object] :indexable_file_contents
21
19
  # A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
22
20
  # @option options [Object] :preview_image
23
21
  # Preview of the document via multipart/form-data.
22
+ # @option options [string] :title
23
+ # Title of the file being shared.
24
24
  # @see https://api.slack.com/methods/files.remote.add
25
25
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json
26
26
  def files_remote_add(options = {})
@@ -9,15 +9,15 @@ module Slack
9
9
  #
10
10
  # Signal that a function failed to complete
11
11
  #
12
- # @option options [string] :error
13
- # A human-readable error message that contains information about why the function failed to complete.
14
12
  # @option options [string] :function_execution_id
15
13
  # Context identifier that maps to the executed function.
14
+ # @option options [string] :error
15
+ # A human-readable error message that contains information about why the function failed to complete.
16
16
  # @see https://api.slack.com/methods/functions.completeError
17
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions/functions.completeError.json
18
18
  def functions_completeError(options = {})
19
- raise ArgumentError, 'Required arguments :error missing' if options[:error].nil?
20
19
  raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil?
20
+ raise ArgumentError, 'Required arguments :error missing' if options[:error].nil?
21
21
  post('functions.completeError', options)
22
22
  end
23
23
 
@@ -9,12 +9,12 @@ module Slack
9
9
  #
10
10
  # Grant users access to a custom slack function if its permission_type is set to named_entities
11
11
  #
12
- # @option options [string] :function_app_id
13
- # The encoded ID of the app.
14
- # @option options [string] :function_callback_id
15
- # The callback ID defined in the function's definition file.
16
12
  # @option options [string] :function_id
17
13
  # The encoded ID of the function.
14
+ # @option options [string] :function_callback_id
15
+ # The callback ID defined in the function's definition file.
16
+ # @option options [string] :function_app_id
17
+ # The encoded ID of the app.
18
18
  # @option options [array] :user_ids
19
19
  # List of encoded user IDs.
20
20
  # @see https://api.slack.com/methods/functions.distributions.permissions.add
@@ -24,14 +24,14 @@ module Slack
24
24
  end
25
25
 
26
26
  #
27
- # List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities
27
+ # List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities
28
28
  #
29
- # @option options [string] :function_app_id
30
- # The encoded ID of the app.
31
- # @option options [string] :function_callback_id
32
- # The callback ID defined in the function's definition file.
33
29
  # @option options [string] :function_id
34
30
  # The encoded ID of the function.
31
+ # @option options [string] :function_callback_id
32
+ # The callback ID defined in the function's definition file.
33
+ # @option options [string] :function_app_id
34
+ # The encoded ID of the app.
35
35
  # @see https://api.slack.com/methods/functions.distributions.permissions.list
36
36
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.list.json
37
37
  def functions_distributions_permissions_list(options = {})
@@ -41,12 +41,12 @@ module Slack
41
41
  #
42
42
  # Revoke user access to a custom slack function if permission_type set to named_entities
43
43
  #
44
- # @option options [string] :function_app_id
45
- # The encoded ID of the app.
46
- # @option options [string] :function_callback_id
47
- # The callback ID defined in the function's definition file.
48
44
  # @option options [string] :function_id
49
45
  # The encoded ID of the function.
46
+ # @option options [string] :function_callback_id
47
+ # The callback ID defined in the function's definition file.
48
+ # @option options [string] :function_app_id
49
+ # The encoded ID of the app.
50
50
  # @option options [array] :user_ids
51
51
  # List of encoded user IDs.
52
52
  # @see https://api.slack.com/methods/functions.distributions.permissions.remove
@@ -56,22 +56,22 @@ module Slack
56
56
  end
57
57
 
58
58
  #
59
- # Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities
59
+ # Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities
60
60
  #
61
- # @option options [enum] :permission_type
62
- # The type of permission that defines how the function can be distributed.
63
- # @option options [string] :function_app_id
64
- # The encoded ID of the app.
65
- # @option options [string] :function_callback_id
66
- # The callback ID defined in the function's definition file.
67
61
  # @option options [string] :function_id
68
62
  # The encoded ID of the function.
69
- # @option options [array] :org_ids
70
- # List of org IDs to allow for named_entities permission.
71
- # @option options [array] :team_ids
72
- # List of team IDs to allow for named_entities permission.
63
+ # @option options [string] :function_callback_id
64
+ # The callback ID defined in the function's definition file.
65
+ # @option options [string] :function_app_id
66
+ # The encoded ID of the app.
67
+ # @option options [enum] :permission_type
68
+ # The type of permission that defines how the function can be distributed.
73
69
  # @option options [array] :user_ids
74
70
  # List of encoded user IDs.
71
+ # @option options [array] :team_ids
72
+ # List of team IDs to allow for named_entities permission.
73
+ # @option options [array] :org_ids
74
+ # List of org IDs to allow for named_entities permission.
75
75
  # @see https://api.slack.com/methods/functions.distributions.permissions.set
76
76
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.set.json
77
77
  def functions_distributions_permissions_set(options = {})
@@ -9,14 +9,14 @@ module Slack
9
9
  #
10
10
  # List the steps of a specific function of a workflow's versions
11
11
  #
12
- # @option options [string] :function_id
13
- # The ID of the function to query.
12
+ # @option options [string] :workflow_id
13
+ # The workflow ID, starts with Wf*.
14
14
  # @option options [string] :workflow
15
15
  # The workflow encoded ID or workflow reference.
16
16
  # @option options [string] :workflow_app_id
17
17
  # The app tied to the workflow reference.
18
- # @option options [string] :workflow_id
19
- # The workflow ID, starts with Wf*.
18
+ # @option options [string] :function_id
19
+ # The ID of the function to query.
20
20
  # @see https://api.slack.com/methods/functions.workflows.steps.list
21
21
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps/functions.workflows.steps.list.json
22
22
  def functions_workflows_steps_list(options = {})
@@ -9,14 +9,14 @@ module Slack
9
9
  #
10
10
  # Download form responses of a workflow
11
11
  #
12
- # @option options [string] :step_id
13
- # The ID of the OpenForm step to export.
12
+ # @option options [string] :workflow_id
13
+ # The workflow ID, starts with Wf*.
14
14
  # @option options [string] :workflow
15
15
  # The workflow encoded ID or workflow reference.
16
16
  # @option options [string] :workflow_app_id
17
17
  # The app tied to the workflow reference.
18
- # @option options [string] :workflow_id
19
- # The workflow ID, starts with Wf*.
18
+ # @option options [string] :step_id
19
+ # The ID of the OpenForm step to export.
20
20
  # @see https://api.slack.com/methods/functions.workflows.steps.responses.export
21
21
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps.responses/functions.workflows.steps.responses.export.json
22
22
  def functions_workflows_steps_responses_export(options = {})
@@ -7,7 +7,7 @@ module Slack
7
7
  module Endpoints
8
8
  module Migration
9
9
  #
10
- # For Enterprise Grid workspaces, map local user IDs to global user IDs
10
+ # For Enterprise organization workspaces, map local user IDs to global user IDs
11
11
  #
12
12
  # @option options [array] :users
13
13
  # A comma-separated list of user ids, up to 400 per request.
@@ -15,10 +15,10 @@ module Slack
15
15
  # Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
16
16
  # @option options [string] :code
17
17
  # The code param returned via the OAuth callback.
18
- # @option options [string] :grant_type
19
- # The grant_type param as described in the OAuth spec.
20
18
  # @option options [string] :redirect_uri
21
19
  # This must match the originally submitted URI (if one was sent).
20
+ # @option options [string] :grant_type
21
+ # The grant_type param as described in the OAuth spec.
22
22
  # @option options [string] :refresh_token
23
23
  # The refresh_token param as described in the OAuth spec.
24
24
  # @see https://api.slack.com/methods/oauth.v2.access
@@ -15,10 +15,10 @@ module Slack
15
15
  # Issued when you created your application.
16
16
  # @option options [string] :code
17
17
  # The code param returned via the OAuth callback.
18
- # @option options [enum] :grant_type
19
- # The grant_type param as described in the OAuth spec.
20
18
  # @option options [string] :redirect_uri
21
19
  # This must match the originally submitted URI (if one was sent).
20
+ # @option options [enum] :grant_type
21
+ # The grant_type param as described in the OAuth spec.
22
22
  # @option options [string] :refresh_token
23
23
  # The refresh_token param as described in the OAuth spec.
24
24
  # @see https://api.slack.com/methods/openid.connect.token
@@ -48,16 +48,16 @@ module Slack
48
48
  #
49
49
  # Lists reactions made by a user.
50
50
  #
51
- # @option options [string] :cursor
52
- # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details.
51
+ # @option options [user] :user
52
+ # Show reactions made by this user. Defaults to the authed user.
53
53
  # @option options [boolean] :full
54
54
  # If true always return the complete reaction list.
55
+ # @option options [string] :cursor
56
+ # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details.
55
57
  # @option options [integer] :limit
56
58
  # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
57
59
  # @option options [string] :team_id
58
60
  # encoded team id to list reactions in, required if org token is used.
59
- # @option options [user] :user
60
- # Show reactions made by this user. Defaults to the authed user.
61
61
  # @see https://api.slack.com/methods/reactions.list
62
62
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.list.json
63
63
  def reactions_list(options = {})
@@ -76,12 +76,12 @@ module Slack
76
76
  #
77
77
  # @option options [string] :name
78
78
  # Reaction (emoji) name.
79
- # @option options [channel] :channel
80
- # Channel where the message to remove reaction from was posted.
81
79
  # @option options [file] :file
82
80
  # File to remove reaction from.
83
81
  # @option options [string] :file_comment
84
82
  # File comment to remove reaction from.
83
+ # @option options [channel] :channel
84
+ # Channel where the message to remove reaction from was posted.
85
85
  # @option options [string] :timestamp
86
86
  # Timestamp of the message to remove reaction from.
87
87
  # @see https://api.slack.com/methods/reactions.remove
@@ -13,12 +13,12 @@ module Slack
13
13
  # The content of the reminder.
14
14
  # @option options [string] :time
15
15
  # Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").
16
- # @option options [object] :recurrence
17
- # Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.
18
- # @option options [string] :team_id
19
- # Encoded team id, required if org token is used.
20
16
  # @option options [user] :user
21
17
  # No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.
18
+ # @option options [string] :team_id
19
+ # Encoded team id, required if org token is used.
20
+ # @option options [object] :recurrence
21
+ # Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.
22
22
  # @see https://api.slack.com/methods/reminders.add
23
23
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.add.json
24
24
  def reminders_add(options = {})
@@ -18,6 +18,29 @@ module Slack
18
18
  def rtm_connect(options = {})
19
19
  post('rtm.connect', options)
20
20
  end
21
+
22
+ #
23
+ # Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.
24
+ #
25
+ # @option options [boolean] :simple_latest
26
+ # Return timestamp only for latest message object of each channel (improves performance).
27
+ # @option options [boolean] :no_unreads
28
+ # Skip unread counts for each channel (improves performance).
29
+ # @option options [boolean] :mpim_aware
30
+ # Returns MPIMs to the client in the API response.
31
+ # @option options [boolean] :presence_sub
32
+ # Only deliver presence events when requested by subscription. See presence subscriptions.
33
+ # @option options [boolean] :batch_presence_aware
34
+ # Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.
35
+ # @option options [boolean] :no_latest
36
+ # Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.
37
+ # @option options [boolean] :include_locale
38
+ # Set this to true to receive the locale for users and channels. Defaults to false.
39
+ # @see https://api.slack.com/methods/rtm.start
40
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/rtm/rtm.start.json
41
+ def rtm_start(options = {})
42
+ post('rtm.start', options)
43
+ end
21
44
  end
22
45
  end
23
46
  end
@@ -9,10 +9,10 @@ module Slack
9
9
  #
10
10
  # Searches for messages and files matching a query.
11
11
  #
12
- # @option options [string] :query
13
- # Search query. May contains booleans, etc.
14
12
  # @option options [boolean] :highlight
15
13
  # Pass a value of true to enable query highlight markers (see below).
14
+ # @option options [string] :query
15
+ # Search query. May contains booleans, etc.
16
16
  # @option options [string] :sort
17
17
  # Return matches sorted by either score or timestamp.
18
18
  # @option options [enum] :sort_dir
@@ -29,10 +29,10 @@ module Slack
29
29
  #
30
30
  # Searches for files matching a query.
31
31
  #
32
- # @option options [string] :query
33
- # Search query.
34
32
  # @option options [boolean] :highlight
35
33
  # Pass a value of true to enable query highlight markers (see below).
34
+ # @option options [string] :query
35
+ # Search query.
36
36
  # @option options [string] :sort
37
37
  # Return matches sorted by either score or timestamp.
38
38
  # @option options [enum] :sort_dir
@@ -49,12 +49,12 @@ module Slack
49
49
  #
50
50
  # Searches for messages matching a query.
51
51
  #
52
- # @option options [string] :query
53
- # Search query.
54
- # @option options [string] :cursor
55
- # Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results.
56
52
  # @option options [boolean] :highlight
57
53
  # Pass a value of true to enable query highlight markers (see below).
54
+ # @option options [string] :cursor
55
+ # Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results.
56
+ # @option options [string] :query
57
+ # Search query.
58
58
  # @option options [string] :sort
59
59
  # Return matches sorted by either score or timestamp.
60
60
  # @option options [enum] :sort_dir
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module SlackLists
9
+ #
10
+ # Create a List.
11
+ #
12
+ # @option options [string] :name
13
+ # Name of the List.
14
+ # @option options [array] :description_blocks
15
+ # A rich text description of the List.
16
+ # @option options [array] :schema
17
+ # Column definition for the List.
18
+ # @option options [string] :copy_from_list_id
19
+ # ID of the List to copy.
20
+ # @option options [boolean] :include_copied_list_records
21
+ # Boolean indicating whether to include records when a List is copied.
22
+ # @option options [boolean] :todo_mode
23
+ # Boolean indicating whether the List should be used to track todo tasks.
24
+ # @see https://api.slack.com/methods/slackLists.create
25
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists/slackLists.create.json
26
+ def slackLists_create(options = {})
27
+ raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
28
+ post('slackLists.create', options)
29
+ end
30
+
31
+ #
32
+ # Update a List.
33
+ #
34
+ # @option options [Object] :id
35
+ # The ID of the List to update.
36
+ # @option options [string] :name
37
+ # The updated name of the List.
38
+ # @option options [array] :description_blocks
39
+ # A rich text description of the List.
40
+ # @option options [boolean] :todo_mode
41
+ # Boolean indicating whether the List should be in todo mode.
42
+ # @see https://api.slack.com/methods/slackLists.update
43
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists/slackLists.update.json
44
+ def slackLists_update(options = {})
45
+ raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
46
+ post('slackLists.update', options)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module SlackListsAccess
9
+ #
10
+ # Revoke access to a List for specified entities.
11
+ #
12
+ # @option options [Object] :list_id
13
+ # Encoded ID of the List.
14
+ # @option options [array] :channel_ids
15
+ # List of channels you wish to update access for. Can only be used if user_ids is not provided.
16
+ # @option options [array] :user_ids
17
+ # List of users you wish to update access for. Can only be used if channel_ids is not provided.
18
+ # @see https://api.slack.com/methods/slackLists.access.delete
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.access/slackLists.access.delete.json
20
+ def slackLists_access_delete(options = {})
21
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
22
+ post('slackLists.access.delete', options)
23
+ end
24
+
25
+ #
26
+ # Set the access level to a List for specified entities.
27
+ #
28
+ # @option options [Object] :list_id
29
+ # Encoded ID of the List.
30
+ # @option options [Object] :access_level
31
+ # Desired level of access.
32
+ # @option options [array] :channel_ids
33
+ # List of channels you wish to update access for. Can only be used if user_ids is not provided.
34
+ # @option options [array] :user_ids
35
+ # List of users you wish to update access for. Can only be used if channel_ids is not provided.
36
+ # @see https://api.slack.com/methods/slackLists.access.set
37
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.access/slackLists.access.set.json
38
+ def slackLists_access_set(options = {})
39
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
40
+ raise ArgumentError, 'Required arguments :access_level missing' if options[:access_level].nil?
41
+ post('slackLists.access.set', options)
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module SlackListsDownload
9
+ #
10
+ # Retrieve List download URL from an export job to download List contents.
11
+ #
12
+ # @option options [string] :list_id
13
+ # ID of the List to export.
14
+ # @option options [string] :job_id
15
+ # The ID of the recently started job to export the List.
16
+ # @see https://api.slack.com/methods/slackLists.download.get
17
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.download/slackLists.download.get.json
18
+ def slackLists_download_get(options = {})
19
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
20
+ raise ArgumentError, 'Required arguments :job_id missing' if options[:job_id].nil?
21
+ post('slackLists.download.get', options)
22
+ end
23
+
24
+ #
25
+ # Initiate a job to export List contents.
26
+ #
27
+ # @option options [string] :list_id
28
+ # ID of the List to export.
29
+ # @option options [boolean] :include_archived
30
+ # @see https://api.slack.com/methods/slackLists.download.start
31
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.download/slackLists.download.start.json
32
+ def slackLists_download_start(options = {})
33
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
34
+ post('slackLists.download.start', options)
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module SlackListsItems
9
+ #
10
+ # Add a new item to an existing List.
11
+ #
12
+ # @option options [Object] :list_id
13
+ # ID of the List to add the item to.
14
+ # @option options [Object] :duplicated_item_id
15
+ # ID of the record to make a copy of.
16
+ # @option options [Object] :parent_item_id
17
+ # ID of the parent record for this subtask.
18
+ # @option options [array] :initial_fields
19
+ # Initial item data.
20
+ # @see https://api.slack.com/methods/slackLists.items.create
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.create.json
22
+ def slackLists_items_create(options = {})
23
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
24
+ post('slackLists.items.create', options)
25
+ end
26
+
27
+ #
28
+ # Deletes an item from an existing List.
29
+ #
30
+ # @option options [string] :list_id
31
+ # ID of the List containing the item.
32
+ # @option options [string] :id
33
+ # ID of item to delete.
34
+ # @see https://api.slack.com/methods/slackLists.items.delete
35
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.delete.json
36
+ def slackLists_items_delete(options = {})
37
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
38
+ raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
39
+ post('slackLists.items.delete', options)
40
+ end
41
+
42
+ #
43
+ # Deletes multiple items from an existing List.
44
+ #
45
+ # @option options [string] :list_id
46
+ # ID of the List containing the items.
47
+ # @option options [array] :ids
48
+ # IDs of items to delete.
49
+ # @see https://api.slack.com/methods/slackLists.items.deleteMultiple
50
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.deleteMultiple.json
51
+ def slackLists_items_deleteMultiple(options = {})
52
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
53
+ raise ArgumentError, 'Required arguments :ids missing' if options[:ids].nil?
54
+ post('slackLists.items.deleteMultiple', options)
55
+ end
56
+
57
+ #
58
+ # Get a row from a List.
59
+ #
60
+ # @option options [string] :list_id
61
+ # ID of the List.
62
+ # @option options [string] :id
63
+ # ID of the row to get.
64
+ # @option options [boolean] :include_is_subscribed
65
+ # Set to true to include is_subscribed data for the returned List row.
66
+ # @see https://api.slack.com/methods/slackLists.items.info
67
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.info.json
68
+ def slackLists_items_info(options = {})
69
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
70
+ raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
71
+ post('slackLists.items.info', options)
72
+ end
73
+
74
+ #
75
+ # Get records from a List.
76
+ #
77
+ # @option options [string] :list_id
78
+ # ID of the List.
79
+ # @option options [integer] :limit
80
+ # The maximum number of records to return.
81
+ # @option options [string] :cursor
82
+ # Next cursor for pagination.
83
+ # @option options [boolean] :archived
84
+ # Boolean indicating whether archived items or normal items should be returned.
85
+ # @see https://api.slack.com/methods/slackLists.items.list
86
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.list.json
87
+ def slackLists_items_list(options = {})
88
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
89
+ if block_given?
90
+ Pagination::Cursor.new(self, :slackLists_items_list, options).each do |page|
91
+ yield page
92
+ end
93
+ else
94
+ post('slackLists.items.list', options)
95
+ end
96
+ end
97
+
98
+ #
99
+ # Updates cells in a List.
100
+ #
101
+ # @option options [string] :list_id
102
+ # ID of the List to add or update cells.
103
+ # @option options [array] :cells
104
+ # Cells to update.
105
+ # @see https://api.slack.com/methods/slackLists.items.update
106
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.update.json
107
+ def slackLists_items_update(options = {})
108
+ raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
109
+ raise ArgumentError, 'Required arguments :cells missing' if options[:cells].nil?
110
+ post('slackLists.items.update', options)
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
@@ -9,7 +9,7 @@ module Slack
9
9
  #
10
10
  # Gets the access logs for the current team.
11
11
  #
12
- # @option options [string] :before
12
+ # @option options [["string", "string"]] :before
13
13
  # End of time range of logs to include in results (inclusive).
14
14
  # @option options [string] :cursor
15
15
  # Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details.
@@ -36,10 +36,10 @@ module Slack
36
36
  # Set cursor to next_cursor returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.
37
37
  # @option options [integer] :limit
38
38
  # The maximum number of items to return.
39
- # @option options [string] :team_id
40
- # encoded team id to get the billable information from, required if org token is used.
41
39
  # @option options [user] :user
42
40
  # A user to retrieve the billable information for. Defaults to all users.
41
+ # @option options [string] :team_id
42
+ # encoded team id to get the billable information from, required if org token is used.
43
43
  # @see https://api.slack.com/methods/team.billableInfo
44
44
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.billableInfo.json
45
45
  def team_billableInfo(options = {})
@@ -21,20 +21,20 @@ module Slack
21
21
  #
22
22
  # Returns a list of all the external teams connected and details about the connection.
23
23
  #
24
- # @option options [enum] :connection_status_filter
25
- # Status of the connected team.
26
- # @option options [string] :cursor
27
- # Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail.
28
24
  # @option options [integer] :limit
29
25
  # The maximum number of items to return per page.
30
- # @option options [array] :slack_connect_pref_filter
31
- # Filters connected orgs by Slack Connect pref override(s). Value can be: approved_orgs_only allow_sc_file_uploads profile_visibility away_team_sc_invite_permissions accept_sc_invites sc_mpdm_to_private require_sc_channel_for_sc_dm external_awareness_context_bar.
32
- # @option options [enum] :sort_direction
33
- # Direction to sort in asc or desc.
26
+ # @option options [string] :cursor
27
+ # Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail.
34
28
  # @option options [enum] :sort_field
35
29
  # Name of the parameter that we are sorting by.
30
+ # @option options [enum] :sort_direction
31
+ # Direction to sort in asc or desc.
32
+ # @option options [array] :slack_connect_pref_filter
33
+ # Filters connected orgs by Slack Connect pref override(s). Value can be: approved_orgs_only allow_sc_file_uploads profile_visibility away_team_sc_invite_permissions accept_sc_invites sc_mpdm_to_private require_sc_channel_for_sc_dm external_awareness_context_bar.
36
34
  # @option options [array] :workspace_filter
37
35
  # Shows connected orgs which are connected on a specified encoded workspace ID.
36
+ # @option options [enum] :connection_status_filter
37
+ # Status of the connected team.
38
38
  # @see https://api.slack.com/methods/team.externalTeams.list
39
39
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.externalTeams/team.externalTeams.list.json
40
40
  def team_externalTeams_list(options = {})