slack-ruby-client 0.14.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.rubocop.yml +15 -3
  4. data/.rubocop_todo.yml +110 -38
  5. data/.travis.yml +2 -5
  6. data/CHANGELOG.md +42 -0
  7. data/CONTRIBUTING.md +19 -8
  8. data/Dangerfile +1 -1
  9. data/Gemfile +1 -2
  10. data/LICENSE.md +1 -1
  11. data/README.md +38 -36
  12. data/RELEASING.md +1 -1
  13. data/UPGRADING.md +62 -2
  14. data/bin/commands/admin_analytics.rb +16 -0
  15. data/bin/commands/admin_apps.rb +26 -2
  16. data/bin/commands/admin_apps_requests.rb +1 -0
  17. data/bin/commands/admin_auth_policy.rb +39 -0
  18. data/bin/commands/admin_barriers.rb +47 -0
  19. data/bin/commands/admin_conversations.rb +155 -3
  20. data/bin/commands/admin_conversations_ekm.rb +17 -0
  21. data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
  22. data/bin/commands/admin_conversations_whitelist.rb +37 -0
  23. data/bin/commands/admin_emoji.rb +1 -1
  24. data/bin/commands/admin_teams.rb +1 -1
  25. data/bin/commands/admin_usergroups.rb +48 -0
  26. data/bin/commands/admin_users.rb +3 -2
  27. data/bin/commands/admin_users_session.rb +62 -0
  28. data/bin/commands/api.rb +0 -1
  29. data/bin/commands/apps_connections.rb +13 -0
  30. data/bin/commands/apps_event_authorizations.rb +16 -0
  31. data/bin/commands/apps_manifest.rb +51 -0
  32. data/bin/commands/auth_teams.rb +16 -0
  33. data/bin/commands/bots.rb +1 -0
  34. data/bin/commands/calls.rb +52 -0
  35. data/bin/commands/calls_participants.rb +25 -0
  36. data/bin/commands/channels.rb +1 -155
  37. data/bin/commands/chat.rb +17 -12
  38. data/bin/commands/chat_scheduledMessages.rb +1 -0
  39. data/bin/commands/conversations.rb +71 -3
  40. data/bin/commands/dnd.rb +2 -0
  41. data/bin/commands/files.rb +6 -4
  42. data/bin/commands/files_remote.rb +2 -2
  43. data/bin/commands/groups.rb +1 -162
  44. data/bin/commands/im.rb +1 -63
  45. data/bin/commands/migration.rb +1 -0
  46. data/bin/commands/mpim.rb +1 -61
  47. data/bin/commands/oauth.rb +0 -13
  48. data/bin/commands/oauth_v2.rb +13 -1
  49. data/bin/commands/openid_connect.rb +27 -0
  50. data/bin/commands/pins.rb +2 -4
  51. data/bin/commands/reactions.rb +1 -0
  52. data/bin/commands/reminders.rb +6 -0
  53. data/bin/commands/rtm.rb +2 -2
  54. data/bin/commands/search.rb +4 -0
  55. data/bin/commands/stars.rb +7 -6
  56. data/bin/commands/team.rb +3 -0
  57. data/bin/commands/team_billing.rb +13 -0
  58. data/bin/commands/team_preferences.rb +13 -0
  59. data/bin/commands/tooling_tokens.rb +14 -0
  60. data/bin/commands/usergroups.rb +5 -0
  61. data/bin/commands/usergroups_users.rb +2 -0
  62. data/bin/commands/users.rb +4 -2
  63. data/bin/commands/users_profile.rb +5 -5
  64. data/bin/commands/views.rb +2 -2
  65. data/bin/commands/workflows.rb +38 -0
  66. data/bin/commands.rb +17 -8
  67. data/lib/slack/config.rb +1 -2
  68. data/lib/slack/events/request.rb +10 -4
  69. data/lib/slack/messages/message.rb +0 -4
  70. data/lib/slack/real_time/client.rb +6 -6
  71. data/lib/slack/real_time/concurrency/async.rb +7 -11
  72. data/lib/slack/real_time/concurrency.rb +0 -2
  73. data/lib/slack/real_time/config.rb +5 -14
  74. data/lib/slack/real_time/models/base.rb +0 -4
  75. data/lib/slack/real_time/socket.rb +3 -4
  76. data/lib/slack/real_time/stores/base.rb +4 -7
  77. data/lib/slack/real_time/stores/starter.rb +6 -3
  78. data/lib/slack/real_time/stores/store.rb +5 -0
  79. data/lib/slack/version.rb +1 -1
  80. data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
  81. data/lib/slack/web/api/endpoints/admin_apps.rb +42 -6
  82. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +2 -2
  83. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +4 -2
  84. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +2 -2
  85. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
  86. data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
  87. data/lib/slack/web/api/endpoints/admin_conversations.rb +234 -4
  88. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
  89. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
  90. data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +64 -0
  91. data/lib/slack/web/api/endpoints/admin_emoji.rb +10 -10
  92. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +7 -7
  93. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +3 -3
  94. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  95. data/lib/slack/web/api/endpoints/admin_teams.rb +7 -7
  96. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +2 -2
  97. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -2
  98. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +5 -5
  99. data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
  100. data/lib/slack/web/api/endpoints/admin_users.rb +23 -23
  101. data/lib/slack/web/api/endpoints/admin_users_session.rb +97 -3
  102. data/lib/slack/web/api/endpoints/api.rb +1 -3
  103. data/lib/slack/web/api/endpoints/apps.rb +2 -2
  104. data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
  105. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
  106. data/lib/slack/web/api/endpoints/apps_manifest.rb +75 -0
  107. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  108. data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
  109. data/lib/slack/web/api/endpoints/bots.rb +3 -1
  110. data/lib/slack/web/api/endpoints/calls.rb +83 -0
  111. data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
  112. data/lib/slack/web/api/endpoints/channels.rb +1 -245
  113. data/lib/slack/web/api/endpoints/chat.rb +76 -66
  114. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +5 -3
  115. data/lib/slack/web/api/endpoints/conversations.rb +149 -41
  116. data/lib/slack/web/api/endpoints/dialog.rb +2 -2
  117. data/lib/slack/web/api/endpoints/dnd.rb +6 -3
  118. data/lib/slack/web/api/endpoints/files.rb +21 -17
  119. data/lib/slack/web/api/endpoints/files_comments.rb +1 -1
  120. data/lib/slack/web/api/endpoints/files_remote.rb +23 -23
  121. data/lib/slack/web/api/endpoints/groups.rb +0 -253
  122. data/lib/slack/web/api/endpoints/im.rb +0 -101
  123. data/lib/slack/web/api/endpoints/migration.rb +4 -2
  124. data/lib/slack/web/api/endpoints/mpim.rb +0 -96
  125. data/lib/slack/web/api/endpoints/oauth.rb +5 -30
  126. data/lib/slack/web/api/endpoints/oauth_v2.rb +24 -6
  127. data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
  128. data/lib/slack/web/api/endpoints/pins.rb +7 -12
  129. data/lib/slack/web/api/endpoints/reactions.rb +16 -14
  130. data/lib/slack/web/api/endpoints/reminders.rb +17 -5
  131. data/lib/slack/web/api/endpoints/rtm.rb +10 -10
  132. data/lib/slack/web/api/endpoints/search.rb +27 -13
  133. data/lib/slack/web/api/endpoints/stars.rb +13 -11
  134. data/lib/slack/web/api/endpoints/team.rb +11 -5
  135. data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
  136. data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
  137. data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
  138. data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
  139. data/lib/slack/web/api/endpoints/usergroups.rb +26 -16
  140. data/lib/slack/web/api/endpoints/usergroups_users.rb +9 -5
  141. data/lib/slack/web/api/endpoints/users.rb +20 -18
  142. data/lib/slack/web/api/endpoints/users_profile.rb +7 -7
  143. data/lib/slack/web/api/endpoints/views.rb +13 -13
  144. data/lib/slack/web/api/endpoints/workflows.rb +61 -0
  145. data/lib/slack/web/api/endpoints.rb +35 -18
  146. data/lib/slack/web/api/errors/server_error.rb +37 -0
  147. data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -4
  148. data/lib/slack/web/api/errors.rb +486 -12
  149. data/lib/slack/web/api/mixins/{channels.id.rb → conversations.id.rb} +3 -5
  150. data/lib/slack/web/api/mixins/ids.id.rb +3 -5
  151. data/lib/slack/web/api/mixins/users.id.rb +1 -3
  152. data/lib/slack/web/api/mixins.rb +1 -2
  153. data/lib/slack/web/api/patches/{chat.6.block-kit-support.patch → chat.1.patch} +25 -24
  154. data/lib/slack/web/api/templates/endpoints.erb +1 -2
  155. data/lib/slack/web/api/templates/method.erb +4 -1
  156. data/lib/slack/web/api/templates/method_spec.erb +1 -1
  157. data/lib/slack/web/config.rb +2 -0
  158. data/lib/slack/web/faraday/connection.rb +23 -20
  159. data/lib/slack/web/faraday/request.rb +2 -1
  160. data/lib/slack/web/faraday/response/raise_error.rb +12 -1
  161. data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
  162. data/lib/slack/web/pagination/cursor.rb +3 -7
  163. data/lib/slack-ruby-client.rb +4 -4
  164. data/lib/tasks/web.rake +11 -3
  165. data/slack-ruby-client.gemspec +6 -7
  166. data/spec/fixtures/slack/web/429_error.yml +50 -54
  167. data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
  168. data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
  169. data/spec/fixtures/slack/web/conversations_info.yml +167 -0
  170. data/spec/fixtures/slack/web/conversations_setTopic.yml +84 -0
  171. data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +172 -0
  172. data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +253 -0
  173. data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
  174. data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
  175. data/spec/fixtures/slack/web/rtm_start.yml +771 -60
  176. data/spec/fixtures/slack/web/users_info.yml +153 -69
  177. data/spec/fixtures/slack/web/users_list.yml +102 -41
  178. data/spec/fixtures/slack/web/views_open_error.yml +49 -42
  179. data/spec/slack/events/request_spec.rb +13 -8
  180. data/spec/slack/real_time/client_spec.rb +35 -22
  181. data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
  182. data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
  183. data/spec/slack/real_time/event_handlers/bot_spec.rb +1 -1
  184. data/spec/slack/real_time/event_handlers/channel_spec.rb +1 -1
  185. data/spec/slack/real_time/event_handlers/im_spec.rb +5 -5
  186. data/spec/slack/real_time/event_handlers/user_spec.rb +2 -2
  187. data/spec/slack/real_time/rtm_connect_spec.rb +1 -1
  188. data/spec/slack/real_time/rtm_start_spec.rb +1 -1
  189. data/spec/slack/slack_spec.rb +3 -1
  190. data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
  191. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +10 -0
  192. data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
  193. data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
  194. data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → admin_conversations_ekm_spec.rb} +1 -1
  195. data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
  196. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +85 -0
  197. data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +6 -6
  198. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +10 -10
  199. data/spec/slack/web/api/endpoints/admin_teams_spec.rb +2 -2
  200. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
  201. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +28 -0
  202. data/spec/slack/web/api/endpoints/admin_users_spec.rb +15 -23
  203. data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → apps_connections_spec.rb} +1 -1
  204. data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
  205. data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
  206. data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
  207. data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
  208. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
  209. data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
  210. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +4 -6
  211. data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
  212. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +2 -2
  213. data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -5
  214. data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
  215. data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
  216. data/spec/slack/web/api/endpoints/files_spec.rb +4 -4
  217. data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -22
  218. data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +6 -3
  219. data/spec/slack/web/api/endpoints/openid_connect_spec.rb +8 -0
  220. data/spec/slack/web/api/endpoints/pins_spec.rb +1 -4
  221. data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
  222. data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
  223. data/spec/slack/web/api/endpoints/team_billing_spec.rb +8 -0
  224. data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
  225. data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
  226. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
  227. data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
  228. data/spec/slack/web/api/error_spec.rb +5 -7
  229. data/spec/slack/web/api/errors/slack_error_spec.rb +21 -26
  230. data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
  231. data/spec/slack/web/api/mixins/{channels_spec.rb → conversations_spec.rb} +8 -8
  232. data/spec/slack/web/api/mixins/users_spec.rb +1 -1
  233. data/spec/slack/web/api/pagination/cursor_spec.rb +1 -3
  234. data/spec/slack/web/client_spec.rb +123 -1
  235. data/spec/slack/web/faraday/request_spec.rb +80 -0
  236. data/spec/slack/web/faraday/response/raise_error_spec.rb +8 -6
  237. data/spec/spec_helper.rb +1 -1
  238. data/spec/support/real_time/connected_client.rb +1 -7
  239. data/spec/support/vcr.rb +36 -1
  240. metadata +95 -173
  241. data/examples/hi_real_time/Gemfile +0 -6
  242. data/examples/hi_real_time/hi.gif +0 -0
  243. data/examples/hi_real_time/hi.rb +0 -41
  244. data/examples/hi_real_time_async_celluloid/Gemfile +0 -7
  245. data/examples/hi_real_time_async_celluloid/Procfile +0 -2
  246. data/examples/hi_real_time_async_celluloid/hi.rb +0 -39
  247. data/examples/hi_real_time_async_eventmachine/Gemfile +0 -7
  248. data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
  249. data/examples/hi_real_time_async_eventmachine/hi.rb +0 -39
  250. data/lib/slack/real_time/concurrency/celluloid.rb +0 -142
  251. data/lib/slack/real_time/concurrency/eventmachine.rb +0 -85
  252. data/lib/slack/web/api/mixins/channels.id.json +0 -20
  253. data/lib/slack/web/api/mixins/groups.id.json +0 -20
  254. data/lib/slack/web/api/mixins/groups.id.rb +0 -27
  255. data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
  256. data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
  257. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
  258. data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
  259. data/lib/slack/web/api/patches/chat.5.postEphemeral-text-or-attachments.patch +0 -15
  260. data/spec/fixtures/slack/web/503_error.yml +0 -14
  261. data/spec/fixtures/slack/web/channels_info.yml +0 -46
  262. data/spec/fixtures/slack/web/groups_info.yml +0 -43
  263. data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -116
  264. data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -57
  265. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -16
  266. data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -19
  267. data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -101
  268. data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -13
  269. data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -13
  270. data/spec/slack/web/api/endpoints/im_spec.rb +0 -39
  271. data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -39
  272. data/spec/slack/web/api/endpoints/views_spec.rb +0 -29
  273. data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -17
  274. data/spec/slack/web/api/mixins/groups_spec.rb +0 -43
