slack-ruby-client 2.3.0 → 2.5.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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +22 -12
  3. data/.github/workflows/update_api.yml +1 -1
  4. data/.gitignore +1 -0
  5. data/.rubocop_todo.yml +43 -13
  6. data/CHANGELOG.md +19 -0
  7. data/CONTRIBUTING.md +7 -7
  8. data/Gemfile +1 -0
  9. data/README.md +68 -25
  10. data/bin/commands/admin_conversations.rb +21 -0
  11. data/bin/commands/admin_emoji.rb +1 -1
  12. data/bin/commands/admin_users.rb +4 -4
  13. data/bin/commands/admin_users_session.rb +1 -1
  14. data/bin/commands/admin_workflows.rb +6 -2
  15. data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
  16. data/bin/commands/apps_datastore.rb +46 -0
  17. data/bin/commands/assistant_threads.rb +45 -0
  18. data/bin/commands/bookmarks.rb +1 -0
  19. data/bin/commands/canvases.rb +40 -0
  20. data/bin/commands/canvases_access.rb +34 -0
  21. data/bin/commands/canvases_sections.rb +21 -0
  22. data/bin/commands/chat.rb +7 -3
  23. data/bin/commands/conversations.rb +6 -6
  24. data/bin/commands/conversations_canvases.rb +21 -0
  25. data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
  26. data/bin/commands/conversations_requestSharedInvite.rb +48 -0
  27. data/bin/commands/files.rb +2 -1
  28. data/bin/commands/functions_distributions_permissions.rb +59 -0
  29. data/bin/commands/oauth.rb +2 -2
  30. data/bin/commands/oauth_v2.rb +2 -2
  31. data/bin/commands/reminders.rb +1 -1
  32. data/bin/commands/team_externalTeams.rb +35 -0
  33. data/bin/commands/usergroups.rb +5 -0
  34. data/bin/commands/usergroups_users.rb +2 -0
  35. data/bin/commands/users_discoverableContacts.rb +20 -0
  36. data/bin/commands/workflows_triggers_permissions.rb +60 -0
  37. data/examples/files_upload_v2/.env.example +1 -0
  38. data/examples/files_upload_v2/Gemfile +5 -0
  39. data/examples/files_upload_v2/README.md +13 -0
  40. data/examples/files_upload_v2/files_upload_v2.rb +37 -0
  41. data/examples/oauth_v2/.env.example +4 -0
  42. data/examples/oauth_v2/Gemfile +7 -0
  43. data/examples/oauth_v2/README.md +33 -0
  44. data/examples/oauth_v2/oauth_v2.rb +60 -0
  45. data/lib/slack/messages/formatting.rb +13 -0
  46. data/lib/slack/version.rb +1 -1
  47. data/lib/slack/web/api/endpoints/admin_conversations.rb +35 -0
  48. data/lib/slack/web/api/endpoints/admin_emoji.rb +1 -1
  49. data/lib/slack/web/api/endpoints/admin_users.rb +2 -2
  50. data/lib/slack/web/api/endpoints/admin_users_session.rb +2 -3
  51. data/lib/slack/web/api/endpoints/admin_workflows.rb +10 -2
  52. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -0
  53. data/lib/slack/web/api/endpoints/apps_datastore.rb +71 -0
  54. data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
  55. data/lib/slack/web/api/endpoints/bookmarks.rb +2 -0
  56. data/lib/slack/web/api/endpoints/canvases.rb +52 -0
  57. data/lib/slack/web/api/endpoints/canvases_access.rb +47 -0
  58. data/lib/slack/web/api/endpoints/canvases_sections.rb +27 -0
  59. data/lib/slack/web/api/endpoints/chat.rb +12 -3
  60. data/lib/slack/web/api/endpoints/conversations.rb +5 -5
  61. data/lib/slack/web/api/endpoints/conversations_canvases.rb +26 -0
  62. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
  63. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
  64. data/lib/slack/web/api/endpoints/dnd.rb +1 -0
  65. data/lib/slack/web/api/endpoints/files.rb +3 -1
  66. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +80 -0
  67. data/lib/slack/web/api/endpoints/oauth.rb +2 -2
  68. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  69. data/lib/slack/web/api/endpoints/reminders.rb +1 -1
  70. data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -0
  71. data/lib/slack/web/api/endpoints/usergroups.rb +10 -0
  72. data/lib/slack/web/api/endpoints/usergroups_users.rb +4 -0
  73. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
  74. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
  75. data/lib/slack/web/api/endpoints.rb +24 -0
  76. data/lib/slack/web/api/errors.rb +118 -8
  77. data/lib/slack/web/api/helpers/files.rb +87 -0
  78. data/lib/slack/web/api/helpers.rb +13 -0
  79. data/lib/slack/web/api/templates/method.erb +1 -0
  80. data/lib/slack/web/api/templates/method_spec.erb +6 -4
  81. data/lib/slack/web/client.rb +1 -0
  82. data/lib/slack/web/faraday/connection.rb +13 -26
  83. data/lib/slack/web/faraday/options.rb +24 -0
  84. data/lib/slack/web/faraday/request.rb +2 -1
  85. data/lib/slack-ruby-client.rb +2 -0
  86. data/slack-ruby-client.gemspec +2 -1
  87. metadata +52 -144
  88. data/screenshots/create-app.png +0 -0
  89. data/spec/fixtures/slack/web/429_error.yml +0 -81
  90. data/spec/fixtures/slack/web/auth_test_error.yml +0 -81
  91. data/spec/fixtures/slack/web/auth_test_success.yml +0 -81
  92. data/spec/fixtures/slack/web/conversations_info.yml +0 -167
  93. data/spec/fixtures/slack/web/conversations_setTopic.yml +0 -84
  94. data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +0 -172
  95. data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +0 -253
  96. data/spec/fixtures/slack/web/paginated_users_list.yml +0 -613
  97. data/spec/fixtures/slack/web/rtm_connect.yml +0 -391
  98. data/spec/fixtures/slack/web/users_info.yml +0 -214
  99. data/spec/fixtures/slack/web/users_list.yml +0 -133
  100. data/spec/fixtures/slack/web/views_open_error.yml +0 -83
  101. data/spec/integration/integration_spec.rb +0 -207
  102. data/spec/slack/config_spec.rb +0 -16
  103. data/spec/slack/events/config_spec.rb +0 -35
  104. data/spec/slack/events/request_spec.rb +0 -199
  105. data/spec/slack/messages/formatting_spec.rb +0 -124
  106. data/spec/slack/real_time/api/message_spec.rb +0 -20
  107. data/spec/slack/real_time/api/ping_spec.rb +0 -17
  108. data/spec/slack/real_time/api/typing_spec.rb +0 -19
  109. data/spec/slack/real_time/client_spec.rb +0 -601
  110. data/spec/slack/real_time/concurrency/clients/async_spec.rb +0 -16
  111. data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -21
  112. data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +0 -10
  113. data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +0 -10
  114. data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -47
  115. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -16
  116. data/spec/slack/real_time/event_handlers/im_spec.rb +0 -51
  117. data/spec/slack/real_time/event_handlers/private_channel_spec.rb +0 -99
  118. data/spec/slack/real_time/event_handlers/public_channel_spec.rb +0 -123
  119. data/spec/slack/real_time/event_handlers/team_spec.rb +0 -63
  120. data/spec/slack/real_time/event_handlers/user_spec.rb +0 -65
  121. data/spec/slack/real_time/rtm_connect_spec.rb +0 -14
  122. data/spec/slack/real_time/stores/store_spec.rb +0 -50
  123. data/spec/slack/slack_spec.rb +0 -93
  124. data/spec/slack/version_spec.rb +0 -8
  125. data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +0 -13
  126. data/spec/slack/web/api/endpoints/admin_apps_activities_spec.rb +0 -8
  127. data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +0 -8
  128. data/spec/slack/web/api/endpoints/admin_apps_config_spec.rb +0 -18
  129. data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +0 -13
  130. data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +0 -8
  131. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +0 -18
  132. data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +0 -8
  133. data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +0 -35
  134. data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +0 -38
  135. data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +0 -8
  136. data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +0 -32
  137. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +0 -133
  138. data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +0 -37
  139. data/spec/slack/web/api/endpoints/admin_functions_permissions_spec.rb +0 -21
  140. data/spec/slack/web/api/endpoints/admin_functions_spec.rb +0 -13
  141. data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +0 -8
  142. data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +0 -8
  143. data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +0 -18
  144. data/spec/slack/web/api/endpoints/admin_roles_spec.rb +0 -30
  145. data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +0 -13
  146. data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +0 -13
  147. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +0 -53
  148. data/spec/slack/web/api/endpoints/admin_teams_spec.rb +0 -16
  149. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +0 -37
  150. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +0 -41
  151. data/spec/slack/web/api/endpoints/admin_users_spec.rb +0 -67
  152. data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +0 -8
  153. data/spec/slack/web/api/endpoints/admin_workflows_collaborators_spec.rb +0 -24
  154. data/spec/slack/web/api/endpoints/admin_workflows_permissions_spec.rb +0 -13
  155. data/spec/slack/web/api/endpoints/admin_workflows_spec.rb +0 -13
  156. data/spec/slack/web/api/endpoints/api_spec.rb +0 -8
  157. data/spec/slack/web/api/endpoints/apps_activities_spec.rb +0 -13
  158. data/spec/slack/web/api/endpoints/apps_auth_external_spec.rb +0 -13
  159. data/spec/slack/web/api/endpoints/apps_connections_spec.rb +0 -8
  160. data/spec/slack/web/api/endpoints/apps_datastore_spec.rb +0 -45
  161. data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +0 -13
  162. data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +0 -44
  163. data/spec/slack/web/api/endpoints/apps_spec.rb +0 -16
  164. data/spec/slack/web/api/endpoints/auth_spec.rb +0 -8
  165. data/spec/slack/web/api/endpoints/auth_teams_spec.rb +0 -8
  166. data/spec/slack/web/api/endpoints/bookmarks_spec.rb +0 -40
  167. data/spec/slack/web/api/endpoints/bots_spec.rb +0 -8
  168. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +0 -24
  169. data/spec/slack/web/api/endpoints/calls_spec.rb +0 -31
  170. data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +0 -8
  171. data/spec/slack/web/api/endpoints/chat_spec.rb +0 -134
  172. data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -8
  173. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -27
  174. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -206
  175. data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +0 -13
  176. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -40
  177. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -38
  178. data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +0 -112
  179. data/spec/slack/web/api/endpoints/dialog_spec.rb +0 -14
  180. data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -13
  181. data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -8
  182. data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -16
  183. data/spec/slack/web/api/endpoints/files_remote_spec.rb +0 -24
  184. data/spec/slack/web/api/endpoints/files_spec.rb +0 -57
  185. data/spec/slack/web/api/endpoints/functions_spec.rb +0 -28
  186. data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +0 -13
  187. data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +0 -13
  188. data/spec/slack/web/api/endpoints/migration_spec.rb +0 -13
  189. data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -8
  190. data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +0 -16
  191. data/spec/slack/web/api/endpoints/openid_connect_spec.rb +0 -8
  192. data/spec/slack/web/api/endpoints/pins_spec.rb +0 -23
  193. data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -24
  194. data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -31
  195. data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -8
  196. data/spec/slack/web/api/endpoints/search_spec.rb +0 -23
  197. data/spec/slack/web/api/endpoints/stars_spec.rb +0 -8
  198. data/spec/slack/web/api/endpoints/team_billing_spec.rb +0 -8
  199. data/spec/slack/web/api/endpoints/team_preferences_spec.rb +0 -8
  200. data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -8
  201. data/spec/slack/web/api/endpoints/team_spec.rb +0 -8
  202. data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +0 -13
  203. data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -28
  204. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -21
  205. data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -18
  206. data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -8
  207. data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -14
  208. data/spec/slack/web/api/endpoints/users_spec.rb +0 -8
  209. data/spec/slack/web/api/endpoints/views_spec.rb +0 -65
  210. data/spec/slack/web/api/endpoints/workflows_spec.rb +0 -34
  211. data/spec/slack/web/api/error_spec.rb +0 -14
  212. data/spec/slack/web/api/errors/slack_error_spec.rb +0 -33
  213. data/spec/slack/web/api/mixins/conversations_list_spec.rb +0 -21
  214. data/spec/slack/web/api/mixins/conversations_spec.rb +0 -45
  215. data/spec/slack/web/api/mixins/users_spec.rb +0 -52
  216. data/spec/slack/web/api/options_spec.rb +0 -69
  217. data/spec/slack/web/api/pagination/cursor_spec.rb +0 -102
  218. data/spec/slack/web/client_spec.rb +0 -359
  219. data/spec/slack/web/faraday/request_spec.rb +0 -80
  220. data/spec/slack/web/faraday/response/raise_error_spec.rb +0 -86
  221. data/spec/spec_helper.rb +0 -30
  222. data/spec/support/queue_with_timeout.rb +0 -35
  223. data/spec/support/real_time/concurrency/mock.rb +0 -31
  224. data/spec/support/real_time/connected_client.rb +0 -21
  225. data/spec/support/real_time/event.rb +0 -12
  226. data/spec/support/real_time/loaded_client.rb +0 -120
  227. data/spec/support/token.rb +0 -11
  228. data/spec/support/vcr.rb +0 -45
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AssistantThreads methods.'
8
+ command 'assistant_threads' do |g|
9
+ g.desc 'Set the status for an AI assistant thread.'
10
+ g.long_desc %( Set the status for an AI assistant thread. )
11
+ g.command 'setStatus' do |c|
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
+ c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.assistant_threads_setStatus(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Set suggested prompts for the given assistant thread'
21
+ g.long_desc %( Set suggested prompts for the given assistant thread )
22
+ g.command 'setSuggestedPrompts' do |c|
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
+ c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
26
+ c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
27
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump(@client.assistant_threads_setSuggestedPrompts(options))
29
+ end
30
+ end
31
+
32
+ g.desc 'Set the title for the given assistant thread'
33
+ g.long_desc %( Set the title for the given assistant thread )
34
+ g.command 'setTitle' do |c|
35
+ c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
36
+ c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
37
+ c.flag 'title', desc: 'The title to use for the thread.'
38
+ c.action do |_global_options, options, _args|
39
+ puts JSON.dump(@client.assistant_threads_setTitle(options))
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -12,6 +12,7 @@ module Slack
12
12
  c.flag 'channel_id', desc: 'Channel to add bookmark in.'
13
13
  c.flag 'title', desc: 'Title for the bookmark.'
14
14
  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)."
