slack-ruby-client 2.7.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +1 -1
  3. data/.github/workflows/pr_lint.yml +1 -1
  4. data/.github/workflows/test.yml +4 -11
  5. data/.github/workflows/update_api.yml +1 -1
  6. data/.rubocop_todo.yml +45 -67
  7. data/CHANGELOG.md +12 -0
  8. data/Gemfile +0 -9
  9. data/LICENSE.md +1 -1
  10. data/README.md +16 -219
  11. data/Rakefile +0 -1
  12. data/UPGRADING.md +4 -0
  13. data/bin/commands/admin_analytics.rb +1 -1
  14. data/bin/commands/admin_apps.rb +4 -4
  15. data/bin/commands/admin_apps_activities.rb +7 -7
  16. data/bin/commands/admin_apps_approved.rb +4 -4
  17. data/bin/commands/admin_apps_config.rb +3 -1
  18. data/bin/commands/admin_apps_requests.rb +5 -5
  19. data/bin/commands/admin_apps_restricted.rb +4 -4
  20. data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
  21. data/bin/commands/admin_auth_policy.rb +5 -5
  22. data/bin/commands/admin_barriers.rb +3 -3
  23. data/bin/commands/admin_conversations.rb +15 -15
  24. data/bin/commands/admin_conversations_ekm.rb +2 -2
  25. data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
  26. data/bin/commands/admin_emoji.rb +5 -5
  27. data/bin/commands/admin_functions.rb +4 -3
  28. data/bin/commands/admin_functions_permissions.rb +2 -2
  29. data/bin/commands/admin_inviteRequests.rb +3 -3
  30. data/bin/commands/admin_inviteRequests_approved.rb +1 -1
  31. data/bin/commands/admin_inviteRequests_denied.rb +1 -1
  32. data/bin/commands/admin_roles.rb +3 -3
  33. data/bin/commands/admin_teams.rb +3 -3
  34. data/bin/commands/admin_teams_admins.rb +2 -2
  35. data/bin/commands/admin_teams_owners.rb +2 -2
  36. data/bin/commands/admin_teams_settings.rb +5 -5
  37. data/bin/commands/admin_usergroups.rb +4 -4
  38. data/bin/commands/admin_users.rb +22 -11
  39. data/bin/commands/admin_users_session.rb +6 -5
  40. data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
  41. data/bin/commands/admin_workflows.rb +6 -6
  42. data/bin/commands/admin_workflows_collaborators.rb +2 -2
  43. data/bin/commands/apps_activities.rb +7 -7
  44. data/bin/commands/apps_auth_external.rb +1 -1
  45. data/bin/commands/apps_datastore.rb +12 -12
  46. data/bin/commands/apps_event_authorizations.rb +3 -3
  47. data/bin/commands/apps_manifest.rb +1 -1
  48. data/bin/commands/assistant_search.rb +22 -3
  49. data/bin/commands/assistant_threads.rb +3 -2
  50. data/bin/commands/auth.rb +1 -1
  51. data/bin/commands/auth_teams.rb +1 -1
  52. data/bin/commands/bookmarks.rb +6 -6
  53. data/bin/commands/calls.rb +5 -5
  54. data/bin/commands/canvases.rb +2 -2
  55. data/bin/commands/canvases_access.rb +1 -1
  56. data/bin/commands/chat.rb +63 -25
  57. data/bin/commands/conversations.rb +8 -8
  58. data/bin/commands/conversations_canvases.rb +1 -1
  59. data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
  60. data/bin/commands/conversations_requestSharedInvite.rb +4 -4
  61. data/bin/commands/dnd.rb +1 -1
  62. data/bin/commands/entity.rb +24 -0
  63. data/bin/commands/files.rb +6 -6
  64. data/bin/commands/files_remote.rb +1 -1
  65. data/bin/commands/functions.rb +1 -1
  66. data/bin/commands/functions_distributions_permissions.rb +15 -15
  67. data/bin/commands/functions_workflows_steps.rb +2 -2
  68. data/bin/commands/functions_workflows_steps_responses.rb +2 -2
  69. data/bin/commands/migration.rb +2 -2
  70. data/bin/commands/oauth_v2.rb +2 -1
  71. data/bin/commands/openid_connect.rb +1 -1
  72. data/bin/commands/reactions.rb +3 -3
  73. data/bin/commands/reminders.rb +2 -2
  74. data/bin/commands/rtm.rb +15 -0
  75. data/bin/commands/search.rb +4 -4
  76. data/bin/commands/slackLists.rb +37 -0
  77. data/bin/commands/slackLists_access.rb +34 -0
  78. data/bin/commands/slackLists_download.rb +31 -0
  79. data/bin/commands/slackLists_items.rb +76 -0
  80. data/bin/commands/team.rb +1 -1
  81. data/bin/commands/team_externalTeams.rb +4 -4
  82. data/bin/commands/usergroups.rb +10 -10
  83. data/bin/commands/usergroups_users.rb +5 -5
  84. data/bin/commands/users.rb +1 -1
  85. data/bin/commands/users_discoverableContacts.rb +1 -1
  86. data/bin/commands/views.rb +4 -4
  87. data/bin/commands/workflows_featured.rb +50 -0
  88. data/bin/commands/workflows_triggers_permissions.rb +7 -7
  89. data/examples/oauth_v2/README.md +3 -3
  90. data/lib/slack/version.rb +1 -1
  91. data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
  92. data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
  93. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
  94. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
  95. data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
  96. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
  97. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
  98. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
  99. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
  100. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  101. data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
  102. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  103. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
  104. data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
  105. data/lib/slack/web/api/endpoints/admin_functions.rb +5 -3
  106. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +1 -1
  107. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
  108. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
  109. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  110. data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
  111. data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
  112. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
  113. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
  114. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
  115. data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
  116. data/lib/slack/web/api/endpoints/admin_users.rb +40 -25
  117. data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
  118. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
  119. data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
  120. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
  121. data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
  122. data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
  123. data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
  124. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
  125. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
  126. data/lib/slack/web/api/endpoints/assistant_search.rb +35 -4
  127. data/lib/slack/web/api/endpoints/assistant_threads.rb +9 -7
  128. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  129. data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
  130. data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
  131. data/lib/slack/web/api/endpoints/calls.rb +10 -10
  132. data/lib/slack/web/api/endpoints/canvases.rb +4 -4
  133. data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
  134. data/lib/slack/web/api/endpoints/chat.rb +123 -60
  135. data/lib/slack/web/api/endpoints/conversations.rb +16 -16
  136. data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
  137. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
  138. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
  139. data/lib/slack/web/api/endpoints/dnd.rb +2 -2
  140. data/lib/slack/web/api/endpoints/entity.rb +32 -0
  141. data/lib/slack/web/api/endpoints/files.rb +12 -12
  142. data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
  143. data/lib/slack/web/api/endpoints/functions.rb +3 -3
  144. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
  145. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
  146. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
  147. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  148. data/lib/slack/web/api/endpoints/oauth_v2.rb +4 -2
  149. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
  150. data/lib/slack/web/api/endpoints/reactions.rb +6 -6
  151. data/lib/slack/web/api/endpoints/reminders.rb +4 -4
  152. data/lib/slack/web/api/endpoints/rtm.rb +23 -0
  153. data/lib/slack/web/api/endpoints/search.rb +8 -8
  154. data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
  155. data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
  156. data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
  157. data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
  158. data/lib/slack/web/api/endpoints/team.rb +3 -3
  159. data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
  160. data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
  161. data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
  162. data/lib/slack/web/api/endpoints/users.rb +2 -2
  163. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
  164. data/lib/slack/web/api/endpoints/views.rb +9 -9
  165. data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
  166. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
  167. data/lib/slack/web/api/endpoints.rb +12 -2
  168. data/lib/slack/web/api/errors.rb +126 -16
  169. data/lib/slack/web/api/helpers/files.rb +4 -1
  170. data/lib/slack/web/faraday/response/raise_error.rb +20 -2
  171. data/lib/slack-ruby-client.rb +0 -12
  172. data/lib/tasks/update.rake +0 -1
  173. data/lib/tasks/web.rake +2 -4
  174. metadata +15 -40
  175. data/.github/workflows/integration_test.yml +0 -45
  176. data/bin/commands/workflows.rb +0 -44
  177. data/examples/hi_real_time_and_web/Gemfile +0 -6
  178. data/examples/hi_real_time_and_web/hi.gif +0 -0
  179. data/examples/hi_real_time_and_web/hi.rb +0 -28
  180. data/examples/hi_real_time_async_async/Gemfile +0 -7
  181. data/examples/hi_real_time_async_async/Procfile +0 -2
  182. data/examples/hi_real_time_async_async/hi.rb +0 -41
  183. data/lib/slack/real_time/api/message.rb +0 -23
  184. data/lib/slack/real_time/api/message_id.rb +0 -15
  185. data/lib/slack/real_time/api/ping.rb +0 -19
  186. data/lib/slack/real_time/api/schema/event.json +0 -23
  187. data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
  188. data/lib/slack/real_time/api/typing.rb +0 -20
  189. data/lib/slack/real_time/client.rb +0 -271
  190. data/lib/slack/real_time/concurrency/async.rb +0 -142
  191. data/lib/slack/real_time/concurrency.rb +0 -8
  192. data/lib/slack/real_time/config.rb +0 -62
  193. data/lib/slack/real_time/models/base.rb +0 -11
  194. data/lib/slack/real_time/models/bot.rb +0 -9
  195. data/lib/slack/real_time/models/channel.rb +0 -13
  196. data/lib/slack/real_time/models/im.rb +0 -9
  197. data/lib/slack/real_time/models/mpim.rb +0 -9
  198. data/lib/slack/real_time/models/team.rb +0 -9
  199. data/lib/slack/real_time/models/user.rb +0 -9
  200. data/lib/slack/real_time/models.rb +0 -9
  201. data/lib/slack/real_time/socket.rb +0 -118
  202. data/lib/slack/real_time/stores/base.rb +0 -47
  203. data/lib/slack/real_time/stores/starter.rb +0 -449
  204. data/lib/slack/real_time/stores/store.rb +0 -624
  205. data/lib/slack/real_time/stores.rb +0 -5
  206. data/lib/slack/web/api/endpoints/workflows.rb +0 -63
  207. data/lib/tasks/real_time.rake +0 -81
