slack-ruby-client 2.6.0 → 3.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 (206) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +4 -10
  3. data/.github/workflows/update_api.yml +1 -1
  4. data/.rubocop_todo.yml +58 -71
  5. data/CHANGELOG.md +15 -0
  6. data/CONTRIBUTING.md +1 -1
  7. data/Gemfile +0 -9
  8. data/LICENSE.md +1 -1
  9. data/README.md +31 -220
  10. data/Rakefile +0 -1
  11. data/UPGRADING.md +4 -0
  12. data/bin/commands/admin_analytics.rb +1 -1
  13. data/bin/commands/admin_apps.rb +4 -4
  14. data/bin/commands/admin_apps_activities.rb +7 -7
  15. data/bin/commands/admin_apps_approved.rb +4 -4
  16. data/bin/commands/admin_apps_config.rb +3 -1
  17. data/bin/commands/admin_apps_requests.rb +5 -5
  18. data/bin/commands/admin_apps_restricted.rb +4 -4
  19. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  20. data/bin/commands/admin_auth_policy.rb +5 -5
  21. data/bin/commands/admin_barriers.rb +3 -3
  22. data/bin/commands/admin_conversations.rb +15 -15
  23. data/bin/commands/admin_conversations_ekm.rb +2 -2
  24. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  25. data/bin/commands/admin_emoji.rb +5 -5
  26. data/bin/commands/admin_functions.rb +1 -1
  27. data/bin/commands/admin_inviteRequests.rb +3 -3
  28. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  29. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  30. data/bin/commands/admin_roles.rb +3 -3
  31. data/bin/commands/admin_teams.rb +3 -3
  32. data/bin/commands/admin_teams_admins.rb +2 -2
  33. data/bin/commands/admin_teams_owners.rb +2 -2
  34. data/bin/commands/admin_teams_settings.rb +5 -5
  35. data/bin/commands/admin_usergroups.rb +4 -4
  36. data/bin/commands/admin_users.rb +12 -11
  37. data/bin/commands/admin_users_session.rb +6 -5
  38. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  39. data/bin/commands/admin_workflows.rb +6 -6
  40. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  41. data/bin/commands/apps_activities.rb +7 -7
  42. data/bin/commands/apps_auth_external.rb +1 -1
  43. data/bin/commands/apps_datastore.rb +12 -12
  44. data/bin/commands/apps_event_authorizations.rb +3 -3
  45. data/bin/commands/apps_manifest.rb +1 -1
  46. data/bin/commands/assistant_search.rb +18 -2
  47. data/bin/commands/assistant_threads.rb +2 -2
  48. data/bin/commands/auth.rb +1 -1
  49. data/bin/commands/auth_teams.rb +1 -1
  50. data/bin/commands/bookmarks.rb +6 -6
  51. data/bin/commands/calls.rb +5 -5
  52. data/bin/commands/canvases.rb +2 -2
  53. data/bin/commands/canvases_access.rb +1 -1
  54. data/bin/commands/chat.rb +23 -24
  55. data/bin/commands/conversations.rb +8 -8
  56. data/bin/commands/conversations_canvases.rb +1 -1
  57. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  58. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  59. data/bin/commands/dnd.rb +1 -1
  60. data/bin/commands/files.rb +5 -5
  61. data/bin/commands/files_remote.rb +1 -1
  62. data/bin/commands/functions.rb +1 -1
  63. data/bin/commands/functions_distributions_permissions.rb +15 -15
  64. data/bin/commands/functions_workflows_steps.rb +2 -2
  65. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  66. data/bin/commands/migration.rb +2 -2
  67. data/bin/commands/oauth_v2.rb +1 -1
  68. data/bin/commands/openid_connect.rb +1 -1
  69. data/bin/commands/reactions.rb +3 -3
  70. data/bin/commands/reminders.rb +2 -2
  71. data/bin/commands/rtm.rb +15 -0
  72. data/bin/commands/search.rb +4 -4
  73. data/bin/commands/slackLists.rb +37 -0
  74. data/bin/commands/slackLists_access.rb +34 -0
  75. data/bin/commands/slackLists_download.rb +31 -0
  76. data/bin/commands/slackLists_items.rb +76 -0
  77. data/bin/commands/team.rb +1 -1
  78. data/bin/commands/team_externalTeams.rb +4 -4
  79. data/bin/commands/usergroups.rb +10 -10
  80. data/bin/commands/usergroups_users.rb +5 -5
  81. data/bin/commands/users.rb +1 -1
  82. data/bin/commands/users_discoverableContacts.rb +1 -1
  83. data/bin/commands/views.rb +4 -4
  84. data/bin/commands/workflows_featured.rb +50 -0
  85. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  86. data/examples/files_upload_v2/files_upload_v2.rb +8 -0
  87. data/lib/slack/events/request.rb +1 -0
  88. data/lib/slack/version.rb +1 -1
  89. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  90. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  91. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  92. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  93. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  94. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  95. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  96. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  97. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  98. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  99. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  100. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  101. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  102. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  103. data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
  104. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  105. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  106. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  107. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  108. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  109. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  110. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  111. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  112. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  113. data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
  114. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  115. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  116. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  117. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  118. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  119. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  120. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  121. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  122. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  123. data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
  124. data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
  125. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  126. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  127. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  128. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  129. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  130. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  131. data/lib/slack/web/api/endpoints/chat.rb +53 -55
  132. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  133. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  134. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  135. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  136. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  137. data/lib/slack/web/api/endpoints/files.rb +11 -11
  138. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  139. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  140. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  141. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  142. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  143. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  144. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  145. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  146. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  147. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  148. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  149. data/lib/slack/web/api/endpoints/search.rb +8 -8
  150. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  151. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  152. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  153. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  154. data/lib/slack/web/api/endpoints/team.rb +3 -3
  155. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  156. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  157. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  158. data/lib/slack/web/api/endpoints/users.rb +2 -2
  159. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  160. data/lib/slack/web/api/endpoints/views.rb +9 -9
  161. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  162. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  163. data/lib/slack/web/api/endpoints.rb +10 -2
  164. data/lib/slack/web/api/errors.rb +88 -46
  165. data/lib/slack/web/api/helpers/files.rb +32 -22
  166. data/lib/slack/web/api/mixins/conversations.id.rb +14 -3
  167. data/lib/slack/web/api/mixins/users.id.rb +7 -3
  168. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  169. data/lib/slack-ruby-client.rb +0 -12
  170. data/lib/tasks/update.rake +0 -1
  171. data/lib/tasks/web.rake +0 -4
  172. data/slack-ruby-client.gemspec +1 -1
  173. metadata +19 -38
  174. data/.github/workflows/integration_test.yml +0 -45
  175. data/bin/commands/workflows.rb +0 -44
  176. data/examples/hi_real_time_and_web/Gemfile +0 -6
  177. data/examples/hi_real_time_and_web/hi.gif +0 -0
  178. data/examples/hi_real_time_and_web/hi.rb +0 -28
  179. data/examples/hi_real_time_async_async/Gemfile +0 -7
  180. data/examples/hi_real_time_async_async/Procfile +0 -2
  181. data/examples/hi_real_time_async_async/hi.rb +0 -41
  182. data/lib/slack/real_time/api/message.rb +0 -23
  183. data/lib/slack/real_time/api/message_id.rb +0 -15
  184. data/lib/slack/real_time/api/ping.rb +0 -19
  185. data/lib/slack/real_time/api/schema/event.json +0 -23
  186. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  187. data/lib/slack/real_time/api/typing.rb +0 -20
  188. data/lib/slack/real_time/client.rb +0 -271
  189. data/lib/slack/real_time/concurrency/async.rb +0 -142
  190. data/lib/slack/real_time/concurrency.rb +0 -8
  191. data/lib/slack/real_time/config.rb +0 -62
  192. data/lib/slack/real_time/models/base.rb +0 -11
  193. data/lib/slack/real_time/models/bot.rb +0 -9
  194. data/lib/slack/real_time/models/channel.rb +0 -13
  195. data/lib/slack/real_time/models/im.rb +0 -9
  196. data/lib/slack/real_time/models/mpim.rb +0 -9
  197. data/lib/slack/real_time/models/team.rb +0 -9
  198. data/lib/slack/real_time/models/user.rb +0 -9
  199. data/lib/slack/real_time/models.rb +0 -9
  200. data/lib/slack/real_time/socket.rb +0 -118
  201. data/lib/slack/real_time/stores/base.rb +0 -47
  202. data/lib/slack/real_time/stores/starter.rb +0 -449
  203. data/lib/slack/real_time/stores/store.rb +0 -624
  204. data/lib/slack/real_time/stores.rb +0 -5
  205. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  206. data/lib/tasks/real_time.rake +0 -81