@@ -3,6 +3,46 @@
3
3
 
4
4
  desc 'AdminUsersSession methods.'
5
5
  command 'admin_users_session' do |g|
6
+ g.desc 'Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.'
7
+ g.long_desc %( Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users. )
8
+ g.command 'clearSettings' do |c|
9
+ c.flag 'user_ids', desc: "The IDs of users you'd like to clear session settings for."
10
+ c.action do |_global_options, options, _args|
11
+ puts JSON.dump($client.admin_users_session_clearSettings(options))
12
+ end
13
+ end
14
+
15
+ g.desc 'Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.'
16
+ g.long_desc %( Get user-specific session settings—the session duration and what happens when the client closes—given a list of users. )
17
+ g.command 'getSettings' do |c|
18
+ c.flag 'user_ids', desc: "The IDs of users you'd like to fetch session settings for. Note: if a user does not have any active sessions, they will not be returned in the response."
19
+ c.action do |_global_options, options, _args|
20
+ puts JSON.dump($client.admin_users_session_getSettings(options))
21
+ end
22
+ end
23
+
24
+ g.desc 'Revoke a single session for a user. The user will be forced to login to Slack.'
25
+ g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
26
+ g.command 'invalidate' do |c|
27
+ c.flag 'session_id', desc: 'ID of the session to invalidate.'
28
+ c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
29
+ c.action do |_global_options, options, _args|
30
+ puts JSON.dump($client.admin_users_session_invalidate(options))
31
+ end
32
+ end
33
+
34
+ g.desc 'List active user sessions for an organization'
35
+ g.long_desc %( List active user sessions for an organization )
36
+ g.command 'list' do |c|
37
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
38
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
39
+ c.flag 'team_id', desc: "The ID of the workspace you'd like active sessions for. If you pass a team_id, you'll need to pass a user_id as well."
40
+ c.flag 'user_id', desc: "The ID of user you'd like active sessions for. If you pass a user_id, you'll need to pass a team_id as well."
41
+ c.action do |_global_options, options, _args|
42
+ puts JSON.dump($client.admin_users_session_list(options))
43
+ end
44
+ end
45
+
6
46
  g.desc 'Wipes all valid sessions on all devices for a given user'
