slack-ruby-client 0.11.0 → 2.7.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 (403) hide show
  1. checksums.yaml +5 -5
  2. data/.coveralls.yml +2 -0
  3. data/.github/FUNDING.yml +2 -0
  4. data/.github/dependabot.yml +6 -0
  5. data/.github/workflows/integration_test.yml +45 -0
  6. data/.github/workflows/lint.yml +14 -0
  7. data/.github/workflows/pr_lint.yml +21 -0
  8. data/.github/workflows/test.yml +56 -0
  9. data/.github/workflows/update_api.yml +81 -0
  10. data/.gitignore +7 -3
  11. data/.rubocop.yml +40 -2
  12. data/.rubocop_todo.yml +209 -55
  13. data/.ruby-version +1 -0
  14. data/CHANGELOG.md +257 -30
  15. data/CONTRIBUTING.md +44 -29
  16. data/Dangerfile +2 -0
  17. data/Gemfile +28 -6
  18. data/Gemfile.danger +6 -0
  19. data/LICENSE.md +1 -1
  20. data/README.md +473 -134
  21. data/RELEASING.md +2 -2
  22. data/Rakefile +2 -1
  23. data/SECURITY.md +9 -0
  24. data/UPGRADING.md +117 -3
  25. data/bin/commands/admin_analytics.rb +22 -0
  26. data/bin/commands/admin_apps.rb +57 -0
  27. data/bin/commands/admin_apps_activities.rb +32 -0
  28. data/bin/commands/admin_apps_approved.rb +24 -0
  29. data/bin/commands/admin_apps_config.rb +31 -0
  30. data/bin/commands/admin_apps_requests.rb +35 -0
  31. data/bin/commands/admin_apps_restricted.rb +24 -0
  32. data/bin/commands/admin_audit_anomaly_allow.rb +29 -0
  33. data/bin/commands/admin_auth_policy.rb +45 -0
  34. data/bin/commands/admin_barriers.rb +53 -0
  35. data/bin/commands/admin_conversations.rb +260 -0
  36. data/bin/commands/admin_conversations_ekm.rb +23 -0
  37. data/bin/commands/admin_conversations_restrictAccess.rb +43 -0
  38. data/bin/commands/admin_emoji.rb +60 -0
  39. data/bin/commands/admin_functions.rb +23 -0
  40. data/bin/commands/admin_functions_permissions.rb +31 -0
  41. data/bin/commands/admin_inviteRequests.rb +42 -0
  42. data/bin/commands/admin_inviteRequests_approved.rb +22 -0
  43. data/bin/commands/admin_inviteRequests_denied.rb +22 -0
  44. data/bin/commands/admin_roles.rb +46 -0
  45. data/bin/commands/admin_teams.rb +33 -0
  46. data/bin/commands/admin_teams_admins.rb +22 -0
  47. data/bin/commands/admin_teams_owners.rb +22 -0
  48. data/bin/commands/admin_teams_settings.rb +70 -0
  49. data/bin/commands/admin_usergroups.rb +54 -0
  50. data/bin/commands/admin_users.rb +106 -0
  51. data/bin/commands/admin_users_session.rb +84 -0
  52. data/bin/commands/admin_users_unsupportedVersions.rb +21 -0
  53. data/bin/commands/admin_workflows.rb +42 -0
  54. data/bin/commands/admin_workflows_collaborators.rb +31 -0
  55. data/bin/commands/admin_workflows_permissions.rb +21 -0
  56. data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
  57. data/bin/commands/api.rb +15 -9
  58. data/bin/commands/apps.rb +21 -0
  59. data/bin/commands/apps_activities.rb +32 -0
  60. data/bin/commands/apps_auth_external.rb +32 -0
  61. data/bin/commands/apps_connections.rb +19 -0
  62. data/bin/commands/apps_datastore.rb +116 -0
  63. data/bin/commands/apps_event_authorizations.rb +22 -0
  64. data/bin/commands/apps_manifest.rb +58 -0
  65. data/bin/commands/assistant_search.rb +27 -0
  66. data/bin/commands/assistant_threads.rb +45 -0
  67. data/bin/commands/auth.rb +22 -15
  68. data/bin/commands/auth_teams.rb +22 -0
  69. data/bin/commands/bookmarks.rb +60 -0
  70. data/bin/commands/bots.rb +16 -8
  71. data/bin/commands/calls.rb +58 -0
  72. data/bin/commands/calls_participants.rb +31 -0
  73. data/bin/commands/canvases.rb +41 -0
  74. data/bin/commands/canvases_access.rb +34 -0
  75. data/bin/commands/canvases_sections.rb +21 -0
  76. data/bin/commands/chat.rb +158 -99
  77. data/bin/commands/chat_scheduledMessages.rb +25 -0
  78. data/bin/commands/conversations.rb +241 -157
  79. data/bin/commands/conversations_canvases.rb +22 -0
  80. data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
  81. data/bin/commands/conversations_requestSharedInvite.rb +48 -0
  82. data/bin/commands/dialog.rb +16 -9
  83. data/bin/commands/dnd.rb +47 -38
  84. data/bin/commands/emoji.rb +15 -7
  85. data/bin/commands/files.rb +113 -87
  86. data/bin/commands/files_comments.rb +16 -30
  87. data/bin/commands/files_remote.rb +84 -0
  88. data/bin/commands/functions.rb +31 -0
  89. data/bin/commands/functions_distributions_permissions.rb +61 -0
  90. data/bin/commands/functions_workflows_steps.rb +23 -0
  91. data/bin/commands/functions_workflows_steps_responses.rb +23 -0
  92. data/bin/commands/migration.rb +17 -9
  93. data/bin/commands/oauth.rb +19 -24
  94. data/bin/commands/oauth_v2.rb +35 -0
  95. data/bin/commands/openid_connect.rb +33 -0
  96. data/bin/commands/pins.rb +33 -30
  97. data/bin/commands/reactions.rb +53 -45
  98. data/bin/commands/reminders.rb +54 -41
  99. data/bin/commands/rtm.rb +16 -22
  100. data/bin/commands/search.rb +44 -33
  101. data/bin/commands/stars.rb +39 -29
  102. data/bin/commands/team.rb +50 -34
  103. data/bin/commands/team_billing.rb +19 -0
  104. data/bin/commands/team_externalTeams.rb +35 -0
  105. data/bin/commands/team_preferences.rb +19 -0
  106. data/bin/commands/team_profile.rb +15 -8
  107. data/bin/commands/tooling_tokens.rb +20 -0
  108. data/bin/commands/usergroups.rb +69 -53
  109. data/bin/commands/usergroups_users.rb +30 -19
  110. data/bin/commands/users.rb +114 -84
  111. data/bin/commands/users_admin.rb +29 -22
  112. data/bin/commands/users_discoverableContacts.rb +20 -0
  113. data/bin/commands/users_prefs.rb +14 -7
  114. data/bin/commands/users_profile.rb +27 -20
  115. data/bin/commands/views.rb +56 -0
  116. data/bin/commands/workflows.rb +44 -0
  117. data/bin/commands/workflows_triggers_permissions.rb +60 -0
  118. data/bin/slack +50 -46
  119. data/examples/files_upload_v2/.env.example +1 -0
  120. data/examples/{hi_real_time → files_upload_v2}/Gemfile +2 -2
  121. data/examples/files_upload_v2/README.md +13 -0
  122. data/examples/files_upload_v2/files_upload_v2.rb +45 -0
  123. data/examples/hi_real_time_and_web/Gemfile +1 -0
  124. data/examples/hi_real_time_and_web/hi.rb +7 -3
  125. data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
  126. data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/hi.rb +12 -7
  127. data/examples/hi_web/Gemfile +1 -0
  128. data/examples/hi_web/hi.rb +1 -0
  129. data/examples/new_ticket/Gemfile +1 -0
  130. data/examples/new_ticket/new_ticket.rb +1 -0
  131. data/examples/oauth_v2/.env.example +4 -0
  132. data/examples/oauth_v2/Gemfile +7 -0
  133. data/examples/oauth_v2/README.md +33 -0
  134. data/examples/oauth_v2/oauth_v2.rb +60 -0
  135. data/lib/slack/config.rb +2 -2
  136. data/lib/slack/events/config.rb +32 -0
  137. data/lib/slack/events/request.rb +76 -0
  138. data/lib/slack/logger.rb +6 -5
  139. data/lib/slack/messages/formatting.rb +66 -1
  140. data/lib/slack/messages/message.rb +1 -4
  141. data/lib/slack/real_time/api/message.rb +6 -3
  142. data/lib/slack/real_time/api/message_id.rb +1 -0
  143. data/lib/slack/real_time/api/ping.rb +5 -2
  144. data/lib/slack/real_time/api/templates/event_handler.erb +5 -1
  145. data/lib/slack/real_time/api/typing.rb +5 -2
  146. data/lib/slack/real_time/client.rb +117 -54
  147. data/lib/slack/real_time/concurrency/async.rb +142 -0
  148. data/lib/slack/real_time/concurrency.rb +2 -2
  149. data/lib/slack/real_time/config.rb +12 -13
  150. data/lib/slack/real_time/models/base.rb +1 -4
  151. data/lib/slack/real_time/models/bot.rb +1 -0
  152. data/lib/slack/real_time/models/channel.rb +5 -0
  153. data/lib/slack/real_time/models/im.rb +1 -0
  154. data/lib/slack/real_time/models/{group.rb → mpim.rb} +2 -1
  155. data/lib/slack/real_time/models/team.rb +1 -0
  156. data/lib/slack/real_time/models/user.rb +1 -0
  157. data/lib/slack/real_time/models.rb +3 -1
  158. data/lib/slack/real_time/socket.rb +49 -17
  159. data/lib/slack/real_time/stores/base.rb +28 -14
  160. data/lib/slack/real_time/stores/starter.rb +325 -287
  161. data/lib/slack/real_time/stores/store.rb +271 -186
  162. data/lib/slack/real_time/stores.rb +2 -7
  163. data/lib/slack/utils/security.rb +44 -0
  164. data/lib/slack/version.rb +2 -1
  165. data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
  166. data/lib/slack/web/api/endpoints/admin_apps.rb +78 -0
  167. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +53 -0
  168. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +37 -0
  169. data/lib/slack/web/api/endpoints/admin_apps_config.rb +40 -0
  170. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +53 -0
  171. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +37 -0
  172. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
  173. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
  174. data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
  175. data/lib/slack/web/api/endpoints/admin_conversations.rb +397 -0
  176. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
  177. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
  178. data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
  179. data/lib/slack/web/api/endpoints/admin_functions.rb +36 -0
  180. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +41 -0
  181. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
  182. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
  183. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
  184. data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
  185. data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
  186. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
  187. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
  188. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
  189. data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
  190. data/lib/slack/web/api/endpoints/admin_users.rb +167 -0
  191. data/lib/slack/web/api/endpoints/admin_users_session.rb +121 -0
  192. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
  193. data/lib/slack/web/api/endpoints/admin_workflows.rb +67 -0
  194. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +42 -0
  195. data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +26 -0
  196. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -0
  197. data/lib/slack/web/api/endpoints/api.rb +2 -3
  198. data/lib/slack/web/api/endpoints/apps.rb +27 -0
  199. data/lib/slack/web/api/endpoints/apps_activities.rb +54 -0
  200. data/lib/slack/web/api/endpoints/apps_auth_external.rb +41 -0
  201. data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
  202. data/lib/slack/web/api/endpoints/apps_datastore.rb +181 -0
  203. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
  204. data/lib/slack/web/api/endpoints/apps_manifest.rb +79 -0
  205. data/lib/slack/web/api/endpoints/assistant_search.rb +44 -0
  206. data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
  207. data/lib/slack/web/api/endpoints/auth.rb +2 -1
  208. data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
  209. data/lib/slack/web/api/endpoints/bookmarks.rb +90 -0
  210. data/lib/slack/web/api/endpoints/bots.rb +4 -1
  211. data/lib/slack/web/api/endpoints/calls.rb +83 -0
  212. data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
  213. data/lib/slack/web/api/endpoints/canvases.rb +54 -0
  214. data/lib/slack/web/api/endpoints/canvases_access.rb +47 -0
  215. data/lib/slack/web/api/endpoints/canvases_sections.rb +27 -0
  216. data/lib/slack/web/api/endpoints/chat.rb +172 -87
  217. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
  218. data/lib/slack/web/api/endpoints/conversations.rb +190 -64
  219. data/lib/slack/web/api/endpoints/conversations_canvases.rb +28 -0
  220. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
  221. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
  222. data/lib/slack/web/api/endpoints/dialog.rb +6 -10
  223. data/lib/slack/web/api/endpoints/dnd.rb +11 -5
  224. data/lib/slack/web/api/endpoints/emoji.rb +3 -0
  225. data/lib/slack/web/api/endpoints/files.rb +85 -36
  226. data/lib/slack/web/api/endpoints/files_comments.rb +4 -36
  227. data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
  228. data/lib/slack/web/api/endpoints/functions.rb +43 -0
  229. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +84 -0
  230. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +30 -0
  231. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +30 -0
  232. data/lib/slack/web/api/endpoints/migration.rb +6 -3
  233. data/lib/slack/web/api/endpoints/oauth.rb +10 -32
  234. data/lib/slack/web/api/endpoints/oauth_v2.rb +48 -0
  235. data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
  236. data/lib/slack/web/api/endpoints/pins.rb +11 -18
  237. data/lib/slack/web/api/endpoints/reactions.rb +31 -20
  238. data/lib/slack/web/api/endpoints/reminders.rb +25 -12
  239. data/lib/slack/web/api/endpoints/rtm.rb +4 -22
  240. data/lib/slack/web/api/endpoints/search.rb +33 -18
  241. data/lib/slack/web/api/endpoints/stars.rb +23 -10
  242. data/lib/slack/web/api/endpoints/team.rb +38 -7
  243. data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
  244. data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -0
  245. data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
  246. data/lib/slack/web/api/endpoints/team_profile.rb +2 -1
  247. data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
  248. data/lib/slack/web/api/endpoints/usergroups.rb +44 -25
  249. data/lib/slack/web/api/endpoints/usergroups_users.rb +23 -14
  250. data/lib/slack/web/api/endpoints/users.rb +57 -18
  251. data/lib/slack/web/api/endpoints/users_admin.rb +5 -2
  252. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
  253. data/lib/slack/web/api/endpoints/users_prefs.rb +2 -0
  254. data/lib/slack/web/api/endpoints/users_profile.rb +11 -9
  255. data/lib/slack/web/api/endpoints/views.rb +86 -0
  256. data/lib/slack/web/api/endpoints/workflows.rb +63 -0
  257. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
  258. data/lib/slack/web/api/endpoints.rb +136 -12
  259. data/lib/slack/web/api/error.rb +1 -0
  260. data/lib/slack/web/api/errors/server_error.rb +37 -0
  261. data/lib/slack/web/api/errors/slack_error.rb +14 -1
  262. data/lib/slack/web/api/errors/too_many_requests_error.rb +2 -4
  263. data/lib/slack/web/api/errors.rb +1396 -0
  264. data/lib/slack/web/api/helpers/files.rb +97 -0
  265. data/lib/slack/web/api/helpers.rb +13 -0
  266. data/lib/slack/web/api/mixins/conversations.id.rb +47 -0
  267. data/lib/slack/web/api/mixins/ids.id.rb +4 -3
  268. data/lib/slack/web/api/mixins/users.id.rb +18 -4
  269. data/lib/slack/web/api/mixins/users.search.rb +3 -1
  270. data/lib/slack/web/api/mixins.rb +2 -2
  271. data/lib/slack/web/api/options.rb +26 -0
  272. data/lib/slack/web/api/patches/.gitkeep +0 -0
  273. data/lib/slack/web/api/templates/command.erb +19 -12
  274. data/lib/slack/web/api/templates/endpoints.erb +2 -2
  275. data/lib/slack/web/api/templates/errors.erb +20 -0
  276. data/lib/slack/web/api/templates/method.erb +23 -3
  277. data/lib/slack/web/api/templates/method_spec.erb +40 -3
  278. data/lib/slack/web/client.rb +4 -1
  279. data/lib/slack/web/config.rb +9 -2
  280. data/lib/slack/web/faraday/connection.rb +11 -20
  281. data/lib/slack/web/faraday/options.rb +24 -0
  282. data/lib/slack/web/faraday/request.rb +6 -1
  283. data/lib/slack/web/faraday/response/raise_error.rb +14 -8
  284. data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
  285. data/lib/slack/web/pagination/cursor.rb +7 -7
  286. data/lib/slack-ruby-client.rb +18 -6
  287. data/lib/slack.rb +1 -0
  288. data/lib/slack_ruby_client.rb +1 -0
  289. data/lib/tasks/git.rake +1 -0
  290. data/lib/tasks/real_time.rake +51 -21
  291. data/lib/tasks/update.rake +1 -0
  292. data/lib/tasks/web.rake +43 -17
  293. data/slack-ruby-client.gemspec +10 -14
  294. metadata +191 -307
  295. data/.travis.yml +0 -30
  296. data/bin/commands/apps_permissions.rb +0 -22
  297. data/bin/commands/channels.rb +0 -175
  298. data/bin/commands/groups.rb +0 -172
  299. data/bin/commands/im.rb +0 -67
  300. data/bin/commands/mpim.rb +0 -63
  301. data/bin/commands.rb +0 -33
  302. data/examples/hi_real_time/hi.gif +0 -0
  303. data/examples/hi_real_time/hi.rb +0 -37
  304. data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
  305. data/examples/hi_real_time_async_celluloid/hi.rb +0 -36
  306. data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
  307. data/lib/slack/real_time/concurrency/celluloid.rb +0 -117
  308. data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
  309. data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -35
  310. data/lib/slack/web/api/endpoints/channels.rb +0 -265
  311. data/lib/slack/web/api/endpoints/groups.rb +0 -255
  312. data/lib/slack/web/api/endpoints/im.rb +0 -113
  313. data/lib/slack/web/api/endpoints/mpim.rb +0 -98
  314. data/lib/slack/web/api/endpoints/presence.rb +0 -23
  315. data/lib/slack/web/api/mixins/channels.id.json +0 -20
  316. data/lib/slack/web/api/mixins/channels.id.rb +0 -26
  317. data/lib/slack/web/api/mixins/groups.id.json +0 -20
  318. data/lib/slack/web/api/mixins/groups.id.rb +0 -26
  319. data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
  320. data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
  321. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
  322. data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
  323. data/lib/slack/web/api/patches/dialog.1.open-json-support.patch +0 -17
  324. data/lib/slack/web/api/templates/commands.erb +0 -5
  325. data/screenshots/register-bot.png +0 -0
  326. data/spec/fixtures/slack/web/429_error.yml +0 -85
  327. data/spec/fixtures/slack/web/auth_test_error.yml +0 -48
  328. data/spec/fixtures/slack/web/auth_test_success.yml +0 -57
  329. data/spec/fixtures/slack/web/channels_info.yml +0 -46
  330. data/spec/fixtures/slack/web/groups_info.yml +0 -43
  331. data/spec/fixtures/slack/web/paginated_users_list.yml +0 -181
  332. data/spec/fixtures/slack/web/rtm_connect.yml +0 -70
  333. data/spec/fixtures/slack/web/rtm_start.yml +0 -104
  334. data/spec/fixtures/slack/web/users_info.yml +0 -130
  335. data/spec/fixtures/slack/web/users_list.yml +0 -72
  336. data/spec/integration/integration_spec.rb +0 -139
  337. data/spec/slack/config_spec.rb +0 -14
  338. data/spec/slack/messages/formatting_spec.rb +0 -43
  339. data/spec/slack/real_time/api/message_spec.rb +0 -15
  340. data/spec/slack/real_time/api/ping_spec.rb +0 -15
  341. data/spec/slack/real_time/api/typing_spec.rb +0 -15
  342. data/spec/slack/real_time/client_spec.rb +0 -425
  343. data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -62
  344. data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
  345. data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -19
  346. data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -44
  347. data/spec/slack/real_time/event_handlers/channel_spec.rb +0 -116
  348. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -15
  349. data/spec/slack/real_time/event_handlers/group_spec.rb +0 -90
  350. data/spec/slack/real_time/event_handlers/im_spec.rb +0 -47
  351. data/spec/slack/real_time/event_handlers/team_spec.rb +0 -62
  352. data/spec/slack/real_time/event_handlers/user_spec.rb +0 -63
  353. data/spec/slack/real_time/rtm_connect_spec.rb +0 -13
  354. data/spec/slack/real_time/rtm_start_spec.rb +0 -13
  355. data/spec/slack/real_time/store_spec.rb +0 -11
  356. data/spec/slack/slack_spec.rb +0 -58
  357. data/spec/slack/version_spec.rb +0 -7
  358. data/spec/slack/web/api/endpoints/api_spec.rb +0 -7
  359. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
  360. data/spec/slack/web/api/endpoints/bots_spec.rb +0 -7
  361. data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
  362. data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -25
  363. data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
  364. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -105
  365. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -28
  366. data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
  367. data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -33
  368. data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -12
  369. data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -7
  370. data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -34
  371. data/spec/slack/web/api/endpoints/files_spec.rb +0 -43
  372. data/spec/slack/web/api/endpoints/im_spec.rb +0 -38
  373. data/spec/slack/web/api/endpoints/migration_spec.rb +0 -12
  374. data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
  375. data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -29
  376. data/spec/slack/web/api/endpoints/pins_spec.rb +0 -22
  377. data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -17
  378. data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -30
  379. data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -7
  380. data/spec/slack/web/api/endpoints/search_spec.rb +0 -22
  381. data/spec/slack/web/api/endpoints/stars_spec.rb +0 -7
  382. data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -7
  383. data/spec/slack/web/api/endpoints/team_spec.rb +0 -7
  384. data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -27
  385. data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -20
  386. data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -17
  387. data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -7
  388. data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -7
  389. data/spec/slack/web/api/error_spec.rb +0 -14
  390. data/spec/slack/web/api/errors/slack_error_spec.rb +0 -14
  391. data/spec/slack/web/api/mixins/channels_spec.rb +0 -31
  392. data/spec/slack/web/api/mixins/groups_spec.rb +0 -31
  393. data/spec/slack/web/api/mixins/users_spec.rb +0 -39
  394. data/spec/slack/web/api/pagination/cursor_spec.rb +0 -70
  395. data/spec/slack/web/client_spec.rb +0 -174
  396. data/spec/spec_helper.rb +0 -14
  397. data/spec/support/queue_with_timeout.rb +0 -34
  398. data/spec/support/real_time/concurrency/mock.rb +0 -30
  399. data/spec/support/real_time/connected_client.rb +0 -21
  400. data/spec/support/real_time/event.rb +0 -11
  401. data/spec/support/token.rb +0 -10
  402. data/spec/support/vcr.rb +0 -9
  403. /data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
