slack-ruby-client 2.7.0 → 3.1.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 (207) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +1 -1
  3. data/.github/workflows/pr_lint.yml +1 -1
  4. data/.github/workflows/test.yml +4 -11
  5. data/.github/workflows/update_api.yml +1 -1
  6. data/.rubocop_todo.yml +45 -67
  7. data/CHANGELOG.md +12 -0
  8. data/Gemfile +0 -9
  9. data/LICENSE.md +1 -1
  10. data/README.md +16 -219
  11. data/Rakefile +0 -1
  12. data/UPGRADING.md +4 -0
  13. data/bin/commands/admin_analytics.rb +1 -1
  14. data/bin/commands/admin_apps.rb +4 -4
  15. data/bin/commands/admin_apps_activities.rb +7 -7
  16. data/bin/commands/admin_apps_approved.rb +4 -4
  17. data/bin/commands/admin_apps_config.rb +3 -1
  18. data/bin/commands/admin_apps_requests.rb +5 -5
  19. data/bin/commands/admin_apps_restricted.rb +4 -4
  20. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  21. data/bin/commands/admin_auth_policy.rb +5 -5
  22. data/bin/commands/admin_barriers.rb +3 -3
  23. data/bin/commands/admin_conversations.rb +15 -15
  24. data/bin/commands/admin_conversations_ekm.rb +2 -2
  25. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  26. data/bin/commands/admin_emoji.rb +5 -5
  27. data/bin/commands/admin_functions.rb +4 -3
  28. data/bin/commands/admin_functions_permissions.rb +2 -2
  29. data/bin/commands/admin_inviteRequests.rb +3 -3
  30. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  31. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  32. data/bin/commands/admin_roles.rb +3 -3
  33. data/bin/commands/admin_teams.rb +3 -3
  34. data/bin/commands/admin_teams_admins.rb +2 -2
  35. data/bin/commands/admin_teams_owners.rb +2 -2
  36. data/bin/commands/admin_teams_settings.rb +5 -5
  37. data/bin/commands/admin_usergroups.rb +4 -4
  38. data/bin/commands/admin_users.rb +22 -11
  39. data/bin/commands/admin_users_session.rb +6 -5
  40. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  41. data/bin/commands/admin_workflows.rb +6 -6
  42. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  43. data/bin/commands/apps_activities.rb +7 -7
  44. data/bin/commands/apps_auth_external.rb +1 -1
  45. data/bin/commands/apps_datastore.rb +12 -12
  46. data/bin/commands/apps_event_authorizations.rb +3 -3
  47. data/bin/commands/apps_manifest.rb +1 -1
  48. data/bin/commands/assistant_search.rb +22 -3
  49. data/bin/commands/assistant_threads.rb +3 -2
  50. data/bin/commands/auth.rb +1 -1
  51. data/bin/commands/auth_teams.rb +1 -1
  52. data/bin/commands/bookmarks.rb +6 -6
  53. data/bin/commands/calls.rb +5 -5
  54. data/bin/commands/canvases.rb +2 -2
  55. data/bin/commands/canvases_access.rb +1 -1
  56. data/bin/commands/chat.rb +63 -25
  57. data/bin/commands/conversations.rb +8 -8
  58. data/bin/commands/conversations_canvases.rb +1 -1
  59. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  60. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  61. data/bin/commands/dnd.rb +1 -1
  62. data/bin/commands/entity.rb +24 -0
  63. data/bin/commands/files.rb +6 -6
  64. data/bin/commands/files_remote.rb +1 -1
  65. data/bin/commands/functions.rb +1 -1
  66. data/bin/commands/functions_distributions_permissions.rb +15 -15
  67. data/bin/commands/functions_workflows_steps.rb +2 -2
  68. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  69. data/bin/commands/migration.rb +2 -2
  70. data/bin/commands/oauth_v2.rb +2 -1
  71. data/bin/commands/openid_connect.rb +1 -1
  72. data/bin/commands/reactions.rb +3 -3
  73. data/bin/commands/reminders.rb +2 -2
  74. data/bin/commands/rtm.rb +15 -0
  75. data/bin/commands/search.rb +4 -4
  76. data/bin/commands/slackLists.rb +37 -0
  77. data/bin/commands/slackLists_access.rb +34 -0
  78. data/bin/commands/slackLists_download.rb +31 -0
  79. data/bin/commands/slackLists_items.rb +76 -0
  80. data/bin/commands/team.rb +1 -1
  81. data/bin/commands/team_externalTeams.rb +4 -4
  82. data/bin/commands/usergroups.rb +10 -10
  83. data/bin/commands/usergroups_users.rb +5 -5
  84. data/bin/commands/users.rb +1 -1
  85. data/bin/commands/users_discoverableContacts.rb +1 -1
  86. data/bin/commands/views.rb +4 -4
  87. data/bin/commands/workflows_featured.rb +50 -0
  88. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  89. data/examples/oauth_v2/README.md +3 -3
  90. data/lib/slack/version.rb +1 -1
  91. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  92. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  93. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  94. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  95. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  96. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  97. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  98. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  99. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  100. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  101. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  102. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  103. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  104. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  105. data/lib/slack/web/api/endpoints/admin_functions.rb +5 -3
  106. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +1 -1
  107. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  108. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  109. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  110. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  111. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  112. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  113. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  114. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  115. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  116. data/lib/slack/web/api/endpoints/admin_users.rb +40 -25
  117. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  118. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  119. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  120. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  121. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  122. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  123. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  124. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  125. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  126. data/lib/slack/web/api/endpoints/assistant_search.rb +35 -4
  127. data/lib/slack/web/api/endpoints/assistant_threads.rb +9 -7
  128. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  129. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  130. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  131. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  132. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  133. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  134. data/lib/slack/web/api/endpoints/chat.rb +123 -60
  135. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  136. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  137. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  138. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  139. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  140. data/lib/slack/web/api/endpoints/entity.rb +32 -0
  141. data/lib/slack/web/api/endpoints/files.rb +12 -12
  142. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  143. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  144. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  145. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  146. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  147. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  148. data/lib/slack/web/api/endpoints/oauth_v2.rb +4 -2
  149. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  150. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  151. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  152. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  153. data/lib/slack/web/api/endpoints/search.rb +8 -8
  154. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  155. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  156. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  157. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  158. data/lib/slack/web/api/endpoints/team.rb +3 -3
  159. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  160. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  161. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  162. data/lib/slack/web/api/endpoints/users.rb +2 -2
  163. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  164. data/lib/slack/web/api/endpoints/views.rb +9 -9
  165. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  166. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  167. data/lib/slack/web/api/endpoints.rb +12 -2
  168. data/lib/slack/web/api/errors.rb +126 -16
  169. data/lib/slack/web/api/helpers/files.rb +4 -1
  170. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  171. data/lib/slack-ruby-client.rb +0 -12
  172. data/lib/tasks/update.rake +0 -1
  173. data/lib/tasks/web.rake +2 -4
  174. metadata +15 -40
  175. data/.github/workflows/integration_test.yml +0 -45
  176. data/bin/commands/workflows.rb +0 -44
  177. data/examples/hi_real_time_and_web/Gemfile +0 -6
  178. data/examples/hi_real_time_and_web/hi.gif +0 -0
  179. data/examples/hi_real_time_and_web/hi.rb +0 -28
  180. data/examples/hi_real_time_async_async/Gemfile +0 -7
  181. data/examples/hi_real_time_async_async/Procfile +0 -2
  182. data/examples/hi_real_time_async_async/hi.rb +0 -41
  183. data/lib/slack/real_time/api/message.rb +0 -23
  184. data/lib/slack/real_time/api/message_id.rb +0 -15
  185. data/lib/slack/real_time/api/ping.rb +0 -19
  186. data/lib/slack/real_time/api/schema/event.json +0 -23
  187. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  188. data/lib/slack/real_time/api/typing.rb +0 -20
  189. data/lib/slack/real_time/client.rb +0 -271
  190. data/lib/slack/real_time/concurrency/async.rb +0 -142
  191. data/lib/slack/real_time/concurrency.rb +0 -8
  192. data/lib/slack/real_time/config.rb +0 -62
  193. data/lib/slack/real_time/models/base.rb +0 -11
  194. data/lib/slack/real_time/models/bot.rb +0 -9
  195. data/lib/slack/real_time/models/channel.rb +0 -13
  196. data/lib/slack/real_time/models/im.rb +0 -9
  197. data/lib/slack/real_time/models/mpim.rb +0 -9
  198. data/lib/slack/real_time/models/team.rb +0 -9
  199. data/lib/slack/real_time/models/user.rb +0 -9
  200. data/lib/slack/real_time/models.rb +0 -9
  201. data/lib/slack/real_time/socket.rb +0 -118
  202. data/lib/slack/real_time/stores/base.rb +0 -47
  203. data/lib/slack/real_time/stores/starter.rb +0 -449
  204. data/lib/slack/real_time/stores/store.rb +0 -624
  205. data/lib/slack/real_time/stores.rb +0 -5
  206. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  207. data/lib/tasks/real_time.rake +0 -81