7
47
  g.long_desc %( Wipes all valid sessions on all devices for a given user )
8
48
  g.command 'reset' do |c|
@@ -13,4 +53,26 @@ command 'admin_users_session' do |g|
13
53
  puts JSON.dump($client.admin_users_session_reset(options))
14
54
  end
15
55
  end
56
+
57
+ g.desc 'Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users'
58
+ g.long_desc %( Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users )
59
+ g.command 'resetBulk' do |c|
60
+ c.flag 'user_ids', desc: 'The ID of the user to wipe sessions for.'
61
+ c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
62
+ c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
63
+ c.action do |_global_options, options, _args|
64
+ puts JSON.dump($client.admin_users_session_resetBulk(options))
65
+ end
66
+ end
67
+
68
+ g.desc 'Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.'
69
+ g.long_desc %( Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users. )
70
+ g.command 'setSettings' do |c|
71
+ c.flag 'user_ids', desc: 'The list of user IDs to apply the session settings for.'
72
+ c.flag 'desktop_app_browser_quit', desc: 'Terminate the session when the client—either the desktop app or a browser window—is closed.'
73
+ c.flag 'duration', desc: "The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session)."
74
+ c.action do |_global_options, options, _args|
75
+ puts JSON.dump($client.admin_users_session_setSettings(options))
76
+ end
77
+ end
16
78
  end