@@ -10,8 +10,8 @@ module Slack
10
10
  g.long_desc %( Delete external auth tokens only on the Slack side )
11
11
  g.command 'delete' do |c|
12
12
  c.flag 'app_id', desc: 'The id of the app whose tokens you want to delete.'
13
- c.flag 'external_token_id', desc: 'The id of the token that you want to delete.'
14
13
  c.flag 'provider_key', desc: 'The provider key of the provider whose tokens you want to delete.'
14
+ c.flag 'external_token_id', desc: 'The id of the token that you want to delete.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_auth_external_delete(options))
17
17
  end
@@ -11,7 +11,7 @@ module Slack
11
11
  g.command 'bulkDelete' do |c|
12
12
  c.flag 'datastore', desc: 'name of the datastore.'
13
13
  c.flag 'ids', desc: 'IDs of items to be deleted.'
14
- c.flag 'app_id', desc: '.'
14
+ c.flag 'app_id', desc: ''
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_datastore_bulkDelete(options))
17
17
  end
@@ -22,7 +22,7 @@ module Slack
22
22
  g.command 'bulkGet' do |c|
23
23
  c.flag 'datastore', desc: 'name of the datastore.'
24
24
  c.flag 'ids', desc: "items' ids."
25
- c.flag 'app_id', desc: '.'
25
+ c.flag 'app_id', desc: ''
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.apps_datastore_bulkGet(options))
28
28
  end
