slack-ruby-client 3.2.0 → 3.3.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 (307) 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/prompts/changelog-entries.prompt.yml +32 -0
  6. data/.github/workflows/danger-comment.yml +0 -0
  7. data/.github/workflows/danger.yml +0 -0
  8. data/.github/workflows/lint.yml +2 -0
  9. data/.github/workflows/test.yml +0 -0
  10. data/.github/workflows/update_api.yml +86 -6
  11. data/.gitignore +0 -0
  12. data/.gitmodules +0 -0
  13. data/.rspec +0 -0
  14. data/.rubocop.yml +2 -1
  15. data/.rubocop_todo.yml +13 -2
  16. data/.ruby-version +0 -0
  17. data/AGENTS.md +12 -0
  18. data/CHANGELOG.md +33 -0
  19. data/CONTRIBUTING.md +10 -1
  20. data/Dangerfile +0 -0
  21. data/Gemfile +17 -5
  22. data/LICENSE.md +0 -0
  23. data/README.md +47 -2
  24. data/RELEASING.md +2 -2
  25. data/Rakefile +7 -3
  26. data/SECURITY.md +0 -0
  27. data/UPGRADING.md +12 -0
  28. data/bin/commands/admin_analytics.rb +0 -0
  29. data/bin/commands/admin_analytics_messages.rb +2 -2
  30. data/bin/commands/admin_apps.rb +0 -0
  31. data/bin/commands/admin_apps_activities.rb +0 -0
  32. data/bin/commands/admin_apps_approved.rb +0 -0
  33. data/bin/commands/admin_apps_config.rb +0 -0
  34. data/bin/commands/admin_apps_mcp_servers.rb +21 -0
  35. data/bin/commands/admin_apps_mcp_servers_permissions.rb +33 -0
  36. data/bin/commands/admin_apps_permissions.rb +58 -0
  37. data/bin/commands/admin_apps_requests.rb +0 -0
  38. data/bin/commands/admin_apps_restricted.rb +0 -0
  39. data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
  40. data/bin/commands/admin_auth_policy.rb +0 -0
  41. data/bin/commands/admin_barriers.rb +0 -0
  42. data/bin/commands/admin_conversations.rb +12 -2
  43. data/bin/commands/admin_conversations_ekm.rb +0 -0
  44. data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
  45. data/bin/commands/admin_emoji.rb +0 -0
  46. data/bin/commands/admin_functions.rb +1 -1
  47. data/bin/commands/admin_functions_permissions.rb +0 -0
  48. data/bin/commands/admin_inviteRequests.rb +0 -0
  49. data/bin/commands/admin_inviteRequests_approved.rb +0 -0
  50. data/bin/commands/admin_inviteRequests_denied.rb +0 -0
  51. data/bin/commands/admin_roles.rb +0 -0
  52. data/bin/commands/admin_teams.rb +0 -0
  53. data/bin/commands/admin_teams_admins.rb +0 -0
  54. data/bin/commands/admin_teams_owners.rb +0 -0
  55. data/bin/commands/admin_teams_settings.rb +0 -0
  56. data/bin/commands/admin_usergroups.rb +74 -0
  57. data/bin/commands/admin_users.rb +0 -0
  58. data/bin/commands/admin_users_session.rb +0 -1
  59. data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
  60. data/bin/commands/admin_workflows.rb +0 -0
  61. data/bin/commands/admin_workflows_collaborators.rb +0 -0
  62. data/bin/commands/admin_workflows_permissions.rb +0 -0
  63. data/bin/commands/admin_workflows_triggers_types_permissions.rb +0 -0
  64. data/bin/commands/agents_sessions.rb +38 -0
  65. data/bin/commands/api.rb +0 -0
  66. data/bin/commands/apps.rb +0 -0
  67. data/bin/commands/apps_activities.rb +0 -0
  68. data/bin/commands/apps_auth_external.rb +0 -0
  69. data/bin/commands/apps_connections.rb +0 -0
  70. data/bin/commands/apps_datastore.rb +0 -0
  71. data/bin/commands/apps_event_authorizations.rb +0 -0
  72. data/bin/commands/apps_icon.rb +0 -0
  73. data/bin/commands/apps_managed_permissions.rb +21 -0
  74. data/bin/commands/apps_manifest.rb +0 -0
  75. data/bin/commands/apps_user_connection.rb +0 -0
  76. data/bin/commands/assistant_search.rb +0 -0
  77. data/bin/commands/assistant_threads.rb +1 -1
  78. data/bin/commands/auth.rb +0 -0
  79. data/bin/commands/auth_teams.rb +0 -0
  80. data/bin/commands/blocks.rb +0 -0
  81. data/bin/commands/bookmarks.rb +0 -0
  82. data/bin/commands/bots.rb +0 -0
  83. data/bin/commands/calls.rb +0 -0
  84. data/bin/commands/calls_participants.rb +0 -0
  85. data/bin/commands/canvases.rb +12 -2
  86. data/bin/commands/canvases_access.rb +0 -0
  87. data/bin/commands/canvases_sections.rb +0 -0
  88. data/bin/commands/chat.rb +9 -6
  89. data/bin/commands/chat_scheduledMessages.rb +0 -0
  90. data/bin/commands/conversations.rb +1 -1
  91. data/bin/commands/conversations_canvases.rb +1 -1
  92. data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
  93. data/bin/commands/conversations_requestSharedInvite.rb +0 -0
  94. data/bin/commands/dialog.rb +0 -0
  95. data/bin/commands/dnd.rb +0 -0
  96. data/bin/commands/emoji.rb +0 -0
  97. data/bin/commands/entity.rb +27 -0
  98. data/bin/commands/files.rb +3 -0
  99. data/bin/commands/files_comments.rb +0 -0
  100. data/bin/commands/files_remote.rb +0 -0
  101. data/bin/commands/functions.rb +0 -0
  102. data/bin/commands/functions_distributions_permissions.rb +0 -0
  103. data/bin/commands/functions_workflows_steps.rb +0 -0
  104. data/bin/commands/functions_workflows_steps_responses.rb +0 -0
  105. data/bin/commands/migration.rb +0 -0
  106. data/bin/commands/oauth.rb +0 -0
  107. data/bin/commands/oauth_v2.rb +21 -0
  108. data/bin/commands/oauth_v2_user.rb +0 -0
  109. data/bin/commands/openid_connect.rb +0 -0
  110. data/bin/commands/pins.rb +0 -0
  111. data/bin/commands/reactions.rb +0 -0
  112. data/bin/commands/reminders.rb +0 -0
  113. data/bin/commands/rtm.rb +0 -0
  114. data/bin/commands/search.rb +0 -0
  115. data/bin/commands/slackLists.rb +0 -0
  116. data/bin/commands/slackLists_access.rb +0 -0
  117. data/bin/commands/slackLists_download.rb +6 -0
  118. data/bin/commands/slackLists_items.rb +1 -0
  119. data/bin/commands/stars.rb +0 -0
  120. data/bin/commands/team.rb +0 -0
  121. data/bin/commands/team_billing.rb +0 -0
  122. data/bin/commands/team_externalTeams.rb +0 -0
  123. data/bin/commands/team_preferences.rb +0 -0
  124. data/bin/commands/team_profile.rb +0 -0
  125. data/bin/commands/tooling_tokens.rb +0 -0
  126. data/bin/commands/usergroups.rb +0 -0
  127. data/bin/commands/usergroups_users.rb +0 -0
  128. data/bin/commands/users.rb +1 -0
  129. data/bin/commands/users_admin.rb +0 -0
  130. data/bin/commands/users_discoverableContacts.rb +0 -0
  131. data/bin/commands/users_prefs.rb +0 -0
  132. data/bin/commands/users_profile.rb +0 -0
  133. data/bin/commands/views.rb +0 -0
  134. data/bin/commands/workflows_featured.rb +0 -0
  135. data/bin/commands/workflows_triggers_permissions.rb +0 -0
  136. data/bin/slack +5 -1
  137. data/examples/files_upload_v2/.env.example +0 -0
  138. data/examples/files_upload_v2/Gemfile +0 -0
  139. data/examples/files_upload_v2/README.md +0 -0
  140. data/examples/files_upload_v2/files_upload_v2.rb +1 -1
  141. data/examples/hi_web/Gemfile +0 -0
  142. data/examples/hi_web/hi.gif +0 -0
  143. data/examples/hi_web/hi.rb +1 -1
  144. data/examples/new_ticket/Gemfile +0 -0
  145. data/examples/new_ticket/new_ticket.rb +1 -1
  146. data/examples/oauth_v2/.env.example +0 -0
  147. data/examples/oauth_v2/Gemfile +0 -0
  148. data/examples/oauth_v2/README.md +0 -0
  149. data/examples/oauth_v2/oauth_v2.rb +6 -6
  150. data/lib/slack/config.rb +0 -0
  151. data/lib/slack/events/config.rb +1 -1
  152. data/lib/slack/events/request.rb +2 -2
  153. data/lib/slack/logger.rb +0 -0
  154. data/lib/slack/messages/formatting.rb +0 -0
  155. data/lib/slack/messages/message.rb +0 -0
  156. data/lib/slack/utils/security.rb +0 -0
  157. data/lib/slack/version.rb +1 -1
  158. data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
  159. data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +2 -2
  160. data/lib/slack/web/api/endpoints/admin_apps.rb +0 -0
  161. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +0 -0
  162. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
  163. data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
  164. data/lib/slack/web/api/endpoints/admin_apps_mcp_servers.rb +31 -0
  165. data/lib/slack/web/api/endpoints/admin_apps_mcp_servers_permissions.rb +46 -0
  166. data/lib/slack/web/api/endpoints/admin_apps_permissions.rb +83 -0
  167. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
  168. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
  169. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
  170. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
  171. data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
  172. data/lib/slack/web/api/endpoints/admin_conversations.rb +16 -1
  173. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
  174. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
  175. data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -1
  176. data/lib/slack/web/api/endpoints/admin_functions.rb +1 -1
  177. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +0 -0
  178. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
  179. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
  180. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
  181. data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
  182. data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
  183. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
  184. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
  185. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
  186. data/lib/slack/web/api/endpoints/admin_usergroups.rb +111 -0
  187. data/lib/slack/web/api/endpoints/admin_users.rb +1 -0
  188. data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -2
  189. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
  190. data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
  191. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
  192. data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
  193. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +0 -0
  194. data/lib/slack/web/api/endpoints/agents_sessions.rb +54 -0
  195. data/lib/slack/web/api/endpoints/api.rb +0 -0
  196. data/lib/slack/web/api/endpoints/apps.rb +0 -0
  197. data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
  198. data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
  199. data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
  200. data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
  201. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
  202. data/lib/slack/web/api/endpoints/apps_icon.rb +0 -0
  203. data/lib/slack/web/api/endpoints/apps_managed_permissions.rb +27 -0
  204. data/lib/slack/web/api/endpoints/apps_manifest.rb +0 -0
  205. data/lib/slack/web/api/endpoints/apps_user_connection.rb +0 -0
  206. data/lib/slack/web/api/endpoints/assistant_search.rb +0 -0
  207. data/lib/slack/web/api/endpoints/assistant_threads.rb +1 -1
  208. data/lib/slack/web/api/endpoints/auth.rb +0 -0
  209. data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
  210. data/lib/slack/web/api/endpoints/blocks.rb +0 -0
  211. data/lib/slack/web/api/endpoints/bookmarks.rb +0 -0
  212. data/lib/slack/web/api/endpoints/bots.rb +0 -0
  213. data/lib/slack/web/api/endpoints/calls.rb +0 -0
  214. data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
  215. data/lib/slack/web/api/endpoints/canvases.rb +16 -2
  216. data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
  217. data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
  218. data/lib/slack/web/api/endpoints/chat.rb +13 -9
  219. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
  220. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  221. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  222. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
  223. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
  224. data/lib/slack/web/api/endpoints/dialog.rb +0 -0
  225. data/lib/slack/web/api/endpoints/dnd.rb +0 -0
  226. data/lib/slack/web/api/endpoints/emoji.rb +0 -0
  227. data/lib/slack/web/api/endpoints/entity.rb +48 -0
  228. data/lib/slack/web/api/endpoints/files.rb +7 -0
  229. data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
  230. data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
  231. data/lib/slack/web/api/endpoints/functions.rb +0 -0
  232. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
  233. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
  234. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
  235. data/lib/slack/web/api/endpoints/migration.rb +0 -0
  236. data/lib/slack/web/api/endpoints/oauth.rb +0 -0
  237. data/lib/slack/web/api/endpoints/oauth_v2.rb +33 -0
  238. data/lib/slack/web/api/endpoints/oauth_v2_user.rb +0 -0
  239. data/lib/slack/web/api/endpoints/openid_connect.rb +0 -0
  240. data/lib/slack/web/api/endpoints/pins.rb +0 -0
  241. data/lib/slack/web/api/endpoints/reactions.rb +0 -0
  242. data/lib/slack/web/api/endpoints/reminders.rb +0 -0
  243. data/lib/slack/web/api/endpoints/rtm.rb +0 -0
  244. data/lib/slack/web/api/endpoints/search.rb +0 -0
  245. data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
  246. data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
  247. data/lib/slack/web/api/endpoints/slackLists_download.rb +12 -0
  248. data/lib/slack/web/api/endpoints/slackLists_items.rb +2 -0
  249. data/lib/slack/web/api/endpoints/stars.rb +0 -0
  250. data/lib/slack/web/api/endpoints/team.rb +0 -0
  251. data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
  252. data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
  253. data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
  254. data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
  255. data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
  256. data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
  257. data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
  258. data/lib/slack/web/api/endpoints/users.rb +2 -1
  259. data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
  260. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
  261. data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
  262. data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
  263. data/lib/slack/web/api/endpoints/views.rb +0 -0
  264. data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
  265. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
  266. data/lib/slack/web/api/endpoints.rb +10 -0
  267. data/lib/slack/web/api/error.rb +0 -0
  268. data/lib/slack/web/api/errors/server_error.rb +1 -1
  269. data/lib/slack/web/api/errors/slack_error.rb +1 -1
  270. data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -1
  271. data/lib/slack/web/api/errors.rb +126 -8
  272. data/lib/slack/web/api/helpers/files.rb +2 -2
  273. data/lib/slack/web/api/helpers.rb +0 -0
  274. data/lib/slack/web/api/mixins/conversations.id.rb +2 -1
  275. data/lib/slack/web/api/mixins/ids.id.rb +0 -0
  276. data/lib/slack/web/api/mixins/users.id.json +0 -0
  277. data/lib/slack/web/api/mixins/users.id.rb +2 -1
  278. data/lib/slack/web/api/mixins/users.search.json +0 -0
  279. data/lib/slack/web/api/mixins/users.search.rb +1 -1
  280. data/lib/slack/web/api/mixins.rb +0 -0
  281. data/lib/slack/web/api/options.rb +0 -0
  282. data/lib/slack/web/api/patches/.gitkeep +0 -0
  283. data/lib/slack/web/api/patches/files.default-filename.patch +12 -0
  284. data/lib/slack/web/api/schema/group.json +0 -0
  285. data/lib/slack/web/api/schema/method.json +0 -0
  286. data/lib/slack/web/api/templates/command.erb +0 -0
  287. data/lib/slack/web/api/templates/endpoints.erb +0 -0
  288. data/lib/slack/web/api/templates/errors.erb +0 -0
  289. data/lib/slack/web/api/templates/method.erb +0 -0
  290. data/lib/slack/web/api/templates/method_spec.erb +0 -0
  291. data/lib/slack/web/client.rb +29 -0
  292. data/lib/slack/web/config.rb +0 -0
  293. data/lib/slack/web/faraday/connection.rb +0 -0
  294. data/lib/slack/web/faraday/options.rb +0 -0
  295. data/lib/slack/web/faraday/request.rb +22 -2
  296. data/lib/slack/web/faraday/response/raise_error.rb +0 -0
  297. data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
  298. data/lib/slack/web/pagination/cursor.rb +0 -0
  299. data/lib/slack-ruby-client.rb +0 -0
  300. data/lib/slack.rb +0 -0
  301. data/lib/slack_ruby_client.rb +0 -0
  302. data/lib/tasks/git.rake +0 -0
  303. data/lib/tasks/update.rake +0 -0
  304. data/lib/tasks/web.rake +0 -0
  305. data/slack-ruby-client.gemspec +0 -1
  306. data/slack.png +0 -0
  307. metadata +20 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a057a75d8b3d01ab039746d48088770fd5aca2edbc833e8963540d6f776a3e0