@@ -6,6 +6,25 @@ 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 [timestamp] :ts
15
+ # The timestamp of the streaming message.
16
+ # @option options [string] :markdown_text
17
+ # 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.
18
+ # @see https://api.slack.com/methods/chat.appendStream
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.appendStream.json
20
+ def chat_appendStream(options = {})
21
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
22
+ raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
23
+ raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
24
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
25
+ post('chat.appendStream', options)
26
+ end
27
+
9
28
  #
10
29
  # Execute a slash command in a public channel (undocumented)
11
30
  #
@@ -27,12 +46,12 @@ module Slack
27
46
  #
28
47
  # Deletes a message.
29
48
  #
49
+ # @option options [boolean] :as_user
50
+ # (Legacy) Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. See legacy as_user parameter below.
30
51
  # @option options [channel] :channel
31
52
  # Channel containing the message to be deleted.
32
53
  # @option options [timestamp] :ts
33
54
  # Timestamp of the message to be deleted.
34
- # @option options [boolean] :as_user
35
- # Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.
36
55
  # @see https://api.slack.com/methods/chat.delete
37
56
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.delete.json
38
57
  def chat_delete(options = {})
@@ -45,12 +64,12 @@ module Slack
45
64
  #
46
65
  # Deletes a pending scheduled message from the queue.