@@ -33,7 +33,7 @@ module Slack
33
33
  g.command 'bulkPut' do |c|
34
34
  c.flag 'datastore', desc: 'name of the datastore.'
35
35
  c.flag 'items', desc: 'attribute names and values of the items; limit of 25.'
36
- c.flag 'app_id', desc: '.'
36
+ c.flag 'app_id', desc: ''
37
37
  c.action do |_global_options, options, _args|
38
38
  puts JSON.dump(@client.apps_datastore_bulkPut(options))
39
39
  end
@@ -43,10 +43,10 @@ module Slack
43
43
  g.long_desc %( Count the number of items in a datastore that match a query )
44
44
  g.command 'count' do |c|
45
45
  c.flag 'datastore', desc: 'Name of the datastore.'
46
- c.flag 'app_id', desc: 'Required if calling with user token.'
47
- c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
46
+ c.flag 'expression', desc: 'A query filter expression.'
48
47
  c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
49
48
  c.flag 'expression_values', desc: 'A map of values referenced in expression.'
49
+ c.flag 'app_id', desc: 'Required if calling with user token.'
50
50
  c.action do |_global_options, options, _args|
51
51
  puts JSON.dump(@client.apps_datastore_count(options))
52
52
  end
@@ -57,7 +57,7 @@ module Slack
57
57
  g.command 'delete' do |c|
58
58
  c.flag 'datastore', desc: 'name of the datastore.'
59
59
  c.flag 'id', desc: 'item id.'
60
- c.flag 'app_id', desc: '.'
60
+ c.flag 'app_id', desc: ''
61
61
  c.action do |_global_options, options, _args|
62
62
  puts JSON.dump(@client.apps_datastore_delete(options))
63
63
  end
@@ -68,7 +68,7 @@ module Slack
68
68
  g.command 'get' do |c|
69
69
  c.flag 'datastore', desc: 'name of the datastore.'
70
70
  c.flag 'id', desc: 'item id.'
71
- c.flag 'app_id', desc: '.'
71
+ c.flag 'app_id', desc: ''
72
72
  c.action do |_global_options, options, _args|
73
73
  puts JSON.dump(@client.apps_datastore_get(options))
74
74
  end
@@ -79,7 +79,7 @@ module Slack
79
79
  g.command 'put' do |c|
80
80
  c.flag 'datastore', desc: 'name of the datastore.'
81
81
  c.flag 'item', desc: 'attribute names and values of the item.'
82
- c.flag 'app_id', desc: '.'
82
+ c.flag 'app_id', desc: ''
83
83
  c.action do |_global_options, options, _args|
84
84
  puts JSON.dump(@client.apps_datastore_put(options))
85
85
  end
@@ -89,11 +89,11 @@ module Slack
89
89
  g.long_desc %( Query a datastore for items )
90
90
  g.command 'query' do |c|
91
91
  c.flag 'datastore', desc: 'Name of the datastore.'
92
- c.flag 'app_id', desc: 'Required if calling with user token.'
93
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
94
- c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
92
+ c.flag 'expression', desc: 'A query filter expression.'
95
93
  c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
96
94
  c.flag 'expression_values', desc: 'A map of values referenced in expression.'
95
+ c.flag 'app_id', desc: 'Required if calling with user token.'
96
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
97
97
  c.flag 'limit', desc: 'The maximum number of items to evaluate for a given request (not necessarily the number of matching items). If the given request dataset size exceeds 1 MB before reaching the limit, the returned item count will likely be less than the limit. In any case where there are more items available beyond an imposed limit, a next_cursor value will be provided for use in subsequent requests.'
98
98
  c.action do |_global_options, options, _args|
99
99
  puts JSON.dump(@client.apps_datastore_query(options))
