slack-ruby-client 3.1.0 → 3.2.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 (294) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +0 -0
  3. data/.github/FUNDING.yml +0 -0
  4. data/.github/dependabot.yml +0 -0
  5. data/.github/workflows/danger-comment.yml +11 -0
  6. data/.github/workflows/danger.yml +13 -0
  7. data/.github/workflows/lint.yml +1 -1
  8. data/.github/workflows/test.yml +1 -1
  9. data/.github/workflows/update_api.yml +8 -10
  10. data/.gitignore +0 -0
  11. data/.gitmodules +0 -0
  12. data/.rspec +0 -0
  13. data/.rubocop.yml +0 -0
  14. data/.rubocop_todo.yml +5 -2
  15. data/.ruby-version +0 -0
  16. data/CHANGELOG.md +10 -1
  17. data/CONTRIBUTING.md +0 -0
  18. data/Dangerfile +4 -1
  19. data/Gemfile +3 -0
  20. data/LICENSE.md +0 -0
  21. data/README.md +1 -1
  22. data/RELEASING.md +0 -0
  23. data/Rakefile +0 -0
  24. data/SECURITY.md +0 -0
  25. data/UPGRADING.md +4 -0
  26. data/bin/commands/admin_analytics.rb +0 -0
  27. data/bin/commands/admin_analytics_messages.rb +36 -0
  28. data/bin/commands/admin_apps.rb +3 -0
  29. data/bin/commands/admin_apps_activities.rb +0 -0
  30. data/bin/commands/admin_apps_approved.rb +0 -0
  31. data/bin/commands/admin_apps_config.rb +0 -0
  32. data/bin/commands/admin_apps_requests.rb +0 -0
  33. data/bin/commands/admin_apps_restricted.rb +0 -0
  34. data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
  35. data/bin/commands/admin_auth_policy.rb +0 -0
  36. data/bin/commands/admin_barriers.rb +0 -0
  37. data/bin/commands/admin_conversations.rb +10 -0
  38. data/bin/commands/admin_conversations_ekm.rb +0 -0
  39. data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
  40. data/bin/commands/admin_emoji.rb +0 -0
  41. data/bin/commands/admin_functions.rb +0 -0
  42. data/bin/commands/admin_functions_permissions.rb +1 -0
  43. data/bin/commands/admin_inviteRequests.rb +0 -0
  44. data/bin/commands/admin_inviteRequests_approved.rb +0 -0
  45. data/bin/commands/admin_inviteRequests_denied.rb +0 -0
  46. data/bin/commands/admin_roles.rb +0 -0
  47. data/bin/commands/admin_teams.rb +0 -0
  48. data/bin/commands/admin_teams_admins.rb +0 -0
  49. data/bin/commands/admin_teams_owners.rb +0 -0
  50. data/bin/commands/admin_teams_settings.rb +0 -0
  51. data/bin/commands/admin_usergroups.rb +0 -0
  52. data/bin/commands/admin_users.rb +10 -8
  53. data/bin/commands/admin_users_session.rb +0 -0
  54. data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
  55. data/bin/commands/admin_workflows.rb +0 -0
  56. data/bin/commands/admin_workflows_collaborators.rb +0 -0
  57. data/bin/commands/admin_workflows_permissions.rb +0 -0
  58. data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
  59. data/bin/commands/api.rb +0 -0
  60. data/bin/commands/apps.rb +0 -0
  61. data/bin/commands/apps_activities.rb +0 -0
  62. data/bin/commands/apps_auth_external.rb +0 -0
  63. data/bin/commands/apps_connections.rb +0 -0
  64. data/bin/commands/apps_datastore.rb +0 -0
  65. data/bin/commands/apps_event_authorizations.rb +0 -0
  66. data/bin/commands/apps_icon.rb +22 -0
  67. data/bin/commands/apps_manifest.rb +7 -6
  68. data/bin/commands/apps_user_connection.rb +21 -0
  69. data/bin/commands/assistant_search.rb +3 -2
  70. data/bin/commands/assistant_threads.rb +5 -2
  71. data/bin/commands/auth.rb +0 -0
  72. data/bin/commands/auth_teams.rb +0 -0
  73. data/bin/commands/blocks.rb +22 -0
  74. data/bin/commands/bookmarks.rb +6 -6
  75. data/bin/commands/bots.rb +0 -0
  76. data/bin/commands/calls.rb +0 -0
  77. data/bin/commands/calls_participants.rb +0 -0
  78. data/bin/commands/canvases.rb +0 -0
  79. data/bin/commands/canvases_access.rb +0 -0
  80. data/bin/commands/canvases_sections.rb +0 -0
  81. data/bin/commands/chat.rb +13 -6
  82. data/bin/commands/chat_scheduledMessages.rb +0 -0
  83. data/bin/commands/conversations.rb +1 -1
  84. data/bin/commands/conversations_canvases.rb +0 -0
  85. data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
  86. data/bin/commands/conversations_requestSharedInvite.rb +0 -0
  87. data/bin/commands/dialog.rb +0 -0
  88. data/bin/commands/dnd.rb +0 -0
  89. data/bin/commands/emoji.rb +0 -0
  90. data/bin/commands/entity.rb +0 -0
  91. data/bin/commands/files.rb +2 -2
  92. data/bin/commands/files_comments.rb +0 -0
  93. data/bin/commands/files_remote.rb +0 -0
  94. data/bin/commands/functions.rb +0 -0
  95. data/bin/commands/functions_distributions_permissions.rb +0 -0
  96. data/bin/commands/functions_workflows_steps.rb +0 -0
  97. data/bin/commands/functions_workflows_steps_responses.rb +0 -0
  98. data/bin/commands/migration.rb +0 -0
  99. data/bin/commands/oauth.rb +0 -0
  100. data/bin/commands/oauth_v2.rb +1 -0
  101. data/bin/commands/oauth_v2_user.rb +27 -0
  102. data/bin/commands/openid_connect.rb +1 -0
  103. data/bin/commands/pins.rb +0 -0
  104. data/bin/commands/reactions.rb +0 -0
  105. data/bin/commands/reminders.rb +0 -0
  106. data/bin/commands/rtm.rb +0 -0
  107. data/bin/commands/search.rb +0 -0
  108. data/bin/commands/slackLists.rb +0 -0
  109. data/bin/commands/slackLists_access.rb +0 -0
  110. data/bin/commands/slackLists_download.rb +0 -0
  111. data/bin/commands/slackLists_items.rb +0 -0
  112. data/bin/commands/stars.rb +0 -0
  113. data/bin/commands/team.rb +0 -0
  114. data/bin/commands/team_billing.rb +0 -0
  115. data/bin/commands/team_externalTeams.rb +0 -0
  116. data/bin/commands/team_preferences.rb +0 -0
  117. data/bin/commands/team_profile.rb +0 -0
  118. data/bin/commands/tooling_tokens.rb +0 -0
  119. data/bin/commands/usergroups.rb +0 -0
  120. data/bin/commands/usergroups_users.rb +0 -0
  121. data/bin/commands/users.rb +2 -2
  122. data/bin/commands/users_admin.rb +0 -0
  123. data/bin/commands/users_discoverableContacts.rb +0 -0
  124. data/bin/commands/users_prefs.rb +0 -0
  125. data/bin/commands/users_profile.rb +0 -0
  126. data/bin/commands/views.rb +1 -0
  127. data/bin/commands/workflows_featured.rb +0 -0
  128. data/bin/commands/workflows_triggers_permissions.rb +0 -0
  129. data/examples/files_upload_v2/.env.example +0 -0
  130. data/examples/files_upload_v2/Gemfile +0 -0
  131. data/examples/files_upload_v2/README.md +0 -0
  132. data/examples/files_upload_v2/files_upload_v2.rb +0 -0
  133. data/examples/hi_web/Gemfile +0 -0
  134. data/examples/hi_web/hi.gif +0 -0
  135. data/examples/hi_web/hi.rb +0 -0
  136. data/examples/new_ticket/Gemfile +0 -0
  137. data/examples/new_ticket/new_ticket.rb +0 -0
  138. data/examples/oauth_v2/.env.example +0 -0
  139. data/examples/oauth_v2/Gemfile +0 -0
  140. data/examples/oauth_v2/README.md +0 -0
  141. data/lib/slack/config.rb +0 -0
  142. data/lib/slack/events/config.rb +0 -0
  143. data/lib/slack/events/request.rb +0 -0
  144. data/lib/slack/logger.rb +0 -0
  145. data/lib/slack/messages/formatting.rb +0 -0
  146. data/lib/slack/messages/message.rb +0 -0
  147. data/lib/slack/utils/security.rb +0 -0
  148. data/lib/slack/version.rb +1 -1
  149. data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
  150. data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
  151. data/lib/slack/web/api/endpoints/admin_apps.rb +6 -0
  152. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +0 -0
  153. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
  154. data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
  155. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
  156. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
  157. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
  158. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
  159. data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
  160. data/lib/slack/web/api/endpoints/admin_conversations.rb +15 -0
  161. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
  162. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
  163. data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -0
  164. data/lib/slack/web/api/endpoints/admin_functions.rb +0 -0
  165. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +2 -1
  166. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
  167. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
  168. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
  169. data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
  170. data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
  171. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
  172. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
  173. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
  174. data/lib/slack/web/api/endpoints/admin_usergroups.rb +0 -0
  175. data/lib/slack/web/api/endpoints/admin_users.rb +10 -6
  176. data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -0
  177. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
  178. data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
  179. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
  180. data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
  181. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
  182. data/lib/slack/web/api/endpoints/api.rb +0 -0
  183. data/lib/slack/web/api/endpoints/apps.rb +0 -0
  184. data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
  185. data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
  186. data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
  187. data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
  188. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
  189. data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
  190. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
  191. data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
  192. data/lib/slack/web/api/endpoints/assistant_search.rb +3 -1
  193. data/lib/slack/web/api/endpoints/assistant_threads.rb +8 -3
  194. data/lib/slack/web/api/endpoints/auth.rb +0 -0
  195. data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
  196. data/lib/slack/web/api/endpoints/blocks.rb +28 -0
  197. data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
  198. data/lib/slack/web/api/endpoints/bots.rb +0 -0
  199. data/lib/slack/web/api/endpoints/calls.rb +0 -0
  200. data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
  201. data/lib/slack/web/api/endpoints/canvases.rb +0 -0
  202. data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
  203. data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
  204. data/lib/slack/web/api/endpoints/chat.rb +31 -13
  205. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
  206. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  207. data/lib/slack/web/api/endpoints/conversations_canvases.rb +0 -0
  208. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
  209. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
  210. data/lib/slack/web/api/endpoints/dialog.rb +0 -0
  211. data/lib/slack/web/api/endpoints/dnd.rb +0 -0
  212. data/lib/slack/web/api/endpoints/emoji.rb +0 -0
  213. data/lib/slack/web/api/endpoints/entity.rb +0 -0
  214. data/lib/slack/web/api/endpoints/files.rb +1 -1
  215. data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
  216. data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
  217. data/lib/slack/web/api/endpoints/functions.rb +0 -0
  218. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
  219. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
  220. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
  221. data/lib/slack/web/api/endpoints/migration.rb +0 -0
  222. data/lib/slack/web/api/endpoints/oauth.rb +0 -0
  223. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -0
  224. data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
  225. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -0
  226. data/lib/slack/web/api/endpoints/pins.rb +0 -0
  227. data/lib/slack/web/api/endpoints/reactions.rb +0 -0
  228. data/lib/slack/web/api/endpoints/reminders.rb +0 -0
  229. data/lib/slack/web/api/endpoints/rtm.rb +0 -0
  230. data/lib/slack/web/api/endpoints/search.rb +0 -0
  231. data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
  232. data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
  233. data/lib/slack/web/api/endpoints/slackLists_download.rb +0 -0
  234. data/lib/slack/web/api/endpoints/slackLists_items.rb +0 -0
  235. data/lib/slack/web/api/endpoints/stars.rb +0 -0
  236. data/lib/slack/web/api/endpoints/team.rb +0 -0
  237. data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
  238. data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
  239. data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
  240. data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
  241. data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
  242. data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
  243. data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
  244. data/lib/slack/web/api/endpoints/users.rb +1 -1
  245. data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
  246. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
  247. data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
  248. data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
  249. data/lib/slack/web/api/endpoints/views.rb +1 -0
  250. data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
  251. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
  252. data/lib/slack/web/api/endpoints.rb +10 -0
  253. data/lib/slack/web/api/error.rb +0 -0
  254. data/lib/slack/web/api/errors/server_error.rb +0 -0
  255. data/lib/slack/web/api/errors/slack_error.rb +0 -0
  256. data/lib/slack/web/api/errors/too_many_requests_error.rb +0 -0
  257. data/lib/slack/web/api/errors.rb +112 -6
  258. data/lib/slack/web/api/helpers/files.rb +0 -0
  259. data/lib/slack/web/api/helpers.rb +0 -0
  260. data/lib/slack/web/api/mixins/conversations.id.rb +0 -0
  261. data/lib/slack/web/api/mixins/ids.id.rb +3 -1
  262. data/lib/slack/web/api/mixins/users.id.json +0 -0
  263. data/lib/slack/web/api/mixins/users.id.rb +0 -0
  264. data/lib/slack/web/api/mixins/users.search.json +0 -0
  265. data/lib/slack/web/api/mixins/users.search.rb +0 -0
  266. data/lib/slack/web/api/mixins.rb +0 -0
  267. data/lib/slack/web/api/options.rb +0 -0
  268. data/lib/slack/web/api/patches/.gitkeep +0 -0
  269. data/lib/slack/web/api/schema/group.json +0 -0
  270. data/lib/slack/web/api/schema/method.json +0 -0
  271. data/lib/slack/web/api/templates/command.erb +0 -0
  272. data/lib/slack/web/api/templates/endpoints.erb +0 -0
  273. data/lib/slack/web/api/templates/errors.erb +0 -0
  274. data/lib/slack/web/api/templates/method.erb +3 -1
  275. data/lib/slack/web/api/templates/method_spec.erb +32 -3
  276. data/lib/slack/web/client.rb +0 -0
  277. data/lib/slack/web/config.rb +0 -0
  278. data/lib/slack/web/faraday/connection.rb +0 -0
  279. data/lib/slack/web/faraday/options.rb +0 -0
  280. data/lib/slack/web/faraday/request.rb +0 -0
  281. data/lib/slack/web/faraday/response/raise_error.rb +0 -0
  282. data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
  283. data/lib/slack/web/pagination/cursor.rb +0 -0
  284. data/lib/slack-ruby-client.rb +0 -0
  285. data/lib/slack.rb +0 -0
  286. data/lib/slack_ruby_client.rb +0 -0
  287. data/lib/tasks/git.rake +0 -0
  288. data/lib/tasks/update.rake +0 -0
  289. data/lib/tasks/web.rake +5 -2
  290. data/slack-ruby-client.gemspec +0 -0
  291. data/slack.png +0 -0
  292. metadata +13 -3
  293. data/.github/workflows/pr_lint.yml +0 -21
  294. data/Gemfile.danger +0 -6
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Add bookmark to a channel.'
10
10
  g.long_desc %( Add bookmark to a channel. )