data/bin/commands/api.rb CHANGED
@@ -7,7 +7,6 @@ command 'api' do |g|
7
7
  g.long_desc %( Checks API calling code. )
8
8
  g.command 'test' do |c|
9
9
  c.flag 'error', desc: 'Error response to return.'
10
- c.flag 'foo', desc: 'example property to return.'
11
10
  c.action do |_global_options, options, _args|
12
11
  puts JSON.dump($client.api_test(options))
13
12
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'AppsConnections methods.'
5
+ command 'apps_connections' do |g|
6
+ g.desc 'Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over,'
7
+ g.long_desc %( Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over, )
8
+ g.command 'open' do |c|
9
+ c.action do |_global_options, options, _args|
10
+ puts JSON.dump($client.apps_connections_open(options))
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'AppsEventAuthorizations methods.'
5
+ command 'apps_event_authorizations' do |g|
6
+ g.desc 'Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.'
7
+ g.long_desc %( Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to. )
8
+ g.command 'list' do |c|
9
+ c.flag 'event_context', desc: '.'
10
+ c.flag 'cursor', desc: '.'
11
+ c.flag 'limit', desc: '.'
12
+ c.action do |_global_options, options, _args|
13
+ puts JSON.dump($client.apps_event_authorizations_list(options))
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'AppsManifest methods.'
5
+ command 'apps_manifest' do |g|
6
+ g.desc 'Create an app from an app manifest.'
7
+ g.long_desc %( Create an app from an app manifest. )
8
+ g.command 'create' do |c|
9
+ c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.'
10
+ c.action do |_global_options, options, _args|
11
+ puts JSON.dump($client.apps_manifest_create(options))
12
+ end
13
+ end
14
+
15
+ g.desc 'Permanently deletes an app created through app manifests'
16
+ g.long_desc %( Permanently deletes an app created through app manifests )
17
+ g.command 'delete' do |c|
18
+ c.flag 'app_id', desc: 'The ID of the app you want to delete.'
19
+ c.action do |_global_options, options, _args|
20
+ puts JSON.dump($client.apps_manifest_delete(options))
21
+ end
22
+ end
23
+
24
+ g.desc 'Export an app manifest from an existing app'
25
+ g.long_desc %( Export an app manifest from an existing app )
26
+ g.command 'export' do |c|
27
+ c.flag 'app_id', desc: 'The ID of the app whose configuration you want to export as a manifest.'
28
+ c.action do |_global_options, options, _args|
29
+ puts JSON.dump($client.apps_manifest_export(options))
30
+ end
31
+ end
32
+
33
+ g.desc 'Update an app from an app manifest'
34
+ g.long_desc %( Update an app from an app manifest )
35
+ g.command 'update' do |c|
36
+ c.flag 'app_id', desc: 'The ID of the app whose configuration you want to update.'
37
+ c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.'
38
+ c.action do |_global_options, options, _args|
39
+ puts JSON.dump($client.apps_manifest_update(options))
40
+ end
41
+ end
42
+
43
+ g.desc 'Validate an app manifest'
44
+ g.long_desc %( Validate an app manifest )
45
+ g.command 'validate' do |c|
46
+ c.flag 'manifest', desc: 'The manifest to be validated. Will be validated against the app manifest schema - read our guide.'
47
+ c.action do |_global_options, options, _args|
48
+ puts JSON.dump($client.apps_manifest_validate(options))
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'AuthTeams methods.'
5
+ command 'auth_teams' do |g|
6
+ g.desc 'List the workspaces a token can access.'
7
+ g.long_desc %( List the workspaces a token can access. )
8
+ g.command 'list' do |c|
9
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
10
+ c.flag 'include_icon', desc: 'Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace.'
11
+ c.flag 'limit', desc: 'The maximum number of workspaces to return. Must be a positive integer no larger than 1000.'
12
+ c.action do |_global_options, options, _args|
13
+ puts JSON.dump($client.auth_teams_list(options))
14
+ end
15
+ end
16
+ end
data/bin/commands/bots.rb CHANGED
@@ -7,6 +7,7 @@ command 'bots' do |g|
7
7
  g.long_desc %( Gets information about a bot user. )