15
16
  c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
16
17
  c.flag 'entity_id', desc: 'ID of the entity being bookmarked. Only applies to message and file types.'
17
18
  c.flag 'link', desc: 'Link to bookmark.'
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Canvases methods.'
8
+ command 'canvases' do |g|
9
+ g.desc 'Create canvas for a user'
10
+ g.long_desc %( Create canvas for a user )
11
+ g.command 'create' do |c|
12
+ c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
13
+ c.flag 'title', desc: 'Title of the newly created canvas.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.canvases_create(options))
16
+ end
17
+ end
18
+
19
+ g.desc 'Deletes a canvas'
20
+ g.long_desc %( Deletes a canvas )
21
+ g.command 'delete' do |c|
22
+ c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
23
+ c.action do |_global_options, options, _args|
24
+ puts JSON.dump(@client.canvases_delete(options))
25
+ end
26
+ end
27
+
28
+ g.desc 'Update an existing canvas'
29
+ g.long_desc %( Update an existing canvas )
30
+ g.command 'edit' do |c|
31
+ c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
32
+ c.flag 'changes', desc: 'List of changes to apply on the specified canvas.'
33
+ c.action do |_global_options, options, _args|
34
+ puts JSON.dump(@client.canvases_edit(options))
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'CanvasesAccess methods.'
8
+ command 'canvases_access' do |g|
9
+ g.desc 'Remove access to a canvas for specified entities'
10
+ g.long_desc %( Remove access to a canvas for specified entities )
11
+ g.command 'delete' do |c|
12
+ c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
13
+ c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
14
+ c.flag 'user_ids', desc: 'List of users you wish to update access for.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.canvases_access_delete(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Sets the access level to a canvas for specified entities'
21
+ g.long_desc %( Sets the access level to a canvas for specified entities )
22
+ g.command 'set' do |c|
23
+ c.flag 'access_level', desc: 'Desired level of access.'
24
+ c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
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
+ 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
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump(@client.canvases_access_set(options))
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'CanvasesSections methods.'
8
+ command 'canvases_sections' do |g|
9
+ g.desc 'Find sections matching the provided criteria'
10
+ g.long_desc %( Find sections matching the provided criteria )
11
+ g.command 'lookup' do |c|
12
+ c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
13
+ c.flag 'criteria', desc: 'Filtering criteria.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.canvases_sections_lookup(options))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
data/bin/commands/chat.rb CHANGED
@@ -71,6 +71,7 @@ module Slack
71
71
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
72
72
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
73
73
  c.flag 'link_names', desc: 'Find and link channel names and usernames.'
