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
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
4
  module Slack
@@ -26,6 +27,8 @@ module Slack
26
27
  #
27
28
  # Retrieves a user's current Do Not Disturb status.
28
29
  #
30
+ # @option options [string] :team_id
31
+ # 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
32
  # @option options [user] :user
30
33
  # User to fetch status for (defaults to current user).
31
34
  # @see https://api.slack.com/methods/dnd.info
@@ -38,23 +41,26 @@ module Slack
38
41
  #
39
42
  # Turns on Do Not Disturb mode for the current user, or changes its duration.
40
43
  #
41
- # @option options [Object] :num_minutes
42
- # Number of minutes, from now, to snooze until.
44
+ # @option options [string] :num_minutes
45
+ # This argument is required. Number of minutes, from now, to snooze until.
43
46
  # @see https://api.slack.com/methods/dnd.setSnooze
44
47
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json
45
48
  def dnd_setSnooze(options = {})
46
- throw ArgumentError.new('Required arguments :num_minutes missing') if options[:num_minutes].nil?
49
+ raise ArgumentError, 'Required arguments :num_minutes missing' if options[:num_minutes].nil?
47
50
  post('dnd.setSnooze', options)
48
51
  end
49
52
 
50
53
  #
51
- # Retrieves the Do Not Disturb status for users on a team.
54
+ # Retrieves the Do Not Disturb status for up to 50 users on a team.
52
55
  #
53
- # @option options [Object] :users
56
+ # @option options [string] :users
54
57
  # Comma-separated list of users to fetch Do Not Disturb status for.
58
+ # @option options [string] :team_id
59
+ # Encoded team id where passed in users belong, required if org token is used.
55
60
  # @see https://api.slack.com/methods/dnd.teamInfo
56
61
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.teamInfo.json
57
62
  def dnd_teamInfo(options = {})
63
+ raise ArgumentError, 'Required arguments :users missing' if options[:users].nil?
58
64
  post('dnd.teamInfo', options)
59
65
  end
60
66
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
4
  module Slack
@@ -8,6 +9,8 @@ module Slack
8
9
  #
9
10
  # Lists custom emoji for a team.
10
11
  #
12
+ # @option options [boolean] :include_categories
13
+ # Include a list of categories for Unicode emoji and the emoji in each category.
11
14
  # @see https://api.slack.com/methods/emoji.list
12
15
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json
13
16
  def emoji_list(options = {})
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
4
  module Slack
@@ -5,6 +6,29 @@ module Slack
5
6
  module Api
6
7
  module Endpoints
7
8
  module Files
9
+ #
10
+ # Finishes an upload started with files.getUploadURLExternal
11
+ #
12
+ # @option options [array] :files
13
+ # Array of file ids and their corresponding (optional) titles.
14
+ # @option options [blocks[] as string] :blocks
15
+ # 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.
16
+ # @option options [Object] :channel_id
17
+ # Channel ID where the file will be shared. If not specified the file will be private.
18
+ # @option options [string] :channels
19
+ # Comma-separated string of channel IDs where the file will be shared.
20
+ # @option options [string] :initial_comment
21
+ # The message text introducing the file in specified channels.
22
+ # @option options [string] :thread_ts
23
+ # 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'.
24
+ # @see https://api.slack.com/methods/files.completeUploadExternal
25
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
26
+ def files_completeUploadExternal(options = {})
27
+ raise ArgumentError, 'Required arguments :files missing' if options[:files].nil?
28
+ options = encode_options_as_json(options, %i[blocks])
29
+ post('files.completeUploadExternal', options)
30
+ end
31
+
8
32
  #
9
33
  # Deletes a file.
10
34
  #
@@ -13,7 +37,7 @@ module Slack
13
37
  # @see https://api.slack.com/methods/files.delete
14
38
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.delete.json
15
39
  def files_delete(options = {})
16
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
40
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
17
41
  post('files.delete', options)
18
42
  end
19
43
 
@@ -28,52 +52,74 @@ module Slack
28
52
  # New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.
29
53
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/files/files.edit.json
30
54
  def files_edit(options = {})
31
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
32
- throw ArgumentError.new('Required arguments :title missing') if options[:title].nil?
55
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
56
+ raise ArgumentError, 'Required arguments :title missing' if options[:title].nil?
57
+ logger.warn('The files.edit method is undocumented.')
33
58
  post('files.edit', options)
34
59
  end