4
- data.tar.gz: 2627e79b84280d7c15c822085d25e99ce6f74e3b231778a0a931029b6e113ede
3
+ metadata.gz: 41ed3cba2bb8122e285978e01bdcc9ce1e66c8572734bf90f9bd9c048fab5b27
4
+ data.tar.gz: 9cd4ec9ee0d7c8ab512491700e7e78133a099ef0be1ed553e63cf766f487f835
5
5
  SHA512:
6
- metadata.gz: eb7c40566f3d080375bae84a179be662fa38f65b8288326896ad1ddb96d76d6a5e61f904bf864dc180cfa718fb2796bd7aa08cf58d265816cb72c9a4143ede14
7
- data.tar.gz: d30ea958d1558ca9acf2eba48c8a36f423550abcec7c24b8780dc284bfe1067b1a5651c92571946ad49e47e2d74cd5b7ac3c7cc8ced42f64d70709d74fd4ffe5
6
+ metadata.gz: acf9e865def155ca75f77079bafb8abd1382943a3de640ed2d9eb8462712dfd48c49d61c603872b97158937ae8b769b5f02a976961590f79973369f7cf770b90
7
+ data.tar.gz: d38d2f774122deb06c9c00c788d511bf9fe2af8664c01f87edce0121f2f23669bbf528784b922f7cbcb4a35e5bdc83a2909038d6635c2ce45fb4001d0762411b
data/.coveralls.yml CHANGED
File without changes
data/.github/FUNDING.yml CHANGED
File without changes
File without changes
@@ -0,0 +1,32 @@
1
+ messages:
2
+ - role: system
3
+ content: |-
4
+ You write CHANGELOG entries describing an automated API update to slack-ruby-client, a
5
+ Ruby gem whose Web API endpoint methods, argument validations, specs, and bin commands
6
+ are code-generated from JSON method definitions vendored from
7
+ https://github.com/slack-ruby/slack-api-ref (via a git submodule and rake task).
8
+
9
+ Given a diffstat and a diff of the regenerated files, respond with ONLY a single JSON
10
+ object (no markdown code fences, no other text) in exactly this shape:
11
+ {"entries": [string, ...]}
12
+
13
+ Rules for entries:
14
+ - Each entry is a single short line, imperative mood, no leading bullet/dash and no
15
+ trailing period (the caller adds both).
16
+ - Group related changes together into one entry per notable change or affected method
17
+ group (e.g. one entry for "Add chat.appendStream and chat.stopStream methods", one
18
+ entry for "Add a metadata argument to chat.postEphemeral, chat.postMessage,
19
+ chat.scheduleMessage, and chat.update"), rather than one entry per file.
20
+ - Focus on developer-visible API surface changes: new/removed/renamed methods, new/
21
+ removed/changed arguments (including required/mutually-exclusive validation changes),
22
+ new/removed error codes, and behavioral changes to generated code.
23
+ - Skip purely mechanical noise (e.g. reformatted docs/comments with no semantic change).
24
+ - Produce at most 8 entries. If there are no notable API surface changes, return a single
25
+ generic entry describing the update in one line.
26
+ - role: user
27
+ content: |-
28
+ Diffstat:
29
+ {{diff_stat}}
30
+
31
+ Diff (may be truncated):
32
+ {{diff}}
File without changes
File without changes
@@ -10,5 +10,7 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
+ ruby-version: '3.3'
14
+ bundler: latest
13
15
  bundler-cache: true
14
16
  - run: bundle exec rubocop
File without changes
@@ -32,6 +32,67 @@ jobs:
32
32
  - name: Get slack-api-ref ref
33
33
  id: api-ref
34
34
  run: echo "api-ref=$(git rev-parse --short HEAD:lib/slack/web/api/slack-api-ref)" >> $GITHUB_OUTPUT
35
+ - name: Check for changes
36
+ id: changes
37
+ run: |
38
+ if git diff --quiet; then
39
+ echo "changed=false" >> "$GITHUB_OUTPUT"
40
+ else
41
+ echo "changed=true" >> "$GITHUB_OUTPUT"
42
+ fi
43
+ - name: Prepare diff for AI summary
44
+ if: steps.changes.outputs.changed == 'true'
45
+ run: |
46
+ git diff --stat | sed 's/^/ /' > /tmp/diff_stat.txt
47
+ git diff | head -c 20000 | sed 's/^/ /' > /tmp/diff.txt
48
+ - name: Set up Node
49
+ if: steps.changes.outputs.changed == 'true'
50
+ uses: actions/setup-node@v7
51
+ - name: Install Copilot CLI
52
+ if: steps.changes.outputs.changed == 'true'
53
+ run: npm install -g @github/copilot
54
+ - name: Generate changelog entries with AI
55
+ if: steps.changes.outputs.changed == 'true'
56
+ id: ai
57
+ uses: actions/ai-inference@v3
58
+ with:
59
+ prompt-file: ./.github/prompts/changelog-entries.prompt.yml
60
+ model: ''
61
+ file_input: |
62
+ diff_stat: /tmp/diff_stat.txt
63
+ diff: /tmp/diff.txt
64
+ env:
65
+ COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_PAT }}
66
+ - name: Build changelog entries
67
+ id: entries
68
+ run: |
69
+ entries=""
70
+ if [ "${{ steps.changes.outputs.changed }}" = "true" ]; then
71
+ response_file="${{ steps.ai.outputs.response-file }}"
72
+ echo "AI changelog response:"
73
+ cat "$response_file" || true
74
+ # Copilot CLI's response file may include narration/thinking lines
75
+ # before the final JSON answer, so grab the last line that looks
76
+ # like a JSON object rather than trying to parse the whole file.
77
+ json_line="$(grep -E '^\{.*\}$' "$response_file" 2>/dev/null | tail -n 1)"
78
+ if [ -z "$json_line" ]; then
79
+ echo "::error::AI changelog response did not contain a JSON object, see response above."
80
+ exit 1
81
+ fi
82
+ entries="$(printf '%s' "$json_line" | jq -r '.entries[]? // empty')"
83
+ fi
84
+ if [ -z "$entries" ]; then
85
+ entries="Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }}"
86
+ fi
87
+ body_list="$(printf '%s\n' "$entries" | sed 's/^/- /')"
88
+ {
89
+ echo 'entries<<CHANGELOG_ENTRIES_EOF'
90
+ echo "$entries"
91
+ echo 'CHANGELOG_ENTRIES_EOF'
92
+ echo 'body_list<<CHANGELOG_BODY_EOF'
93
+ echo "$body_list"
94
+ echo 'CHANGELOG_BODY_EOF'
95
+ } >> "$GITHUB_OUTPUT"
35
96
  - name: GitHub App token