@@ -105,7 +105,7 @@ module Slack
105
105
  g.command 'update' do |c|
106
106
  c.flag 'datastore', desc: 'name of the datastore.'
107
107
  c.flag 'item', desc: 'attribute names and values to be updated.'
108
- c.flag 'app_id', desc: '.'
108
+ c.flag 'app_id', desc: ''
109
109
  c.action do |_global_options, options, _args|
110
110
  puts JSON.dump(@client.apps_datastore_update(options))
111
111
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.'
10
10
  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. )
11
11
  g.command 'list' do |c|
12
- c.flag 'event_context', desc: '.'
13
- c.flag 'cursor', desc: '.'
14
- c.flag 'limit', desc: '.'
12
+ c.flag 'event_context', desc: ''
13
+ c.flag 'cursor', desc: ''
14
+ c.flag 'limit', desc: ''
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.apps_event_authorizations_list(options))
17
17
  end
@@ -36,8 +36,8 @@ module Slack
36
36
  g.desc 'Update an app from an app manifest'
37
37
  g.long_desc %( Update an app from an app manifest )
38
38
  g.command 'update' do |c|
39
+ 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.'
39
40
  c.flag 'app_id', desc: 'The ID of the app whose configuration you want to update.'
40
- 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.'
41
41
  c.action do |_global_options, options, _args|
42
42
  puts JSON.dump(@client.apps_manifest_update(options))
43
43
  end
@@ -12,15 +12,31 @@ module Slack
12
12
  c.flag 'query', desc: 'User prompt or search query.'
13
13
  c.flag 'action_token', desc: 'Send action_token as received in a message event.'
14
14
  c.flag 'channel_types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
15
- c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files.'
15
+ c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files, channels, users.'
16
+ c.flag 'include_bots', desc: 'If you want the results to include bots.'
17
+ c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
18
+ c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
19
+ c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
16
20
  c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
17
21
  c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.'
18
- c.flag 'include_bots', desc: 'If you want the results to include bots.'
19
22
  c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
23
+ c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
24
+ c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
25
+ c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
26
+ c.flag 'highlight', desc: 'Whether to highlight the search query in the results. Defaults to false if unspecified.'
27
+ c.flag 'term_clauses', desc: 'A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).'
20
28
  c.action do |_global_options, options, _args|
21
29
  puts JSON.dump(@client.assistant_search_context(options))
22
30
  end
23
31
  end
32
+
33
+ g.desc 'Returns search capabilities on a given team.'
34
+ g.long_desc %( Returns search capabilities on a given team. )
35
+ g.command 'info' do |c|
36
+ c.action do |_global_options, options, _args|
37
+ puts JSON.dump(@client.assistant_search_info(options))
38
+ end
39
+ end
24
40
  end
25
41
  end
26
42
  end
@@ -10,8 +10,8 @@ module Slack
10
10
  g.long_desc %( Set the status for an AI assistant thread. )
11
11
  g.command 'setStatus' do |c|
12
12
  c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
13
- c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
14
13
  c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
14
+ c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.assistant_threads_setStatus(options))
17
17
  end
@@ -21,8 +21,8 @@ module Slack
21
21
  g.long_desc %( Set suggested prompts for the given assistant thread )
22
22
  g.command 'setSuggestedPrompts' do |c|
23
23
  c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
24
- c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
25
24
  c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
25
+ c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
26
26
  c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
27
27
  c.action do |_global_options, options, _args|
28
28
  puts JSON.dump(@client.assistant_threads_setSuggestedPrompts(options))
data/bin/commands/auth.rb CHANGED
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Revokes a token.'
10
10
  g.long_desc %( Revokes a token. )
11
11
  g.command 'revoke' do |c|
12
- c.flag 'test', desc: 'Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.'
12
+ c.flag 'test', desc: 'Setting this parameter to 1 triggers a _testing mode_ where the specified token will not actually be revoked.'
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump(@client.auth_revoke(options))
15
15
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Obtain a full list of workspaces your org-wide app has been approved for.'
10
10
  g.long_desc %( Obtain a full list of workspaces your org-wide app has been approved for. )
11
11
  g.command 'list' do |c|
12
+ c.flag 'limit', desc: 'The maximum number of workspaces to return. Must be a positive integer no larger than 1000.'
12
13
  c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
13
14
  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.'
14
- c.flag 'limit', desc: 'The maximum number of workspaces to return. Must be a positive integer no larger than 1000.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.auth_teams_list(options))
17
17
  end
@@ -11,11 +11,11 @@ module Slack
11
11
  g.command 'add' do |c|
12
12
  c.flag 'channel_id', desc: 'Channel to add bookmark in.'