35
60
 
36
61
  #
37
- # Gets information about a team file.
62
+ # Gets a URL for an edge external file upload
63
+ #
64
+ # @option options [string] :filename
65
+ # Name of the file being uploaded.
66
+ # @option options [integer] :length
67
+ # Size in bytes of the file being uploaded.
68
+ # @option options [string] :alt_txt
69
+ # Description of image for screen-reader.
70
+ # @option options [string] :snippet_type
71
+ # Syntax type of the snippet being uploaded.
72
+ # @see https://api.slack.com/methods/files.getUploadURLExternal
73
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.getUploadURLExternal.json
74
+ def files_getUploadURLExternal(options = {})
75
+ raise ArgumentError, 'Required arguments :filename missing' if options[:filename].nil?
76
+ raise ArgumentError, 'Required arguments :length missing' if options[:length].nil?
77
+ post('files.getUploadURLExternal', options)
78
+ end
79
+
80
+ #
81
+ # Gets information about a file.
38
82
  #
39
83
  # @option options [file] :file
40
84
  # Specify a file by providing its ID.
85
+ # @option options [string] :cursor
86
+ # 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.
87
+ # @option options [integer] :limit
88
+ # 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.
41
89
  # @see https://api.slack.com/methods/files.info
42
90
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.info.json
43
91
  def files_info(options = {})
44
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
45
- post('files.info', options)
92
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
93
+ if block_given?
94
+ Pagination::Cursor.new(self, :files_info, options).each do |page|
95
+ yield page
96
+ end
97
+ else
98
+ post('files.info', options)
99
+ end
46
100
  end
47
101
 
48
102
  #
49
- # Lists & filters team files.
103
+ # List for a team, in a channel, or from a user with applied filters.
50
104
  #
51
105
  # @option options [channel] :channel
52
106
  # Filter files appearing in a specific channel, indicated by its ID.
53
- # @option options [Object] :ts_from
107
+ # @option options [boolean] :show_files_hidden_by_limit
108
+ # Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.
109
+ # @option options [string] :team_id
110
+ # encoded team id to list files in, required if org token is used.
111
+ # @option options [string] :ts_from
54
112
  # Filter files created after this timestamp (inclusive).
55
- # @option options [Object] :ts_to
113
+ # @option options [string] :ts_to
56
114
  # Filter files created before this timestamp (inclusive).
57
- # @option options [Object] :types
58
- # Filter files by type:
59
- #
60
- # all - All files
61
- # spaces - Posts
62
- # snippets - Snippets
63
- # images - Image files
64
- # gdocs - Google docs
65
- # zips - Zip files
66
- # pdfs - PDF files
67
- #
68
- #
69
- # You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.
70
- # .
115
+ # @option options [string] :types
116
+ # 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.
71
117
  # @option options [user] :user
72
118
  # Filter files created by a single user.
73
119
  # @see https://api.slack.com/methods/files.list
74
120
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.list.json
75
121
  def files_list(options = {})
76
- options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
122
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
77
123
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
78
124
  post('files.list', options)
79
125
  end
@@ -86,7 +132,7 @@ module Slack
86
132
  # @see https://api.slack.com/methods/files.revokePublicURL
87
133
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.revokePublicURL.json
88
134
  def files_revokePublicURL(options = {})
89
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
135
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
90
136
  post('files.revokePublicURL', options)
91
137
  end
92
138
 
@@ -99,9 +145,10 @@ module Slack
99
145
  # Channel to share the file in. Works with both public (channel ID) and private channels (group ID).
100
146
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/files/files.share.json
101
147
  def files_share(options = {})
102
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
103
- throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
104
- options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
148
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
149
+ raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
150
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
151
+ logger.warn('The files.share method is undocumented.')
105
152
  post('files.share', options)
106
153
  end
107
154
 
@@ -113,26 +160,28 @@ module Slack
113
160
  # @see https://api.slack.com/methods/files.sharedPublicURL
114
161
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.sharedPublicURL.json
115
162
  def files_sharedPublicURL(options = {})
116
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
163
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
117
164
  post('files.sharedPublicURL', options)
118
165
  end
119
166
 
120
167
  #
121
168
  # Uploads or creates a file.
122
169
  #
123
- # @option options [Object] :channels
170
+ # @option options [string] :channels
124
171
  # Comma-separated list of channel names or IDs where the file will be shared.