8
8
  g.command 'info' do |c|
9
9
  c.flag 'bot', desc: 'Bot user to get info on.'
10
+ c.flag 'team_id', desc: 'encoded team id or enterprise id where the bot exists, required if org token is used.'
10
11
  c.action do |_global_options, options, _args|
11
12
  puts JSON.dump($client.bots_info(options))
12
13
  end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'Calls methods.'
5
+ command 'calls' do |g|
6
+ g.desc 'Registers a new Call.'
7
+ g.long_desc %( Registers a new Call. )
8
+ g.command 'add' do |c|
9
+ c.flag 'external_unique_id', desc: 'An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.'
10
+ c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
11
+ c.flag 'created_by', desc: 'The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.'
12
+ c.flag 'date_start', desc: 'Call start time in UTC UNIX timestamp format.'
13
+ c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
14
+ c.flag 'external_display_id', desc: 'An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.'
15
+ c.flag 'title', desc: 'The name of the Call.'
16
+ c.flag 'users', desc: 'The list of users to register as participants in the Call. Read more on how to specify users here.'
17
+ c.action do |_global_options, options, _args|
18
+ puts JSON.dump($client.calls_add(options))
19
+ end
20
+ end
21
+
22
+ g.desc 'Ends a Call.'
23
+ g.long_desc %( Ends a Call. )
24
+ g.command 'end' do |c|
25
+ c.flag 'id', desc: 'id returned when registering the call using the calls.add method.'
26
+ c.flag 'duration', desc: 'Call duration in seconds.'
27
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump($client.calls_end(options))
29
+ end
30
+ end
31
+
32
+ g.desc 'Returns information about a Call.'
33
+ g.long_desc %( Returns information about a Call. )
34
+ g.command 'info' do |c|
35
+ c.flag 'id', desc: 'id of the Call returned by the calls.add method.'
36
+ c.action do |_global_options, options, _args|
37
+ puts JSON.dump($client.calls_info(options))
38
+ end
39
+ end
40
+
41
+ g.desc 'Updates information about a Call.'
42
+ g.long_desc %( Updates information about a Call. )
43
+ g.command 'update' do |c|
44
+ c.flag 'id', desc: 'id returned by the calls.add method.'
45
+ c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
46
+ c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
47
+ c.flag 'title', desc: 'The name of the Call.'
48
+ c.action do |_global_options, options, _args|
49
+ puts JSON.dump($client.calls_update(options))
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'CallsParticipants methods.'
5
+ command 'calls_participants' do |g|
6
+ g.desc 'Registers new participants added to a Call.'
7
+ g.long_desc %( Registers new participants added to a Call. )
8
+ g.command 'add' do |c|
9
+ c.flag 'id', desc: 'id returned by the calls.add method.'
10
+ c.flag 'users', desc: 'The list of users to add as participants in the Call. Read more on how to specify users here.'
11
+ c.action do |_global_options, options, _args|
12
+ puts JSON.dump($client.calls_participants_add(options))
13
+ end
14
+ end
15
+
16
+ g.desc 'Registers participants removed from a Call.'
17
+ g.long_desc %( Registers participants removed from a Call. )
18
+ g.command 'remove' do |c|
19
+ c.flag 'id', desc: 'id returned by the calls.add method.'
20
+ c.flag 'users', desc: 'The list of users to remove as participants in the Call. Read more on how to specify users here.'
21
+ c.action do |_global_options, options, _args|
22
+ puts JSON.dump($client.calls_participants_remove(options))
23
+ end
24
+ end
25
+ end
@@ -1,27 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'Channels methods.'
4
+ desc "Get info on your team's Slack channels, create or archive channels, invite users, set the topic and purpose, and mark a channel as read."
5
5
  command 'channels' do |g|