47
66
  #
67
+ # @option options [boolean] :as_user
68
+ # Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.
48
69
  # @option options [channel] :channel
49
70
  # The channel the scheduled_message is posting to.
50
71
  # @option options [string] :scheduled_message_id
51
72
  # scheduled_message_id returned from call to chat.scheduleMessage.
52
- # @option options [boolean] :as_user
53
- # Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.
54
73
  # @see https://api.slack.com/methods/chat.deleteScheduledMessage
55
74
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.deleteScheduledMessage.json
56
75
  def chat_deleteScheduledMessage(options = {})
@@ -94,18 +113,14 @@ module Slack
94
113
  #
95
114
  # Sends an ephemeral message to a user in a channel.
96
115
  #
97
- # @option options [channel] :channel
98
- # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
99
- # @option options [user] :user
100
- # id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.
116
+ # @option options [boolean] :as_user
117
+ # (Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.
101
118
  # @option options [string] :attachments
102
119
  # A JSON-based array of structured attachments, presented as a URL-encoded string.
103
- # @option options [blocks[] as string] :blocks
120
+ # @option options [string] :blocks
104
121
  # A JSON-based array of structured blocks, presented as a URL-encoded string.
105
- # @option options [string] :text
106
- # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
107
- # @option options [boolean] :as_user
108
- # (Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.
122
+ # @option options [channel] :channel
123
+ # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
109
124
  # @option options [string] :icon_emoji
110
125
  # Emoji to use as the icon for this message. Overrides icon_url.
111
126
  # @option options [string] :icon_url
@@ -116,8 +131,12 @@ module Slack
116
131
  # 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.
117
132
  # @option options [string] :parse
118
133
  # Change how messages are treated. Defaults to none. See below.
134
+ # @option options [string] :text
135
+ # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
119
136
  # @option options [string] :thread_ts
120
137
  # Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread.
138
+ # @option options [user] :user
139
+ # id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.
121
140
  # @option options [string] :username
122
141
  # Set your bot's user name.
123
142
  # @see https://api.slack.com/methods/chat.postEphemeral
@@ -134,18 +153,16 @@ module Slack
134
153
  #
135
154
  # Sends a message to a channel.
136
155
  #