@@ -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
@@ -6,6 +6,17 @@ module Slack
6
6
  class App
7
7
  desc 'Chat methods.'
8
8
  command 'chat' do |g|
9
+ g.desc 'Appends text to an existing streaming conversation.'
10
+ g.long_desc %( Appends text to an existing streaming conversation. )
11
+ g.command 'appendStream' do |c|
12
+ c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
13
+ c.flag 'ts', desc: 'The timestamp of the streaming message.'
14
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.chat_appendStream(options))
17
+ end
18
+ end
19
+
9
20
  g.desc 'Execute a slash command in a public channel (undocumented)'
10
21
  g.long_desc %( Execute a slash command in a public channel )
11
22
  g.command 'command' do |c|
@@ -20,9 +31,9 @@ module Slack
20
31
  g.desc 'Deletes a message.'
21
32
  g.long_desc %( Deletes a message. )
22
33
  g.command 'delete' do |c|
34
+ 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
35
  c.flag 'channel', desc: 'Channel containing the message to be deleted.'
24
36
  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
37
  c.action do |_global_options, options, _args|
27
38
  puts JSON.dump(@client.chat_delete(options))
28
39
  end
@@ -31,9 +42,9 @@ module Slack
31
42
  g.desc 'Deletes a pending scheduled message from the queue.'