74
+ 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.'
74
75
  c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
75
76
  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
77
  c.flag 'username', desc: "Set your bot's user name."
@@ -82,14 +83,15 @@ module Slack
82
83
  g.desc 'Sends a message to a channel.'
83
84
  g.long_desc %( Sends a message to a channel. )
84
85
  g.command 'postMessage' do |c|
85
- 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.'
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
87
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
87
88
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
88
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.'
89
- 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 Slack apps. See authorship below.'
90
+ 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.'
90
91
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
91
92
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
92
93
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
94
+ 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.'
93
95
  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.'
94
96
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
95
97
  c.flag 'parse', desc: 'Change how messages are treated. See below.'
@@ -113,6 +115,7 @@ module Slack
113
115
  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.'
114
116
  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.'
115
117
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
118
+ 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.'
116
119
  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.'
117
120
  c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
118
121
  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.'
@@ -144,7 +147,7 @@ module Slack
144
147
  g.desc 'Updates a message.'
145
148
  g.long_desc %( Updates a message. )
146
149
  g.command 'update' do |c|
147
- c.flag 'channel', desc: 'Channel containing the message to be updated.'
150
+ 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).'
148
151
  c.flag 'ts', desc: 'Timestamp of the message to be updated.'
149
152
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
150
153
  c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