137
- # @option options [channel] :channel
138
- # 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.
139
- # @option options [string] :attachments
140
- # A JSON-based array of structured attachments, presented as a URL-encoded string.
141
- # @option options [blocks[] as string] :blocks
142
- # A JSON-based array of structured blocks, presented as a URL-encoded string.
143
- # @option options [string] :text
144
- # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
145
- # @option options [Object] :agent_message_source_type
146
- # Identify how the message was posted for agentforce BE logging.
147
156
  # @option options [boolean] :as_user
148
157
  # (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.
158
+ # @option options [["string", "boolean"]] :attachments
159
+ # A JSON-based array of structured attachments, presented as a URL-encoded string.
160
+ # @option options [string] :blocks
161
+ # A JSON-based array of structured blocks, presented as a URL-encoded string.
162
+ # @option options [channel] :channel
163
+ # 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.
164
+ # @option options [string] :current_draft_last_updated_ts
165
+ # 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.
149
166
  # @option options [string] :icon_emoji
150
167
  # Emoji to use as the icon for this message. Overrides icon_url.
151
168
  # @option options [string] :icon_url
@@ -162,6 +179,8 @@ module Slack
162
179
  # Change how messages are treated. See below.
163
180
  # @option options [boolean] :reply_broadcast
164
181
  # Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
182
+ # @option options [string] :text
183
+ # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
165
184
  # @option options [string] :thread_ts
166
185
  # Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead.
167
186
  # @option options [boolean] :unfurl_links
@@ -182,34 +201,34 @@ module Slack
182
201
  #
183
202
  # Schedules a message to be sent to a channel.
184
203
  #
185
- # @option options [channel] :channel
186
- # Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.
187
- # @option options [integer] :post_at
188
- # Unix timestamp representing the future time the message should post to Slack.
204
+ # @option options [boolean] :as_user
205
+ # Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.
189
206
  # @option options [string] :attachments
190
207
  # A JSON-based array of structured attachments, presented as a URL-encoded string.
191
- # @option options [blocks[] as string] :blocks
208
+ # @option options [string] :blocks
192
209
  # A JSON-based array of structured blocks, presented as a URL-encoded string.
193
- # @option options [string] :text
194
- # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
195
- # @option options [boolean] :as_user
196
- # Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.
210
+ # @option options [channel] :channel
211
+ # Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.
197
212
  # @option options [boolean] :link_names
198
213
  # Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
199
214
  # @option options [string] :markdown_text
200
215
  # 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.
201
- # @option options [string] :metadata
202
- # 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.
203
216
  # @option options [enum] :parse
204
217
  # Change how messages are treated. See chat.postMessage.
218
+ # @option options [integer] :post_at
219
+ # Unix timestamp representing the future time the message should post to Slack.
205
220
  # @option options [boolean] :reply_broadcast
206
221
  # Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
222
+ # @option options [string] :text
223
+ # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
207
224
  # @option options [string] :thread_ts
208
225
  # Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead.
209
226
  # @option options [boolean] :unfurl_links
210
227
  # Pass true to enable unfurling of primarily text-based content.
211
228
  # @option options [boolean] :unfurl_media
212
229
  # Pass false to disable unfurling of media content.
230
+ # @option options [string] :metadata
231
+ # 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.
213
232
  # @see https://api.slack.com/methods/chat.scheduleMessage
214
233
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.scheduleMessage.json
215
234
  def chat_scheduleMessage(options = {})
@@ -220,6 +239,51 @@ module Slack
220
239
  post('chat.scheduleMessage', options)
221
240
  end
222
241
 