6
- g.desc 'Archives a channel.'
7
- g.long_desc %( Archives a channel. )
8
- g.command 'archive' do |c|
9
- c.flag 'channel', desc: 'Channel to archive.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.channels_archive(options))
12
- end
13
- end
14
-
15
- g.desc 'Creates a channel.'
16
- g.long_desc %( Creates a channel. )
17
- g.command 'create' do |c|
18
- c.flag 'name', desc: 'Name of channel to create.'
19
- c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.'
20
- c.action do |_global_options, options, _args|
21
- puts JSON.dump($client.channels_create(options))
22
- end
23
- end
24
-
25
6
  g.desc 'Delete a channel (undocumented)'
26
7
  g.long_desc %( Delete a channel )
27
8
  g.command 'delete' do |c|
@@ -31,19 +12,6 @@ command 'channels' do |g|
31
12
  end
32
13
  end
33
14
 
34
- g.desc 'Fetches history of messages and events from a channel.'
35
- g.long_desc %( Fetches history of messages and events from a channel. )
36
- g.command 'history' do |c|
37
- c.flag 'channel', desc: 'Channel to fetch history for.'
38
- c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.'
39
- c.flag 'latest', desc: 'End of time range of messages to include in results.'
40
- c.flag 'oldest', desc: 'Start of time range of messages to include in results.'
41
- c.flag 'unreads', desc: 'Include unread_count_display in the output?.'
42
- c.action do |_global_options, options, _args|
43
- puts JSON.dump($client.channels_history(options))
44
- end
45
- end
46
-
47
15
  g.desc 'This method returns the ID of a team channel.'