@@ -152,6 +155,7 @@ module Slack
152
155
  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
156
  c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
154
157
  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.'
158
+ 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.'
155
159
  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."
156
160
  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.'
157
161
  c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
@@ -77,7 +77,7 @@ module Slack
77
77
  c.flag 'include_all_metadata', desc: 'Return all metadata associated with this message.'
78
78
  c.flag 'inclusive', desc: 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified.'
79
79
  c.flag 'latest', desc: 'Only messages before this Unix timestamp will be included in results. Default is the current time.'
80
- 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."
80
+ 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 conversation history hasn't been reached. Maximum of 999."
81
81
  c.flag 'oldest', desc: 'Only messages after this Unix timestamp will be included in results.'
82
82
  c.action do |_global_options, options, _args|
83
83
  puts JSON.dump(@client.conversations_history(options))
@@ -111,7 +111,7 @@ 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 a external limited member. Defaults to true.'
114
+ c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
115
115
  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.'
116
116
  c.action do |_global_options, options, _args|
117
117
  puts JSON.dump(@client.conversations_inviteShared(options))
@@ -228,11 +228,11 @@ module Slack
228
228
  end
229
229
  end
230
230
 
231
- g.desc 'Sets the purpose for a conversation.'
232
- g.long_desc %( Sets the purpose for a conversation. )
231
+ g.desc 'Sets the channel description.'
232
+ g.long_desc %( Sets the channel description. )
233
233
  g.command 'setPurpose' do |c|