242
+ #
243
+ # Starts a new streaming conversation.
244
+ #
245
+ # @option options [channel] :channel
246
+ # An encoded ID that represents a channel, private group, or DM.
247
+ # @option options [string] :markdown_text
248
+ # Accepts message text formatted in markdown. Limit this field to 12,000 characters.
249
+ # @option options [string] :thread_ts
250
+ # Provide another message's ts value to reply to. Streamed messages should always be replies to a user request.
251
+ # @option options [Object] :recipient_user_id
252
+ # The encoded ID of the user to receive the streaming text. Required when streaming to channels.
253
+ # @option options [string] :recipient_team_id
254
+ # The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
255
+ # @see https://api.slack.com/methods/chat.startStream
256
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
257
+ def chat_startStream(options = {})
258
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
259
+ raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
260
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
261
+ post('chat.startStream', options)
262
+ end
263
+
264
+ #
265
+ # Stops a streaming conversation.
266
+ #
267
+ # @option options [channel] :channel
268
+ # An encoded ID that represents a channel, private group, or DM.
269
+ # @option options [timestamp] :ts
270
+ # The timestamp of the streaming message.
271
+ # @option options [string] :markdown_text
272
+ # Accepts message text formatted in markdown. Limit this field to 12,000 characters.
273
+ # @option options [Object] :blocks
274
+ # A list of blocks that will be rendered at the bottom of the finalized message.
275
+ # @option options [string] :metadata
276
+ # 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.
277
+ # @see https://api.slack.com/methods/chat.stopStream
278
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
279
+ def chat_stopStream(options = {})
280
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
281
+ raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
282
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
283
+ options = encode_options_as_json(options, %i[metadata])
284
+ post('chat.stopStream', options)
285
+ end
286
+
223
287
  #
224
288
  # Provide custom unfurl behavior for user-posted URLs
225
289
  #
@@ -228,57 +292,56 @@ module Slack
228
292
  # @option options [timestamp] :ts
229
293
  # Timestamp of the message to add unfurl behavior to.
230
294
  # @option options [string] :unfurls
231
- # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.
232
- # @option options [enum] :source
233
- # The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.
234
- # @option options [string] :unfurl_id
235
- # The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.
236
- # @option options [Object] :user_auth_blocks
237
- # Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.
238
- # @option options [Object] :user_auth_message
295
+ # URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Either unfurls or metadata must be provided.
296
+ # @option options [string] :user_auth_message
239
297
  # 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.
240
298
  # @option options [boolean] :user_auth_required
241
299
  # Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.
242
- # @option options [Object] :user_auth_url
300
+ # @option options [string] :user_auth_url
243
301
  # Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.
302
+ # @option options [Object] :user_auth_blocks
303
+ # Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.
304
+ # @option options [string] :unfurl_id
305
+ # The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.
306
+ # @option options [enum] :source
307
+ # The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.
308
+ # @option options [string] :metadata
309
+ # JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.
244
310
  # @see https://api.slack.com/methods/chat.unfurl
245
311
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
246
312
  def chat_unfurl(options = {})
247
- raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
248
- raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
249
- raise ArgumentError, 'Required arguments :unfurls missing' if options[:unfurls].nil?
250
313
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
251
- options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
314
+ options = encode_options_as_json(options, %i[unfurls user_auth_blocks metadata])
252
315
  post('chat.unfurl', options)
253
316
  end
254
317
 
255
318
  #
256
319
  # Updates a message.
257
320
  #
258
- # @option options [channel] :channel
259
- # Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with D) instead of a User ID (starts with either U or W).
260
- # @option options [timestamp] :ts
261
- # Timestamp of the message to be updated.
321
+ # @option options [["boolean", "string"]] :as_user
322
+ # Pass true to update the message as the authed user. Bot users in this context are considered authed users.
262
323
  # @option options [string] :attachments
263
324
  # A JSON-based array of structured attachments, presented as a URL-encoded string.
264
- # @option options [blocks[] as string] :blocks
325
+ # @option options [string] :blocks
265
326
  # A JSON-based array of structured blocks, presented as a URL-encoded string.
266
- # @option options [string] :text
267
- # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
268
- # @option options [boolean] :as_user
269
- # Pass true to update the message as the authed user. Bot users in this context are considered authed users.
270
- # @option options [array] :file_ids
271
- # Array of new file ids that will be sent with this message.
272
- # @option options [boolean] :link_names
273
- # Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.
274
327
  # @option options [string] :markdown_text
275
328
  # 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.
276
329
  # @option options [string] :metadata
277
330
  # JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.
331
+ # @option options [channel] :channel
332
+ # Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with D) instead of a User ID (starts with either U or W).
333
+ # @option options [["boolean", "string"]] :link_names
334
+ # Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.
278
335
  # @option options [string] :parse
279
336
  # Change how messages are treated. Defaults to client, unlike chat.postMessage. Accepts either none or full. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, client.
337
+ # @option options [string] :text
338
+ # How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
339
+ # @option options [timestamp] :ts
340
+ # Timestamp of the message to be updated.
280
341
  # @option options [boolean] :reply_broadcast