11
11
  g.command 'add' do |c|
12
- c.flag 'channel_id', desc: 'Channel to add bookmark in.'
12
+ c.flag 'channel_id', desc: 'Channel to add bookmark in. Required for public channels.'
13
13
  c.flag 'title', desc: 'Title for the bookmark.'
14
14
  c.flag 'link', desc: 'Link to bookmark.'
15
15
  c.flag 'type', desc: 'Type of the bookmark i.e link.'
@@ -25,8 +25,8 @@ module Slack
25
25
  g.desc 'Edit bookmark.'
26
26
  g.long_desc %( Edit bookmark. )
27
27
  g.command 'edit' do |c|
28
- c.flag 'channel_id', desc: 'Channel to update bookmark in.'
29
- c.flag 'bookmark_id', desc: 'Bookmark to update.'
28
+ c.flag 'channel_id', desc: 'Channel to update bookmark in. Required for public channels.'
29
+ c.flag 'bookmark_id', desc: 'Bookmark to update. Required for public channels.'
30
30
  c.flag 'title', desc: 'Title for the bookmark.'
31
31
  c.flag 'link', desc: 'Link to bookmark.'
32
32
  c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
@@ -38,7 +38,7 @@ module Slack
38
38
  g.desc 'List bookmark for the channel.'