234
- c.flag 'channel', desc: 'Conversation to set the purpose of.'
235
- c.flag 'purpose', desc: 'A new, specialer purpose.'
234
+ c.flag 'channel', desc: 'Channel to set the description of.'
235
+ c.flag 'purpose', desc: 'The description.'
236
236
  c.action do |_global_options, options, _args|
237
237
  puts JSON.dump(@client.conversations_setPurpose(options))
238
238
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'ConversationsCanvases methods.'
8
+ command 'conversations_canvases' do |g|
9
+ g.desc 'Create a channel canvas for a channel'
10
+ g.long_desc %( Create a channel canvas for a channel )
11
+ g.command 'create' do |c|
12
+ c.flag 'channel_id', desc: 'Channel ID of the channel we create the channel canvas for.'
13
+ c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.conversations_canvases_create(options))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'ConversationsExternalinvitepermissions methods.'
8
+ command 'conversations_externalInvitePermissions' do |g|
9
+ g.desc "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'."
10
+ g.long_desc %( Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. )
11
+ g.command 'set' do |c|
12
+ c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
13
+ c.flag 'channel', desc: 'The channel ID to change external invite permissions for.'
14
+ c.flag 'target_team', desc: 'The encoded team ID of the target team. Must be in the specified channel.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.conversations_externalInvitePermissions_set(options))
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'ConversationsRequestsharedinvite methods.'
8
+ command 'conversations_requestSharedInvite' do |g|
9
+ g.desc 'Approves a request to add an external user to a channel and sends them a Slack Connect invite'
10
+ g.long_desc %( Approves a request to add an external user to a channel and sends them a Slack Connect invite )
11
+ g.command 'approve' do |c|
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
+ 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.'
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
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.conversations_requestSharedInvite_approve(options))
18
+ end
19
+ end
20
+
21
+ g.desc 'Denies a request to invite an external user to a channel'
22
+ g.long_desc %( Denies a request to invite an external user to a channel )
23
+ g.command 'deny' do |c|
24
+ c.flag 'invite_id', desc: 'ID of the requested shared channel invite to deny.'
25
+ c.flag 'message', desc: 'Optional message explaining why the request to invite was denied.'
26
+ c.action do |_global_options, options, _args|
27
+ puts JSON.dump(@client.conversations_requestSharedInvite_deny(options))
28
+ end
29
+ end
30
+
31
+ g.desc 'Lists requests to add external users to channels with ability to filter.'
32
+ g.long_desc %( Lists requests to add external users to channels with ability to filter. )
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."
35
+ c.flag 'include_approved', desc: 'When true approved invitation requests will be returned, otherwise they will be excluded.'
36
+ 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
+ c.flag 'invite_ids', desc: 'An optional list of invitation ids to look up.'
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.'
41
+ c.action do |_global_options, options, _args|
42
+ puts JSON.dump(@client.conversations_requestSharedInvite_list(options))
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -11,8 +11,9 @@ module Slack
11
11
  g.command 'completeUploadExternal' do |c|