32
43
  g.long_desc %( Deletes a pending scheduled message from the queue. )
33
44
  g.command 'deleteScheduledMessage' do |c|
45
+ 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
46
  c.flag 'channel', desc: 'The channel the scheduled_message is posting to.'
35
47
  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
48
  c.action do |_global_options, options, _args|
38
49
  puts JSON.dump(@client.chat_deleteScheduledMessage(options))
39
50
  end
@@ -62,18 +73,18 @@ module Slack
62
73
  g.desc 'Sends an ephemeral message to a user in a channel.'
63
74
  g.long_desc %( Sends an ephemeral message to a user in a channel. )
64
75
  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.'
76
+ 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
77
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
68
78
  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.'
79
+ c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
71
80
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
72
81
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
73
82
  c.flag 'link_names', desc: 'Find and link channel names and usernames.'
74
83
  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
84
  c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
85
+ 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
86
  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."
87
+ 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
88
  c.flag 'username', desc: "Set your bot's user name."
78
89
  c.action do |_global_options, options, _args|
79
90
  puts JSON.dump(@client.chat_postEphemeral(options))
@@ -83,12 +94,11 @@ module Slack
83
94
  g.desc 'Sends a message to a channel.'
84
95
  g.long_desc %( Sends a message to a channel. )
85
96
  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.'
