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
@@ -0,0 +1,260 @@
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 'AdminConversations methods.'
8
+ command 'admin_conversations' do |g|
9
+ g.desc 'Archive a public or private channel.'
10
+ g.long_desc %( Archive a public or private channel. )
11
+ g.command 'archive' do |c|
12
+ c.flag 'channel_id', desc: 'The channel to archive.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.admin_conversations_archive(options))
15
+ end
16
+ end
17
+
18
+ g.desc 'Archive public or private channels in bulk.'
19
+ g.long_desc %( Archive public or private channels in bulk. )
20
+ g.command 'bulkArchive' do |c|
21
+ c.flag 'channel_ids', desc: 'An array of channel IDs to archive. No more than 100 items are allowed.'
22
+ c.action do |_global_options, options, _args|
23
+ puts JSON.dump(@client.admin_conversations_bulkArchive(options))
24
+ end
25
+ end
26
+
27
+ g.desc 'Delete public or private channels in bulk'
28
+ g.long_desc %( Delete public or private channels in bulk )
29
+ g.command 'bulkDelete' do |c|
30
+ c.flag 'channel_ids', desc: 'An array of channel IDs.'
31
+ c.action do |_global_options, options, _args|
32
+ puts JSON.dump(@client.admin_conversations_bulkDelete(options))
33
+ end
34
+ end
35
+
36
+ g.desc 'Move public or private channels in bulk.'
37
+ g.long_desc %( Move public or private channels in bulk. )
38
+ g.command 'bulkMove' do |c|
39
+ c.flag 'channel_ids', desc: 'An array of channel IDs.'
40
+ c.flag 'target_team_id', desc: 'Target team ID.'
41
+ c.action do |_global_options, options, _args|
42
+ puts JSON.dump(@client.admin_conversations_bulkMove(options))
43
+ end
44
+ end
45
+
46
+ g.desc 'Convert a public channel to a private channel.'
47
+ g.long_desc %( Convert a public channel to a private channel. )
48
+ g.command 'convertToPrivate' do |c|
49
+ c.flag 'channel_id', desc: 'The channel to convert to private.'
50
+ c.flag 'name', desc: 'Name of private channel to create. Only respected when converting an MPIM.'
51
+ c.action do |_global_options, options, _args|
52
+ puts JSON.dump(@client.admin_conversations_convertToPrivate(options))
53
+ end
54
+ end
55
+
56
+ g.desc 'Convert a private channel to a public channel.'
57
+ g.long_desc %( Convert a private channel to a public channel. )
58
+ g.command 'convertToPublic' do |c|
59
+ c.flag 'channel_id', desc: 'The channel to convert to public.'
60
+ c.action do |_global_options, options, _args|
61
+ puts JSON.dump(@client.admin_conversations_convertToPublic(options))
62
+ end
63
+ end
64
+
65
+ g.desc 'Create a public or private channel-based conversation.'
66
+ g.long_desc %( Create a public or private channel-based conversation. )
67
+ g.command 'create' do |c|
68
+ c.flag 'is_private', desc: 'When true, creates a private channel instead of a public channel.'
69
+ c.flag 'name', desc: 'Name of the public or private channel to create.'
70
+ c.flag 'description', desc: 'Description of the public or private channel to create.'
71
+ c.flag 'org_wide', desc: 'When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel.'
72
+ c.flag 'team_id', desc: 'The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.'
73
+ c.action do |_global_options, options, _args|
74
+ puts JSON.dump(@client.admin_conversations_create(options))
75
+ end
76
+ end
77
+
78
+ g.desc 'Create a Salesforce channel for the corresponding object provided.'
79
+ g.long_desc %( Create a Salesforce channel for the corresponding object provided. )
80
+ g.command 'createForObjects' do |c|
81
+ c.flag 'object_id', desc: 'Object / Record ID (15 or 18 digit accepted). See here for how to look up an ID.'
82
+ c.flag 'salesforce_org_id', desc: 'Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.'
83
+ c.flag 'invite_object_team', desc: 'Optional flag to add all team members related to the object to the newly created Salesforce channel. When true, adds a maximum of 100 team members to the channel.'
84
+ c.action do |_global_options, options, _args|
85
+ puts JSON.dump(@client.admin_conversations_createForObjects(options))
86
+ end
87
+ end
88
+
89
+ g.desc 'Delete a public or private channel.'
90
+ g.long_desc %( Delete a public or private channel. )
91
+ g.command 'delete' do |c|
92
+ c.flag 'channel_id', desc: 'The channel to delete.'
93
+ c.action do |_global_options, options, _args|
94
+ puts JSON.dump(@client.admin_conversations_delete(options))
95
+ end
96
+ end
97
+
98
+ g.desc 'Disconnect a connected channel from one or more workspaces.'
99
+ g.long_desc %( Disconnect a connected channel from one or more workspaces. )
100
+ g.command 'disconnectShared' do |c|
101
+ c.flag 'channel_id', desc: 'The channel to be disconnected from some workspaces.'
102
+ c.flag 'leaving_team_ids', desc: 'team IDs getting removed from the channel, optional if there are only two teams in the channel.'
103
+ c.action do |_global_options, options, _args|
104
+ puts JSON.dump(@client.admin_conversations_disconnectShared(options))
105
+ end
106
+ end
107
+
108
+ g.desc 'Get conversation preferences for a public or private channel.'
109
+ g.long_desc %( Get conversation preferences for a public or private channel. )
110
+ g.command 'getConversationPrefs' do |c|
111
+ c.flag 'channel_id', desc: 'The channel to get preferences for.'
112
+ c.action do |_global_options, options, _args|
113
+ puts JSON.dump(@client.admin_conversations_getConversationPrefs(options))
114
+ end
115
+ end
116
+
117
+ g.desc "This API endpoint can be used by any admin to get a conversation's retention policy."
118
+ g.long_desc %( This API endpoint can be used by any admin to get a conversation's retention policy. )
119
+ g.command 'getCustomRetention' do |c|
120
+ c.flag 'channel_id', desc: 'The conversation to get the retention policy for.'
121
+ c.action do |_global_options, options, _args|
122
+ puts JSON.dump(@client.admin_conversations_getCustomRetention(options))
123
+ end
124
+ end
125
+
126
+ g.desc 'Get all the workspaces a given public or private channel is connected to within this Enterprise org.'
127
+ g.long_desc %( Get all the workspaces a given public or private channel is connected to within this Enterprise org. )
128
+ g.command 'getTeams' do |c|
129
+ c.flag 'channel_id', desc: 'The channel to determine connected workspaces within the organization for.'
130
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
131
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
132
+ c.action do |_global_options, options, _args|
133
+ puts JSON.dump(@client.admin_conversations_getTeams(options))
134
+ end
135
+ end
136
+
137
+ g.desc 'Invite a user to a public or private channel.'
138
+ g.long_desc %( Invite a user to a public or private channel. )
139
+ g.command 'invite' do |c|
140
+ c.flag 'channel_id', desc: 'The channel that the users will be invited to.'
141
+ c.flag 'user_ids', desc: 'The users to invite.'
142
+ c.action do |_global_options, options, _args|
143
+ puts JSON.dump(@client.admin_conversations_invite(options))
144
+ end
145
+ end
146
+
147
+ g.desc 'Link a Salesforce record to a channel'
148
+ g.long_desc %( Link a Salesforce record to a channel )
149
+ g.command 'linkObjects' do |c|
150
+ c.flag 'channel', desc: 'Channel ID for Slack channel that will be linked to a Salesforce record.'
151
+ c.flag 'record_id', desc: 'Salesforce record ID (15 or 18 digit accepted). See here for how to look up record ID.'
152
+ c.flag 'salesforce_org_id', desc: 'Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.'
153
+ c.action do |_global_options, options, _args|
154
+ puts JSON.dump(@client.admin_conversations_linkObjects(options))
155
+ end
156
+ end
157
+
158
+ g.desc 'Returns channels on the given team using the filters.'
159
+ g.long_desc %( Returns channels on the given team using the filters. )
160
+ g.command 'lookup' do |c|
161
+ c.flag 'last_message_activity_before', desc: 'Filter by public channels where the most recent message was sent before last_message_activity.'
162
+ c.flag 'team_ids', desc: 'Array of team IDs to filter by.'
163
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned in the previous call, to fetch the next page.'
164
+ c.flag 'limit', desc: 'Maximum number of results.'
165
+ c.flag 'max_member_count', desc: 'Filter by public channels with member count equal to or less than the specified number.'
166
+ c.action do |_global_options, options, _args|
167
+ puts JSON.dump(@client.admin_conversations_lookup(options))
168
+ end
169
+ end
170
+
171
+ g.desc "This API endpoint can be used by any admin to remove a conversation's retention policy."
172
+ g.long_desc %( This API endpoint can be used by any admin to remove a conversation's retention policy. )
173
+ g.command 'removeCustomRetention' do |c|
174
+ c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
175
+ c.action do |_global_options, options, _args|
176
+ puts JSON.dump(@client.admin_conversations_removeCustomRetention(options))
177
+ end
178
+ end
179
+
180
+ g.desc 'Rename a public or private channel.'
181
+ g.long_desc %( Rename a public or private channel. )
182
+ g.command 'rename' do |c|
183
+ c.flag 'channel_id', desc: 'The channel to rename.'
184
+ c.flag 'name', desc: '.'
185
+ c.action do |_global_options, options, _args|
186
+ puts JSON.dump(@client.admin_conversations_rename(options))
187
+ end
188
+ end
189
+
190
+ g.desc 'Search for public or private channels in an Enterprise organization.'
191
+ g.long_desc %( Search for public or private channels in an Enterprise organization. )
192
+ g.command 'search' do |c|
193
+ c.flag 'connected_team_ids', desc: 'Array of encoded team IDs, signifying the external orgs to search through.'
194
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
195
+ c.flag 'limit', desc: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
196
+ c.flag 'query', desc: 'Name of the the channel to query by.'
197
+ c.flag 'search_channel_types', desc: 'The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.'
198
+ c.flag 'sort', desc: 'Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.'
199
+ c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
200
+ c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
201
+ c.flag 'total_count_only', desc: 'Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.'
202
+ c.action do |_global_options, options, _args|
203
+ puts JSON.dump(@client.admin_conversations_search(options))
204
+ end
205
+ end
206
+
207
+ g.desc 'Set the posting permissions for a public or private channel.'
208
+ g.long_desc %( Set the posting permissions for a public or private channel. )
209
+ g.command 'setConversationPrefs' do |c|
210
+ c.flag 'channel_id', desc: 'The channel to set the prefs for.'
211
+ c.flag 'prefs', desc: 'The prefs for this channel in a stringified JSON format.'
212
+ c.action do |_global_options, options, _args|
213
+ puts JSON.dump(@client.admin_conversations_setConversationPrefs(options))
214
+ end
215
+ end
216
+
217
+ g.desc "This API endpoint can be used by any admin to set a conversation's retention policy."
218
+ g.long_desc %( This API endpoint can be used by any admin to set a conversation's retention policy. )
219
+ g.command 'setCustomRetention' do |c|
220
+ c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
221
+ c.flag 'duration_days', desc: 'The message retention duration in days to set for this conversation.'
222
+ c.action do |_global_options, options, _args|
223
+ puts JSON.dump(@client.admin_conversations_setCustomRetention(options))
224
+ end
225
+ end
226
+
227
+ g.desc 'Set the workspaces in an Enterprise grid org that connect to a public or private channel.'
228
+ g.long_desc %( Set the workspaces in an Enterprise grid org that connect to a public or private channel. )
229
+ g.command 'setTeams' do |c|
230
+ c.flag 'channel_id', desc: 'The encoded channel_id to add or remove to workspaces.'
231
+ c.flag 'org_channel', desc: 'True if channel has to be converted to an org channel.'
232
+ c.flag 'target_team_ids', desc: 'A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.'
233
+ c.flag 'team_id', desc: 'The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.'
234
+ c.action do |_global_options, options, _args|
235
+ puts JSON.dump(@client.admin_conversations_setTeams(options))
236
+ end
237
+ end
238
+
239
+ g.desc 'Unarchive a public or private channel.'
240
+ g.long_desc %( Unarchive a public or private channel. )
241
+ g.command 'unarchive' do |c|
242
+ c.flag 'channel_id', desc: 'The channel to unarchive.'
243
+ c.action do |_global_options, options, _args|
244
+ puts JSON.dump(@client.admin_conversations_unarchive(options))
245
+ end
246
+ end
247
+
248
+ g.desc 'Unlink a Salesforce record from a channel'
249
+ g.long_desc %( Unlink a Salesforce record from a channel )
250
+ g.command 'unlinkObjects' do |c|
251
+ c.flag 'channel', desc: 'Channel ID for Slack channel that will be unlinked from the Salesforce record.'
252
+ c.flag 'new_name', desc: 'Channel name you would like to give to the channel that is being unlinked from the Salesforce record.'
253
+ c.action do |_global_options, options, _args|
254
+ puts JSON.dump(@client.admin_conversations_unlinkObjects(options))
255
+ end
256
+ end
257
+ end
258
+ end
259
+ end
260
+ 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 'AdminConversationsEkm methods.'
8
+ command 'admin_conversations_ekm' do |g|
9
+ g.desc 'List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.'
10
+ g.long_desc %( List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM. )
11
+ g.command 'listOriginalConnectedChannelInfo' do |c|
12
+ c.flag 'channel_ids', desc: 'A comma-separated list of channels to filter to.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
15
+ c.flag 'team_ids', desc: 'A comma-separated list of the workspaces to which the channels you would like returned belong.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.admin_conversations_ekm_listOriginalConnectedChannelInfo(options))
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ 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 Cli
6
+ class App
7
+ desc 'AdminConversationsRestrictaccess methods.'
8
+ command 'admin_conversations_restrictAccess' do |g|
9
+ g.desc 'Add an allowlist of IDP groups for accessing a channel'
10
+ g.long_desc %( Add an allowlist of IDP groups for accessing a channel )
11
+ g.command 'addGroup' do |c|
12
+ c.flag 'channel_id', desc: 'The channel to link this group to.'
13
+ c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.'
14
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_conversations_restrictAccess_addGroup(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'List all IDP Groups linked to a channel'
21
+ g.long_desc %( List all IDP Groups linked to a channel )
22
+ g.command 'listGroups' do |c|
23
+ c.flag 'channel_id', desc: '.'
24
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
25
+ c.action do |_global_options, options, _args|
26
+ puts JSON.dump(@client.admin_conversations_restrictAccess_listGroups(options))
27
+ end
28
+ end
29
+
30
+ g.desc 'Remove a linked IDP group linked from a private channel'
31
+ g.long_desc %( Remove a linked IDP group linked from a private channel )
32
+ g.command 'removeGroup' do |c|
33
+ c.flag 'channel_id', desc: 'The channel to remove the linked group from.'
34
+ c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.'
35
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
36
+ c.action do |_global_options, options, _args|
37
+ puts JSON.dump(@client.admin_conversations_restrictAccess_removeGroup(options))
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminEmoji methods.'
8
+ command 'admin_emoji' do |g|
9
+ g.desc 'Add an emoji.'
10
+ g.long_desc %( Add an emoji. )
11
+ g.command 'add' do |c|
12
+ c.flag 'name', desc: 'The name of the emoji to be added (using lower-case letters only). Colons (:myemoji:) around the value are not required, although they may be included.'
13
+ c.flag 'url', desc: 'The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.admin_emoji_add(options))
16
+ end
17
+ end
18
+
19
+ g.desc 'Add an emoji alias.'
20
+ g.long_desc %( Add an emoji alias. )
21
+ g.command 'addAlias' do |c|
22
+ c.flag 'alias_for', desc: 'Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.'
23
+ c.flag 'name', desc: 'The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.admin_emoji_addAlias(options))
26
+ end
27
+ end
28
+
29
+ g.desc 'List emoji for an Enterprise Grid organization.'
30
+ g.long_desc %( List emoji for an Enterprise Grid organization. )
31
+ g.command 'list' do |c|
32
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
33
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
34
+ c.action do |_global_options, options, _args|
35
+ puts JSON.dump(@client.admin_emoji_list(options))
36
+ end
37
+ end
38
+
39
+ g.desc 'Remove an emoji across an Enterprise Grid organization'
40
+ g.long_desc %( Remove an emoji across an Enterprise Grid organization )
41
+ g.command 'remove' do |c|
42
+ c.flag 'name', desc: 'The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.'
43
+ c.action do |_global_options, options, _args|
44
+ puts JSON.dump(@client.admin_emoji_remove(options))
45
+ end
46
+ end
47
+
48
+ g.desc 'Rename an emoji.'
49
+ g.long_desc %( Rename an emoji. )
50
+ g.command 'rename' do |c|
51
+ c.flag 'name', desc: 'The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.'
52
+ c.flag 'new_name', desc: 'The new name of the emoji.'
53
+ c.action do |_global_options, options, _args|
54
+ puts JSON.dump(@client.admin_emoji_rename(options))
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ 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 'AdminFunctions methods.'
8
+ command 'admin_functions' do |g|
9
+ g.desc 'Look up functions by a set of apps'
10
+ g.long_desc %( Look up functions by a set of apps )
11
+ g.command 'list' do |c|
12
+ c.flag 'app_ids', desc: 'Comma-separated array of app IDs to get functions for; max 50.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.'
15
+ c.flag 'team_id', desc: 'The team context to retrieve functions from.'
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.admin_functions_list(options))
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ 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 'AdminFunctionsPermissions methods.'
8
+ command 'admin_functions_permissions' do |g|
9
+ g.desc 'Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.'
10
+ g.long_desc %( Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities. )
11
+ g.command 'lookup' do |c|
12
+ c.flag 'function_ids', desc: 'An array of function IDs to get permissions for.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.admin_functions_permissions_lookup(options))
15
+ end
16
+ end
17
+
18
+ g.desc 'Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities'
19
+ g.long_desc %( Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities )
20
+ g.command 'set' do |c|
21
+ c.flag 'function_id', desc: 'The function ID to set permissions for.'
22
+ c.flag 'visibility', desc: 'The function visibility.'
23
+ c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.admin_functions_permissions_set(options))
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,42 @@
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 'AdminInviterequests methods.'
8
+ command 'admin_inviteRequests' do |g|
9
+ g.desc 'Approve a workspace invite request.'
10
+ g.long_desc %( Approve a workspace invite request. )
11
+ g.command 'approve' do |c|
12
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
13
+ c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.admin_inviteRequests_approve(options))
16
+ end
17
+ end
18
+
19
+ g.desc 'Deny a workspace invite request.'
20
+ g.long_desc %( Deny a workspace invite request. )
21
+ g.command 'deny' do |c|
22
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
23
+ c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.admin_inviteRequests_deny(options))
26
+ end
27
+ end
28
+
29
+ g.desc 'List all pending workspace invite requests.'
30
+ g.long_desc %( List all pending workspace invite requests. )
31
+ g.command 'list' do |c|
32
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
33
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
34
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
35
+ c.action do |_global_options, options, _args|
36
+ puts JSON.dump(@client.admin_inviteRequests_list(options))
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminInviterequestsApproved methods.'
8
+ command 'admin_inviteRequests_approved' do |g|
9
+ g.desc 'List all approved workspace invite requests.'
10
+ g.long_desc %( List all approved workspace invite requests. )
11
+ g.command 'list' do |c|
12
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
13
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
14
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_inviteRequests_approved_list(options))
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminInviterequestsDenied methods.'
8
+ command 'admin_inviteRequests_denied' do |g|
9
+ g.desc 'List all denied workspace invite requests.'
10
+ g.long_desc %( List all denied workspace invite requests. )
11
+ g.command 'list' do |c|
12
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous api response.'
13
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.'
14
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_inviteRequests_denied_list(options))
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,46 @@
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 'AdminRoles methods.'
8
+ command 'admin_roles' do |g|
9
+ g.desc 'Adds members to the specified role with the specified scopes'
10
+ g.long_desc %( Adds members to the specified role with the specified scopes )
11
+ g.command 'addAssignments' do |c|
12
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.'
13
+ c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
14
+ c.flag 'user_ids', desc: 'List of IDs from the users to be added to the given role.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_roles_addAssignments(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities'
21
+ g.long_desc %( Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities )
22
+ g.command 'listAssignments' do |c|
23
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
24
+ c.flag 'entity_ids', desc: 'The entities for which the roles apply.'
25
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 200 both inclusive.'
26
+ c.flag 'role_ids', desc: 'collection of role ids to scope results by.'
27
+ c.flag 'sort_dir', desc: 'Sort direction. Default is descending on date_create, can be either ASC or DESC.'
28
+ c.action do |_global_options, options, _args|
29
+ puts JSON.dump(@client.admin_roles_listAssignments(options))
30
+ end
31
+ end
32
+
33
+ g.desc 'Removes a set of users from a role for the given scopes and entities'
34
+ g.long_desc %( Removes a set of users from a role for the given scopes and entities )
35
+ g.command 'removeAssignments' do |c|
36
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.'
37
+ c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
38
+ c.flag 'user_ids', desc: 'List of IDs of the users whose roles will be revoked.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.admin_roles_removeAssignments(options))
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,33 @@
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 'AdminTeams methods.'
8
+ command 'admin_teams' do |g|
9
+ g.desc 'Create an Enterprise team.'
10
+ g.long_desc %( Create an Enterprise team. )
11
+ g.command 'create' do |c|
12
+ c.flag 'team_domain', desc: 'Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.'
13
+ c.flag 'team_name', desc: 'Team name (for example, Slack Softball Team).'
14
+ c.flag 'team_description', desc: 'Description for the team.'
15
+ c.flag 'team_discoverability', desc: "Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted."
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.admin_teams_create(options))
18
+ end
19
+ end
20
+
21
+ g.desc 'List all teams on an Enterprise organization'
22
+ g.long_desc %( List all teams on an Enterprise organization )
23
+ g.command 'list' do |c|
24
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
25
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be a positive integer no larger than 1000.'
26
+ c.action do |_global_options, options, _args|
27
+ puts JSON.dump(@client.admin_teams_list(options))
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminTeamsAdmins methods.'
8
+ command 'admin_teams_admins' do |g|
9
+ g.desc 'List all of the admins on a given workspace.'
10
+ g.long_desc %( List all of the admins on a given workspace. )
11
+ g.command 'list' do |c|
12
+ c.flag 'team_id', desc: '.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.flag 'limit', desc: 'The maximum number of items to return.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_teams_admins_list(options))
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end