slack-ruby-client 3.0.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 +14 -0
  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 +3 -2
  42. data/bin/commands/admin_functions_permissions.rb +3 -2
  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 +20 -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 +9 -5
  70. data/bin/commands/assistant_threads.rb +5 -1
  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 +50 -4
  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 +24 -0
  91. data/bin/commands/files.rb +3 -3
  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 +2 -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 +3 -3
  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 +3 -1
  165. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +3 -2
  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 +23 -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 +12 -4
  193. data/lib/slack/web/api/endpoints/assistant_threads.rb +10 -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 +95 -12
  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 +32 -0
  214. data/lib/slack/web/api/endpoints/files.rb +2 -2
  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 +4 -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 +12 -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 +178 -4
  258. data/lib/slack/web/api/helpers/files.rb +4 -1
  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 +7 -2
  290. data/slack-ruby-client.gemspec +0 -0
  291. data/slack.png +0 -0
  292. metadata +17 -9
  293. data/.github/workflows/pr_lint.yml +0 -21
  294. data/Gemfile.danger +0 -6
@@ -6,6 +6,27 @@ module Slack
6
6
  module Api
7
7
  module Endpoints
8
8
  module Chat
9
+ #
10
+ # Appends text to an existing streaming conversation.
11
+ #
12
+ # @option options [channel] :channel
13
+ # An encoded ID that represents a channel, private group, or DM.
14
+ # @option options [array] :chunks
15
+ # Array of streaming chunks.
16
+ # @option options [timestamp] :ts
17
+ # The timestamp of the streaming message.
18
+ # @option options [string] :markdown_text
19
+ # 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.
20
+ # @see https://api.slack.com/methods/chat.appendStream
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.appendStream.json
22
+ def chat_appendStream(options = {})
23
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
24
+ raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
25
+ raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
26
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
27
+ post('chat.appendStream', options)
28
+ end
29
+
9
30
  #
10
31
  # Execute a slash command in a public channel (undocumented)
11
32
  #
@@ -125,7 +146,8 @@ module Slack
125
146
  def chat_postEphemeral(options = {})
126
147
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
127
148
  raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
128
- raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
149
+ raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
150
+ raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
129
151
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
130
152
  options = encode_options_as_json(options, %i[attachments blocks])
131
153
  post('chat.postEphemeral', options)
@@ -142,6 +164,8 @@ module Slack
142
164
  # A JSON-based array of structured blocks, presented as a URL-encoded string.
143
165
  # @option options [channel] :channel
144
166
  # An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.
167
+ # @option options [string] :current_draft_last_updated_ts
168
+ # This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server.
145
169
  # @option options [string] :icon_emoji
146
170
  # Emoji to use as the icon for this message. Overrides icon_url.
147
171
  # @option options [string] :icon_url
@@ -151,7 +175,7 @@ module Slack
151
175
  # @option options [string] :markdown_text
152
176
  # 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.
153
177
  # @option options [string] :metadata
154
- # 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.
178
+ # 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.
155
179
  # @option options [boolean] :mrkdwn
156
180
  # Disable Slack markup parsing by setting to false. Enabled by default.
157
181
  # @option options [string] :parse
@@ -172,7 +196,8 @@ module Slack
172
196
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
173
197
  def chat_postMessage(options = {})
174
198
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
175
- raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
199
+ raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
200
+ raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
176
201
  options = encode_options_as_json(options, %i[attachments blocks metadata])
177
202
  post('chat.postMessage', options)
178
203
  end
@@ -213,20 +238,78 @@ module Slack
213
238
  def chat_scheduleMessage(options = {})
214
239
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
215
240
  raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
216
- raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
241
+ raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
242
+ raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
217
243
  options = encode_options_as_json(options, %i[attachments blocks metadata])
218
244
  post('chat.scheduleMessage', options)
219
245
  end
220
246
 