39
39
  g.long_desc %( List bookmark for the channel. )
40
40
  g.command 'list' do |c|
41
- c.flag 'channel_id', desc: 'Channel to list bookmarks in.'
41
+ c.flag 'channel_id', desc: 'Channel to list bookmarks in. Required for public channels.'
42
42
  c.action do |_global_options, options, _args|
43
43
  puts JSON.dump(@client.bookmarks_list(options))
44
44
  end
@@ -47,8 +47,8 @@ module Slack
47
47
  g.desc 'Remove bookmark from the channel.'
48
48
  g.long_desc %( Remove bookmark from the channel. )
49
49
  g.command 'remove' do |c|
50
- c.flag 'channel_id', desc: 'Channel to remove bookmark.'
51
- c.flag 'bookmark_id', desc: 'Bookmark to remove.'
50
+ c.flag 'channel_id', desc: 'Channel to remove bookmark. Required for public channels.'
51
+ c.flag 'bookmark_id', desc: 'Bookmark to remove. Required for public channels.'
52
52
  c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
53
53
  c.action do |_global_options, options, _args|
54
54
  puts JSON.dump(@client.bookmarks_remove(options))
data/bin/commands/bots.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/bin/commands/chat.rb CHANGED
@@ -10,6 +10,7 @@ module Slack
10
10
  g.long_desc %( Appends text to an existing streaming conversation. )