125
- # @option options [Object] :content
172
+ # @option options [string] :content
126
173
  # File contents via a POST variable. If omitting this parameter, you must provide a file.
127
174
  # @option options [file] :file
128
175
  # File contents via multipart/form-data. If omitting this parameter, you must submit content.
129
- # @option options [Object] :filename
176
+ # @option options [string] :filename
130
177
  # Filename of file.
131
- # @option options [Object] :filetype
178
+ # @option options [string] :filetype
132
179
  # A file type identifier.
133
- # @option options [Object] :initial_comment
134
- # Initial comment to add to file.
135
- # @option options [Object] :title
180
+ # @option options [string] :initial_comment
181
+ # The message text introducing the file in specified channels.
182
+ # @option options [string] :thread_ts
183
+ # Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.
184
+ # @option options [string] :title
136
185
  # Title of file.
137
186
  # @see https://api.slack.com/methods/files.upload
138
187
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file was auto-generated by lib/tasks/web.rake
2
3
 
3
4
  module Slack
@@ -5,53 +6,20 @@ module Slack
5
6
  module Api
6
7
  module Endpoints
7
8
  module FilesComments
8
- #
9
- # Add a comment to an existing file.
10
- #
11
- # @option options [Object] :comment
12
- # Text of the comment to add.
13
- # @option options [file] :file
14
- # File to add a comment to.
15
- # @see https://api.slack.com/methods/files.comments.add
16
- # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json
17
- def files_comments_add(options = {})
18
- throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
19
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
20
- post('files.comments.add', options)
21
- end
22
-
23
9
  #
24
10
  # Deletes an existing comment on a file.
25
11
  #
26
12
  # @option options [file] :file
27
13
  # File to delete a comment from.
28
- # @option options [Object] :id
14
+ # @option options [string] :id
29
15
  # The comment to delete.
30
16
  # @see https://api.slack.com/methods/files.comments.delete
31
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.delete.json
32
18
  def files_comments_delete(options = {})
33
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
34
- throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
19
+ raise ArgumentError, 'Required arguments :file missing' if options[:file].nil?
20
+ raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
35
21
  post('files.comments.delete', options)
36
22
  end
37
-
38
- #
39
- # Edit an existing file comment.
40
- #
41
- # @option options [Object] :comment
42
- # Text of the comment to edit.
43
- # @option options [file] :file
44
- # File containing the comment to edit.
45
- # @option options [Object] :id
46
- # The comment to edit.
47
- # @see https://api.slack.com/methods/files.comments.edit
48
- # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json
49
- def files_comments_edit(options = {})
50
- throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil?
51
- throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
52
- throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
53
- post('files.comments.edit', options)
54
- end
55
23
  end
56
24
  end
57
25
  end