281
342
  # Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.
343
+ # @option options [array] :file_ids
344
+ # Array of new file ids that will be sent with this message.
282
345
  # @see https://api.slack.com/methods/chat.update
283
346
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.update.json
284
347
  def chat_update(options = {})
@@ -11,14 +11,14 @@ module Slack
11
11
  #
12
12
  # @option options [string] :channel_name
13
13
  # Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take.
14
- # @option options [Object] :channel_id
15
- # ID of the channel that you'd like to accept. Must provide either invite_id or channel_id.
14
+ # @option options [boolean] :is_private
15
+ # Whether the channel should be private.
16
16
  # @option options [boolean] :free_trial_accepted
17
17
  # Whether you'd like to use your workspace's free trial to begin using Slack Connect.
18
18
  # @option options [Object] :invite_id
19
19
  # ID of the invite that you'd like to accept. Must provide either invite_id or channel_id. See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.
20
- # @option options [boolean] :is_private
21
- # Whether the channel should be private.
20
+ # @option options [Object] :channel_id
21
+ # ID of the channel that you'd like to accept. Must provide either invite_id or channel_id.
22
22
  # @option options [Object] :team_id
23
23
  # The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the team_id argument is required.
24
24
  # @see https://api.slack.com/methods/conversations.acceptSharedInvite
@@ -71,10 +71,10 @@ module Slack
71
71
  #
72
72
  # Initiates a public or private channel-based conversation
73
73
  #
74
- # @option options [string] :name
75
- # Name of the public or private channel to create.
76
74
  # @option options [boolean] :is_private
77
75
  # Create a private channel instead of a public one.
76
+ # @option options [string] :name
77
+ # Name of the public or private channel to create.
78
78
  # @option options [string] :team_id
79
79
  # encoded team id to create the channel in, required if org token is used.
80
80
  # @see https://api.slack.com/methods/conversations.create
@@ -151,10 +151,10 @@ module Slack
151
151
  #
152
152
  # @option options [channel] :channel
153
153
  # The ID of the public or private channel to invite user(s) to.
154
- # @option options [string] :users
155
- # A comma separated list of user IDs. Up to 1000 users may be listed.
156
154
  # @option options [boolean] :force
157
155
  # When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.
156
+ # @option options [string] :users
157
+ # A comma separated list of user IDs. Up to 100 users may be listed.
158
158
  # @see https://api.slack.com/methods/conversations.invite
159
159
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json
160
160
  def conversations_invite(options = {})
@@ -171,10 +171,10 @@ module Slack
171
171
  # ID of the channel on your team that you'd like to share.
172
172
  # @option options [array] :emails
173
173
  # Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
174
- # @option options [boolean] :external_limited
175
- # Optional boolean on whether invite is to an external limited member. Defaults to true.
176
174
  # @option options [array] :user_ids
177
175
  # Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
176
+ # @option options [boolean] :external_limited
177
+ # Optional boolean on whether invite is to an external limited member. Defaults to true.
178
178
  # @see https://api.slack.com/methods/conversations.inviteShared
179
179
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.inviteShared.json
180
180
  def conversations_inviteShared(options = {})
@@ -253,10 +253,10 @@ module Slack
253
253
  #
254
254
  # Lists shared channel invites that have been generated or received but have not been approved by all parties
255
255
  #
256
- # @option options [string] :cursor
257
- # Set to next_cursor returned by previous call to list items in subsequent page.
258
256
  # @option options [string] :team_id
259
257
  # Encoded team id for the workspace to retrieve invites for, required if org token is used.
258
+ # @option options [string] :cursor
259
+ # Set to next_cursor returned by previous call to list items in subsequent page.
260
260
  # @see https://api.slack.com/methods/conversations.listConnectInvites
261
261
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.listConnectInvites.json
262
262
  def conversations_listConnectInvites(options = {})
@@ -313,12 +313,12 @@ module Slack
313
313
  #
314
314
  # @option options [channel] :channel
315
315
  # Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead.
316
- # @option options [boolean] :prevent_creation
317
- # Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.
318
316
  # @option options [boolean] :return_im
319
317
  # Boolean, indicates you want the full IM channel definition in the response.
320
318
  # @option options [string] :users
321
319
  # Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users.