12
12
  c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
13
13
  c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
14
+ c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
14
15
  c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
15
- c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead."
16
+ c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'."
16
17
  c.action do |_global_options, options, _args|
17
18
  puts JSON.dump(@client.files_completeUploadExternal(options))
18
19
  end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'FunctionsDistributionsPermissions methods.'
8
+ command 'functions_distributions_permissions' do |g|
9
+ g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
10
+ g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
11
+ g.command 'add' do |c|
12
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
13
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
14
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
15
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.functions_distributions_permissions_add(options))
18
+ end
19
+ end
20
+
21
+ g.desc 'List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities'
22
+ g.long_desc %( List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities )
23
+ g.command 'list' do |c|
24
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
25
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
26
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
27
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump(@client.functions_distributions_permissions_list(options))
29
+ end
30
+ end
31
+
32
+ g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
33
+ g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
34
+ g.command 'remove' do |c|
35
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
36
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
37
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
38
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.functions_distributions_permissions_remove(options))
41
+ end
42
+ end
43
+
44
+ g.desc 'Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities'
45
+ g.long_desc %( Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities )
46
+ g.command 'set' do |c|
47
+ c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
48
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
49
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
50
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
51
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
52
+ c.action do |_global_options, options, _args|
53
+ puts JSON.dump(@client.functions_distributions_permissions_set(options))
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
10
10
  g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