247
+ #
248
+ # Starts a new streaming conversation.
249
+ #
250
+ # @option options [channel] :channel
251
+ # An encoded ID that represents a channel thread or DM.
252
+ # @option options [array] :chunks
253
+ # Array of streaming chunks.
254
+ # @option options [string] :markdown_text
255
+ # Accepts message text formatted in markdown. Limit this field to 12,000 characters.
256
+ # @option options [string] :thread_ts
257
+ # Provide another message's ts value to reply to. Streamed messages should always be replies to a user request.
258
+ # @option options [Object] :recipient_user_id
259
+ # The encoded ID of the user to receive the streaming text. Required when streaming to channels.
260
+ # @option options [string] :recipient_team_id
261
+ # The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
262
+ # @option options [enum] :task_display_mode
263
+ # 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.
264
+ # @option options [string] :icon_emoji
265
+ # Emoji to use as the icon for this message. Overrides icon_url.
266
+ # @option options [string] :icon_url
267
+ # Image URL to use as the icon for this message.
268
+ # @option options [string] :username
269
+ # The bot's username to display.
270
+ # @see https://api.slack.com/methods/chat.startStream
271
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
272
+ def chat_startStream(options = {})
273
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
274
+ raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
275
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
276
+ post('chat.startStream', options)
277
+ end
278
+
279
+ #
280
+ # Stops a streaming conversation.
281
+ #
282
+ # @option options [channel] :channel
283
+ # An encoded ID that represents a channel, private group, or DM.
284
+ # @option options [array] :chunks
285
+ # Array of streaming chunks.
286
+ # @option options [timestamp] :ts
287
+ # The timestamp of the streaming message.
288
+ # @option options [string] :markdown_text
289
+ # Accepts message text formatted in markdown. Limit this field to 12,000 characters.
290
+ # @option options [Object] :blocks
291
+ # A list of blocks that will be rendered at the bottom of the finalized message.
292
+ # @option options [string] :metadata
293
+ # 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.
294
+ # @see https://api.slack.com/methods/chat.stopStream
295
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
296
+ def chat_stopStream(options = {})
297
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
298
+ raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
299
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
300
+ options = encode_options_as_json(options, %i[metadata])
301
+ post('chat.stopStream', options)
302
+ end
303
+
221
304
  #
222
305
  # Provide custom unfurl behavior for user-posted URLs
223
306
  #
224
307
  # @option options [channel] :channel
225
- # Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.
308
+ # 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.
226
309
  # @option options [timestamp] :ts
227
- # Timestamp of the message to add unfurl behavior to.
310
+ # Timestamp of the message to add unfurl behavior to. Required for public channels.
228
311
  # @option options [string] :unfurls
229
- # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.
312
+ # 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.
230
313
  # @option options [string] :user_auth_message
231
314
  # 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.
232
315
  # @option options [boolean] :user_auth_required
@@ -242,9 +325,6 @@ module Slack
242
325
  # @see https://api.slack.com/methods/chat.unfurl
243
326
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
244
327
  def chat_unfurl(options = {})
245
- raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
246
- raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
247
- raise ArgumentError, 'Required arguments :unfurls missing' if options[:unfurls].nil?
248
328
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
249
329
  options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
250
330
  post('chat.unfurl', options)
@@ -257,6 +337,8 @@ module Slack
257
337
  # Pass true to update the message as the authed user. Bot users in this context are considered authed users.
258
338
  # @option options [string] :attachments
259
339
  # A JSON-based array of structured attachments, presented as a URL-encoded string.
340
+ # @option options [string] :unfurled_attachments
341
+ # A JSON-based array of structured attachments, presented as a URL-encoded string.
260
342
  # @option options [string] :blocks
261
343
  # A JSON-based array of structured blocks, presented as a URL-encoded string.
262
344
  # @option options [string] :markdown_text
@@ -282,9 +364,10 @@ module Slack
282
364
  def chat_update(options = {})
283
365
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
284
366
  raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
285
- raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
367
+ raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
368
+ raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
286
369
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
287
- options = encode_options_as_json(options, %i[attachments blocks metadata])
370
+ options = encode_options_as_json(options, %i[attachments unfurled_attachments blocks metadata])
288
371
  post('chat.update', options)
289
372
  end
290
373
  end
@@ -34,7 +34,7 @@ module Slack
34
34
  # @option options [Object] :invite_id
35
35
  # ID of the shared channel invite to approve.
36
36
  # @option options [Object] :target_team
37
- # The team or enterprise id of the other party involved in the invitation you are approving.
37
+ # The team or enterprise ID of the receiving party involved in the invitation you are approving.
38
38
  # @see https://api.slack.com/methods/conversations.approveSharedInvite
