slack-ruby-client 0.16.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/danger.yml +19 -0
  3. data/.github/workflows/integtest.yml +25 -0
  4. data/.github/workflows/rubocop.yml +13 -0
  5. data/.github/workflows/test.yml +34 -0
  6. data/.gitignore +5 -3
  7. data/.rubocop.yml +6 -0
  8. data/.rubocop_todo.yml +137 -43
  9. data/CHANGELOG.md +34 -3
  10. data/CONTRIBUTING.md +4 -4
  11. data/Gemfile +18 -1
  12. data/Gemfile.danger +6 -0
  13. data/LICENSE.md +1 -1
  14. data/README.md +13 -12
  15. data/RELEASING.md +1 -1
  16. data/UPGRADING.md +42 -0
  17. data/bin/commands/admin_analytics.rb +2 -1
  18. data/bin/commands/admin_apps.rb +11 -0
  19. data/bin/commands/admin_apps_requests.rb +12 -0
  20. data/bin/commands/admin_auth_policy.rb +39 -0
  21. data/bin/commands/admin_conversations.rb +2 -1
  22. data/bin/commands/admin_conversations_restrictAccess.rb +1 -1
  23. data/bin/commands/admin_emoji.rb +2 -2
  24. data/bin/commands/admin_teams.rb +1 -1
  25. data/bin/commands/admin_users.rb +1 -0
  26. data/bin/commands/admin_users_session.rb +40 -0
  27. data/bin/commands/admin_users_unsupportedVersions.rb +15 -0
  28. data/bin/commands/apps_manifest.rb +52 -0
  29. data/bin/commands/bookmarks.rb +52 -0
  30. data/bin/commands/channels.rb +0 -157
  31. data/bin/commands/chat.rb +14 -9
  32. data/bin/commands/conversations.rb +61 -4
  33. data/bin/commands/dnd.rb +3 -1
  34. data/bin/commands/files.rb +2 -1
  35. data/bin/commands/groups.rb +0 -163
  36. data/bin/commands/im.rb +0 -62
  37. data/bin/commands/mpim.rb +0 -60
  38. data/bin/commands/oauth.rb +0 -13
  39. data/bin/commands/oauth_v2.rb +13 -1
  40. data/bin/commands/openid_connect.rb +27 -0
  41. data/bin/commands/pins.rb +2 -2
  42. data/bin/commands/reminders.rb +6 -0
  43. data/bin/commands/rtm.rb +2 -2
  44. data/bin/commands/search.rb +2 -1
  45. data/bin/commands/stars.rb +7 -6
  46. data/bin/commands/team.rb +1 -0
  47. data/bin/commands/team_billing.rb +13 -0
  48. data/bin/commands/team_preferences.rb +13 -0
  49. data/bin/commands/tooling_tokens.rb +14 -0
  50. data/bin/commands/usergroups.rb +1 -1
  51. data/bin/commands/users.rb +1 -1
  52. data/bin/commands/views.rb +1 -1
  53. data/bin/commands.rb +8 -9
  54. data/lib/slack/config.rb +1 -2
  55. data/lib/slack/events/request.rb +5 -3
  56. data/lib/slack/real_time/client.rb +6 -7
  57. data/lib/slack/real_time/concurrency/async.rb +6 -8
  58. data/lib/slack/real_time/config.rb +3 -13
  59. data/lib/slack/real_time/socket.rb +1 -2
  60. data/lib/slack/real_time/stores/base.rb +1 -6
  61. data/lib/slack/real_time/stores/starter.rb +6 -3
  62. data/lib/slack/real_time/stores/store.rb +5 -0
  63. data/lib/slack/version.rb +1 -1
  64. data/lib/slack/web/api/endpoints/admin_analytics.rb +5 -3
  65. data/lib/slack/web/api/endpoints/admin_apps.rb +21 -5
  66. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +2 -2
  67. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +20 -2
  68. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +2 -2
  69. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
  70. data/lib/slack/web/api/endpoints/admin_barriers.rb +6 -6
  71. data/lib/slack/web/api/endpoints/admin_conversations.rb +28 -26
  72. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
  73. data/lib/slack/web/api/endpoints/admin_emoji.rb +11 -11
  74. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +7 -7
  75. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +3 -3
  76. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
  77. data/lib/slack/web/api/endpoints/admin_teams.rb +7 -7
  78. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +2 -2
  79. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -2
  80. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +5 -5
  81. data/lib/slack/web/api/endpoints/admin_usergroups.rb +10 -10
  82. data/lib/slack/web/api/endpoints/admin_users.rb +20 -18
  83. data/lib/slack/web/api/endpoints/admin_users_session.rb +65 -9
  84. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
  85. data/lib/slack/web/api/endpoints/api.rb +1 -1
  86. data/lib/slack/web/api/endpoints/apps.rb +2 -2
  87. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +3 -3
  88. data/lib/slack/web/api/endpoints/apps_manifest.rb +77 -0
  89. data/lib/slack/web/api/endpoints/auth.rb +1 -1
  90. data/lib/slack/web/api/endpoints/auth_teams.rb +3 -3
  91. data/lib/slack/web/api/endpoints/bookmarks.rb +86 -0
  92. data/lib/slack/web/api/endpoints/bots.rb +2 -2
  93. data/lib/slack/web/api/endpoints/calls.rb +15 -15
  94. data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
  95. data/lib/slack/web/api/endpoints/channels.rb +0 -265
  96. data/lib/slack/web/api/endpoints/chat.rb +67 -57
  97. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +3 -3
  98. data/lib/slack/web/api/endpoints/conversations.rb +117 -27
  99. data/lib/slack/web/api/endpoints/dialog.rb +2 -2
  100. data/lib/slack/web/api/endpoints/dnd.rb +6 -3
  101. data/lib/slack/web/api/endpoints/files.rb +16 -14
  102. data/lib/slack/web/api/endpoints/files_comments.rb +1 -1
  103. data/lib/slack/web/api/endpoints/files_remote.rb +20 -20
  104. data/lib/slack/web/api/endpoints/groups.rb +0 -273
  105. data/lib/slack/web/api/endpoints/im.rb +0 -107
  106. data/lib/slack/web/api/endpoints/migration.rb +3 -3
  107. data/lib/slack/web/api/endpoints/mpim.rb +0 -102
  108. data/lib/slack/web/api/endpoints/oauth.rb +5 -27
  109. data/lib/slack/web/api/endpoints/oauth_v2.rb +24 -6
  110. data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
  111. data/lib/slack/web/api/endpoints/pins.rb +4 -4
  112. data/lib/slack/web/api/endpoints/reactions.rb +12 -12
  113. data/lib/slack/web/api/endpoints/reminders.rb +17 -5
  114. data/lib/slack/web/api/endpoints/rtm.rb +10 -10
  115. data/lib/slack/web/api/endpoints/search.rb +24 -16
  116. data/lib/slack/web/api/endpoints/stars.rb +11 -9
  117. data/lib/slack/web/api/endpoints/team.rb +10 -8
  118. data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
  119. data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
  120. data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
  121. data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
  122. data/lib/slack/web/api/endpoints/usergroups.rb +19 -19
  123. data/lib/slack/web/api/endpoints/usergroups_users.rb +7 -7
  124. data/lib/slack/web/api/endpoints/users.rb +16 -16
  125. data/lib/slack/web/api/endpoints/users_profile.rb +4 -4
  126. data/lib/slack/web/api/endpoints/views.rb +12 -12
  127. data/lib/slack/web/api/endpoints/workflows.rb +9 -9
  128. data/lib/slack/web/api/endpoints.rb +16 -20
  129. data/lib/slack/web/api/errors/server_error.rb +37 -0
  130. data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -4
  131. data/lib/slack/web/api/errors.rb +232 -16
  132. data/lib/slack/web/api/mixins.rb +0 -2
  133. data/lib/slack/web/api/patches/chat.1.patch +7 -9
  134. data/lib/slack/web/api/templates/endpoints.erb +0 -2
  135. data/lib/slack/web/faraday/connection.rb +5 -5
  136. data/lib/slack/web/faraday/request.rb +4 -1
  137. data/lib/slack/web/faraday/response/raise_error.rb +2 -14
  138. data/lib/slack/web/faraday/response/wrap_error.rb +11 -5
  139. data/lib/slack/web/pagination/cursor.rb +1 -5
  140. data/lib/slack-ruby-client.rb +3 -2
  141. data/lib/tasks/real_time.rake +1 -3
  142. data/lib/tasks/web.rake +4 -0
  143. data/slack-ruby-client.gemspec +5 -14
  144. data/spec/fixtures/slack/web/429_error.yml +50 -54
  145. data/spec/fixtures/slack/web/auth_test_error.yml +51 -18
  146. data/spec/fixtures/slack/web/auth_test_success.yml +50 -26
  147. data/spec/fixtures/slack/web/conversations_info.yml +167 -0
  148. data/spec/fixtures/slack/web/conversations_setTopic.yml +42 -27
  149. data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +89 -59
  150. data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +131 -86
  151. data/spec/fixtures/slack/web/paginated_users_list.yml +501 -69
  152. data/spec/fixtures/slack/web/rtm_connect.yml +267 -30
  153. data/spec/fixtures/slack/web/rtm_start.yml +771 -60
  154. data/spec/fixtures/slack/web/users_info.yml +153 -69
  155. data/spec/fixtures/slack/web/users_list.yml +102 -41
  156. data/spec/fixtures/slack/web/views_open_error.yml +49 -42
  157. data/spec/integration/integration_spec.rb +1 -1
  158. data/spec/slack/events/request_spec.rb +7 -6
  159. data/spec/slack/real_time/client_spec.rb +37 -39
  160. data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +10 -0
  161. data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +10 -0
  162. data/spec/slack/real_time/event_handlers/bot_spec.rb +1 -1
  163. data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -9
  164. data/spec/slack/real_time/event_handlers/group_spec.rb +2 -2
  165. data/spec/slack/real_time/event_handlers/im_spec.rb +7 -7
  166. data/spec/slack/real_time/event_handlers/user_spec.rb +2 -2
  167. data/spec/slack/real_time/rtm_connect_spec.rb +1 -1
  168. data/spec/slack/real_time/rtm_start_spec.rb +1 -1
  169. data/spec/slack/real_time/store_spec.rb +2 -2
  170. data/spec/slack/slack_spec.rb +7 -5
  171. data/spec/slack/version_spec.rb +1 -1
  172. data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +5 -0
  173. data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
  174. data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +35 -0
  175. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +9 -9
  176. data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +1 -1
  177. data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
  178. data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +22 -2
  179. data/spec/slack/web/api/endpoints/admin_users_spec.rb +8 -8
  180. data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +8 -0
  181. data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +36 -0
  182. data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
  183. data/spec/slack/web/api/endpoints/bookmarks_spec.rb +40 -0
  184. data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
  185. data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
  186. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +4 -6
  187. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +28 -16
  188. data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +13 -0
  189. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +4 -2
  190. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +2 -2
  191. data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +22 -14
  192. data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -5
  193. data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
  194. data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
  195. data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -11
  196. data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +6 -3
  197. data/spec/slack/web/api/endpoints/{apps_permissions_scopes_spec.rb → openid_connect_spec.rb} +1 -1
  198. data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
  199. data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
  200. data/spec/slack/web/api/endpoints/{apps_permissions_resources_spec.rb → team_billing_spec.rb} +1 -1
  201. data/spec/slack/web/api/endpoints/team_preferences_spec.rb +8 -0
  202. data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +13 -0
  203. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
  204. data/spec/slack/web/api/error_spec.rb +5 -7
  205. data/spec/slack/web/api/errors/slack_error_spec.rb +21 -26
  206. data/spec/slack/web/api/mixins/conversations_list_spec.rb +1 -1
  207. data/spec/slack/web/api/pagination/cursor_spec.rb +8 -10
  208. data/spec/slack/web/client_spec.rb +46 -32
  209. data/spec/slack/web/faraday/request_spec.rb +80 -0
  210. data/spec/slack/web/faraday/response/raise_error_spec.rb +2 -1
  211. data/spec/spec_helper.rb +1 -1
  212. data/spec/support/real_time/connected_client.rb +2 -8
  213. data/spec/support/vcr.rb +33 -2
  214. metadata +50 -297
  215. data/.travis.yml +0 -28
  216. data/lib/slack/web/api/errors/internal_error.rb +0 -14
  217. data/lib/slack/web/api/mixins/channels.id.json +0 -20
  218. data/lib/slack/web/api/mixins/channels.id.rb +0 -25
  219. data/lib/slack/web/api/mixins/groups.id.json +0 -20
  220. data/lib/slack/web/api/mixins/groups.id.rb +0 -25
  221. data/spec/fixtures/slack/web/503_error.yml +0 -14
  222. data/spec/fixtures/slack/web/channels_info.yml +0 -139
  223. data/spec/fixtures/slack/web/groups_info.yml +0 -43
  224. data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +0 -32
  225. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -16
  226. data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +0 -19
  227. data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -109
  228. data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -13
  229. data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -13
  230. data/spec/slack/web/api/endpoints/im_spec.rb +0 -39
  231. data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -39
  232. data/spec/slack/web/api/endpoints/views_spec.rb +0 -29
  233. data/spec/slack/web/api/mixins/channels_spec.rb +0 -43
  234. data/spec/slack/web/api/mixins/groups_spec.rb +0 -43