11
11
  g.command 'appendStream' do |c|
12
12
  c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
13
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
13
14
  c.flag 'ts', desc: 'The timestamp of the streaming message.'
14
15
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.'
15
16
  c.action do |_global_options, options, _args|
@@ -103,7 +104,7 @@ module Slack
103
104
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
104
105
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
105
106
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
106
- c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
107
+ c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
107
108
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
108
109
  c.flag 'parse', desc: 'Change how messages are treated. See below.'
109
110
  c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
@@ -142,11 +143,16 @@ module Slack
142
143
  g.desc 'Starts a new streaming conversation.'
143
144
  g.long_desc %( Starts a new streaming conversation. )
144
145
  g.command 'startStream' do |c|
145
- c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
146
+ c.flag 'channel', desc: 'An encoded ID that represents a channel thread or DM.'
147
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
146
148
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
147
149
  c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
148
150
  c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
149
151
  c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.'
152
+ c.flag 'task_display_mode', desc: "Specifies how tasks are displayed in the message. A timeline displays individual tasks with text in sequential order, plan displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and dense collapses consecutive tool calls into a single summarized task card."
153
+ c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
154
+ c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.'
155
+ c.flag 'username', desc: "The bot's username to display."
150
156
  c.action do |_global_options, options, _args|