13
13
  c.flag 'title', desc: 'Title for the bookmark.'
14
+ c.flag 'link', desc: 'Link to bookmark.'
14
15
  c.flag 'type', desc: 'Type of the bookmark i.e link.'
15
- c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
16
16
  c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
17
17
  c.flag 'entity_id', desc: 'ID of the entity being bookmarked. Only applies to message and file types.'
18
- c.flag 'link', desc: 'Link to bookmark.'
18
+ c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
19
19
  c.flag 'parent_id', desc: "Id of this bookmark's parent."
20
20
  c.action do |_global_options, options, _args|
21
21
  puts JSON.dump(@client.bookmarks_add(options))
@@ -25,11 +25,11 @@ module Slack
25
25
  g.desc 'Edit bookmark.'
26
26
  g.long_desc %( Edit bookmark. )
27
27
  g.command 'edit' do |c|
28
- c.flag 'bookmark_id', desc: 'Bookmark to update.'
29
28
  c.flag 'channel_id', desc: 'Channel to update bookmark in.'
30
- c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
31
- c.flag 'link', desc: 'Link to bookmark.'
29
+ c.flag 'bookmark_id', desc: 'Bookmark to update.'
32
30
  c.flag 'title', desc: 'Title for the bookmark.'
31
+ c.flag 'link', desc: 'Link to bookmark.'
32
+ c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
33
33
  c.action do |_global_options, options, _args|
34
34
  puts JSON.dump(@client.bookmarks_edit(options))
35
35
  end
@@ -47,8 +47,8 @@ module Slack
47
47
  g.desc 'Remove bookmark from the channel.'
48
48
  g.long_desc %( Remove bookmark from the channel. )
49
49
  g.command 'remove' do |c|
50
- c.flag 'bookmark_id', desc: 'Bookmark to remove.'
51
50
  c.flag 'channel_id', desc: 'Channel to remove bookmark.'
51
+ c.flag 'bookmark_id', desc: 'Bookmark to remove.'
52
52
  c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
53
53
  c.action do |_global_options, options, _args|
54
54
  puts JSON.dump(@client.bookmarks_remove(options))
@@ -10,12 +10,12 @@ module Slack
10
10
  g.long_desc %( Registers a new Call. )
11
11
  g.command 'add' do |c|
12
12
  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.'
13
+ 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.'
13
14
  c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
14
- 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.'
15
- c.flag 'date_start', desc: 'Unix timestamp of the call start time.'
16
15
  c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
17
- 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.'
16
+ c.flag 'date_start', desc: 'Unix timestamp of the call start time.'
18
17
  c.flag 'title', desc: 'The name of the Call.'
18
+ 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.'
19
19
  c.flag 'users', desc: 'The list of users to register as participants in the Call. Read more on how to specify users here.'
20
20
  c.action do |_global_options, options, _args|
21
21
  puts JSON.dump(@client.calls_add(options))
@@ -45,9 +45,9 @@ module Slack
45
45
  g.long_desc %( Updates information about a Call. )
46
46
  g.command 'update' do |c|
47
47
  c.flag 'id', desc: 'id returned by the calls.add method.'
48
- c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
49
- c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
50
48
  c.flag 'title', desc: 'The name of the Call.'
49
+ c.flag 'join_url', desc: 'The URL required for a client to join the Call.'
50
+ c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.'
51
51
  c.action do |_global_options, options, _args|
52
52
  puts JSON.dump(@client.calls_update(options))
53
53
  end
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc 'Create canvas for a user'
10
10
  g.long_desc %( Create canvas for a user )
11
11
  g.command 'create' do |c|
12
- c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.'
13
- c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
12
  c.flag 'title', desc: 'Title of the newly created canvas.'
13
+ c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
+ c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.canvases_create(options))
17
17
  end
@@ -20,8 +20,8 @@ module Slack
20
20
  g.desc 'Sets the access level to a canvas for specified entities'
21
21
  g.long_desc %( Sets the access level to a canvas for specified entities )
22
22
  g.command 'set' do |c|
23
- c.flag 'access_level', desc: 'Desired level of access.'
24
23
  c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
24
+ c.flag 'access_level', desc: 'Desired level of access.'
25
25
  c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
26
26
  c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
27
27
  c.action do |_global_options, options, _args|
data/bin/commands/chat.rb CHANGED
@@ -20,9 +20,9 @@ module Slack
20
20
  g.desc 'Deletes a message.'
21
21
  g.long_desc %( Deletes a message. )
22
22
  g.command 'delete' do |c|
23
+ c.flag 'as_user', desc: '(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.'
23
24
  c.flag 'channel', desc: 'Channel containing the message to be deleted.'