320
+ # @option options [boolean] :prevent_creation
321
+ # Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.
322
322
  # @see https://api.slack.com/methods/conversations.open
323
323
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.open.json
324
324
  def conversations_open(options = {})
@@ -347,8 +347,6 @@ module Slack
347
347
  #
348
348
  # @option options [channel] :channel
349
349
  # Conversation ID to fetch thread from.
350
- # @option options [timestamp] :ts
351
- # Unique identifier of either a thread's parent message or a message in the thread. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message.
352
350
  # @option options [string] :cursor
353
351
  # 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.
354
352
  # @option options [boolean] :include_all_metadata
@@ -361,6 +359,8 @@ module Slack
361
359
  # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
362
360
  # @option options [timestamp] :oldest
363
361
  # Only messages after this Unix timestamp will be included in results.
362
+ # @option options [timestamp] :ts
363
+ # Unique identifier of either a thread's parent message or a message in the thread. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message.
364
364
  # @see https://api.slack.com/methods/conversations.replies
365
365
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.replies.json
366
366
  def conversations_replies(options = {})
@@ -10,7 +10,7 @@ module Slack
10
10
  # Create a channel canvas for a channel
11
11
  #
12
12
  # @option options [string] :channel_id
13
- # Channel ID of the channel we create the channel canvas for.
13
+ # Channel ID of the channel the canvas will be tabbed in.
14
14
  # @option options [Object] :document_content
15
15
  # Structure describing the type and value of the content to create.
16
16
  # @option options [string] :title
@@ -9,18 +9,18 @@ module Slack
9
9
  #
10
10
  # Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'.
11
11
  #
12
- # @option options [enum] :action
13
- # Type of action to be taken: upgrade or downgrade.
14
12
  # @option options [channel] :channel
15
13
  # The channel ID to change external invite permissions for.
16
14
  # @option options [Object] :target_team
17
15
  # The encoded team ID of the target team. Must be in the specified channel.
16
+ # @option options [enum] :action
17
+ # Type of action to be taken: upgrade or downgrade.
18
18
  # @see https://api.slack.com/methods/conversations.externalInvitePermissions.set
19
19
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.externalInvitePermissions/conversations.externalInvitePermissions.set.json
20
20
  def conversations_externalInvitePermissions_set(options = {})
21
- raise ArgumentError, 'Required arguments :action missing' if options[:action].nil?
22
21
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
23
22
  raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil?
23
+ raise ArgumentError, 'Required arguments :action missing' if options[:action].nil?
24
24
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
25
25
  post('conversations.externalInvitePermissions.set', options)
26
26
  end
@@ -11,10 +11,10 @@ module Slack
11
11
  #
12
12
  # @option options [Object] :invite_id
13
13
  # ID of the requested shared channel invite to approve.
14
- # @option options [string] :channel_id
15
- # Optional channel_id to which external user will be invited to. Will override the value on the requested invite.
16
14
  # @option options [boolean] :is_external_limited
17
15
  # Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.
16
+ # @option options [string] :channel_id
17
+ # Optional channel_id to which external user will be invited to. Will override the value on the requested invite.
18
18
  # @option options [object] :message
19
19
  # Object describing the text to send along with the invite. If this object is specified, both text and is_override are required properties. If is_override is set to true, text will override the original invitation message. Otherwise, text will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If is_override is set to false, the length of text and the user specified message on the invite request in total must be less than 560 characters.
20
20
  # @see https://api.slack.com/methods/conversations.requestSharedInvite.approve
@@ -41,20 +41,20 @@ module Slack
41
41
  #
42
42
  # Lists requests to add external users to channels with ability to filter.
43
43
  #
44
- # @option options [string] :cursor
45
- # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail.
44
+ # @option options [Object] :user_id
45
+ # Optional filter to return invitation requests for the inviting user.
46
+ # @option options [boolean] :include_expired
47
+ # When true expired invitation requests will be returned, otherwise they will be excluded.
46
48
  # @option options [boolean] :include_approved
47
49
  # When true approved invitation requests will be returned, otherwise they will be excluded.
48
50
  # @option options [boolean] :include_denied
49
51
  # When true denied invitation requests will be returned, otherwise they will be excluded.
50
- # @option options [boolean] :include_expired
51
- # When true expired invitation requests will be returned, otherwise they will be excluded.
52
52
  # @option options [array] :invite_ids