11
11
  g.command 'access' do |c|
12
- c.flag 'client_id', desc: 'Issued when you created your application.'
13
- c.flag 'client_secret', desc: 'Issued when you created your application.'
12
+ c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
13
+ c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
14
14
  c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
15
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
16
16
  c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel. Only valid with a legacy workspace app.'
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
10
10
  g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
11
11
  g.command 'access' do |c|
12
- c.flag 'client_id', desc: 'Issued when you created your application.'
13
- c.flag 'client_secret', desc: 'Issued when you created your application.'
12
+ c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
13
+ c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
14
14
  c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
15
  c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
16
16
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
@@ -10,7 +10,7 @@ module Slack
10
10
  g.long_desc %( Creates a reminder. )
11
11
  g.command 'add' do |c|
12
12
  c.flag 'text', desc: 'The content of the reminder.'
13
- c.flag 'time', desc: 'When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").'
13
+ c.flag 'time', desc: 'Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").'
14
14
  c.flag 'recurrence', desc: 'Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.'
15
15
  c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
16
16
  c.flag 'user', desc: 'No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.'
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'TeamExternalteams methods.'
8
+ command 'team_externalTeams' do |g|
9
+ g.desc 'Disconnect an external organization.'
10
+ g.long_desc %( Disconnect an external organization. )
11
+ g.command 'disconnect' do |c|
12
+ c.flag 'target_team', desc: 'The team ID of the target team.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.team_externalTeams_disconnect(options))
15
+ end
16
+ end
17
+
18
+ g.desc 'Returns a list of all the external teams connected and details about the connection.'
19
+ g.long_desc %( Returns a list of all the external teams connected and details about the connection. )
20
+ g.command 'list' do |c|
21
+ c.flag 'connection_status_filter', desc: 'Status of the connected team.'
22
+ c.flag 'cursor', desc: "Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail."
23
+ c.flag 'limit', desc: 'The maximum number of items to return per page.'
24
+ c.flag 'slack_connect_pref_filter', desc: 'Filters connected orgs by Slack Connect pref override(s). Value can be: approved_orgs_only allow_sc_file_uploads profile_visibility away_team_sc_invite_permissions accept_sc_invites sc_mpdm_to_private require_sc_channel_for_sc_dm external_awareness_context_bar.'
25
+ c.flag 'sort_direction', desc: 'Direction to sort in asc or desc.'
26
+ c.flag 'sort_field', desc: 'Name of the parameter that we are sorting by.'
27
+ c.flag 'workspace_filter', desc: 'Shows connected orgs which are connected on a specified encoded workspace ID.'
28
+ c.action do |_global_options, options, _args|
29
+ puts JSON.dump(@client.team_externalTeams_list(options))
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -10,8 +10,10 @@ module Slack
10
10
  g.long_desc %( Create a User Group. )
11
11
  g.command 'create' do |c|
12
12
  c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
13
+ c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
13
14
  c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
14
15
  c.flag 'description', desc: 'A short description of the User Group.'
16
+ c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
15
17
  c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
16
18
  c.flag 'include_count', desc: 'Include the number of users in each User Group.'
17
19
  c.flag 'team_id', desc: 'Encoded team id where the user group has to be created, required if org token is used.'
@@ -49,6 +51,7 @@ module Slack
49
51
  c.flag 'include_disabled', desc: 'Include disabled User Groups.'
50
52
  c.flag 'include_users', desc: 'Include the list of users for each User Group.'
51
53
  c.flag 'team_id', desc: 'encoded team id to list user groups in, required if org token is used.'