97
+ 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
98
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
88
99
  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.'
100
+ 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.'
101
+ c.flag 'current_draft_last_updated_ts', desc: "This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server."
92
102
  c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
93
103
  c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
94
104
  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 +107,7 @@ module Slack
97
107
  c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
98
108
  c.flag 'parse', desc: 'Change how messages are treated. See below.'
99
109
  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.'
110
+ 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
111
  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
112
  c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
102
113
  c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
@@ -109,37 +120,64 @@ module Slack
109
120
  g.desc 'Schedules a message to be sent to a channel.'
110
121
  g.long_desc %( Schedules a message to be sent to a channel. )
111
122
  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.'
123
+ 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
124
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
115
125
  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.'
126
+ 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
127
  c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
119
128
  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
129
  c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
130
+ c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
122
131
  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.'
132
+ 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
133
  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
134
  c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
125
135
  c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
136
+ 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
137
  c.action do |_global_options, options, _args|
127
138
  puts JSON.dump(@client.chat_scheduleMessage(options))
128
139
  end
129
140
  end
130
141
 
142
+ g.desc 'Starts a new streaming conversation.'
143
+ g.long_desc %( Starts a new streaming conversation. )
144
+ g.command 'startStream' do |c|
145
+ c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
146
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
147
+ c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Streamed messages should always be replies to a user request."
148
+ c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
149
+ c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.'
150
+ c.action do |_global_options, options, _args|
151
+ puts JSON.dump(@client.chat_startStream(options))
152
+ end
153
+ end
154
+
155
+ g.desc 'Stops a streaming conversation.'
156
+ g.long_desc %( Stops a streaming conversation. )
157
+ g.command 'stopStream' do |c|
158
+ c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
159
+ c.flag 'ts', desc: 'The timestamp of the streaming message.'
160
+ c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
161
+ c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
162
+ 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.'
163
+ c.action do |_global_options, options, _args|
164
+ puts JSON.dump(@client.chat_stopStream(options))
165
+ end
166
+ end
167
+
131
168
  g.desc 'Provide custom unfurl behavior for user-posted URLs'
132
169
  g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
133
170
  g.command 'unfurl' do |c|
134
171
  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
172
  c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
136
- 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.'
173
+ 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. Either unfurls or metadata must be provided.'
140
174
  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
175
  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
176
  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.'
177
+ 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.'
178
+ 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.'
179
+ 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.'
180
+ c.flag 'metadata', desc: 'JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.'
143
181
  c.action do |_global_options, options, _args|
144
182
  puts JSON.dump(@client.chat_unfurl(options))
145
183
  end
@@ -148,18 +186,18 @@ module Slack
148
186
  g.desc 'Updates a message.'
149
187
  g.long_desc %( Updates a message. )
150
188
  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.'
189
+ 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
190
  c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
154
191
  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
192
  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
193
  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."
194
+ 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).'
195
+ 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
196
  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.'
197
+ 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.'
198
+ c.flag 'ts', desc: 'Timestamp of the message to be updated.'
162
199
  c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
200
+ c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
163
201
  c.action do |_global_options, options, _args|
164
202
  puts JSON.dump(@client.chat_update(options))
165
203
  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
@@ -0,0 +1,24 @@
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 'Entity methods.'
8
+ command 'entity' do |g|
9
+ g.desc 'Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.'
10
+ g.long_desc %( Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. )
11
+ g.command 'presentDetails' do |c|
12
+ c.flag 'metadata', desc: 'URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.'
13
+ c.flag 'trigger_id', desc: 'A reference to the original user action that initiated the request.'
14
+ c.flag 'user_auth_required', desc: 'Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.'
15
+ c.flag 'user_auth_url', desc: 'A custom URL to which users are directed for authentication if required.'
16
+ c.flag 'error', desc: ''
17
+ c.action do |_global_options, options, _args|
18
+ puts JSON.dump(@client.entity_presentDetails(options))
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -10,11 +10,11 @@ module Slack
10
10
  g.long_desc %( Finishes an upload started with files.getUploadURLExternal )