151
157
  puts JSON.dump(@client.chat_startStream(options))
152
158
  end
@@ -156,6 +162,7 @@ module Slack
156
162
  g.long_desc %( Stops a streaming conversation. )
157
163
  g.command 'stopStream' do |c|
158
164
  c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
165
+ c.flag 'chunks', desc: 'Array of streaming chunks.'
159
166
  c.flag 'ts', desc: 'The timestamp of the streaming message.'
160
167
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
161
168
  c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
@@ -168,16 +175,15 @@ module Slack
168
175
  g.desc 'Provide custom unfurl behavior for user-posted URLs'
169
176
  g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
170
177
  g.command 'unfurl' do |c|
171
- c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
172
- c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
173
- c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Either unfurls or metadata must be provided.'
178
+ c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together. Required for public channels.'
179
+ c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to. Required for public channels.'
180
+ c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels.'
174
181
  c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
175
182
  c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
176
183
  c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
177
184
  c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
178
185
  c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
179
186
  c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
180
- c.flag 'metadata', desc: 'JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.'
181
187
  c.action do |_global_options, options, _args|
182
188
  puts JSON.dump(@client.chat_unfurl(options))
183
189
  end
@@ -188,6 +194,7 @@ module Slack
188
194
  g.command 'update' do |c|