39
39
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.approveSharedInvite.json
40
40
  def conversations_approveSharedInvite(options = {})
File without changes
File without changes
File without changes
@@ -0,0 +1,32 @@
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 Entity
9
+ #
10
+ # Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.
11
+ #
12
+ # @option options [object] :metadata
13
+ # URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.
14
+ # @option options [string] :trigger_id
15
+ # A reference to the original user action that initiated the request.
16
+ # @option options [boolean] :user_auth_required
17
+ # Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.
18
+ # @option options [string] :user_auth_url
19
+ # A custom URL to which users are directed for authentication if required.
20
+ # @option options [Object] :error
21
+ # @see https://api.slack.com/methods/entity.presentDetails
22
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.presentDetails.json
23
+ def entity_presentDetails(options = {})
24
+ raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
25
+ options = encode_options_as_json(options, %i[metadata])
26
+ post('entity.presentDetails', options)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -16,7 +16,7 @@ module Slack
16
16
  # @option options [string] :thread_ts
17
17
  # Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'.
18
18
  # @option options [string] :channels
19
- # Comma-separated string of channel IDs where the file will be shared.
19
+ # Comma-separated string of channel IDs or user IDs where the file will be shared.
20
20
  # @option options [string] :initial_comment
21
21
  # The message text introducing the file in specified channels.
22
22
  # @option options [string] :blocks
@@ -100,7 +100,7 @@ module Slack
100
100
  end
101
101
 
102
102
  #
103
- # List for a team, in a channel, or from a user with applied filters.
103
+ # List files for a team, in a channel, or from a user with applied filters.
104
104
  #
105
105
  # @option options [channel] :channel
106
106
  # Filter files appearing in a specific channel, indicated by its ID.
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -15,12 +15,16 @@ module Slack
15
15
  # Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
16
16
  # @option options [string] :code
17
17
  # The code param returned via the OAuth callback.
18
+ # @option options [string] :code_verifier
19
+ # The code_verifier param used to generate the code_challenge originally. Used for PKCE.
18
20
  # @option options [string] :redirect_uri
19
21
  # This must match the originally submitted URI (if one was sent).
20
22
  # @option options [string] :grant_type
21
23
  # The grant_type param as described in the OAuth spec.
22
24
  # @option options [string] :refresh_token
23
25
  # The refresh_token param as described in the OAuth spec.
26
+ # @option options [string] :assertion
27
+ # Identity assertion JWT authorization grant.
24
28
  # @see https://api.slack.com/methods/oauth.v2.access
25
29
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json
26
30
  def oauth_v2_access(options = {})
@@ -0,0 +1,37 @@
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 OauthV2User
9
+ #
10
+ # Exchanges a temporary OAuth verifier code for a user access token.
11
+ #
12
+ # @option options [string] :client_id
13
+ # 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
+ # @option options [string] :client_secret
15
+ # Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.
16
+ # @option options [string] :code
17
+ # The code param returned via the OAuth callback.
18
+ # @option options [string] :code_verifier
19
+ # The code_verifier param used to generate the code_challenge originally. Used for PKCE.
20
+ # @option options [string] :redirect_uri
21
+ # This must match the originally submitted URI (if one was sent).
22
+ # @option options [string] :grant_type
23
+ # The grant_type param as described in the OAuth spec.
24
+ # @option options [string] :refresh_token
25
+ # The refresh_token param as described in the OAuth spec.
26
+ # @option options [string] :assertion
27
+ # Identity assertion JWT authorization grant.
28
+ # @see https://api.slack.com/methods/oauth.v2.user.access
29
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2.user/oauth.v2.user.access.json
30
+ def oauth_v2_user_access(options = {})
31
+ post('oauth.v2.user.access', options)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -21,6 +21,8 @@ module Slack
21
21
  # The grant_type param as described in the OAuth spec.
22
22
  # @option options [string] :refresh_token
23
23
  # The refresh_token param as described in the OAuth spec.
24
+ # @option options [string] :code_verifier
25
+ # PKCE code verifier (RFC 7636). Required when the authorization request included a code_challenge.
24
26
  # @see https://api.slack.com/methods/openid.connect.token
25
27
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/openid.connect/openid.connect.token.json
26
28
  def openid_connect_token(options = {})
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
File without changes
File without changes
File without changes
File without changes
@@ -7,7 +7,7 @@ module Slack
7
7
  module Endpoints