11
11
  g.command 'completeUploadExternal' do |c|
12
12
  c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
13
- c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
14
13
  c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
15
- c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
16
- c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
17
14
  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'."
15
+ c.flag 'channels', desc: 'Comma-separated string of channel IDs or user IDs where the file will be shared.'
16
+ c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
17
+ c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
18
18
  c.action do |_global_options, options, _args|
19
19
  puts JSON.dump(@client.files_completeUploadExternal(options))
20
20
  end
@@ -43,10 +43,10 @@ module Slack
43
43
  g.desc 'Gets a URL for an edge external file upload'
44
44
  g.long_desc %( Gets a URL for an edge external file upload )
45
45
  g.command 'getUploadURLExternal' do |c|
46
- c.flag 'filename', desc: 'Name of the file being uploaded.'
47
46
  c.flag 'length', desc: 'Size in bytes of the file being uploaded.'
48
- c.flag 'alt_txt', desc: 'Description of image for screen-reader.'
47
+ c.flag 'filename', desc: 'Name of the file being uploaded.'
49
48
  c.flag 'snippet_type', desc: 'Syntax type of the snippet being uploaded.'
49
+ c.flag 'alt_txt', desc: 'Description of image for screen-reader.'
50
50
  c.action do |_global_options, options, _args|
51
51
  puts JSON.dump(@client.files_getUploadURLExternal(options))
52
52
  end
@@ -55,8 +55,8 @@ module Slack
55
55
  g.desc 'Gets information about a file.'
56
56
  g.long_desc %( Gets information about a file. )
57
57
  g.command 'info' do |c|
58
- c.flag 'file', desc: 'Specify a file by providing its ID.'
59
58
  c.flag 'cursor', desc: "Parameter for pagination. File comments are paginated for a single file. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection of comments. See pagination for more details."
59
+ c.flag 'file', desc: 'Specify a file by providing its ID.'
60
60
  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 list hasn't been reached."
61
61
  c.action do |_global_options, options, _args|
62
62
  puts JSON.dump(@client.files_info(options))
@@ -11,10 +11,10 @@ module Slack
11
11
  g.command 'add' do |c|
12
12
  c.flag 'external_id', desc: 'Creator defined GUID for the file.'
13
13
  c.flag 'external_url', desc: 'URL of the remote file.'
14
- c.flag 'title', desc: 'Title of the file being shared.'
15
14
  c.flag 'filetype', desc: 'type of file.'
16
15
  c.flag 'indexable_file_contents', desc: 'A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.'
17
16
  c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
17
+ c.flag 'title', desc: 'Title of the file being shared.'
18
18
  c.action do |_global_options, options, _args|
19
19
  puts JSON.dump(@client.files_remote_add(options))
20
20
  end
@@ -9,8 +9,8 @@ module Slack
9
9
  g.desc 'Signal that a function failed to complete'
10
10
  g.long_desc %( Signal that a function failed to complete )
11
11
  g.command 'completeError' do |c|
12
- c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.'
13
12
  c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
13
+ c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.'
14
14
  c.action do |_global_options, options, _args|
15
15
  puts JSON.dump(@client.functions_completeError(options))
16
16
  end
@@ -9,21 +9,21 @@ module Slack
9
9
  g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
10
10
  g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
11
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
12
  c.flag 'function_id', desc: 'The encoded ID of the function.'
13
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
14
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
15
15
  c.flag 'user_ids', desc: 'List of encoded user IDs.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.functions_distributions_permissions_add(options))
18
18
  end
19
19
  end
20
20
 
21
- g.desc 'List the access type of a custom slack function and include the users or team or org ids 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 or team or org ids with access if its permission_type is set to named_entities )
21
+ g.desc 'List the access type of a custom slack function and include the users, team or org ids 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, team or org ids with access if its permission_type is set to named_entities )
23
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
24
  c.flag 'function_id', desc: 'The encoded ID of the function.'
25
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
26
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
27
27
  c.action do |_global_options, options, _args|
28
28
  puts JSON.dump(@client.functions_distributions_permissions_list(options))