189
195
  c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
190
196
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
197
+ c.flag 'unfurled_attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
191
198
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
192
199
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
193
200
  c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
File without changes
@@ -24,7 +24,7 @@ module Slack
24
24
  g.long_desc %( Approves an invitation to a Slack Connect channel )
25
25
  g.command 'approveSharedInvite' do |c|
26
26
  c.flag 'invite_id', desc: 'ID of the shared channel invite to approve.'
27
- c.flag 'target_team', desc: 'The team or enterprise id of the other party involved in the invitation you are approving.'
27
+ c.flag 'target_team', desc: 'The team or enterprise ID of the receiving party involved in the invitation you are approving.'
28
28
  c.action do |_global_options, options, _args|
29
29
  puts JSON.dump(@client.conversations_approveSharedInvite(options))
30
30
  end
File without changes
File without changes
File without changes
data/bin/commands/dnd.rb CHANGED
File without changes
File without changes
File without changes
@@ -63,8 +63,8 @@ module Slack
63
63
  end
64
64
  end
65
65
 
66
- g.desc 'List for a team, in a channel, or from a user with applied filters.'
67
- g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
66
+ g.desc 'List files for a team, in a channel, or from a user with applied filters.'
67
+ g.long_desc %( List files for a team, in a channel, or from a user with applied filters. )
68
68
  g.command 'list' do |c|
69
69
  c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
70
70
  c.flag 'show_files_hidden_by_limit', desc: 'Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -16,6 +16,7 @@ module Slack
16
16
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
17
17
  c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
18
18
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
19
+ c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
19
20
  c.action do |_global_options, options, _args|
20
21
  puts JSON.dump(@client.oauth_v2_access(options))
21
22
  end
@@ -0,0 +1,27 @@
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 'OauthV2User methods.'
8
+ command 'oauth_v2_user' do |g|
9
+ g.desc 'Exchanges a temporary OAuth verifier code for a user access token.'
10
+ g.long_desc %( Exchanges a temporary OAuth verifier code for a user access token. )
11
+ g.command 'access' do |c|
12
+ c.flag 'client_id', desc: '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.'
13
+ c.flag 'client_secret', desc: '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.'
14
+ c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
+ c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
16
+ c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
17
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
18
+ c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
19
+ c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
20
+ c.action do |_global_options, options, _args|
21
+ puts JSON.dump(@client.oauth_v2_user_access(options))
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -15,6 +15,7 @@ module Slack
15
15
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
16
16
  c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
17
17
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
18
+ c.flag 'code_verifier', desc: 'PKCE code verifier (RFC 7636). Required when the authorization request included a code_challenge.'
18
19
  c.action do |_global_options, options, _args|
19
20
  puts JSON.dump(@client.openid_connect_token(options))
20
21
  end
data/bin/commands/pins.rb CHANGED
File without changes
File without changes
File without changes
data/bin/commands/rtm.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/bin/commands/team.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -6,8 +6,8 @@ module Slack
6
6
  class App
7
7
  desc 'Users methods.'