48
16
  g.long_desc %( This method returns the ID of a team channel. )
49
17
  g.command 'id' do |c|
@@ -52,126 +20,4 @@ command 'channels' do |g|
52
20
  puts JSON.dump($client.channels_id(options))
53
21
  end
54
22
  end
55
-
56
- g.desc 'Gets information about a channel.'
57
- g.long_desc %( Gets information about a channel. )
58
- g.command 'info' do |c|
59
- c.flag 'channel', desc: 'Channel to get info on.'
60
- c.flag 'include_locale', desc: 'Set this to true to receive the locale for this channel. Defaults to false.'
61
- c.action do |_global_options, options, _args|
62
- puts JSON.dump($client.channels_info(options))
63
- end
64
- end
65
-
66
- g.desc 'Invites a user to a channel.'
67
- g.long_desc %( Invites a user to a channel. )
68
- g.command 'invite' do |c|
69
- c.flag 'channel', desc: 'Channel to invite user to.'
70
- c.flag 'user', desc: 'User to invite to channel.'
71
- c.action do |_global_options, options, _args|
72
- puts JSON.dump($client.channels_invite(options))
73
- end
74
- end
75
-
76
- g.desc 'Joins a channel, creating it if needed.'
77
- g.long_desc %( Joins a channel, creating it if needed. )
78
- g.command 'join' do |c|
79
- c.flag 'name', desc: 'Name of channel to join.'
80
- c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.'
81
- c.action do |_global_options, options, _args|
82
- puts JSON.dump($client.channels_join(options))
83
- end
84
- end
85
-
86
- g.desc 'Removes a user from a channel.'
87
- g.long_desc %( Removes a user from a channel. )
88
- g.command 'kick' do |c|
89
- c.flag 'channel', desc: 'Channel to remove user from.'
90
- c.flag 'user', desc: 'User to remove from channel.'
91
- c.action do |_global_options, options, _args|
92
- puts JSON.dump($client.channels_kick(options))
93
- end
94
- end
95
-
96
- g.desc 'Leaves a channel.'
97
- g.long_desc %( Leaves a channel. )
98
- g.command 'leave' do |c|
99
- c.flag 'channel', desc: 'Channel to leave.'
100
- c.action do |_global_options, options, _args|
101
- puts JSON.dump($client.channels_leave(options))
102
- end
103
- end
104
-
105
- g.desc 'Lists all channels in a Slack team.'
106
- g.long_desc %( Lists all channels in a Slack team. )
107
- g.command 'list' do |c|
108
- c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
109
- c.flag 'exclude_archived', desc: 'Exclude archived channels from the list.'
110
- c.flag 'exclude_members', desc: 'Exclude the members collection from each channel.'
111
- c.flag 'limit', desc: "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."
112
- c.action do |_global_options, options, _args|
113
- puts JSON.dump($client.channels_list(options))
114
- end
115
- end
116
-
117
- g.desc 'Sets the read cursor in a channel.'
118
- g.long_desc %( Sets the read cursor in a channel. )
119
- g.command 'mark' do |c|
120
- c.flag 'channel', desc: 'Channel to set reading cursor in.'
121
- c.flag 'ts', desc: 'Timestamp of the most recently seen message.'
122
- c.action do |_global_options, options, _args|
123
- puts JSON.dump($client.channels_mark(options))
124
- end
125
- end
126
-
127
- g.desc 'Renames a channel.'
128
- g.long_desc %( Renames a channel. )
129
- g.command 'rename' do |c|
130
- c.flag 'channel', desc: 'Channel to rename.'
131
- c.flag 'name', desc: 'New name for channel.'
132
- c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.'
133
- c.action do |_global_options, options, _args|
134
- puts JSON.dump($client.channels_rename(options))
135
- end
136
- end
137
-
138
- g.desc 'Retrieve a thread of messages posted to a channel'
139
- g.long_desc %( Retrieve a thread of messages posted to a channel )
140
- g.command 'replies' do |c|
141
- c.flag 'channel', desc: 'Channel to fetch thread from.'
142
- c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message."
143
- c.action do |_global_options, options, _args|
144
- puts JSON.dump($client.channels_replies(options))
145
- end
146
- end
147
-
148
- g.desc 'Sets the purpose for a channel.'
149
- g.long_desc %( Sets the purpose for a channel. )
150
- g.command 'setPurpose' do |c|
151
- c.flag 'channel', desc: 'Channel to set the purpose of.'
152
- c.flag 'purpose', desc: 'The new purpose.'
153
- c.flag 'name_tagging', desc: 'if it is true, treat this like a message and not an unescaped thing.'
154
- c.action do |_global_options, options, _args|
155
- puts JSON.dump($client.channels_setPurpose(options))
156
- end
157
- end
158
-
159
- g.desc 'Sets the topic for a channel.'
160
- g.long_desc %( Sets the topic for a channel. )
161
- g.command 'setTopic' do |c|
162
- c.flag 'channel', desc: 'Channel to set the topic of.'
163
- c.flag 'topic', desc: 'The new topic.'
164
- c.action do |_global_options, options, _args|
165
- puts JSON.dump($client.channels_setTopic(options))
166
- end
167
- end
168
-
169
- g.desc 'Unarchives a channel.'
170
- g.long_desc %( Unarchives a channel. )
171
- g.command 'unarchive' do |c|
172
- c.flag 'channel', desc: 'Channel to unarchive.'
173
- c.action do |_global_options, options, _args|
174
- puts JSON.dump($client.channels_unarchive(options))
175
- end
176
- end
177
23
  end