29
29
  end
@@ -32,25 +32,25 @@ module Slack
32
32
  g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
33
33
  g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
34
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
35
  c.flag 'function_id', desc: 'The encoded ID of the function.'
36
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
37
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
38
38
  c.flag 'user_ids', desc: 'List of encoded user IDs.'
39
39
  c.action do |_global_options, options, _args|
40
40
  puts JSON.dump(@client.functions_distributions_permissions_remove(options))
41
41
  end
42
42
  end
43
43
 
44
- g.desc 'Set the access type of a custom slack function and define the users or team or org ids 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 or team or org ids to be granted access if permission_type is set to named_entities )
44
+ g.desc 'Set the access type of a custom slack function and define the users, team or org ids 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, team or org ids to be granted access if permission_type is set to named_entities )
46
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
47
  c.flag 'function_id', desc: 'The encoded ID of the function.'
51
- c.flag 'org_ids', desc: 'List of org IDs to allow for named_entities permission.'
52
- c.flag 'team_ids', desc: 'List of team IDs to allow for named_entities permission.'
48
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
49
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
50
+ c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
53
51
  c.flag 'user_ids', desc: 'List of encoded user IDs.'
52
+ c.flag 'team_ids', desc: 'List of team IDs to allow for named_entities permission.'
53
+ c.flag 'org_ids', desc: 'List of org IDs to allow for named_entities permission.'
54
54
  c.action do |_global_options, options, _args|
55
55
  puts JSON.dump(@client.functions_distributions_permissions_set(options))
56
56
  end
@@ -9,10 +9,10 @@ module Slack
9
9
  g.desc "List the steps of a specific function of a workflow's versions"
10
10
  g.long_desc %( List the steps of a specific function of a workflow's versions )
11
11
  g.command 'list' do |c|
12
- c.flag 'function_id', desc: 'The ID of the function to query.'
12
+ c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
13
13
  c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
14
14
  c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
15
- c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
15
+ c.flag 'function_id', desc: 'The ID of the function to query.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.functions_workflows_steps_list(options))
18
18
  end
@@ -9,10 +9,10 @@ module Slack
9
9
  g.desc 'Download form responses of a workflow'
10
10
  g.long_desc %( Download form responses of a workflow )
11
11
  g.command 'export' do |c|
12
- c.flag 'step_id', desc: 'The ID of the OpenForm step to export.'
12
+ c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
13
13
  c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
14
14
  c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
15
- c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
15
+ c.flag 'step_id', desc: 'The ID of the OpenForm step to export.'
16
16
  c.action do |_global_options, options, _args|
17
17
  puts JSON.dump(@client.functions_workflows_steps_responses_export(options))
18
18
  end
@@ -6,8 +6,8 @@ module Slack
6
6
  class App
7
7
  desc 'Migration methods.'
8
8
  command 'migration' do |g|
9
- g.desc 'For Enterprise Grid workspaces, map local user IDs to global user IDs'
10
- g.long_desc %( For Enterprise Grid workspaces, map local user IDs to global user IDs )
9
+ g.desc 'For Enterprise organization workspaces, map local user IDs to global user IDs'
10
+ g.long_desc %( For Enterprise organization workspaces, map local user IDs to global user IDs )
11
11
  g.command 'exchange' do |c|
12
12
  c.flag 'users', desc: 'A comma-separated list of user ids, up to 400 per request.'
13
13
  c.flag 'team_id', desc: 'Specify team_id starts with T in case of Org Token.'
@@ -12,8 +12,9 @@ module Slack
12
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
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
- c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
15
+ c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
16
16
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
17
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
17
18
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
18
19
  c.action do |_global_options, options, _args|
19
20
  puts JSON.dump(@client.oauth_v2_access(options))
@@ -12,8 +12,8 @@ module Slack
12
12
  c.flag 'client_id', desc: 'Issued when you created your application.'
13
13
  c.flag 'client_secret', desc: 'Issued when you created your application.'
14
14
  c.flag 'code', desc: 'The code param returned via the OAuth callback.'
15
- c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
16
15
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
16
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
17
17
  c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
18
18
  c.action do |_global_options, options, _args|
19
19
  puts JSON.dump(@client.openid_connect_token(options))