53
53
  # An optional list of invitation ids to look up.
54
54
  # @option options [integer] :limit
55
55
  # The number of items to return. Must be between 1 - 1000 (inclusive).
56
- # @option options [Object] :user_id
57
- # Optional filter to return invitation requests for the inviting user.
56
+ # @option options [string] :cursor
57
+ # Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail.
58
58
  # @see https://api.slack.com/methods/conversations.requestSharedInvite.list
59
59
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.requestSharedInvite/conversations.requestSharedInvite.list.json
60
60
  def conversations_requestSharedInvite_list(options = {})
@@ -27,10 +27,10 @@ module Slack
27
27
  #
28
28
  # Retrieves a user's current Do Not Disturb status.
29
29
  #
30
- # @option options [string] :team_id
31
- # Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.
32
30
  # @option options [user] :user
33
31
  # User to fetch status for (defaults to current user).
32
+ # @option options [string] :team_id
33
+ # Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.
34
34
  # @see https://api.slack.com/methods/dnd.info
35
35
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.info.json
36
36
  def dnd_info(options = {})
@@ -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
@@ -11,16 +11,16 @@ module Slack
11
11
  #
12
12
  # @option options [array] :files
13
13
  # Array of file ids and their corresponding (optional) titles.
14
- # @option options [blocks[] as string] :blocks
15
- # A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.
16
14
  # @option options [Object] :channel_id
17
15
  # Channel ID where the file will be shared. If not specified the file will be private.
16
+ # @option options [string] :thread_ts
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
- # @option options [string] :thread_ts
23
- # 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'.
22
+ # @option options [string] :blocks
23
+ # A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.
24
24
  # @see https://api.slack.com/methods/files.completeUploadExternal
25
25
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
26
26
  def files_completeUploadExternal(options = {})
@@ -61,29 +61,29 @@ module Slack
61
61
  #
62
62
  # Gets a URL for an edge external file upload
63
63
  #
64
- # @option options [string] :filename
65
- # Name of the file being uploaded.
66
64
  # @option options [integer] :length
67
65
  # Size in bytes of the file being uploaded.
68
- # @option options [string] :alt_txt
69
- # Description of image for screen-reader.
66
+ # @option options [string] :filename
67
+ # Name of the file being uploaded.
70
68
  # @option options [string] :snippet_type
71
69
  # Syntax type of the snippet being uploaded.
70
+ # @option options [string] :alt_txt
71
+ # Description of image for screen-reader.
72
72
  # @see https://api.slack.com/methods/files.getUploadURLExternal
73
73
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.getUploadURLExternal.json
74
74
  def files_getUploadURLExternal(options = {})
75
- raise ArgumentError, 'Required arguments :filename missing' if options[:filename].nil?
76
75
  raise ArgumentError, 'Required arguments :length missing' if options[:length].nil?
76
+ raise ArgumentError, 'Required arguments :filename missing' if options[:filename].nil?
77
77
  post('files.getUploadURLExternal', options)
78
78
  end
79
79
 
80
80
  #
81
81
  # Gets information about a file.
82
82
  #
83
- # @option options [file] :file
84
- # Specify a file by providing its ID.
85
83
  # @option options [string] :cursor
86
84
  # Parameter for pagination. File comments are paginated for a single file. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection of comments. See pagination for more details.
85
+ # @option options [file] :file
86
+ # Specify a file by providing its ID.
87
87
  # @option options [integer] :limit
88
88
  # The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
89
89
  # @see https://api.slack.com/methods/files.info
@@ -13,14 +13,14 @@ module Slack
13
13
  # Creator defined GUID for the file.
14
14
  # @option options [string] :external_url
15
15
  # URL of the remote file.
16
- # @option options [string] :title
17
- # Title of the file being shared.
18
16
  # @option options [string] :filetype
19
17
  # type of file.
20
18
  # @option options [Object] :indexable_file_contents
21
19
  # A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
22
20
  # @option options [Object] :preview_image
23
21
  # Preview of the document via multipart/form-data.
22
+ # @option options [string] :title
23
+ # Title of the file being shared.
24
24
  # @see https://api.slack.com/methods/files.remote.add
25
25
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json
26
26
  def files_remote_add(options = {})