@@ -1,8 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc "Interface with all kinds of conversations the same way, whether they're public or private channels, direct messages, or otherwise."
4
+ desc 'Conversations methods.'
5
5
  command 'conversations' do |g|
6
+ g.desc 'Accepts an invitation to a Slack Connect channel.'
7
+ g.long_desc %( Accepts an invitation to a Slack Connect channel. )
8
+ g.command 'acceptSharedInvite' do |c|
9
+ 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.'
10
+ c.flag 'channel_id', desc: "ID of the channel that you'd like to accept. Must provide either invite_id or channel_id."
11
+ c.flag 'free_trial_accepted', desc: "Whether you'd like to use your workspace's free trial to begin using Slack Connect."
12
+ c.flag 'invite_id', desc: 'See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.'
13
+ c.flag 'is_private', desc: 'Whether the channel should be private.'
14
+ 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.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump($client.conversations_acceptSharedInvite(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Approves an invitation to a Slack Connect channel'
21
+ g.long_desc %( Approves an invitation to a Slack Connect channel )
22
+ g.command 'approveSharedInvite' do |c|
23
+ c.flag 'invite_id', desc: 'ID of the shared channel invite to approve.'
24
+ c.flag 'target_team', desc: 'The team or enterprise id of the other party involved in the invitation you are approving.'
25
+ c.action do |_global_options, options, _args|
26
+ puts JSON.dump($client.conversations_approveSharedInvite(options))
27
+ end
28
+ end
29
+
6
30
  g.desc 'Archives a conversation.'
7
31
  g.long_desc %( Archives a conversation. )
8
32
  g.command 'archive' do |c|
@@ -32,13 +56,23 @@ command 'conversations' do |g|
32
56
  end
33
57
  end
34
58
 
59
+ g.desc 'Declines a Slack Connect channel invite.'
60
+ g.long_desc %( Declines a Slack Connect channel invite. )
61
+ g.command 'declineSharedInvite' do |c|
62
+ c.flag 'invite_id', desc: 'ID of the Slack Connect invite to decline. Subscribe to the shared_channel_invite_accepted event to receive IDs of Slack Connect channel invites that have been accepted and are awaiting approval.'
63
+ c.flag 'target_team', desc: 'The team or enterprise id of the other party involved in the invitation you are declining.'
64
+ c.action do |_global_options, options, _args|
65
+ puts JSON.dump($client.conversations_declineSharedInvite(options))
66
+ end
67
+ end
68
+
35
69
  g.desc "Fetches a conversation's history of messages and events."
36
70
  g.long_desc %( Fetches a conversation's history of messages and events. )
37
71
  g.command 'history' do |c|
38
72
  c.flag 'channel', desc: 'Conversation ID to fetch history for.'
39
73
  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."
40
74
  c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results only when either timestamp is specified.'
41
- c.flag 'latest', desc: 'End of time range of messages to include in results.'
75
+ c.flag 'latest', desc: 'End of time range of messages to include in results. Default is the current time.'
42
76
  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."
43
77
  c.flag 'oldest', desc: 'Start of time range of messages to include in results.'
44
78
  c.action do |_global_options, options, _args|
@@ -67,6 +101,18 @@ command 'conversations' do |g|
67
101
  end
68
102
  end
69
103
 
104
+ g.desc 'Sends an invitation to a Slack Connect channel'
105
+ g.long_desc %( Sends an invitation to a Slack Connect channel )
106
+ g.command 'inviteShared' do |c|
107
+ c.flag 'channel', desc: "ID of the channel on your team that you'd like to share."
108
+ c.flag 'emails', desc: 'Optional email to receive this invite. Either emails or user_ids must be provided.'
109
+ c.flag 'external_limited', desc: 'Optional boolean on whether invite is to a external limited member. Defaults to true.'
110
+ c.flag 'user_ids', desc: 'Optional user_id to receive this invite. Either emails or user_ids must be provided.'
111
+ c.action do |_global_options, options, _args|
112
+ puts JSON.dump($client.conversations_inviteShared(options))
113
+ end
114
+ end
115
+
70
116
  g.desc 'Joins an existing conversation.'
71
117
  g.long_desc %( Joins an existing conversation. )
72
118
  g.command 'join' do |c|
@@ -101,13 +147,23 @@ command 'conversations' do |g|
101
147
  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."
102
148
  c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
103
149
  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. Must be an integer no larger than 1000."
104
- c.flag 'team_id', desc: 'encoded team id to list channels in, required if org token is used.'
150
+ c.flag 'team_id', desc: 'encoded team id to list channels in, required if token belongs to org-wide app.'
105
151
  c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
106
152
  c.action do |_global_options, options, _args|
107
153
  puts JSON.dump($client.conversations_list(options))
108
154
  end
109
155
  end
110
156
 
157
+ g.desc 'Lists shared channel invites that have been generated or received but have not been approved by all parties'
158
+ g.long_desc %( Lists shared channel invites that have been generated or received but have not been approved by all parties )
159
+ g.command 'listConnectInvites' do |c|
160
+ c.flag 'cursor', desc: 'Set to next_cursor returned by previous call to list items in subsequent page.'
161
+ c.flag 'team_id', desc: 'Encoded team id for the workspace to retrieve invites for, required if org token is used.'
162
+ c.action do |_global_options, options, _args|
163
+ puts JSON.dump($client.conversations_listConnectInvites(options))
164
+ end
165
+ end
166
+
111
167
  g.desc 'Sets the read cursor in a channel.'
112
168
  g.long_desc %( Sets the read cursor in a channel. )
113
169
  g.command 'mark' do |c|
@@ -133,6 +189,7 @@ command 'conversations' do |g|
133
189
  g.long_desc %( Opens or resumes a direct message or multi-person direct message. )
134
190
  g.command 'open' do |c|
135
191
  c.flag 'channel', desc: "Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead."
192
+ 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.'
136
193
  c.flag 'return_im', desc: 'Boolean, indicates you want the full IM channel definition in the response.'
137
194
  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.'
138
195
  c.action do |_global_options, options, _args|
@@ -154,7 +211,7 @@ command 'conversations' do |g|
154
211
  g.long_desc %( Retrieve a thread of messages posted to a conversation )
155
212
  g.command 'replies' do |c|
156
213
  c.flag 'channel', desc: 'Conversation ID to fetch thread from.'
157
- c.flag 'ts', desc: "Unique identifier of a thread's parent message. 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."
214
+ 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."
158
215
  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."
159
216
  c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results only when either timestamp is specified.'
160
217
  c.flag 'latest', desc: 'End of time range of messages to include in results.'
data/bin/commands/dnd.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'Adjust and view Do Not Disturb settings for team members.'
4
+ desc 'Dnd methods.'
5
5
  command 'dnd' do |g|
6
6
  g.desc "Ends the current user's Do Not Disturb session immediately."
7
7
  g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
@@ -22,6 +22,7 @@ command 'dnd' do |g|
22
22
  g.desc "Retrieves a user's current Do Not Disturb status."
23
23
  g.long_desc %( Retrieves a user's current Do Not Disturb status. )
24
24
  g.command 'info' do |c|
25
+ 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.'
25
26
  c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
26
27
  c.action do |_global_options, options, _args|
27
28
  puts JSON.dump($client.dnd_info(options))
@@ -41,6 +42,7 @@ command 'dnd' do |g|
41
42
  g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
42
43
  g.command 'teamInfo' do |c|
43
44
  c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
45
+ c.flag 'team_id', desc: 'Encoded team id where passed in users belong, required if org token is used.'
44
46
  c.action do |_global_options, options, _args|
45
47
  puts JSON.dump($client.dnd_teamInfo(options))
46
48
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'Get info on files uploaded to Slack, upload new files to Slack.'
4
+ desc 'Files methods.'
5
5
  command 'files' do |g|
6
6
  g.desc 'Deletes a file.'
7
7
  g.long_desc %( Deletes a file. )
@@ -38,6 +38,7 @@ command 'files' do |g|
38
38
  g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
39
39
  g.command 'list' do |c|
40
40
  c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
41
+ c.flag 'files', desc: '.'
41
42
  c.flag 'show_files_hidden_by_limit', desc: 'Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.'
42
43
  c.flag 'team_id', desc: 'encoded team id to list files in, required if org token is used.'
43
44
  c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
@@ -3,48 +3,6 @@
3
3
 
4
4
  desc "Get info on your team's private channels."
5
5
  command 'groups' do |g|
6
- g.desc 'Archives a private channel.'
7
- g.long_desc %( Archives a private channel. )
8
- g.command 'archive' do |c|
9
- c.flag 'channel', desc: 'Private channel to archive.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.groups_archive(options))
12
- end
13
- end
14
-
15
- g.desc 'Creates a private channel.'
16
- g.long_desc %( Creates a private channel. )
17
- g.command 'create' do |c|
18
- c.flag 'name', desc: 'Name of private channel to create.'
19
- c.flag 'team_id', desc: 'encoded team id to create the channel in, required if org token is used.'
20
- c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.'
21
- c.action do |_global_options, options, _args|
22
- puts JSON.dump($client.groups_create(options))
23
- end
24
- end
25
-
26
- g.desc 'Clones and archives a private channel.'
27
- g.long_desc %( Clones and archives a private channel. )
28
- g.command 'createChild' do |c|
29
- c.flag 'channel', desc: 'Private channel to clone and archive.'
30
- c.action do |_global_options, options, _args|
31
- puts JSON.dump($client.groups_createChild(options))
32
- end
33
- end
34
-
35
- g.desc 'Fetches history of messages and events from a private channel.'
36
- g.long_desc %( Fetches history of messages and events from a private channel. )
37
- g.command 'history' do |c|
38
- c.flag 'channel', desc: 'Private channel to fetch history for.'
39
- c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.'
40
- c.flag 'latest', desc: 'End of time range of messages to include in results.'
41
- c.flag 'oldest', desc: 'Start of time range of messages to include in results.'
42
- c.flag 'unreads', desc: 'Include unread_count_display in the output?.'
43
- c.action do |_global_options, options, _args|
44
- puts JSON.dump($client.groups_history(options))
45
- end
46
- end
47
-
48
6
  g.desc 'This method returns the ID of a group.'
49
7
  g.long_desc %( This method returns the ID of a group. )
50
8
  g.command 'id' do |c|
@@ -53,125 +11,4 @@ command 'groups' do |g|
53
11
  puts JSON.dump($client.groups_id(options))
54
12
  end
55
13
  end
56
-
57
- g.desc 'Gets information about a private channel.'
58
- g.long_desc %( Gets information about a private channel. )
59
- g.command 'info' do |c|
60
- c.flag 'channel', desc: 'Private channel to get info on.'
61
- c.flag 'include_locale', desc: 'Set this to true to receive the locale for this group. Defaults to false.'
62
- c.action do |_global_options, options, _args|
63
- puts JSON.dump($client.groups_info(options))
64
- end
65
- end
66
-
67
- g.desc 'Invites a user to a private channel.'
68
- g.long_desc %( Invites a user to a private channel. )
69
- g.command 'invite' do |c|
70
- c.flag 'channel', desc: 'Private channel to invite user to.'
71
- c.flag 'user', desc: 'User to invite.'
72
- c.action do |_global_options, options, _args|
73
- puts JSON.dump($client.groups_invite(options))
74
- end
75
- end
76
-
77
- g.desc 'Removes a user from a private channel.'
78
- g.long_desc %( Removes a user from a private channel. )
79
- g.command 'kick' do |c|
80
- c.flag 'channel', desc: 'Private channel to remove user from.'
81
- c.flag 'user', desc: 'User to remove from private channel.'
82
- c.action do |_global_options, options, _args|
83
- puts JSON.dump($client.groups_kick(options))
84
- end
85
- end
86
-
87
- g.desc 'Leaves a private channel.'
88
- g.long_desc %( Leaves a private channel. )
89
- g.command 'leave' do |c|
90
- c.flag 'channel', desc: 'Private channel to leave.'
91
- c.action do |_global_options, options, _args|
92
- puts JSON.dump($client.groups_leave(options))
93
- end
94
- end
95
-
96
- g.desc 'Lists private channels that the calling user has access to.'
97
- g.long_desc %( Lists private channels that the calling user has access to. )
98
- g.command 'list' do |c|
99
- c.flag 'cursor', desc: "Parameter for pagination. 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. See pagination for more details."
100
- c.flag 'exclude_archived', desc: "Don't return archived private channels."
101
- c.flag 'exclude_members', desc: 'Exclude the members from each group.'
102
- 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."
103
- c.flag 'team_id', desc: 'encoded team id to list channels in, required if org token is used.'
104
- c.action do |_global_options, options, _args|
105
- puts JSON.dump($client.groups_list(options))
106
- end
107
- end
108
-
109
- g.desc 'Sets the read cursor in a private channel.'
110
- g.long_desc %( Sets the read cursor in a private channel. )
111
- g.command 'mark' do |c|
112
- c.flag 'channel', desc: 'Channel or conversation to set the read cursor for.'
113
- c.flag 'ts', desc: 'Unique identifier of message you want marked as most recently seen in this conversation.'
114
- c.action do |_global_options, options, _args|
115
- puts JSON.dump($client.groups_mark(options))
116
- end
117
- end
118
-
119
- g.desc 'Opens a private channel.'
120
- g.long_desc %( Opens a private channel. )
121
- g.command 'open' do |c|
122
- c.flag 'channel', desc: 'Private channel to open.'
123
- c.action do |_global_options, options, _args|
124
- puts JSON.dump($client.groups_open(options))
125
- end
126
- end
127
-
128
- g.desc 'Renames a private channel.'
129
- g.long_desc %( Renames a private channel. )
130
- g.command 'rename' do |c|
131
- c.flag 'channel', desc: 'Private channel to rename.'
132
- c.flag 'name', desc: 'New name for private channel.'
133
- c.flag 'validate', desc: 'Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.'
134
- c.action do |_global_options, options, _args|
135
- puts JSON.dump($client.groups_rename(options))
136
- end
137
- end
138
-
139
- g.desc 'Retrieve a thread of messages posted to a private channel'
140
- g.long_desc %( Retrieve a thread of messages posted to a private channel )
141
- g.command 'replies' do |c|
142
- c.flag 'channel', desc: 'Private channel to fetch thread from.'
143
- c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message."
144
- c.action do |_global_options, options, _args|
145
- puts JSON.dump($client.groups_replies(options))
146
- end
147
- end
148
-
149
- g.desc 'Sets the purpose for a private channel.'
150
- g.long_desc %( Sets the purpose for a private channel. )
151
- g.command 'setPurpose' do |c|
152
- c.flag 'channel', desc: 'Private channel to set the purpose of.'
153
- c.flag 'purpose', desc: 'The new purpose.'
154
- c.action do |_global_options, options, _args|
155
- puts JSON.dump($client.groups_setPurpose(options))
156
- end
157
- end
158
-
159
- g.desc 'Sets the topic for a private channel.'
160
- g.long_desc %( Sets the topic for a private channel. )
161
- g.command 'setTopic' do |c|
162
- c.flag 'channel', desc: 'Private channel to set the topic of.'
163
- c.flag 'topic', desc: 'The new topic.'
164
- c.action do |_global_options, options, _args|
165
- puts JSON.dump($client.groups_setTopic(options))
166
- end
167
- end
168
-
169
- g.desc 'Unarchives a private channel.'
170
- g.long_desc %( Unarchives a private channel. )
171
- g.command 'unarchive' do |c|
172
- c.flag 'channel', desc: 'Private channel to unarchive.'
173
- c.action do |_global_options, options, _args|
174
- puts JSON.dump($client.groups_unarchive(options))
175
- end
176
- end
177
14
  end
data/bin/commands/im.rb CHANGED
@@ -3,66 +3,4 @@
3
3
 
4
4
  desc 'Get info on your direct messages.'
5
5
  command 'im' do |g|
6
- g.desc 'Close a direct message channel.'
7
- g.long_desc %( Close a direct message channel. )
8
- g.command 'close' do |c|
9
- c.flag 'channel', desc: 'Direct message channel to close.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.im_close(options))
12
- end
13
- end
14
-
15
- g.desc 'Fetches history of messages and events from direct message channel.'
16
- g.long_desc %( Fetches history of messages and events from direct message channel. )
17
- g.command 'history' do |c|
18
- c.flag 'channel', desc: 'Direct message channel to fetch history for.'
19
- c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.'
20
- c.flag 'latest', desc: 'End of time range of messages to include in results.'
21
- c.flag 'oldest', desc: 'Start of time range of messages to include in results.'
22
- c.flag 'unreads', desc: 'Include unread_count_display in the output?.'
23
- c.action do |_global_options, options, _args|
24
- puts JSON.dump($client.im_history(options))
25
- end
26
- end
27
-
28
- g.desc 'Lists direct message channels for the calling user.'
29
- g.long_desc %( Lists direct message channels for the calling user. )
30
- g.command 'list' do |c|
31
- 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."
32
- 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."
33
- c.action do |_global_options, options, _args|
34
- puts JSON.dump($client.im_list(options))
35
- end
36
- end
37
-
38
- g.desc 'Sets the read cursor in a direct message channel.'
39
- g.long_desc %( Sets the read cursor in a direct message channel. )
40
- g.command 'mark' do |c|
41
- c.flag 'channel', desc: 'Direct message channel to set reading cursor in.'
42
- c.flag 'ts', desc: 'Timestamp of the most recently seen message.'
43
- c.action do |_global_options, options, _args|
44
- puts JSON.dump($client.im_mark(options))
45
- end
46
- end
47
-
48
- g.desc 'Opens a direct message channel.'
49
- g.long_desc %( Opens a direct message channel. )
50
- g.command 'open' do |c|
51
- c.flag 'user', desc: 'User to open a direct message channel with.'
52
- c.flag 'include_locale', desc: 'Set this to true to receive the locale for this im. Defaults to false.'
53
- c.flag 'return_im', desc: 'Boolean, indicates you want the full IM channel definition in the response.'
54
- c.action do |_global_options, options, _args|
55
- puts JSON.dump($client.im_open(options))
56
- end
57
- end
58
-
59
- g.desc 'Retrieve a thread of messages posted to a direct message conversation'
60
- g.long_desc %( Retrieve a thread of messages posted to a direct message conversation )
61
- g.command 'replies' do |c|
62
- c.flag 'channel', desc: 'Direct message channel to fetch thread from.'
63
- c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message."
64
- c.action do |_global_options, options, _args|
65
- puts JSON.dump($client.im_replies(options))
66
- end
67
- end
68
6
  end
data/bin/commands/mpim.rb CHANGED
@@ -3,64 +3,4 @@
3
3
 
4
4
  desc 'Get info on your multiparty direct messages.'
5
5
  command 'mpim' do |g|
6
- g.desc 'Closes a multiparty direct message channel.'
7
- g.long_desc %( Closes a multiparty direct message channel. )
8
- g.command 'close' do |c|
9
- c.flag 'channel', desc: 'MPIM to close.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.mpim_close(options))
12
- end
13
- end
14
-
15
- g.desc 'Fetches history of messages and events from a multiparty direct message.'
16
- g.long_desc %( Fetches history of messages and events from a multiparty direct message. )
17
- g.command 'history' do |c|
18
- c.flag 'channel', desc: 'Multiparty direct message to fetch history for.'
19
- c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results.'
20
- c.flag 'latest', desc: 'End of time range of messages to include in results.'
21
- c.flag 'oldest', desc: 'Start of time range of messages to include in results.'
22
- c.flag 'unreads', desc: 'Include unread_count_display in the output?.'
23
- c.action do |_global_options, options, _args|
24
- puts JSON.dump($client.mpim_history(options))
25
- end
26
- end
27
-
28
- g.desc 'Lists multiparty direct message channels for the calling user.'
29
- g.long_desc %( Lists multiparty direct message channels for the calling user. )
30
- g.command 'list' do |c|
31
- c.flag 'cursor', desc: "Parameter for pagination. 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. See pagination for more details."
32
- 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."
33
- c.action do |_global_options, options, _args|
34
- puts JSON.dump($client.mpim_list(options))
35
- end
36
- end
37
-
38
- g.desc 'Sets the read cursor in a multiparty direct message channel.'
39
- g.long_desc %( Sets the read cursor in a multiparty direct message channel. )
40
- g.command 'mark' do |c|
41
- c.flag 'channel', desc: 'Channel or conversation to set the read cursor for.'
42
- c.flag 'ts', desc: 'Unique identifier of message you want marked as most recently seen in this conversation.'
43
- c.action do |_global_options, options, _args|
44
- puts JSON.dump($client.mpim_mark(options))
45
- end
46
- end
47
-
48
- g.desc 'This method opens a multiparty direct message.'
49
- g.long_desc %( This method opens a multiparty direct message. )
50
- g.command 'open' do |c|
51
- c.flag 'users', desc: 'Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.'
52
- c.action do |_global_options, options, _args|
53
- puts JSON.dump($client.mpim_open(options))
54
- end
55
- end
56
-
57
- g.desc 'Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.'
58
- g.long_desc %( Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message. )
59
- g.command 'replies' do |c|
60
- c.flag 'channel', desc: 'Multiparty direct message channel to fetch thread from.'
61
- c.flag 'thread_ts', desc: "Unique identifier of a thread's parent message."
62
- c.action do |_global_options, options, _args|
63
- puts JSON.dump($client.mpim_replies(options))
64
- end
65
- end
66
6
  end
@@ -15,17 +15,4 @@ command 'oauth' do |g|
15
15
  puts JSON.dump($client.oauth_access(options))
16
16
  end
17
17
  end
18
-
19
- g.desc 'Exchanges a temporary OAuth verifier code for a workspace token.'
20
- g.long_desc %( Exchanges a temporary OAuth verifier code for a workspace token. )
21
- g.command 'token' do |c|
22
- c.flag 'client_id', desc: 'Issued when you created your application.'
23
- c.flag 'client_secret', desc: 'Issued when you created your application.'
24
- c.flag 'code', desc: 'The code param returned via the OAuth callback.'
25
- c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
26
- c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel.'
27
- c.action do |_global_options, options, _args|
28
- puts JSON.dump($client.oauth_token(options))
29
- end
30
- end
31
18
  end
@@ -6,12 +6,24 @@ command 'oauth_v2' do |g|
6
6
  g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
7
7
  g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
8
8
  g.command 'access' do |c|
9
- c.flag 'code', desc: 'The code param returned via the OAuth callback.'
10
9
  c.flag 'client_id', desc: 'Issued when you created your application.'
11
10
  c.flag 'client_secret', desc: 'Issued when you created your application.'
11
+ c.flag 'code', desc: 'The code param returned via the OAuth callback.'
12
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
12
13
  c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
14
+ c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
13
15
  c.action do |_global_options, options, _args|
14
16
  puts JSON.dump($client.oauth_v2_access(options))
15
17
  end
16
18
  end
19
+
20
+ g.desc 'Exchanges a legacy access token for a new expiring access token and refresh token'
21
+ g.long_desc %( Exchanges a legacy access token for a new expiring access token and refresh token )
22
+ g.command 'exchange' do |c|
23
+ c.flag 'client_id', desc: 'Issued when you created your application.'
24
+ c.flag 'client_secret', desc: 'Issued when you created your application.'
25
+ c.action do |_global_options, options, _args|
26
+ puts JSON.dump($client.oauth_v2_exchange(options))
27
+ end
28
+ end
17
29
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ desc 'OpenidConnect methods.'
5
+ command 'openid_connect' do |g|
6
+ g.desc 'Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.'
7
+ g.long_desc %( Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack. )
8
+ g.command 'token' do |c|
9
+ c.flag 'client_id', desc: 'Issued when you created your application.'
10
+ c.flag 'client_secret', desc: 'Issued when you created your application.'
11
+ c.flag 'code', desc: 'The code param returned via the OAuth callback.'
12
+ c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
13
+ c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
14
+ c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump($client.openid_connect_token(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Get the identity of a user who has authorized Sign in with Slack.'
21
+ g.long_desc %( Get the identity of a user who has authorized Sign in with Slack. )
22
+ g.command 'userInfo' do |c|
23
+ c.action do |_global_options, options, _args|
24
+ puts JSON.dump($client.openid_connect_userInfo(options))
25
+ end
26
+ end
27
+ end
data/bin/commands/pins.rb CHANGED
@@ -6,8 +6,8 @@ command 'pins' do |g|
6
6
  g.desc 'Pins an item to a channel.'
7
7
  g.long_desc %( Pins an item to a channel. )
8
8
  g.command 'add' do |c|
9
- c.flag 'channel', desc: 'Channel to pin the item in.'
10
- c.flag 'timestamp', desc: 'Timestamp of the message to pin.'
9
+ c.flag 'channel', desc: 'Channel to pin the messsage to. You must also include a timestamp when pinning messages.'
10
+ c.flag 'timestamp', desc: 'Timestamp of the message to pin. You must also include the channel.'
11
11
  c.action do |_global_options, options, _args|
12
12
  puts JSON.dump($client.pins_add(options))
13
13
  end
@@ -8,6 +8,8 @@ command 'reminders' do |g|
8
8
  g.command 'add' do |c|
9
9
  c.flag 'text', desc: 'The content of the reminder.'
10
10
  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").'
11
+ 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.'
12
+ c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
11
13
  c.flag 'user', desc: 'The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.'
12
14
  c.action do |_global_options, options, _args|
13
15
  puts JSON.dump($client.reminders_add(options))
@@ -18,6 +20,7 @@ command 'reminders' do |g|
18
20
  g.long_desc %( Marks a reminder as complete. )
19
21
  g.command 'complete' do |c|
20
22
  c.flag 'reminder', desc: 'The ID of the reminder to be marked as complete.'
23
+ c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
21
24
  c.action do |_global_options, options, _args|
22
25
  puts JSON.dump($client.reminders_complete(options))
23
26
  end
@@ -27,6 +30,7 @@ command 'reminders' do |g|
27
30
  g.long_desc %( Deletes a reminder. )
28
31
  g.command 'delete' do |c|
29
32
  c.flag 'reminder', desc: 'The ID of the reminder.'
33
+ c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
30
34
  c.action do |_global_options, options, _args|
31
35
  puts JSON.dump($client.reminders_delete(options))
32
36
  end
@@ -36,6 +40,7 @@ command 'reminders' do |g|
36
40
  g.long_desc %( Gets information about a reminder. )
37
41
  g.command 'info' do |c|
38
42
  c.flag 'reminder', desc: 'The ID of the reminder.'
43
+ c.flag 'team_id', desc: 'Encoded team id, required if org token is passed.'
39
44
  c.action do |_global_options, options, _args|
40
45
  puts JSON.dump($client.reminders_info(options))
41
46
  end
@@ -44,6 +49,7 @@ command 'reminders' do |g|
44
49
  g.desc 'Lists all reminders created by or for a given user.'
45
50
  g.long_desc %( Lists all reminders created by or for a given user. )
46
51
  g.command 'list' do |c|
52
+ c.flag 'team_id', desc: 'Encoded team id, required if org token is passed.'
47
53
  c.action do |_global_options, options, _args|
48
54
  puts JSON.dump($client.reminders_list(options))
49
55
  end
data/bin/commands/rtm.rb CHANGED
@@ -13,8 +13,8 @@ command 'rtm' do |g|
13
13
  end
14
14
  end
15
15
 
16
- g.desc 'Starts a Real Time Messaging session.'
17
- g.long_desc %( Starts a Real Time Messaging session. )
16
+ g.desc 'Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.'
17
+ g.long_desc %( Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead. )
18
18
  g.command 'start' do |c|
19
19
  c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
20
20
  c.flag 'include_locale', desc: 'Set this to true to receive the locale for users and channels. Defaults to false.'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc "Search your team's files and messages."
4
+ desc 'Search methods.'
5
5
  command 'search' do |g|
6
6
  g.desc 'Searches for messages and files matching a query.'
7
7
  g.long_desc %( Searches for messages and files matching a query. )
@@ -33,6 +33,7 @@ command 'search' do |g|
33
33
  g.long_desc %( Searches for messages matching a query. )
34
34
  g.command 'messages' do |c|
35
35
  c.flag 'query', desc: 'Search query.'
36
+ c.flag 'cursor', desc: "Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results."
36
37
  c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
37
38
  c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
38
39
  c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'