8
8
  command 'users' do |g|
9
- g.desc 'List conversations the calling user may access.'
10
- g.long_desc %( List conversations the calling user may access. )
9
+ g.desc 'List conversations the calling user is a member of.'
10
+ g.long_desc %( List conversations the calling user is a member of. )
11
11
  g.command 'conversations' do |c|
12
12
  c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
13
13
  c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
File without changes
File without changes
File without changes
File without changes
@@ -23,6 +23,7 @@ module Slack
23
23
  c.flag 'user_id', desc: 'id of the user you want publish a view to.'
24
24
  c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
25
25
  c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
26
+ c.flag 'interactivity_pointer', desc: ''
26
27
  c.action do |_global_options, options, _args|
27
28
  puts JSON.dump(@client.views_publish(options))
28
29
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/slack/config.rb CHANGED
File without changes
File without changes
File without changes
data/lib/slack/logger.rb CHANGED
File without changes
File without changes
File without changes
File without changes
data/lib/slack/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Slack
3
- VERSION = '3.1.0'
3
+ VERSION = '3.2.0'
4
4
  end
File without changes
@@ -0,0 +1,64 @@
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 AdminAnalyticsMessages
9
+ #
10
+ # Retrieves activity metrics for messages from a given channel.
11
+ #
12
+ # @option options [channel] :channel
13
+ # Channel ID for channel of the message activity to query.
14
+ # @option options [string] :oldest_ts
15
+ # Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.
16
+ # @option options [string] :latest_ts
17
+ # Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.
18
+ # @option options [string] :cursor
19
+ # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.
20
+ # @option options [integer] :limit
21
+ # Maximum number of entries to return. The maximum limit is 100.
22
+ # @see https://api.slack.com/methods/admin.analytics.messages.activity
23
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.activity.json
24
+ def admin_analytics_messages_activity(options = {})
25
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
26
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
27
+ if block_given?
28
+ Pagination::Cursor.new(self, :admin_analytics_messages_activity, options).each do |page|
29
+ yield page
30
+ end
31
+ else
32
+ post('admin.analytics.messages.activity', options)
33
+ end
34
+ end
35
+
36
+ #
37
+ # Retrieves metadata for a list of messages from a given channel.
38
+ #
39
+ # @option options [channel] :channel
40
+ # Channel ID for channel containing the messages to query.
41
+ # @option options [string] :oldest_ts
42
+ # Oldest timestamp to include in the results.
43
+ # @option options [string] :latest_ts
44
+ # Most recent timestamp to include in the results. If not passed, defaults to current time.
45
+ # @option options [string] :cursor
46
+ # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more details.
47
+ # @see https://api.slack.com/methods/admin.analytics.messages.metadata
48
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.metadata.json
49
+ def admin_analytics_messages_metadata(options = {})
50
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
51
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
52
+ if block_given?
53
+ Pagination::Cursor.new(self, :admin_analytics_messages_metadata, options).each do |page|
54
+ yield page
55
+ end
56
+ else
57
+ post('admin.analytics.messages.metadata', options)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -9,6 +9,8 @@ module Slack
9
9
  #
10
10
  # Approve an app for installation on a workspace.
11
11
  #
12
+ # @option options [boolean] :allow_child_auto_install
13
+ # Auto-create an Admin-Approved App automation rule that pre-approves future child app installs from this manager app.
12
14
  # @option options [string] :app_id
13
15
  # The id of the app to approve.
14
16
  # @option options [string] :request_id
@@ -17,6 +19,10 @@ module Slack
17
19
  # The ID of the workspace to approve the app on.
18
20
  # @option options [Object] :enterprise_id
19
21
  # The ID of the enterprise to approve the app on.
22
+ # @option options [string] :user_scopes
23
+ # User scopes to approve for the app.
24
+ # @option options [string] :bot_scopes
25
+ # Bot scopes to approve for the app.
20
26
  # @see https://api.slack.com/methods/admin.apps.approve