data/bin/commands/chat.rb CHANGED
@@ -59,11 +59,11 @@ command 'chat' do |g|
59
59
  g.desc 'Sends an ephemeral message to a user in a channel.'
60
60
  g.long_desc %( Sends an ephemeral message to a user in a channel. )
61
61
  g.command 'postEphemeral' do |c|
62
- c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
63
62
  c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
64
63
  c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
65
64
  c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.'
66
65
  c.flag 'as_user', desc: '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.'
66
+ c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
67
67
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
68
68
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
69
69
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
@@ -80,12 +80,12 @@ command 'chat' do |g|
80
80
  g.long_desc %( Sends a message to a channel. )
81
81
  g.command 'postMessage' do |c|
82
82
  c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
83
- c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
84
- c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. This argument may not be used with newer bot tokens.'
85
83
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
86
84
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
87
- c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. This argument may not be used with newer bot tokens.'
88
- c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. This argument may not be used with newer bot tokens.'
85
+ c.flag 'text', desc: 'The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications.'
86
+ c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.'
87
+ c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
88
+ c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
89
89
  c.flag 'link_names', desc: 'Find and link channel names and usernames.'
90
90
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
91
91
  c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
@@ -122,10 +122,13 @@ command 'chat' do |g|
122
122
  g.desc 'Provide custom unfurl behavior for user-posted URLs'
123
123
  g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
124
124
  g.command 'unfurl' do |c|
125
- c.flag 'channel', desc: 'Channel ID of the message.'
125
+ c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
126
126
  c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
127
127
  c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.'
128
- c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
128
+ c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
129
+ c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
130
+ c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
131
+ c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
129
132
  c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
130
133
  c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
131
134
  c.action do |_global_options, options, _args|
@@ -137,13 +140,15 @@ command 'chat' do |g|
137
140
  g.long_desc %( Updates a message. )
138
141
  g.command 'update' do |c|
139
142
  c.flag 'channel', desc: 'Channel containing the message to be updated.'
140
- c.flag 'text', desc: "New text for the message, using the default formatting rules. It's not required when presenting attachments."
141
143
  c.flag 'ts', desc: 'Timestamp of the message to be updated.'
142
144
  c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
143
- c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text.'
144
- c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
145
- c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. See below.'
146
- c.flag 'parse', desc: 'Change how messages are treated. Defaults to client, unlike chat.postMessage. See below.'
145
+ c.flag 'attachments', desc: "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text. If you don't include this field, the message's previous attachments will be retained. To remove previous attachments, include an empty array for this field."
146
+ c.flag 'blocks', desc: "A JSON-based array of structured blocks, presented as a URL-encoded string. If you don't include this field, the message's previous blocks will be retained. To remove previous blocks, include an empty array for this field."
147
+ c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
148
+ c.flag 'link_names', desc: '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.'
149
+ c.flag 'parse', desc: '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.'
150
+ c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
151
+ c.flag 'text', desc: "New text for the message, using the default formatting rules. It's not required when presenting blocks or attachments."
147
152
  c.action do |_global_options, options, _args|
148
153
  puts JSON.dump($client.chat_update(options))
149
154
  end
@@ -11,6 +11,7 @@ command 'chat_scheduledMessages' do |g|
11
11
  c.flag 'latest', desc: 'A UNIX timestamp of the latest value in the time range.'
12
12
  c.flag 'limit', desc: 'Maximum number of original entries to return.'
13
13
  c.flag 'oldest', desc: 'A UNIX timestamp of the oldest value in the time range.'
14
+ c.flag 'team_id', desc: 'encoded team id to list channels in, required if org token is used.'
14
15
  c.action do |_global_options, options, _args|
15
16
  puts JSON.dump($client.chat_scheduledMessages_list(options))
16
17
  end