24
25
  c.flag 'ts', desc: 'Timestamp of the message to be deleted.'
25
- c.flag 'as_user', desc: '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.'
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump(@client.chat_delete(options))
28
28
  end
@@ -31,9 +31,9 @@ module Slack
31
31
  g.desc 'Deletes a pending scheduled message from the queue.'
32
32
  g.long_desc %( Deletes a pending scheduled message from the queue. )
33
33
  g.command 'deleteScheduledMessage' do |c|
34
+ c.flag 'as_user', desc: '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.'
34
35
  c.flag 'channel', desc: 'The channel the scheduled_message is posting to.'
35
36
  c.flag 'scheduled_message_id', desc: 'scheduled_message_id returned from call to chat.scheduleMessage.'
36
- c.flag 'as_user', desc: '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.'
37
37
  c.action do |_global_options, options, _args|
38
38
  puts JSON.dump(@client.chat_deleteScheduledMessage(options))
39
39
  end
@@ -62,18 +62,18 @@ module Slack
62
62
  g.desc 'Sends an ephemeral message to a user in a channel.'
63
63
  g.long_desc %( Sends an ephemeral message to a user in a channel. )
64
64
  g.command 'postEphemeral' do |c|
65
- c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
66
- 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.'
65
+ c.flag 'as_user', desc: '(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.'
67
66
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
68
67
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
69
- 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.'
70
- c.flag 'as_user', desc: '(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.'
68
+ c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
71
69
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
72
70
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
73
71
  c.flag 'link_names', desc: 'Find and link channel names and usernames.'
74
72
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
75
73
  c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
74
+ 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.'
76
75
  c.flag 'thread_ts', desc: "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."
76
+ 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.'
77
77
  c.flag 'username', desc: "Set your bot's user name."
78
78
  c.action do |_global_options, options, _args|
79
79
  puts JSON.dump(@client.chat_postEphemeral(options))
@@ -83,12 +83,10 @@ module Slack
83
83
  g.desc 'Sends a message to a channel.'
84
84
  g.long_desc %( Sends a message to a channel. )
85
85
  g.command 'postMessage' do |c|
86
- c.flag 'channel', desc: '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.'
86
+ c.flag 'as_user', desc: '(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.'
87
87
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
88
88
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
89
- 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.'
90
- c.flag 'agent_message_source_type', desc: 'Identify how the message was posted for agentforce BE logging.'
91
- c.flag 'as_user', desc: '(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.'
89
+ c.flag 'channel', desc: '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.'
92
90
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
93
91
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
94
92
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
@@ -97,6 +95,7 @@ module Slack
97
95
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
98
96
  c.flag 'parse', desc: 'Change how messages are treated. See below.'
99
97
  c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
98
+ 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.'
100
99
  c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
101
100
  c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
102
101
  c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
@@ -109,20 +108,20 @@ module Slack
109
108
  g.desc 'Schedules a message to be sent to a channel.'
110
109
  g.long_desc %( Schedules a message to be sent to a channel. )
111
110
  g.command 'scheduleMessage' do |c|
112
- c.flag 'channel', desc: 'Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
113
- c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
111
+ c.flag 'as_user', desc: '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.'
114
112
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
115
113
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
116
- 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.'
117
- c.flag 'as_user', desc: '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.'
114
+ c.flag 'channel', desc: 'Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
118
115
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
119
116
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
120
- c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
121
117
  c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
118
+ c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
122
119
  c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
120
+ 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.'
123
121
  c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
124
122
  c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
125
123
  c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
124
+ c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
126
125
  c.action do |_global_options, options, _args|
127
126
  puts JSON.dump(@client.chat_scheduleMessage(options))
128
127
  end
@@ -134,12 +133,12 @@ module Slack
134
133
  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.'
135
134
  c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
136
135
  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.'
137
- 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.'
138
- 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.'
139
- 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.'
140
136
  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.'
141
137
  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.'
142
138
  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.'
139
+ 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.'
140
+ 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.'
141
+ 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.'
143
142
  c.action do |_global_options, options, _args|
144
143
  puts JSON.dump(@client.chat_unfurl(options))
145
144
  end
@@ -148,18 +147,18 @@ module Slack
148
147
  g.desc 'Updates a message.'
149
148
  g.long_desc %( Updates a message. )
150
149
  g.command 'update' do |c|
151
- c.flag 'channel', desc: '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).'
152
- c.flag 'ts', desc: 'Timestamp of the message to be updated.'
150
+ c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
153
151
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
154
152
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
155
- 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.'
156
- c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
157
- c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
158
- 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.'
159
153
  c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
160
154
  c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
155
+ c.flag 'channel', desc: '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).'
156
+ 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.'
161
157
  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.'