54
+ c.flag 'usergroup_id', desc: 'The id of the usergroup you would like to filter the results down to.'
52
55
  c.action do |_global_options, options, _args|
53
56
  puts JSON.dump(@client.usergroups_list(options))
54
57
  end
@@ -58,8 +61,10 @@ module Slack
58
61
  g.long_desc %( Update an existing User Group. )
59
62
  g.command 'update' do |c|
60
63
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
64
+ c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
61
65
  c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
62
66
  c.flag 'description', desc: 'A short description of the User Group.'
67
+ c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
63
68
  c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
64
69
  c.flag 'include_count', desc: 'Include the number of users in the User Group.'
65
70
  c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
@@ -22,7 +22,9 @@ module Slack
22
22
  g.command 'update' do |c|
23
23
  c.flag 'usergroup', desc: 'The encoded ID of the user group to update.'
24
24
  c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the user group.'
25
+ c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
25
26
  c.flag 'include_count', desc: 'Include the number of users in the user group.'
27
+ c.flag 'is_shared', desc: 'Boolean to identify if the API is getting called when a shared section is getting shared.'
26
28
  c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
27
29
  c.action do |_global_options, options, _args|
28
30
  puts JSON.dump(@client.usergroups_users_update(options))
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'UsersDiscoverablecontacts methods.'
8
+ command 'users_discoverableContacts' do |g|
9
+ g.desc 'Look up an email address to see if someone is discoverable on Slack'
10
+ g.long_desc %( Look up an email address to see if someone is discoverable on Slack )
11
+ g.command 'lookup' do |c|
12
+ c.flag 'email', desc: '.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.users_discoverableContacts_lookup(options))
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'WorkflowsTriggersPermissions methods.'
8
+ command 'workflows_triggers_permissions' do |g|
9
+ g.desc 'Allows users to run a trigger that has its permission type set to named_entities'
10
+ g.long_desc %( Allows users to run a trigger that has its permission type set to named_entities )
11
+ g.command 'add' do |c|
12
+ c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
13
+ c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
14
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
15
+ c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
16
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
17
+ c.action do |_global_options, options, _args|
18
+ puts JSON.dump(@client.workflows_triggers_permissions_add(options))
19
+ end
20
+ end
21
+
22
+ g.desc 'Returns the permission type of a trigger and if applicable, includes the entities that have been granted access'
23
+ g.long_desc %( Returns the permission type of a trigger and if applicable, includes the entities that have been granted access )
24
+ g.command 'list' do |c|
25
+ c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
26
+ c.action do |_global_options, options, _args|
27
+ puts JSON.dump(@client.workflows_triggers_permissions_list(options))
28
+ end
29
+ end
30
+
31
+ g.desc "Revoke an entity's access to a trigger that has its permission type set to named_entities"
32
+ g.long_desc %( Revoke an entity's access to a trigger that has its permission type set to named_entities )
33
+ g.command 'remove' do |c|
34
+ c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
35
+ c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
36
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
37
+ c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
38
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.workflows_triggers_permissions_remove(options))
41
+ end
42
+ end
43
+
44
+ g.desc 'Set the permission type for who can run a trigger'
45
+ g.long_desc %( Set the permission type for who can run a trigger )
46
+ g.command 'set' do |c|
47
+ c.flag 'permission_type', desc: 'The type of permission that defines who can run a trigger.'
48
+ c.flag 'trigger_id', desc: 'Encoded ID of the trigger.'
49
+ c.flag 'channel_ids', desc: 'List of encoded channel IDs.'
50
+ c.flag 'org_ids', desc: 'List of encoded organization IDs.'
51
+ c.flag 'team_ids', desc: 'List of encoded workspace IDs.'
52
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
53
+ c.action do |_global_options, options, _args|
54
+ puts JSON.dump(@client.workflows_triggers_permissions_set(options))
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1 @@
1
+ SLACK_API_TOKEN=
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ source 'http://rubygems.org'
3
+
4
+ gem 'dotenv'
5
+ gem 'slack-ruby-client', path: '../..'