21
27
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.approve.json
22
28
  def admin_apps_approve(options = {})
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -57,6 +57,21 @@ module Slack
57
57
  post('admin.conversations.bulkMove', options)
58
58
  end
59
59
 
60
+ #
61
+ # Exclude channels from Slack AI in bulk
62
+ #
63
+ # @option options [array] :channel_ids
64
+ # An array of channel IDs to exclude from Slack AI.
65
+ # @option options [boolean] :exclude
66
+ # Whether the channels should be excluded from Slack AI.
67
+ # @see https://api.slack.com/methods/admin.conversations.bulkSetExcludeFromSlackAi
68
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkSetExcludeFromSlackAi.json
69
+ def admin_conversations_bulkSetExcludeFromSlackAi(options = {})
70
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
71
+ raise ArgumentError, 'Required arguments :exclude missing' if options[:exclude].nil?
72
+ post('admin.conversations.bulkSetExcludeFromSlackAi', options)
73
+ end
74
+
60
75
  #
61
76
  # Convert a public channel to a private channel.
62
77
  #
File without changes
File without changes
@@ -27,11 +27,12 @@ module Slack
27
27
  # The function visibility.
28
28
  # @option options [array] :user_ids
29
29
  # List of user IDs to allow for named_entities visibility.
30
+ # @option options [array] :permissions
31
+ # Array of permissions for the function.
30
32
  # @see https://api.slack.com/methods/admin.functions.permissions.set
31
33
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.set.json
32
34
  def admin_functions_permissions_set(options = {})
33
35
  raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
34
- raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
35
36
  post('admin.functions.permissions.set', options)
36
37
  end
37
38
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -85,6 +85,10 @@ module Slack
85
85
  # Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.
86
86
  # @option options [boolean] :only_guests
87
87
  # If true, returns only guests and their expiration dates that belong to the team_id.
88
+ # @option options [boolean] :include_admins
89
+ # If true, only admin users will be returned (excludes owners). Returns all admins and owners when combined with include_owners. Cannot be used together with only_guests.
90
+ # @option options [boolean] :include_owners
91
+ # If true, only owner users will be returned. Cannot be used together with only_guests.
88
92
  # @option options [integer] :limit
89
93
  # Limit for how many users to be retrieved per page.
90
94
  # @see https://api.slack.com/methods/admin.users.list
@@ -115,10 +119,10 @@ module Slack
115
119
  end
116
120
 
117
121
  #
118
- # Set an existing regular user or owner to be a workspace admin.
122
+ # Set an existing regular user or owner to be a workspace or org admin.
119
123
  #
120
124
  # @option options [Object] :team_id
121
- # The ID (T1234) of the workspace.
125
+ # The ID of the workspace or organization.
122
126
  # @option options [string] :user_id
123
127
  # The ID of the user to designate as an admin.
124
128
  # @see https://api.slack.com/methods/admin.users.setAdmin
@@ -147,12 +151,12 @@ module Slack
147
151
  end
148
152
 
149
153
  #
150
- # Set an existing regular user or admin to be a workspace owner.
154
+ # Set an existing regular user or admin to be a workspace or org owner.
151
155
  #
152
156
  # @option options [Object] :team_id
153
- # The ID (T1234) of the workspace.
157
+ # The ID of the workspace or organization.
154
158
  # @option options [Object] :user_id
155
- # Id of the user to promote to owner.
159
+ # ID of the user to promote to owner.
156
160
  # @see https://api.slack.com/methods/admin.users.setOwner
157
161
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setOwner.json
158
162
  def admin_users_setOwner(options = {})
@@ -165,7 +169,7 @@ module Slack
165
169
  # Set an existing guest user, admin user, or owner to be a regular user.
166
170
  #
167
171
  # @option options [Object] :team_id
168
- # The ID (T1234) of the workspace.
172
+ # The ID of the workspace or organization.
169
173
  # @option options [string] :user_id
170
174
  # The ID of the user to designate as a regular user.
171
175
  # @see https://api.slack.com/methods/admin.users.setRegular