158
+ 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.'
159
+ c.flag 'ts', desc: 'Timestamp of the message to be updated.'
162
160
  c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
161
+ c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
163
162
  c.action do |_global_options, options, _args|
164
163
  puts JSON.dump(@client.chat_update(options))
165
164
  end
@@ -10,10 +10,10 @@ module Slack
10
10
  g.long_desc %( Accepts an invitation to a Slack Connect channel. )
11
11
  g.command 'acceptSharedInvite' do |c|
12
12
  c.flag 'channel_name', desc: 'Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take.'
13
- c.flag 'channel_id', desc: "ID of the channel that you'd like to accept. Must provide either invite_id or channel_id."
13
+ c.flag 'is_private', desc: 'Whether the channel should be private.'
14
14
  c.flag 'free_trial_accepted', desc: "Whether you'd like to use your workspace's free trial to begin using Slack Connect."
15
15
  c.flag 'invite_id', desc: "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."
16
- c.flag 'is_private', desc: 'Whether the channel should be private.'
16
+ c.flag 'channel_id', desc: "ID of the channel that you'd like to accept. Must provide either invite_id or channel_id."
17
17
  c.flag 'team_id', desc: '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.'
18
18
  c.action do |_global_options, options, _args|
19
19
  puts JSON.dump(@client.conversations_acceptSharedInvite(options))
@@ -51,8 +51,8 @@ module Slack
51
51
  g.desc 'Initiates a public or private channel-based conversation'
52
52
  g.long_desc %( Initiates a public or private channel-based conversation )
53
53
  g.command 'create' do |c|
54
- c.flag 'name', desc: 'Name of the public or private channel to create.'
55
54
  c.flag 'is_private', desc: 'Create a private channel instead of a public one.'
55
+ c.flag 'name', desc: 'Name of the public or private channel to create.'
56
56
  c.flag 'team_id', desc: 'encoded team id to create the channel in, required if org token is used.'
57
57
  c.action do |_global_options, options, _args|
58
58
  puts JSON.dump(@client.conversations_create(options))
@@ -99,8 +99,8 @@ module Slack
99
99
  g.long_desc %( Invites users to a channel. )
100
100
  g.command 'invite' do |c|
101
101
  c.flag 'channel', desc: 'The ID of the public or private channel to invite user(s) to.'
102
- c.flag 'users', desc: 'A comma separated list of user IDs. Up to 1000 users may be listed.'
103
102
  c.flag 'force', desc: 'When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.'
103
+ c.flag 'users', desc: 'A comma separated list of user IDs. Up to 100 users may be listed.'
104
104
  c.action do |_global_options, options, _args|
105
105
  puts JSON.dump(@client.conversations_invite(options))
106
106
  end
@@ -111,8 +111,8 @@ module Slack
111
111
  g.command 'inviteShared' do |c|
112
112
  c.flag 'channel', desc: "ID of the channel on your team that you'd like to share."
113
113
  c.flag 'emails', desc: '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.'
114
- c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
115
114
  c.flag 'user_ids', desc: '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.'
115
+ c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
116
116
  c.action do |_global_options, options, _args|
117
117
  puts JSON.dump(@client.conversations_inviteShared(options))
118
118
  end
@@ -162,8 +162,8 @@ module Slack
162
162
  g.desc 'Lists shared channel invites that have been generated or received but have not been approved by all parties'
163
163
  g.long_desc %( Lists shared channel invites that have been generated or received but have not been approved by all parties )
164
164
  g.command 'listConnectInvites' do |c|
165
- c.flag 'cursor', desc: 'Set to next_cursor returned by previous call to list items in subsequent page.'
166
165
  c.flag 'team_id', desc: 'Encoded team id for the workspace to retrieve invites for, required if org token is used.'
166
+ c.flag 'cursor', desc: 'Set to next_cursor returned by previous call to list items in subsequent page.'
167
167
  c.action do |_global_options, options, _args|
168
168
  puts JSON.dump(@client.conversations_listConnectInvites(options))
169
169
  end
@@ -194,9 +194,9 @@ module Slack
194
194
  g.long_desc %( Opens or resumes a direct message or multi-person direct message. )
195
195
  g.command 'open' do |c|
196
196
  c.flag 'channel', desc: "Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead."
197
- c.flag 'prevent_creation', desc: 'Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.'
198
197
  c.flag 'return_im', desc: 'Boolean, indicates you want the full IM channel definition in the response.'
199
198
  c.flag 'users', desc: '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.'
199
+ c.flag 'prevent_creation', desc: 'Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.'
200
200
  c.action do |_global_options, options, _args|
201
201
  puts JSON.dump(@client.conversations_open(options))
