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,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 = {})
@@ -9,22 +9,22 @@ module Slack
9
9
  #
10
10
  # Create a User Group.
11
11
  #
12
- # @option options [string] :name
13
- # A name for the User Group. Must be unique among User Groups.
14
- # @option options [array] :additional_channels
15
- # A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
16
12
  # @option options [array] :channels
17
13
  # A comma separated string of encoded channel IDs for which the User Group uses as a default.
14
+ # @option options [array] :additional_channels
15
+ # A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
18
16
  # @option options [string] :description
19
17
  # A short description of the User Group.
20
- # @option options [boolean] :enable_section
21
- # Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
22
18
  # @option options [string] :handle
23
19
  # A mention handle. Must be unique among channels, users and User Groups.
24
20
  # @option options [boolean] :include_count
25
21
  # Include the number of users in each User Group.
22
+ # @option options [string] :name
23
+ # A name for the User Group. Must be unique among User Groups.
26
24
  # @option options [string] :team_id
27
25
  # Encoded team id where the user group has to be created, required if org token is used.
26
+ # @option options [boolean] :enable_section
27
+ # Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
28
28
  # @see https://api.slack.com/methods/usergroups.create
29
29
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.create.json
30
30
  def usergroups_create(options = {})
@@ -35,12 +35,12 @@ module Slack
35
35
  #
36
36
  # Disable an existing User Group.
37
37
  #
38
- # @option options [Object] :usergroup
39
- # The encoded ID of the User Group to disable.
40
38
  # @option options [boolean] :include_count
41
39
  # Include the number of users in the User Group.
42
40
  # @option options [Object] :team_id
43
41
  # Encoded target team id where the user group is, required if org token is used.
42
+ # @option options [Object] :usergroup
43
+ # The encoded ID of the User Group to disable.
44
44
  # @see https://api.slack.com/methods/usergroups.disable
45
45
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.disable.json
46
46
  def usergroups_disable(options = {})
@@ -51,12 +51,12 @@ module Slack
51
51
  #
52
52
  # Enable a User Group.
53
53
  #
54
- # @option options [string] :usergroup
55
- # The encoded ID of the User Group to enable.
56
54
  # @option options [boolean] :include_count
57
55
  # Include the number of users in the User Group.
58
56
  # @option options [string] :team_id
59
57
  # Encoded team id where the user group is, required if org token is used.
58
+ # @option options [string] :usergroup
59
+ # The encoded ID of the User Group to enable.
60
60
  # @see https://api.slack.com/methods/usergroups.enable
61
61
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.enable.json
62
62
  def usergroups_enable(options = {})
@@ -70,11 +70,11 @@ module Slack
70
70
  # @option options [boolean] :include_count
71
71
  # Include the number of users in each User Group.
72
72
  # @option options [boolean] :include_disabled
73
- # Include disabled User Groups.
73
+ # Include results for disabled User Groups.
74
74
  # @option options [boolean] :include_users
75
75
  # Include the list of users for each User Group.
76
76
  # @option options [string] :team_id
77
- # encoded team id to list user groups in, required if org token is used.
77
+ # The user group's encoded team ID. Required if org token is used.
78
78
  # @see https://api.slack.com/methods/usergroups.list
79
79
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json
80
80
  def usergroups_list(options = {})
@@ -84,16 +84,12 @@ module Slack
84
84
  #
85
85
  # Update an existing User Group.
86
86
  #
87
- # @option options [Object] :usergroup
88
- # The encoded ID of the User Group to update.
89
- # @option options [array] :additional_channels
90
- # A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
91
87
  # @option options [array] :channels
92
88
  # A comma separated string of encoded channel IDs for which the User Group uses as a default.
89
+ # @option options [array] :additional_channels
90
+ # A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
93
91
  # @option options [string] :description
94
92
  # A short description of the User Group.
95
- # @option options [boolean] :enable_section
96
- # Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
97
93
  # @option options [string] :handle
98
94
  # A mention handle. Must be unique among channels, users and User Groups.
99
95
  # @option options [boolean] :include_count
@@ -102,6 +98,10 @@ module Slack
102
98
  # A name for the User Group. Must be unique among User Groups.
103
99
  # @option options [Object] :team_id
104
100
  # encoded team id where the user group exists, required if org token is used.
101
+ # @option options [Object] :usergroup
102
+ # The encoded ID of the User Group to update.
103
+ # @option options [boolean] :enable_section
104
+ # Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
105
105
  # @see https://api.slack.com/methods/usergroups.update
106
106
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.update.json
107
107
  def usergroups_update(options = {})
@@ -9,12 +9,12 @@ module Slack
9
9
  #
10
10
  # List all users in a User Group.
11
11
  #
12
- # @option options [string] :usergroup
13
- # The encoded ID of the User Group to list users for.
14
12
  # @option options [boolean] :include_disabled
15
- # Allow results that involve disabled User Groups.
13
+ # Include results for disabled User Groups.
14
+ # @option options [string] :usergroup
15
+ # The encoded ID of the User Group.
16
16
  # @option options [string] :team_id
17
- # encoded team id where the user group exists, required if org token is used.
17
+ # The user group's encoded team ID. Required if org token is used.
18
18
  # @see https://api.slack.com/methods/usergroups.users.list
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.list.json
20
20
  def usergroups_users_list(options = {})
@@ -25,18 +25,18 @@ module Slack
25
25
  #
26
26
  # Update the list of users for a user group.
27
27
  #
28
+ # @option options [boolean] :include_count
29
+ # Include the number of users in the user group.
30
+ # @option options [string] :team_id
31
+ # encoded team id where the user group exists, required if org token is used.
28
32
  # @option options [string] :usergroup
29
33
  # The encoded ID of the user group to update.
30
34
  # @option options [array] :users
31
35
  # A comma separated string of encoded user IDs that represent the entire list of users for the user group.
32
36
  # @option options [array] :additional_channels
33
37
  # A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
34
- # @option options [boolean] :include_count
35
- # Include the number of users in the user group.
36
38
  # @option options [boolean] :is_shared
37
39
  # Boolean to identify if the API is getting called when a shared section is getting shared.
38
- # @option options [string] :team_id
39
- # encoded team id where the user group exists, required if org token is used.
40
40
  # @see https://api.slack.com/methods/usergroups.users.update
41
41
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.update.json
42
42
  def usergroups_users_update(options = {})