data/bin/commands/dnd.rb CHANGED
@@ -1,47 +1,56 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
- desc 'Adjust and view Do Not Disturb settings for team members.'
4
- command 'dnd' do |g|
5
- g.desc "Ends the current user's Do Not Disturb session immediately."
6
- g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
7
- g.command 'endDnd' do |c|
8
- c.action do |_global_options, options, _args|
9
- puts JSON.dump($client.dnd_endDnd(options))
10
- end
11
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Dnd methods.'
8
+ command 'dnd' do |g|
9
+ g.desc "Ends the current user's Do Not Disturb session immediately."
10
+ g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
11
+ g.command 'endDnd' do |c|
12
+ c.action do |_global_options, options, _args|
13
+ puts JSON.dump(@client.dnd_endDnd(options))
14
+ end
15
+ end
12
16
 
13
- g.desc "Ends the current user's snooze mode immediately."
14
- g.long_desc %( Ends the current user's snooze mode immediately. )
15
- g.command 'endSnooze' do |c|
16
- c.action do |_global_options, options, _args|
17
- puts JSON.dump($client.dnd_endSnooze(options))
18
- end
19
- end
17
+ g.desc "Ends the current user's snooze mode immediately."
18
+ g.long_desc %( Ends the current user's snooze mode immediately. )
19
+ g.command 'endSnooze' do |c|
20
+ c.action do |_global_options, options, _args|
21
+ puts JSON.dump(@client.dnd_endSnooze(options))
22
+ end
23
+ end
20
24
 
21
- g.desc "Retrieves a user's current Do Not Disturb status."
22
- g.long_desc %( Retrieves a user's current Do Not Disturb status. )
23
- g.command 'info' do |c|
24
- c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
25
- c.action do |_global_options, options, _args|
26
- puts JSON.dump($client.dnd_info(options))
27
- end
28
- end
25
+ g.desc "Retrieves a user's current Do Not Disturb status."
26
+ g.long_desc %( Retrieves a user's current Do Not Disturb status. )
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
+ c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
30
+ c.action do |_global_options, options, _args|
31
+ puts JSON.dump(@client.dnd_info(options))
32
+ end
33
+ end
29
34
 
30
- g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.'
31
- g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. )
32
- g.command 'setSnooze' do |c|
33
- c.flag 'num_minutes', desc: 'Number of minutes, from now, to snooze until.'
34
- c.action do |_global_options, options, _args|
35
- puts JSON.dump($client.dnd_setSnooze(options))
36
- end
37
- end
35
+ g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.'
36
+ g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. )
37
+ g.command 'setSnooze' do |c|
38
+ c.flag 'num_minutes', desc: 'This argument is required. Number of minutes, from now, to snooze until.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.dnd_setSnooze(options))
41
+ end
42
+ end
38
43
 
39
- g.desc 'Retrieves the Do Not Disturb status for users on a team.'
40
- g.long_desc %( Retrieves the Do Not Disturb status for users on a team. )
41
- g.command 'teamInfo' do |c|
42
- c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
43
- c.action do |_global_options, options, _args|
44
- puts JSON.dump($client.dnd_teamInfo(options))
44
+ g.desc 'Retrieves the Do Not Disturb status for up to 50 users on a team.'
45
+ g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
46
+ g.command 'teamInfo' do |c|
47
+ c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
48
+ c.flag 'team_id', desc: 'Encoded team id where passed in users belong, required if org token is used.'
49
+ c.action do |_global_options, options, _args|
50
+ puts JSON.dump(@client.dnd_teamInfo(options))
51
+ end
52
+ end
53
+ end
45
54
  end
46
55
  end
47
56
  end
@@ -1,12 +1,20 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
- desc 'Emoji methods.'
4
- command 'emoji' do |g|
5
- g.desc 'Lists custom emoji for a team.'
6
- g.long_desc %( Lists custom emoji for a team. )
7
- g.command 'list' do |c|
8
- c.action do |_global_options, options, _args|
9
- puts JSON.dump($client.emoji_list(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Emoji methods.'
8
+ command 'emoji' do |g|
9
+ g.desc 'Lists custom emoji for a team.'
10
+ g.long_desc %( Lists custom emoji for a team. )
11
+ g.command 'list' do |c|
12
+ c.flag 'include_categories', desc: 'Include a list of categories for Unicode emoji and the emoji in each category.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.emoji_list(options))
15
+ end
16
+ end
17
+ end
10
18
  end
11
19
  end
12
20
  end
@@ -1,101 +1,127 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
- desc 'Get info on files uploaded to Slack, upload new files to Slack.'
4
- command 'files' do |g|
5
- g.desc 'Deletes a file.'
6
- g.long_desc %( Deletes a file. )
7
- g.command 'delete' do |c|
8
- c.flag 'file', desc: 'ID of file to delete.'
9
- c.action do |_global_options, options, _args|
10
- puts JSON.dump($client.files_delete(options))
11
- end
12
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'Files methods.'
8
+ command 'files' do |g|
9
+ g.desc 'Finishes an upload started with files.getUploadURLExternal'
10
+ g.long_desc %( Finishes an upload started with files.getUploadURLExternal )
11
+ g.command 'completeUploadExternal' do |c|
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
+ 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
+ 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'."
18
+ c.action do |_global_options, options, _args|
19
+ puts JSON.dump(@client.files_completeUploadExternal(options))
20
+ end
21
+ end
13
22
 
14
- g.desc 'Change the properties of a file (undocumented)'
15
- g.long_desc %( Change the properties of a file )
16
- g.command 'edit' do |c|
17
- c.flag 'file', desc: 'ID of the file to be edited'
18
- c.flag 'title', desc: 'New title of the file'
19
- c.flag 'filetype', desc: 'New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.'
20
- c.action do |_global_options, options, _args|
21
- puts JSON.dump($client.files_edit(options))
22
- end
23
- end
23
+ g.desc 'Deletes a file.'
24
+ g.long_desc %( Deletes a file. )
25
+ g.command 'delete' do |c|
26
+ c.flag 'file', desc: 'ID of file to delete.'
27
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump(@client.files_delete(options))
29
+ end
30
+ end
24
31
 
25
- g.desc 'Gets information about a team file.'
26
- g.long_desc %( Gets information about a team file. )
27
- g.command 'info' do |c|
28
- c.flag 'file', desc: 'Specify a file by providing its ID.'
29
- c.action do |_global_options, options, _args|
30
- puts JSON.dump($client.files_info(options))
31
- end
32
- end
32
+ g.desc 'Change the properties of a file (undocumented)'
33
+ g.long_desc %( Change the properties of a file )
34
+ g.command 'edit' do |c|
35
+ c.flag 'file', desc: 'ID of the file to be edited'
36
+ c.flag 'title', desc: 'New title of the file'
37
+ c.flag 'filetype', desc: 'New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.'
38
+ c.action do |_global_options, options, _args|
39
+ puts JSON.dump(@client.files_edit(options))
40
+ end
41
+ end
33
42
 
34
- g.desc 'Lists & filters team files.'
35
- g.long_desc %( Lists & filters team files. )
36
- g.command 'list' do |c|
37
- c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
38
- c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
39
- c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).'
40
- c.flag 'types', desc: 'Filter files by type:
43
+ g.desc 'Gets a URL for an edge external file upload'
44
+ g.long_desc %( Gets a URL for an edge external file upload )
45
+ g.command 'getUploadURLExternal' do |c|
46
+ c.flag 'filename', desc: 'Name of the file being uploaded.'
47
+ c.flag 'length', desc: 'Size in bytes of the file being uploaded.'
48
+ c.flag 'alt_txt', desc: 'Description of image for screen-reader.'
49
+ c.flag 'snippet_type', desc: 'Syntax type of the snippet being uploaded.'
50
+ c.action do |_global_options, options, _args|
51
+ puts JSON.dump(@client.files_getUploadURLExternal(options))
52
+ end
53
+ end
41
54
 
42
- all - All files
43
- spaces - Posts
44
- snippets - Snippets
45
- images - Image files
46
- gdocs - Google docs
47
- zips - Zip files
48
- pdfs - PDF files
55
+ g.desc 'Gets information about a file.'
56
+ g.long_desc %( Gets information about a file. )
57
+ g.command 'info' do |c|
58
+ c.flag 'file', desc: 'Specify a file by providing its ID.'
59
+ 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."
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
+ c.action do |_global_options, options, _args|
62
+ puts JSON.dump(@client.files_info(options))
63
+ end
64
+ end
49
65
 
66
+ g.desc 'List for a team, in a channel, or from a user with applied filters.'
67
+ g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
68
+ g.command 'list' do |c|
69
+ c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
70
+ 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.'
71
+ c.flag 'team_id', desc: 'encoded team id to list files in, required if org token is used.'
72
+ c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
73
+ c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).'
74
+ c.flag 'types', desc: 'Filter files by type (see below). You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.'
75
+ c.flag 'user', desc: 'Filter files created by a single user.'
76
+ c.action do |_global_options, options, _args|
77
+ puts JSON.dump(@client.files_list(options))
78
+ end
79
+ end
50
80
 
51
- You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.
52
- .'
53
- c.flag 'user', desc: 'Filter files created by a single user.'
54
- c.action do |_global_options, options, _args|
55
- puts JSON.dump($client.files_list(options))
56
- end
57
- end
81
+ g.desc 'Revokes public/external sharing access for a file'
82
+ g.long_desc %( Revokes public/external sharing access for a file )
83
+ g.command 'revokePublicURL' do |c|
84
+ c.flag 'file', desc: 'File to revoke.'
85
+ c.action do |_global_options, options, _args|
86
+ puts JSON.dump(@client.files_revokePublicURL(options))
87
+ end
88
+ end
58
89
 
59
- g.desc 'Revokes public/external sharing access for a file'
60
- g.long_desc %( Revokes public/external sharing access for a file )
61
- g.command 'revokePublicURL' do |c|
62
- c.flag 'file', desc: 'File to revoke.'
63
- c.action do |_global_options, options, _args|
64
- puts JSON.dump($client.files_revokePublicURL(options))
65
- end
66
- end
90
+ g.desc 'Share an existing file in a channel (undocumented)'
91
+ g.long_desc %( Share an existing file in a channel )
92
+ g.command 'share' do |c|
93
+ c.flag 'file', desc: 'ID of the file to be shared'
94
+ c.flag 'channel', desc: 'Channel to share the file in. Works with both public (channel ID) and private channels (group ID).'
95
+ c.action do |_global_options, options, _args|
96
+ puts JSON.dump(@client.files_share(options))
97
+ end
98
+ end
67
99
 
68
- g.desc 'Share an existing file in a channel (undocumented)'
69
- g.long_desc %( Share an existing file in a channel )
70
- g.command 'share' do |c|
71
- c.flag 'file', desc: 'ID of the file to be shared'
72
- c.flag 'channel', desc: 'Channel to share the file in. Works with both public (channel ID) and private channels (group ID).'
73
- c.action do |_global_options, options, _args|
74
- puts JSON.dump($client.files_share(options))
75
- end
76
- end
77
-
78
- g.desc 'Enables a file for public/external sharing.'
79
- g.long_desc %( Enables a file for public/external sharing. )
80
- g.command 'sharedPublicURL' do |c|
81
- c.flag 'file', desc: 'File to share.'
82
- c.action do |_global_options, options, _args|
83
- puts JSON.dump($client.files_sharedPublicURL(options))
84
- end
85
- end
100
+ g.desc 'Enables a file for public/external sharing.'
101
+ g.long_desc %( Enables a file for public/external sharing. )
102
+ g.command 'sharedPublicURL' do |c|
103
+ c.flag 'file', desc: 'File to share.'
104
+ c.action do |_global_options, options, _args|
105
+ puts JSON.dump(@client.files_sharedPublicURL(options))
106
+ end
107
+ end
86
108
 
87
- g.desc 'Uploads or creates a file.'
88
- g.long_desc %( Uploads or creates a file. )
89
- g.command 'upload' do |c|
90
- c.flag 'channels', desc: 'Comma-separated list of channel names or IDs where the file will be shared.'
91
- c.flag 'content', desc: 'File contents via a POST variable. If omitting this parameter, you must provide a file.'
92
- c.flag 'file', desc: 'File contents via multipart/form-data. If omitting this parameter, you must submit content.'
93
- c.flag 'filename', desc: 'Filename of file.'
94
- c.flag 'filetype', desc: 'A file type identifier.'
95
- c.flag 'initial_comment', desc: 'Initial comment to add to file.'
96
- c.flag 'title', desc: 'Title of file.'
97
- c.action do |_global_options, options, _args|
98
- puts JSON.dump($client.files_upload(options))
109
+ g.desc 'Uploads or creates a file.'
110
+ g.long_desc %( Uploads or creates a file. )
111
+ g.command 'upload' do |c|
112
+ c.flag 'channels', desc: 'Comma-separated list of channel names or IDs where the file will be shared.'
113
+ c.flag 'content', desc: 'File contents via a POST variable. If omitting this parameter, you must provide a file.'
114
+ c.flag 'file', desc: 'File contents via multipart/form-data. If omitting this parameter, you must submit content.'
115
+ c.flag 'filename', desc: 'Filename of file.'
116
+ c.flag 'filetype', desc: 'A file type identifier.'
117
+ c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
118
+ 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."
119
+ c.flag 'title', desc: 'Title of file.'
120
+ c.action do |_global_options, options, _args|
121
+ puts JSON.dump(@client.files_upload(options))
122
+ end
123
+ end
124
+ end
99
125
  end
100
126
  end
101
127
  end
@@ -1,35 +1,21 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
- desc 'FilesComments methods.'
4
- command 'files_comments' do |g|
5
- g.desc 'Add a comment to an existing file.'
6
- g.long_desc %( Add a comment to an existing file. )
7
- g.command 'add' do |c|
8
- c.flag 'comment', desc: 'Text of the comment to add.'
9
- c.flag 'file', desc: 'File to add a comment to.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.files_comments_add(options))
12
- end
13
- end
14
-
15
- g.desc 'Deletes an existing comment on a file.'
16
- g.long_desc %( Deletes an existing comment on a file. )
17
- g.command 'delete' do |c|
18
- c.flag 'file', desc: 'File to delete a comment from.'
19
- c.flag 'id', desc: 'The comment to delete.'
20
- c.action do |_global_options, options, _args|
21
- puts JSON.dump($client.files_comments_delete(options))
22
- end
23
- end
24
-
25
- g.desc 'Edit an existing file comment.'
26
- g.long_desc %( Edit an existing file comment. )
27
- g.command 'edit' do |c|
28
- c.flag 'comment', desc: 'Text of the comment to edit.'
29
- c.flag 'file', desc: 'File containing the comment to edit.'
30
- c.flag 'id', desc: 'The comment to edit.'
31
- c.action do |_global_options, options, _args|
32
- puts JSON.dump($client.files_comments_edit(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'FilesComments methods.'
8
+ command 'files_comments' do |g|
9
+ g.desc 'Deletes an existing comment on a file.'
10
+ g.long_desc %( Deletes an existing comment on a file. )
11
+ g.command 'delete' do |c|
12
+ c.flag 'file', desc: 'File to delete a comment from.'
13
+ c.flag 'id', desc: 'The comment to delete.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.files_comments_delete(options))
16
+ end
17
+ end
18
+ end
33
19
  end
34
20
  end
35
21
  end
@@ -0,0 +1,84 @@
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 'FilesRemote methods.'
8
+ command 'files_remote' do |g|
9
+ g.desc 'Adds a file from a remote service'
10
+ g.long_desc %( Adds a file from a remote service )
11
+ g.command 'add' do |c|
12
+ c.flag 'external_id', desc: 'Creator defined GUID for the file.'
13
+ c.flag 'external_url', desc: 'URL of the remote file.'
14
+ c.flag 'title', desc: 'Title of the file being shared.'
15
+ c.flag 'filetype', desc: 'type of file.'
16
+ 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
+ c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
18
+ c.action do |_global_options, options, _args|
19
+ puts JSON.dump(@client.files_remote_add(options))
20
+ end
21
+ end
22
+
23
+ g.desc 'Retrieve information about a remote file added to Slack'
24
+ g.long_desc %( Retrieve information about a remote file added to Slack )
25
+ g.command 'info' do |c|
26
+ c.flag 'external_id', desc: 'Creator defined GUID for the file.'
27
+ c.flag 'file', desc: 'Specify a file by providing its ID.'
28
+ c.action do |_global_options, options, _args|
29
+ puts JSON.dump(@client.files_remote_info(options))
30
+ end
31
+ end
32
+
33
+ g.desc 'Retrieve information about a remote file added to Slack'
34
+ g.long_desc %( Retrieve information about a remote file added to Slack )
35
+ g.command 'list' do |c|
36
+ c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
37
+ 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."
38
+ c.flag 'limit', desc: 'The maximum number of items to return.'
39
+ c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
40
+ c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).'
41
+ c.action do |_global_options, options, _args|
42
+ puts JSON.dump(@client.files_remote_list(options))
43
+ end
44
+ end
45
+
46
+ g.desc 'Remove a remote file.'
47
+ g.long_desc %( Remove a remote file. )
48
+ g.command 'remove' do |c|
49
+ c.flag 'external_id', desc: 'Creator defined GUID for the file.'
50
+ c.flag 'file', desc: 'Specify a file by providing its ID.'
51
+ c.action do |_global_options, options, _args|
52
+ puts JSON.dump(@client.files_remote_remove(options))
53
+ end
54
+ end
55
+
56
+ g.desc 'Share a remote file into a channel.'
57
+ g.long_desc %( Share a remote file into a channel. )
58
+ g.command 'share' do |c|
59
+ c.flag 'channels', desc: 'Comma-separated list of channel IDs where the file will be shared.'
60
+ c.flag 'external_id', desc: 'The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or file or both are required.'
61
+ c.flag 'file', desc: 'Specify a file registered with Slack by providing its ID. Either this field or external_id or both are required.'
62
+ c.action do |_global_options, options, _args|
63
+ puts JSON.dump(@client.files_remote_share(options))
64
+ end
65
+ end
66
+
67
+ g.desc 'Updates an existing remote file.'
68
+ g.long_desc %( Updates an existing remote file. )
69
+ g.command 'update' do |c|
70
+ c.flag 'external_id', desc: 'Creator defined GUID for the file.'
71
+ c.flag 'external_url', desc: 'URL of the remote file.'
72
+ c.flag 'file', desc: 'Specify a file by providing its ID.'
73
+ c.flag 'filetype', desc: 'type of file.'
74
+ c.flag 'indexable_file_contents', desc: 'File containing contents that can be used to improve searchability for the remote file.'
75
+ c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
76
+ c.flag 'title', desc: 'Title of the file being shared.'
77
+ c.action do |_global_options, options, _args|
78
+ puts JSON.dump(@client.files_remote_update(options))
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,31 @@
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 'Functions methods.'
8
+ command 'functions' do |g|
9
+ g.desc 'Signal that a function failed to complete'
10
+ g.long_desc %( Signal that a function failed to complete )
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
+ c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.functions_completeError(options))
16
+ end
17
+ end
18
+
19
+ g.desc 'Signal the successful completion of a function'
20
+ g.long_desc %( Signal the successful completion of a function )
21
+ g.command 'completeSuccess' do |c|
22
+ c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
23
+ c.flag 'outputs', desc: 'A JSON-based object that conforms to the output parameters schema for the custom function defined in the manifest.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.functions_completeSuccess(options))
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'FunctionsDistributionsPermissions methods.'
8
+ command 'functions_distributions_permissions' do |g|
9
+ g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
10
+ g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
11
+ g.command 'add' do |c|
12
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
13
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
14
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
15
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.functions_distributions_permissions_add(options))
18
+ end
19
+ end
20
+
21
+ g.desc 'List the access type of a custom slack function and include the users 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 )
23
+ g.command 'list' do |c|
24
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
25
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
26
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
27
+ c.action do |_global_options, options, _args|
28
+ puts JSON.dump(@client.functions_distributions_permissions_list(options))
29
+ end
30
+ end
31
+
32
+ g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
33
+ g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
34
+ g.command 'remove' do |c|
35
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
36
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
37
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
38
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.functions_distributions_permissions_remove(options))
41
+ end
42
+ end
43
+
44
+ g.desc 'Set the access type of a custom slack function and define the users 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 )
46
+ g.command 'set' do |c|
47
+ c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
48
+ c.flag 'function_app_id', desc: 'The encoded ID of the app.'
49
+ c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
50
+ c.flag 'function_id', desc: 'The encoded ID of the function.'
51
+ c.flag '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.'
53
+ c.flag 'user_ids', desc: 'List of encoded user IDs.'
54
+ c.action do |_global_options, options, _args|
55
+ puts JSON.dump(@client.functions_distributions_permissions_set(options))
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,23 @@
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 'FunctionsWorkflowsSteps methods.'
8
+ command 'functions_workflows_steps' do |g|
9
+ g.desc "List the steps of a specific function of a workflow's versions"
10
+ g.long_desc %( List the steps of a specific function of a workflow's versions )
11
+ g.command 'list' do |c|
12
+ c.flag 'function_id', desc: 'The ID of the function to query.'
13
+ c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
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*.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.functions_workflows_steps_list(options))
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
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 'FunctionsWorkflowsStepsResponses methods.'
8
+ command 'functions_workflows_steps_responses' do |g|
9
+ g.desc 'Download form responses of a workflow'
10
+ g.long_desc %( Download form responses of a workflow )
11
+ g.command 'export' do |c|
12
+ c.flag 'step_id', desc: 'The ID of the OpenForm step to export.'
13
+ c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
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*.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.functions_workflows_steps_responses_export(options))
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end