8
8
  module Users
9
9
  #
10
- # List conversations the calling user may access.
10
+ # List conversations the calling user is a member of.
11
11
  #
12
12
  # @option options [string] :cursor
13
13
  # 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.
File without changes
File without changes
File without changes
@@ -33,6 +33,7 @@ module Slack
33
33
  # A view payload. This must be a JSON-encoded string.
34
34
  # @option options [string] :hash
35
35
  # A string that represents view state to protect against possible race conditions.
36
+ # @option options [string] :interactivity_pointer
36
37
  # @see https://api.slack.com/methods/views.publish
37
38
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.publish.json
38
39
  def views_publish(options = {})
File without changes
@@ -2,6 +2,7 @@
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
4
  require_relative 'endpoints/admin_analytics'
5
+ require_relative 'endpoints/admin_analytics_messages'
5
6
  require_relative 'endpoints/admin_apps'
6
7
  require_relative 'endpoints/admin_apps_activities'
7
8
  require_relative 'endpoints/admin_apps_approved'
@@ -40,11 +41,14 @@ require_relative 'endpoints/apps_auth_external'
40
41
  require_relative 'endpoints/apps_connections'
41
42
  require_relative 'endpoints/apps_datastore'
42
43
  require_relative 'endpoints/apps_event_authorizations'
44
+ require_relative 'endpoints/apps_icon'
43
45
  require_relative 'endpoints/apps_manifest'
46
+ require_relative 'endpoints/apps_user_connection'
44
47
  require_relative 'endpoints/assistant_search'
45
48
  require_relative 'endpoints/assistant_threads'
46
49
  require_relative 'endpoints/auth'
47
50
  require_relative 'endpoints/auth_teams'
51
+ require_relative 'endpoints/blocks'
48
52
  require_relative 'endpoints/bookmarks'
49
53
  require_relative 'endpoints/bots'
50
54
  require_relative 'endpoints/calls'
@@ -61,6 +65,7 @@ require_relative 'endpoints/conversations_requestSharedInvite'
61
65
  require_relative 'endpoints/dialog'
62
66
  require_relative 'endpoints/dnd'
63
67
  require_relative 'endpoints/emoji'
68
+ require_relative 'endpoints/entity'
64
69
  require_relative 'endpoints/files'
65
70
  require_relative 'endpoints/files_comments'
66
71
  require_relative 'endpoints/files_remote'
@@ -71,6 +76,7 @@ require_relative 'endpoints/functions_workflows_steps_responses'
71
76
  require_relative 'endpoints/migration'
72
77
  require_relative 'endpoints/oauth'
73
78
  require_relative 'endpoints/oauth_v2'
79
+ require_relative 'endpoints/oauth_v2_user'
74
80
  require_relative 'endpoints/openid_connect'
75
81
  require_relative 'endpoints/pins'
76
82
  require_relative 'endpoints/reactions'
@@ -107,6 +113,7 @@ module Slack
107
113
  include Slack::Web::Api::Mixins::Users
108
114
 
109
115
  include AdminAnalytics
116
+ include AdminAnalyticsMessages
110
117
  include AdminApps
111
118
  include AdminAppsActivities
112
119
  include AdminAppsApproved
@@ -145,11 +152,14 @@ module Slack
145
152
  include AppsConnections
146
153
  include AppsDatastore
147
154
  include AppsEventAuthorizations
155
+ include AppsIcon
148
156
  include AppsManifest
157
+ include AppsUserConnection
149
158
  include AssistantSearch
150
159
  include AssistantThreads
151
160
  include Auth
152
161
  include AuthTeams
162
+ include Blocks
153
163
  include Bookmarks
154
164
  include Bots
155
165
  include Calls
@@ -166,6 +176,7 @@ module Slack
166
176
  include Dialog
167
177
  include Dnd
168
178
  include Emoji
179
+ include Entity
169
180
  include Files
170
181
  include FilesComments
171
182
  include FilesRemote
@@ -176,6 +187,7 @@ module Slack
176
187
  include Migration
177
188
  include Oauth
178
189
  include OauthV2
190
+ include OauthV2User
179
191
  include OpenidConnect
180
192
  include Pins
181
193
  include Reactions
File without changes
File without changes
File without changes
File without changes