36
97
  if: ${{ github.repository == 'slack-ruby/slack-ruby-client' }}
37
98
  id: github_app_token
@@ -46,12 +107,19 @@ jobs:
46
107
  uses: peter-evans/create-pull-request@v8
47
108
  with:
48
109
  token: ${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}
49
- commit-message: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }})
110
+ commit-message: |
111
+ Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }})
112
+
113
+ ${{ steps.entries.outputs.body_list }}
50
114
  title: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }}
51
115
  body: |
52
116
  Update API from [slack-api-ref](https://github.com/slack-ruby/slack-api-ref).
53
117
  Rev: ${{ steps.api-ref.outputs.api-ref }}
54
118
  Date: ${{ steps.date.outputs.date }}
119
+
120
+ ## Changes
121
+
122
+ ${{ steps.entries.outputs.body_list }}
55
123
  branch: automated-api-update
56
124
  base: master
57
125
  committer: slack-ruby-ci-bot <noreply@github.com>
@@ -62,12 +130,24 @@ jobs:
62
130
  git fetch origin automated-api-update
63
131
  git checkout automated-api-update
64
132
  - name: Update CHANGELOG
65
- uses: jacobtomlinson/gha-find-replace@v3
66
133
  if: ${{ steps.cpr.outputs.pull-request-number != '' }}
67
- with:
68
- include: CHANGELOG.md
69
- find: "\\* Your contribution here."
70
- replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby/slack-ruby-client/pull/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
134
+ env:
135
+ PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
136
+ ENTRIES: ${{ steps.entries.outputs.entries }}
137
+ run: |
138
+ ruby - <<'RUBYEOF'
139
+ pr_number = ENV.fetch("PR_NUMBER")
140
+ pr_url = "https://github.com/slack-ruby/slack-ruby-client/pull/#{pr_number}"
141
+ entries = ENV.fetch("ENTRIES").each_line.map(&:strip).reject(&:empty?)
142
+
143
+ lines = entries.map do |entry|
144
+ "* [##{pr_number}](#{pr_url}): #{entry} - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot)."
145
+ end.join("\n")
146
+
147
+ content = File.read("CHANGELOG.md")
148
+ content = content.sub("* Your contribution here.", "#{lines}\n* Your contribution here.")
149
+ File.write("CHANGELOG.md", content)
150
+ RUBYEOF
71
151
  - name: Commit and Push
72
152
  if: ${{ steps.cpr.outputs.pull-request-number != '' }}
73
153
  run: |
data/.gitignore CHANGED
File without changes
data/.gitmodules CHANGED
File without changes
data/.rspec CHANGED
File without changes
data/.rubocop.yml CHANGED
@@ -1,9 +1,10 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require:
3
+ plugins:
4
4
  - rubocop-performance
5
5
  - rubocop-rake
6
6
  - rubocop-rspec
7
+ - rubocop-exception_messages
7
8
 
8
9
  AllCops:
9
10
  TargetRubyVersion: 2.7
data/.rubocop_todo.yml CHANGED
@@ -6,6 +6,16 @@
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Remaining offenses after safe autocorrection with modern RuboCop.
10
+ Naming/PredicateMethod:
11
+ Exclude:
12
+ - 'lib/slack/events/request.rb'
13
+ - 'lib/slack/utils/security.rb'
14
+
15
+ Style/DirectiveScope:
16
+ Exclude:
17
+ - 'lib/slack/utils/security.rb'
18
+
9
19
  # Offense count: 1
10
20
  # This cop supports unsafe auto-correction (--auto-correct-all).
11
21
  Lint/NonDeterministicRequireOrder:
@@ -107,7 +117,7 @@ RSpec/ExampleLength:
107
117
  # Offense count: 10
108
118
  # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
109
119
  # Include: **/*_spec*rb*, **/spec/**/*
110
- RSpec/FilePath:
120
+ RSpec/SpecFilePathFormat:
111
121
  Exclude:
112
122
  - 'spec/slack/version_spec.rb'
113
123
  - 'spec/slack/web/api/endpoints/custom/auth_spec.rb'
@@ -163,7 +173,8 @@ RSpec/SubjectStub:
163
173
  # Configuration parameters: .
164
174
  # SupportedStyles: constant, string
165
175
  RSpec/VerifiedDoubleReference:
166
- EnforcedStyle: string
176
+ Exclude:
177
+ - 'spec/slack/web/faraday/request_spec.rb'
167
178
 
168
179
  # Offense count: 2
169
180
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
data/.ruby-version CHANGED
File without changes
data/AGENTS.md ADDED
@@ -0,0 +1,12 @@
1
+ # Contributor guidance
2
+
3
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) first for setup, tests, lint, changelog, pull request, and API patch instructions. Keep those instructions there rather than duplicating them here.
4
+
5
+ - Preserve the supported-Ruby test matrix when changing lint dependencies.
6
+ - When upgrading lint tooling, review safe corrections and baseline only remaining unrelated offenses.
7
+ - Exception message corrections can change public error strings. Update matching specs, including handwritten specs under `spec/slack/web/api/endpoints/custom/`.
8
+ - Use lowercase exception messages without a trailing period, including messages passed to `super` in error constructors; the exception-message cops may not detect that form. Preserve upstream Slack error codes and dynamically supplied messages.
9
+ - Load RuboCop extensions through `plugins:`. When upgrading an extension, migrate renamed cops and obsolete parameters, review safe corrections, and preserve existing behavior rather than blindly applying unsafe fixes.
10
+ - Do not edit the API-reference submodule or include existing submodule changes unless requested.
11
+ - The API update task pulls the latest reference and can generate unrelated changes. Verify the patch against both the latest and pinned reference; keep unrelated generated updates out of a focused PR. Custom endpoint specs are handwritten despite their location under `endpoints/`.
12
+ - Do not suppress environment warnings in application code or tests. Report local validation limitations explicitly; CLI specs compare subprocess output and can fail when Bundler emits unrelated warnings.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ### 3.3.0 (2026/10/09)
2
+
3
+ * [#607](https://github.com/slack-ruby/slack-ruby-client/pull/607): Support non-rewindable Rack 3 request bodies when verifying Events API signatures, with WEBrick integration coverage; follows [#515](https://github.com/slack-ruby/slack-ruby-client/pull/515) - [@olleolleolle](https://github.com/olleolleolle), [@dblock](https://github.com/dblock).
4
+ * [#606](https://github.com/slack-ruby/slack-ruby-client/pull/606): Add configured client copies with error callbacks for Slack and transport failures - [@dblock](https://github.com/dblock).
5
+ * [#605](https://github.com/slack-ruby/slack-ruby-client/pull/605): Add configured client copies with request and response callbacks, including pagination - [@dblock](https://github.com/dblock).
6
+ * [#603](https://github.com/slack-ruby/slack-ruby-client/pull/603): Enforce consistent exception messages with rubocop-exception_messages and run lint separately from the test matrix - [@dblock](https://github.com/dblock).
7
+ * [#602](https://github.com/slack-ruby/slack-ruby-client/pull/602): Make gli an optional dependency; only the `slack` command-line client needs it - [@corsonknowles](https://github.com/corsonknowles).
8
+ * [#599](https://github.com/slack-ruby/slack-ruby-client/pull/599): Set a default filename in `files_upload` so Slack displays image previews correctly when none is specified - [@ts-3156](https://github.com/ts-3156), [@dblock](https://github.com/dblock).
9
+ * [#591](https://github.com/slack-ruby/slack-ruby-client/pull/591): Generate AI CHANGELOG entries and PR summaries for automated API update PRs, lock simplecov below 1.1.0 to avoid breaking Coveralls - [@dblock](https://github.com/dblock).
10
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add entity.acknowledgeCommentAction and entity.presentComments methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
11
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add admin.apps.mcpServers, admin.apps.mcpServers.permissions, and admin.apps.permissions endpoints - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
12
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add a metadata argument to chat.postEphemeral - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
13
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Remove required :url validation from admin.emoji.add - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
14
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add username, icon_url, and icon_emoji arguments to files.completeUploadExternal - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
15
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add format, include_threads, and include_attachments arguments to slackLists.download.start and slackLists.download.get - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
16
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add exclude_muted argument to users.conversations - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
17
+ * [#590](https://github.com/slack-ruby/slack-ruby-client/pull/590): Add new error codes to errors.rb and update slack-api-ref submodule - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
18
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add admin.conversations.bulkSetProperties method for bulk-setting channel properties - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
19
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add admin.usergroups.removeTeams method for removing default workspaces from an organization-wide IDP Group or Admin Group - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
20
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add unfurl_app_links argument to chat.postMessage - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
21
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Remove required team_id argument from admin.users.session.invalidate - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
22
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add AgentsSessions and AppsManagedPermissions endpoint modules for agents.sessions and apps.managedPermissions methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
23
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Increase conversations.invite users limit from 100 to 1000 - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
24
+ * [#597](https://github.com/slack-ruby/slack-ruby-client/pull/597): Add new Slack API error codes - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
25
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add channel_ids argument to admin.apps.permissions.add and admin.apps.permissions.remove, and channel_restriction_mode/channel_ids arguments to admin.apps.permissions.set - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
26
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add oauth.v2.beginShortTokenRotation and oauth.v2.completeShortTokenRotation methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
27
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add session_status argument to chat.stopStream - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
28
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add include_list argument to slackLists.items.list - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
29
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Update chat.startStream and chat.stopStream chunks argument documentation to mention markdown text, task update, plan update, and blocks chunk objects - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
30
+ * [#600](https://github.com/slack-ruby/slack-ruby-client/pull/600): Add new error codes including AgentPromptDisplayNotAllowed, ChannelRestrictionRequiresAppAccess, ChannelRestrictionsNotAvailable, RotationNotFound, TokenTooLong, TooManyChannels, UserIsExternalGuest, and UserNotAuthenticated - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
31
+ * [#608](https://github.com/slack-ruby/slack-ruby-client/pull/608): Add admin.usergroups.addUsers, admin.usergroups.removeUsers, admin.usergroups.create, admin.usergroups.fetch, admin.usergroups.update, and admin.usergroups.uploadUsers methods - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
32
+ * [#608](https://github.com/slack-ruby/slack-ruby-client/pull/608): Add canvases.getContent method to fetch canvas content as markdown or HTML - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
33
+ * [#608](https://github.com/slack-ruby/slack-ruby-client/pull/608): Add new Slack API error codes to Errors - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
1
34
  ### 3.2.0 (2026/07/05)
2
35
 
3
36
  * [#581](https://github.com/slack-ruby/slack-ruby-client/pull/581): Migrate Danger to use danger-pr-comment workflow - [@dblock](https://github.com/dblock).
data/CONTRIBUTING.md CHANGED
@@ -59,7 +59,16 @@ We definitely appreciate pull requests that highlight or reproduce a problem, ev
59
59
 
60
60
  Implement your feature or bug fix.
61
61
 
62
- Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally ignored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
62
+ Ruby style is enforced with [RuboCop](https://github.com/rubocop/rubocop), including [exception message conventions](https://github.com/dblock/rubocop-exception_messages). The main Gemfile includes lint dependencies only on Ruby 3.2+ so tests can continue running on older supported Ruby versions.
63
+
64
+ ```bash
65
+ bundle install
66
+ bundle exec rubocop
67
+ ```
68
+
69
+ Fix any style issues highlighted, auto-correcting safe issues with `bundle exec rubocop -a`. Exception message corrections require `-A`; review them and update message expectations in tests. To regenerate the baseline for generally ignored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
70
+
71
+ On Ruby 3.2+, `bundle exec rake rubocop` also runs lint. The default `bundle exec rake` runs tests only; CI runs lint separately on Ruby 3.3.
63
72
 
64
73
  Make sure that `bundle exec rake` completes without errors.
65
74
 
data/Dangerfile CHANGED
File without changes
data/Gemfile CHANGED
@@ -12,18 +12,30 @@ group :test do
12
12
  gem 'danger-toc', require: false
13
13
  gem 'erubis'
14
14
  gem 'faraday-typhoeus'
15
+ gem 'gli'
15
16
  gem 'json-schema'
16
17
  gem 'mutex_m'
17
18
  gem 'racc'
19
+ gem 'rackup', '~> 2.1'
18
20
  gem 'rake', '~> 13'
19
21
  gem 'rspec'
20
- gem 'rubocop', '1.26.1' # Lock to specific version to avoid breaking cops/changes
21
- gem 'rubocop-performance'
22
- gem 'rubocop-rake'
23
- gem 'rubocop-rspec'
24
- gem 'simplecov'
22
+ # Lock below 1.1.0, which started writing float timestamps to
23
+ # coverage/.resultset.json, breaking coverallsapp/github-action's parser
24
+ # (coverallsapp/github-action#269, coverallsapp/coverage-reporter#191).
25
+ gem 'simplecov', '< 1.1.0'
25
26
  gem 'simplecov-lcov'
26
27
  gem 'timecop'
27
28
  gem 'vcr'
28
29
  gem 'webmock'
30
+ gem 'webrick', '~> 1.8'
31
+ end
32
+
33
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2')
34
+ group :lint do
35
+ gem 'rubocop', '~> 1.72'
36
+ gem 'rubocop-exception_messages', '~> 0.2.0', require: false
37
+ gem 'rubocop-performance', '~> 1.27'
38
+ gem 'rubocop-rake', '~> 0.7'
39
+ gem 'rubocop-rspec', '~> 3.10'
40
+ end
29
41
  end
data/LICENSE.md CHANGED
File without changes
data/README.md CHANGED
@@ -70,7 +70,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web) and [Events](https:
70
70
 
71
71
  ## Stable Release
72
72
 
73
- You're reading the documentation for the **stable** release of slack-ruby-client, 3.2.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
73
+ You're reading the documentation for the **stable** release of slack-ruby-client, 3.3.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
74
74
 
75
75
  ## Installation
76
76
 
@@ -301,6 +301,41 @@ You can also pass request options, including `timeout` and `open_timeout` into i
301
301
  client.conversations_list(request: { timeout: 180 })
302
302
  ```
303
303
 
304
+ Use `with_request` and `with_response` to create a configured client copy with HTTP callbacks, without changing the original client or parsed-body return values:
305
+
306
+ ```ruby
307
+ scopes = nil
308
+ observed_client = client.with_request do |request|
309
+ request.headers['X-Custom'] = 'value'
310
+ end.with_response do |response|
311
+ scopes = response.headers['x-oauth-scopes']&.split(',')&.map(&:strip)
312
+ end
313
+
314
+ result = observed_client.auth_test
315
+ observed_client.users_list do |page|
316
+ puts page.members
317
+ end
318
+ ```
319
+
320
+ Request callbacks receive a `Faraday::Request` after authentication and request options are configured, before dispatch. They can change headers, body, and options. Response callbacks receive a `Faraday::Response` with the parsed body, headers, and status after successful completion; they do not run when Slack or transport errors are raised. Callbacks apply to each HTTP call, including pagination pages and requests made by helpers. Endpoint blocks retain their existing meaning.
321
+
322
+ Chaining registers callbacks in order. Copies preserve client configuration but use independent connections and callback lists; the original client is unchanged. Callback exceptions propagate and request callback failures prevent dispatch. Callbacks are synchronous; avoid storing sensitive authorization headers, and synchronize any shared state if using a client concurrently.
323
+
324
+ Use `with_error` to observe Slack and transport errors without recovering from them:
325
+
326
+ ```ruby
327
+ observed_client = client.with_error do |error|
328
+ logger.warn(
329
+ message: error.message,
330
+ errors: error.respond_to?(:errors) && error.response ? error.errors : nil,
331
+ response_metadata: error.respond_to?(:response_metadata) && error.response ? error.response_metadata : nil
332
+ )
333
+ end
334
+ observed_client.auth_test
335
+ ```
336
+
337
+ Error callbacks receive the exception and then it is re-raised unchanged. They run for every failed HTTP attempt, including failures that pagination subsequently retries. Successful calls and exceptions from request or response callbacks do not trigger them. If an error callback raises, its exception propagates instead and later callbacks are not invoked. As with other callbacks, these methods return a configured copy and can be chained.
338
+
304
339
  You can control what proxy options are used by modifying the `http_proxy` environment variable per [Net::HTTP's documentation](https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#class-Net::HTTP-label-Proxies).
305
340
 
306
341
  Note that Docker on OSX seems to incorrectly set the proxy, causing `Faraday::ConnectionFailed, ERROR -- : Failed to open TCP connection to : (getaddrinfo: Name or service not known)`. You might need to manually unset `http_proxy` in that case, eg. `http_proxy="" bundle exec ruby ./my_bot.rb`.
@@ -426,6 +461,10 @@ Slack::Events::Request.new(
426
461
 
427
462
  The `verify!` call may raise `Slack::Events::Request::MissingSigningSecret`, `Slack::Events::Request::InvalidSignature` or `Slack::Events::Request::TimestampExpired` errors.
428
463
 
464
+ Both rewindable request bodies and non-rewindable streams permitted by Rack 3 are supported. `Slack::Events::Request#body` caches the raw body. Rewindable inputs are rewound before and after reading, preserving access for other consumers. Non-rewindable inputs are consumed once; use `slack_request.body` for subsequent access to the raw body.
465
+
466
+ Verify the signature before middleware or application code reads a non-rewindable input. Bytes already consumed from a one-shot stream cannot be recovered, and verification will fail. If multiple consumers need to read `rack.input`, install `Rack::RewindableInput::Middleware` (Rack 3) before any body-reading middleware to buffer the input.
467
+
429
468
  ### Message Handling
430
469
 
431
470
  All text in Slack uses the same [system of formatting and escaping](https://api.slack.com/docs/formatting): chat messages, direct messages, file comments, etc. [Slack::Messages::Formatting](lib/slack/messages/formatting.rb) provides convenience methods to format and parse messages.
@@ -562,7 +601,13 @@ Slack::Messages::Formatting.escape('Hello & <world>')
562
601
 
563
602
  ### Command-Line Client
564
603
 
565
- The slack command-line client returns JSON data from the Slack API.
604
+ The slack command-line client returns JSON data from the Slack API. It uses [GLI](https://github.com/davetron5000/gli), which is not a dependency of slack-ruby-client, so install it alongside the client.
605
+
606
+ ```
607
+ gem install gli
608
+ ```
609
+
610
+ Or add `gem 'gli'` to your Gemfile.
566
611
 
567
612
  #### Authenticate with Slack
568
613
 
data/RELEASING.md CHANGED
@@ -16,7 +16,7 @@ Check that the last build succeeded in [GitHub Actions](https://github.com/slack
16
16
  Change "Next" in [CHANGELOG.md](CHANGELOG.md) to the current date.
17
17
 
18
18
  ```
19
- ### 0.2.2 (7/10/2015)
19
+ ### 0.2.2 (2015/07/10)
20
20
  ```
21
21
 
22
22
  Remove the line with "Your contribution here.", since there will be no more contributions to this release.
@@ -44,7 +44,7 @@ $ rake release
44
44
 
45
45
  slack-ruby-client 0.2.2 built to pkg/slack-ruby-client-0.2.2.gem.
46
46
  Tagged v0.2.2.
47
- Pushed git commits and tags.
47
+ Pushed git commits and release tag.
48
48
  Pushed slack-ruby-client 0.2.2 to rubygems.org.
49
49
  ```
50
50
 
data/Rakefile CHANGED
@@ -12,10 +12,14 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
12
12
  spec.pattern = FileList['spec/**/*_spec.rb']
13
13
  end
14
14
 
15
- require 'rubocop/rake_task'
16
- RuboCop::RakeTask.new
15
+ desc 'Run RuboCop (Ruby 3.2+).'
16
+ task :rubocop do
17
+ abort 'RuboCop requires Ruby 3.2 or newer' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.2')
17
18
 
18
- task default: %i[spec rubocop]
19
+ sh 'bundle exec rubocop'
20
+ end
21
+
22
+ task default: :spec
19
23
 
20
24
  load 'tasks/git.rake'
21
25
  load 'tasks/web.rake'
data/SECURITY.md CHANGED
File without changes
data/UPGRADING.md CHANGED
@@ -1,6 +1,18 @@
1
1
  Upgrading Slack-Ruby-Client
2
2
  ===========================
3
3
 
4
+ ### Upgrading to >= 3.3.0
5
+
6
+ #### Command-Line Client Dependency
7
+
8
+ [#602](https://github.com/slack-ruby/slack-ruby-client/pull/602) removes [gli](https://github.com/davetron5000/gli) from slack-ruby-client's runtime dependencies. Only the `slack` command-line client uses it. If you use the command-line client, add `gem 'gli'` to your Gemfile or run `gem install gli`. Without it, `slack` exits with a message saying so. The library itself is unaffected.
9
+
10
+ #### Exception Messages
11
+
12
+ [#603](https://github.com/slack-ruby/slack-ruby-client/pull/603) standardizes handwritten exception messages to start with lowercase letters and omit trailing periods. Some messages also quote argument names and values with backticks. For example, `TooManyRequestsError` now reports `retry after 3600 seconds` instead of `Retry after 3600 seconds`, and file-upload validation reports ``required argument :`filename` missing in file (`0`)`` instead of `Required argument :filename missing in file (0)`.
13
+
14
+ Update tests, regular expressions, or application logic that match these messages exactly. Exception classes and rescue behavior are unchanged; upstream Slack error codes (such as `invalid_auth`) and dynamically supplied messages are preserved. Prefer matching exception classes and structured error attributes rather than human-readable message text.
15
+
4
16
  ### Upgrading to >= 3.2.0
5
17
 
6
18
  [#583](https://github.com/slack-ruby/slack-ruby-client/pull/583) modifies the error types raised when a nonexistent #channel-name or @user-handle is looked up. These will now raise `ChannelNotFound` and `UserNotFound` respectively, whereas they previously raised a `SlackError`. If your code relies on these types without accounting for inheritance, it will need to be migrated. Notably, `rescue SlackError` will continue to work as normal, since both error classes inherit from it.
File without changes
@@ -13,7 +13,7 @@ module Slack
13
13
  c.flag 'oldest_ts', desc: '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.'
14
14
  c.flag 'latest_ts', desc: '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.'
15
15
  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."
16
- c.flag 'limit', desc: 'Maximum number of entries to return. The maximum limit is 100.'
16
+ c.flag 'limit', desc: 'Maximum number of entries to return. Defaults to 50 if not passed. Max allowed is 100.'
17
17
  c.action do |_global_options, options, _args|
18
18
  puts JSON.dump(@client.admin_analytics_messages_activity(options))
19
19
  end
@@ -25,7 +25,7 @@ module Slack
25
25
  c.flag 'channel', desc: 'Channel ID for channel containing the messages to query.'
26
26
  c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results.'
27
27
  c.flag 'latest_ts', desc: 'Most recent timestamp to include in the results. If not passed, defaults to current time.'
28
- 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 details."
28
+ 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."
29
29
  c.action do |_global_options, options, _args|
30
30
  puts JSON.dump(@client.admin_analytics_messages_metadata(options))
31
31
  end
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,21 @@
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 'AdminAppsMcpServers methods.'
8
+ command 'admin_apps_mcp_servers' do |g|
9
+ g.desc "List third-party app MCP servers approved for an organization, derived from the org's MCP server allowlist. Entries reflect allowlist state, not install/scope liveness: servers of apps that are uninstalled (but not deleted) are still listed."
10
+ g.long_desc %( List third-party app MCP servers approved for an organization, derived from the org's MCP server allowlist. Entries reflect allowlist state, not install/scope liveness: servers of apps that are uninstalled (but not deleted) are still listed. )
11
+ g.command 'list' do |c|
12
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.admin_apps_mcp_servers_list(options))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,33 @@
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 'AdminAppsMcpServersPermissions methods.'
8
+ command 'admin_apps_mcp_servers_permissions' do |g|
9
+ g.desc 'List MCP servers for an app with their access control permissions'
10
+ g.long_desc %( List MCP servers for an app with their access control permissions )
11
+ g.command 'list' do |c|
12
+ c.flag 'app_id', desc: 'Encoded ID of the app.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.admin_apps_mcp_servers_permissions_list(options))
15
+ end
16
+ end
17
+
18
+ g.desc 'Set the access control permission for who can use an MCP server'
19
+ g.long_desc %( Set the access control permission for who can use an MCP server )
20
+ g.command 'set' do |c|
21
+ c.flag 'app_id', desc: 'Encoded ID of the app.'
22
+ c.flag 'server_id', desc: 'Encoded ID of the MCP server.'
23
+ c.flag 'permission_type', desc: 'The type of permission that defines who can use this MCP server.'
24
+ c.flag 'user_ids', desc: 'List of user IDs to set for named_entities or named_entities_exclude.'
25
+ c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
26
+ c.action do |_global_options, options, _args|
27
+ puts JSON.dump(@client.admin_apps_mcp_servers_permissions_set(options))
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end