202
202
  end
@@ -216,13 +216,13 @@ module Slack
216
216
  g.long_desc %( Retrieve a thread of messages posted to a conversation )
217
217
  g.command 'replies' do |c|
218
218
  c.flag 'channel', desc: 'Conversation ID to fetch thread from.'
219
- c.flag 'ts', desc: "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."
220
219
  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."
221
220
  c.flag 'include_all_metadata', desc: 'Return all metadata associated with this message.'
222
221
  c.flag 'inclusive', desc: 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified.'
223
222
  c.flag 'latest', desc: 'Only messages before this Unix timestamp will be included in results.'
224
223
  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."
225
224
  c.flag 'oldest', desc: 'Only messages after this Unix timestamp will be included in results.'
225
+ c.flag 'ts', desc: "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."
226
226
  c.action do |_global_options, options, _args|
227
227
  puts JSON.dump(@client.conversations_replies(options))
228
228
  end
@@ -9,7 +9,7 @@ module Slack
9
9
  g.desc 'Create a channel canvas for a channel'
10
10
  g.long_desc %( Create a channel canvas for a channel )
11
11
  g.command 'create' do |c|
12
- c.flag 'channel_id', desc: 'Channel ID of the channel we create the channel canvas for.'
12
+ c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in.'
13
13
  c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
14
  c.flag 'title', desc: 'Title of the newly created canvas.'
15
15
  c.action do |_global_options, options, _args|
@@ -9,9 +9,9 @@ module Slack
9
9
  g.desc "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'."
10
10
  g.long_desc %( Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. )
11
11
  g.command 'set' do |c|
12
- c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
13
12
  c.flag 'channel', desc: 'The channel ID to change external invite permissions for.'
14
13
  c.flag 'target_team', desc: 'The encoded team ID of the target team. Must be in the specified channel.'
14
+ c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
15
15
  c.action do |_global_options, options, _args|
16
16
  puts JSON.dump(@client.conversations_externalInvitePermissions_set(options))
17
17
  end
@@ -10,8 +10,8 @@ module Slack
10
10
  g.long_desc %( Approves a request to add an external user to a channel and sends them a Slack Connect invite )
11
11
  g.command 'approve' do |c|
12
12
  c.flag 'invite_id', desc: 'ID of the requested shared channel invite to approve.'
13
- c.flag 'channel_id', desc: 'Optional channel_id to which external user will be invited to. Will override the value on the requested invite.'
14
13
  c.flag 'is_external_limited', desc: 'Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.'
14
+ c.flag 'channel_id', desc: 'Optional channel_id to which external user will be invited to. Will override the value on the requested invite.'
15
15
  c.flag 'message', desc: '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.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.conversations_requestSharedInvite_approve(options))
@@ -31,13 +31,13 @@ module Slack
31
31
  g.desc 'Lists requests to add external users to channels with ability to filter.'
32
32
  g.long_desc %( Lists requests to add external users to channels with ability to filter. )
33
33
  g.command 'list' do |c|
34
- 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. See pagination for more detail."
34
+ c.flag 'user_id', desc: 'Optional filter to return invitation requests for the inviting user.'
35
+ c.flag 'include_expired', desc: 'When true expired invitation requests will be returned, otherwise they will be excluded.'
35
36
  c.flag 'include_approved', desc: 'When true approved invitation requests will be returned, otherwise they will be excluded.'
36
37
  c.flag 'include_denied', desc: 'When true denied invitation requests will be returned, otherwise they will be excluded.'
37
- c.flag 'include_expired', desc: 'When true expired invitation requests will be returned, otherwise they will be excluded.'
38
38
  c.flag 'invite_ids', desc: 'An optional list of invitation ids to look up.'
39
39
  c.flag 'limit', desc: 'The number of items to return. Must be between 1 - 1000 (inclusive).'
40
- c.flag 'user_id', desc: 'Optional filter to return invitation requests for the inviting user.'
40
+ 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. See pagination for more detail."
41
41
  c.action do |_global_options, options, _args|
42
42
  puts JSON.dump(@client.conversations_requestSharedInvite_list(options))
43
43
  end
data/bin/commands/dnd.rb CHANGED
@@ -25,8 +25,8 @@ module Slack
25
25
  g.desc "Retrieves a user's current Do Not Disturb status."
26
26
  g.long_desc %( Retrieves a user's current Do Not Disturb status. )
27
27
  g.command 'info' do |c|
28
- c.flag 'team_id', desc: '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.'
29
28
  c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
29
+ c.flag 'team_id', desc: '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.'
30
30
  c.action do |_global_options, options, _args|
31
31
  puts JSON.dump(@client.dnd_info(options))
32
32
  end