@@ -0,0 +1,127 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module FilesRemote
9
+ #
10
+ # Adds a file from a remote service
11
+ #
12
+ # @option options [string] :external_id
13
+ # Creator defined GUID for the file.
14
+ # @option options [string] :external_url
15
+ # URL of the remote file.
16
+ # @option options [string] :title
17
+ # Title of the file being shared.
18
+ # @option options [string] :filetype
19
+ # type of file.
20
+ # @option options [Object] :indexable_file_contents
21
+ # A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
22
+ # @option options [Object] :preview_image
23
+ # Preview of the document via multipart/form-data.
24
+ # @see https://api.slack.com/methods/files.remote.add
25
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.add.json
26
+ def files_remote_add(options = {})
27
+ raise ArgumentError, 'Required arguments :external_id missing' if options[:external_id].nil?
28
+ raise ArgumentError, 'Required arguments :external_url missing' if options[:external_url].nil?
29
+ raise ArgumentError, 'Required arguments :title missing' if options[:title].nil?
30
+ post('files.remote.add', options)
31
+ end
32
+
33
+ #
34
+ # Retrieve information about a remote file added to Slack
35
+ #
36
+ # @option options [string] :external_id
37
+ # Creator defined GUID for the file.
38
+ # @option options [file] :file
39
+ # Specify a file by providing its ID.
40
+ # @see https://api.slack.com/methods/files.remote.info
41
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.info.json
42
+ def files_remote_info(options = {})
43
+ post('files.remote.info', options)
44
+ end
45
+
46
+ #
47
+ # Retrieve information about a remote file added to Slack
48
+ #
49
+ # @option options [channel] :channel
50
+ # Filter files appearing in a specific channel, indicated by its ID.
51
+ # @option options [string] :cursor
52
+ # 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.
53
+ # @option options [integer] :limit
54
+ # The maximum number of items to return.
55
+ # @option options [string] :ts_from
56
+ # Filter files created after this timestamp (inclusive).
57
+ # @option options [string] :ts_to
58
+ # Filter files created before this timestamp (inclusive).
59
+ # @see https://api.slack.com/methods/files.remote.list
60
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.list.json
61
+ def files_remote_list(options = {})
62
+ options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
63
+ if block_given?
64
+ Pagination::Cursor.new(self, :files_remote_list, options).each do |page|
65
+ yield page
66
+ end
67
+ else
68
+ post('files.remote.list', options)
69
+ end
70
+ end
71
+
72
+ #
73
+ # Remove a remote file.
74
+ #
75
+ # @option options [string] :external_id
76
+ # Creator defined GUID for the file.
77
+ # @option options [file] :file
78
+ # Specify a file by providing its ID.
79
+ # @see https://api.slack.com/methods/files.remote.remove
80
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.remove.json
81
+ def files_remote_remove(options = {})
82
+ post('files.remote.remove', options)
83
+ end
84
+
85
+ #
86
+ # Share a remote file into a channel.
87
+ #
88
+ # @option options [string] :channels
89
+ # Comma-separated list of channel IDs where the file will be shared.
90
+ # @option options [string] :external_id
91
+ # 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.
92
+ # @option options [file] :file
93
+ # Specify a file registered with Slack by providing its ID. Either this field or external_id or both are required.
94
+ # @see https://api.slack.com/methods/files.remote.share
95
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.share.json
96
+ def files_remote_share(options = {})
97
+ raise ArgumentError, 'Required arguments :channels missing' if options[:channels].nil?
98
+ post('files.remote.share', options)
99
+ end
100
+
101
+ #
102
+ # Updates an existing remote file.
103
+ #
104
+ # @option options [string] :external_id
105
+ # Creator defined GUID for the file.
106
+ # @option options [string] :external_url
107
+ # URL of the remote file.
108
+ # @option options [file] :file
109
+ # Specify a file by providing its ID.
110
+ # @option options [string] :filetype
111
+ # type of file.
112
+ # @option options [Object] :indexable_file_contents
113
+ # File containing contents that can be used to improve searchability for the remote file.
114
+ # @option options [Object] :preview_image
115
+ # Preview of the document via multipart/form-data.
116
+ # @option options [string] :title
117
+ # Title of the file being shared.
118
+ # @see https://api.slack.com/methods/files.remote.update
119
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.remote/files.remote.update.json
120
+ def files_remote_update(options = {})
121
+ post('files.remote.update', options)
122
+ end
123
+ end
124
+ end
125
+ end
126
+ end
127
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module Functions
9
+ #
10
+ # Signal that a function failed to complete
11
+ #
12
+ # @option options [string] :error
13
+ # A human-readable error message that contains information about why the function failed to complete.
14
+ # @option options [string] :function_execution_id
15
+ # Context identifier that maps to the executed function.
16
+ # @see https://api.slack.com/methods/functions.completeError
17
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions/functions.completeError.json
18
+ def functions_completeError(options = {})
19
+ raise ArgumentError, 'Required arguments :error missing' if options[:error].nil?
20
+ raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil?
21
+ post('functions.completeError', options)
22
+ end
23
+
24
+ #
25
+ # Signal the successful completion of a function
26
+ #
27
+ # @option options [string] :function_execution_id
28
+ # Context identifier that maps to the executed function.
29
+ # @option options [object] :outputs
30
+ # A JSON-based object that conforms to the output parameters schema for the custom function defined in the manifest.
31
+ # @see https://api.slack.com/methods/functions.completeSuccess
32
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions/functions.completeSuccess.json
33
+ def functions_completeSuccess(options = {})
34
+ raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil?
35
+ raise ArgumentError, 'Required arguments :outputs missing' if options[:outputs].nil?
36
+ options = encode_options_as_json(options, %i[outputs])
37
+ post('functions.completeSuccess', options)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ 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 Web
6
+ module Api
7
+ module Endpoints
8
+ module FunctionsDistributionsPermissions
9
+ #
10
+ # Grant users access to a custom slack function if its permission_type is set to named_entities
11
+ #
12
+ # @option options [string] :function_app_id
13
+ # The encoded ID of the app.
14
+ # @option options [string] :function_callback_id
15
+ # The callback ID defined in the function's definition file.
16
+ # @option options [string] :function_id
17
+ # The encoded ID of the function.
18
+ # @option options [array] :user_ids
19
+ # List of encoded user IDs.
20
+ # @see https://api.slack.com/methods/functions.distributions.permissions.add
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.add.json
22
+ def functions_distributions_permissions_add(options = {})
23
+ post('functions.distributions.permissions.add', options)
24
+ end
25
+
26
+ #
27
+ # 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
28
+ #
29
+ # @option options [string] :function_app_id
30
+ # The encoded ID of the app.
31
+ # @option options [string] :function_callback_id
32
+ # The callback ID defined in the function's definition file.
33
+ # @option options [string] :function_id
34
+ # The encoded ID of the function.
35
+ # @see https://api.slack.com/methods/functions.distributions.permissions.list
36
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.list.json
37
+ def functions_distributions_permissions_list(options = {})
38
+ post('functions.distributions.permissions.list', options)
39
+ end
40
+
41
+ #
42
+ # Revoke user access to a custom slack function if permission_type set to named_entities
43
+ #
44
+ # @option options [string] :function_app_id
45
+ # The encoded ID of the app.
46
+ # @option options [string] :function_callback_id
47
+ # The callback ID defined in the function's definition file.
48
+ # @option options [string] :function_id
49
+ # The encoded ID of the function.
50
+ # @option options [array] :user_ids
51
+ # List of encoded user IDs.
52
+ # @see https://api.slack.com/methods/functions.distributions.permissions.remove
53
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.remove.json
54
+ def functions_distributions_permissions_remove(options = {})
55
+ post('functions.distributions.permissions.remove', options)
56
+ end
57
+
58
+ #
59
+ # 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
60
+ #
61
+ # @option options [enum] :permission_type
62
+ # The type of permission that defines how the function can be distributed.
63
+ # @option options [string] :function_app_id
64
+ # The encoded ID of the app.
65
+ # @option options [string] :function_callback_id
66
+ # The callback ID defined in the function's definition file.
67
+ # @option options [string] :function_id
68
+ # The encoded ID of the function.
69
+ # @option options [array] :org_ids
70
+ # List of org IDs to allow for named_entities permission.
71
+ # @option options [array] :team_ids
72
+ # List of team IDs to allow for named_entities permission.
73
+ # @option options [array] :user_ids
74
+ # List of encoded user IDs.
75
+ # @see https://api.slack.com/methods/functions.distributions.permissions.set
76
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.set.json
77
+ def functions_distributions_permissions_set(options = {})
78
+ post('functions.distributions.permissions.set', options)
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module FunctionsWorkflowsSteps
9
+ #
10
+ # List the steps of a specific function of a workflow's versions
11
+ #
12
+ # @option options [string] :function_id
13
+ # The ID of the function to query.
14
+ # @option options [string] :workflow
15
+ # The workflow encoded ID or workflow reference.
16
+ # @option options [string] :workflow_app_id
17
+ # The app tied to the workflow reference.
18
+ # @option options [string] :workflow_id
19
+ # The workflow ID, starts with Wf*.
20
+ # @see https://api.slack.com/methods/functions.workflows.steps.list
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps/functions.workflows.steps.list.json
22
+ def functions_workflows_steps_list(options = {})
23
+ raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
24
+ post('functions.workflows.steps.list', options)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Web
6
+ module Api
7
+ module Endpoints
8
+ module FunctionsWorkflowsStepsResponses
9
+ #
10
+ # Download form responses of a workflow
11
+ #
12
+ # @option options [string] :step_id
13
+ # The ID of the OpenForm step to export.
14
+ # @option options [string] :workflow
15
+ # The workflow encoded ID or workflow reference.
16
+ # @option options [string] :workflow_app_id
17
+ # The app tied to the workflow reference.
18
+ # @option options [string] :workflow_id
19
+ # The workflow ID, starts with Wf*.
20
+ # @see https://api.slack.com/methods/functions.workflows.steps.responses.export
21
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps.responses/functions.workflows.steps.responses.export.json
22
+ def functions_workflows_steps_responses_export(options = {})
23
+ raise ArgumentError, 'Required arguments :step_id missing' if options[:step_id].nil?
24
+ post('functions.workflows.steps.responses.export', options)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end