slack-ruby-client 3.0.0 → 3.2.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 (294) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +0 -0
  3. data/.github/FUNDING.yml +0 -0
  4. data/.github/dependabot.yml +0 -0
  5. data/.github/workflows/danger-comment.yml +11 -0
  6. data/.github/workflows/danger.yml +13 -0
  7. data/.github/workflows/lint.yml +1 -1
  8. data/.github/workflows/test.yml +1 -1
  9. data/.github/workflows/update_api.yml +8 -10
  10. data/.gitignore +0 -0
  11. data/.gitmodules +0 -0
  12. data/.rspec +0 -0
  13. data/.rubocop.yml +0 -0
  14. data/.rubocop_todo.yml +5 -2
  15. data/.ruby-version +0 -0
  16. data/CHANGELOG.md +14 -0
  17. data/CONTRIBUTING.md +0 -0
  18. data/Dangerfile +4 -1
  19. data/Gemfile +3 -0
  20. data/LICENSE.md +0 -0
  21. data/README.md +1 -1
  22. data/RELEASING.md +0 -0
  23. data/Rakefile +0 -0
  24. data/SECURITY.md +0 -0
  25. data/UPGRADING.md +4 -0
  26. data/bin/commands/admin_analytics.rb +0 -0
  27. data/bin/commands/admin_analytics_messages.rb +36 -0
  28. data/bin/commands/admin_apps.rb +3 -0
  29. data/bin/commands/admin_apps_activities.rb +0 -0
  30. data/bin/commands/admin_apps_approved.rb +0 -0
  31. data/bin/commands/admin_apps_config.rb +0 -0
  32. data/bin/commands/admin_apps_requests.rb +0 -0
  33. data/bin/commands/admin_apps_restricted.rb +0 -0
  34. data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
  35. data/bin/commands/admin_auth_policy.rb +0 -0
  36. data/bin/commands/admin_barriers.rb +0 -0
  37. data/bin/commands/admin_conversations.rb +10 -0
  38. data/bin/commands/admin_conversations_ekm.rb +0 -0
  39. data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
  40. data/bin/commands/admin_emoji.rb +0 -0
  41. data/bin/commands/admin_functions.rb +3 -2
  42. data/bin/commands/admin_functions_permissions.rb +3 -2
  43. data/bin/commands/admin_inviteRequests.rb +0 -0
  44. data/bin/commands/admin_inviteRequests_approved.rb +0 -0
  45. data/bin/commands/admin_inviteRequests_denied.rb +0 -0
  46. data/bin/commands/admin_roles.rb +0 -0
  47. data/bin/commands/admin_teams.rb +0 -0
  48. data/bin/commands/admin_teams_admins.rb +0 -0
  49. data/bin/commands/admin_teams_owners.rb +0 -0
  50. data/bin/commands/admin_teams_settings.rb +0 -0
  51. data/bin/commands/admin_usergroups.rb +0 -0
  52. data/bin/commands/admin_users.rb +20 -8
  53. data/bin/commands/admin_users_session.rb +0 -0
  54. data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
  55. data/bin/commands/admin_workflows.rb +0 -0
  56. data/bin/commands/admin_workflows_collaborators.rb +0 -0
  57. data/bin/commands/admin_workflows_permissions.rb +0 -0
  58. data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
  59. data/bin/commands/api.rb +0 -0
  60. data/bin/commands/apps.rb +0 -0
  61. data/bin/commands/apps_activities.rb +0 -0
  62. data/bin/commands/apps_auth_external.rb +0 -0
  63. data/bin/commands/apps_connections.rb +0 -0
  64. data/bin/commands/apps_datastore.rb +0 -0
  65. data/bin/commands/apps_event_authorizations.rb +0 -0
  66. data/bin/commands/apps_icon.rb +22 -0
  67. data/bin/commands/apps_manifest.rb +7 -6
  68. data/bin/commands/apps_user_connection.rb +21 -0
  69. data/bin/commands/assistant_search.rb +9 -5
  70. data/bin/commands/assistant_threads.rb +5 -1
  71. data/bin/commands/auth.rb +0 -0
  72. data/bin/commands/auth_teams.rb +0 -0
  73. data/bin/commands/blocks.rb +22 -0
  74. data/bin/commands/bookmarks.rb +6 -6
  75. data/bin/commands/bots.rb +0 -0
  76. data/bin/commands/calls.rb +0 -0
  77. data/bin/commands/calls_participants.rb +0 -0
  78. data/bin/commands/canvases.rb +0 -0
  79. data/bin/commands/canvases_access.rb +0 -0
  80. data/bin/commands/canvases_sections.rb +0 -0
  81. data/bin/commands/chat.rb +50 -4
  82. data/bin/commands/chat_scheduledMessages.rb +0 -0
  83. data/bin/commands/conversations.rb +1 -1
  84. data/bin/commands/conversations_canvases.rb +0 -0
  85. data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
  86. data/bin/commands/conversations_requestSharedInvite.rb +0 -0
  87. data/bin/commands/dialog.rb +0 -0
  88. data/bin/commands/dnd.rb +0 -0
  89. data/bin/commands/emoji.rb +0 -0
  90. data/bin/commands/entity.rb +24 -0
  91. data/bin/commands/files.rb +3 -3
  92. data/bin/commands/files_comments.rb +0 -0
  93. data/bin/commands/files_remote.rb +0 -0
  94. data/bin/commands/functions.rb +0 -0
  95. data/bin/commands/functions_distributions_permissions.rb +0 -0
  96. data/bin/commands/functions_workflows_steps.rb +0 -0
  97. data/bin/commands/functions_workflows_steps_responses.rb +0 -0
  98. data/bin/commands/migration.rb +0 -0
  99. data/bin/commands/oauth.rb +0 -0
  100. data/bin/commands/oauth_v2.rb +2 -0
  101. data/bin/commands/oauth_v2_user.rb +27 -0
  102. data/bin/commands/openid_connect.rb +1 -0
  103. data/bin/commands/pins.rb +0 -0
  104. data/bin/commands/reactions.rb +0 -0
  105. data/bin/commands/reminders.rb +0 -0
  106. data/bin/commands/rtm.rb +0 -0
  107. data/bin/commands/search.rb +0 -0
  108. data/bin/commands/slackLists.rb +0 -0
  109. data/bin/commands/slackLists_access.rb +0 -0
  110. data/bin/commands/slackLists_download.rb +0 -0
  111. data/bin/commands/slackLists_items.rb +0 -0
  112. data/bin/commands/stars.rb +0 -0
  113. data/bin/commands/team.rb +0 -0
  114. data/bin/commands/team_billing.rb +0 -0
  115. data/bin/commands/team_externalTeams.rb +0 -0
  116. data/bin/commands/team_preferences.rb +0 -0
  117. data/bin/commands/team_profile.rb +0 -0
  118. data/bin/commands/tooling_tokens.rb +0 -0
  119. data/bin/commands/usergroups.rb +0 -0
  120. data/bin/commands/usergroups_users.rb +0 -0
  121. data/bin/commands/users.rb +2 -2
  122. data/bin/commands/users_admin.rb +0 -0
  123. data/bin/commands/users_discoverableContacts.rb +0 -0
  124. data/bin/commands/users_prefs.rb +0 -0
  125. data/bin/commands/users_profile.rb +0 -0
  126. data/bin/commands/views.rb +1 -0
  127. data/bin/commands/workflows_featured.rb +0 -0
  128. data/bin/commands/workflows_triggers_permissions.rb +0 -0
  129. data/examples/files_upload_v2/.env.example +0 -0
  130. data/examples/files_upload_v2/Gemfile +0 -0
  131. data/examples/files_upload_v2/README.md +0 -0
  132. data/examples/files_upload_v2/files_upload_v2.rb +0 -0
  133. data/examples/hi_web/Gemfile +0 -0
  134. data/examples/hi_web/hi.gif +0 -0
  135. data/examples/hi_web/hi.rb +0 -0
  136. data/examples/new_ticket/Gemfile +0 -0
  137. data/examples/new_ticket/new_ticket.rb +0 -0
  138. data/examples/oauth_v2/.env.example +0 -0
  139. data/examples/oauth_v2/Gemfile +0 -0
  140. data/examples/oauth_v2/README.md +3 -3
  141. data/lib/slack/config.rb +0 -0
  142. data/lib/slack/events/config.rb +0 -0
  143. data/lib/slack/events/request.rb +0 -0
  144. data/lib/slack/logger.rb +0 -0
  145. data/lib/slack/messages/formatting.rb +0 -0
  146. data/lib/slack/messages/message.rb +0 -0
  147. data/lib/slack/utils/security.rb +0 -0
  148. data/lib/slack/version.rb +1 -1
  149. data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
  150. data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
  151. data/lib/slack/web/api/endpoints/admin_apps.rb +6 -0
  152. data/lib/slack/web/api/endpoints/admin_apps_activities.rb +0 -0
  153. data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
  154. data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
  155. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
  156. data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
  157. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
  158. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
  159. data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
  160. data/lib/slack/web/api/endpoints/admin_conversations.rb +15 -0
  161. data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
  162. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
  163. data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -0
  164. data/lib/slack/web/api/endpoints/admin_functions.rb +3 -1
  165. data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +3 -2
  166. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
  167. data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
  168. data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
  169. data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
  170. data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
  171. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
  172. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
  173. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
  174. data/lib/slack/web/api/endpoints/admin_usergroups.rb +0 -0
  175. data/lib/slack/web/api/endpoints/admin_users.rb +23 -6
  176. data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -0
  177. data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
  178. data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
  179. data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
  180. data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
  181. data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
  182. data/lib/slack/web/api/endpoints/api.rb +0 -0
  183. data/lib/slack/web/api/endpoints/apps.rb +0 -0
  184. data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
  185. data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
  186. data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
  187. data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
  188. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
  189. data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
  190. data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
  191. data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
  192. data/lib/slack/web/api/endpoints/assistant_search.rb +12 -4
  193. data/lib/slack/web/api/endpoints/assistant_threads.rb +10 -3
  194. data/lib/slack/web/api/endpoints/auth.rb +0 -0
  195. data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
  196. data/lib/slack/web/api/endpoints/blocks.rb +28 -0
  197. data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
  198. data/lib/slack/web/api/endpoints/bots.rb +0 -0
  199. data/lib/slack/web/api/endpoints/calls.rb +0 -0
  200. data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
  201. data/lib/slack/web/api/endpoints/canvases.rb +0 -0
  202. data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
  203. data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
  204. data/lib/slack/web/api/endpoints/chat.rb +95 -12
  205. data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
  206. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  207. data/lib/slack/web/api/endpoints/conversations_canvases.rb +0 -0
  208. data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
  209. data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
  210. data/lib/slack/web/api/endpoints/dialog.rb +0 -0
  211. data/lib/slack/web/api/endpoints/dnd.rb +0 -0
  212. data/lib/slack/web/api/endpoints/emoji.rb +0 -0
  213. data/lib/slack/web/api/endpoints/entity.rb +32 -0
  214. data/lib/slack/web/api/endpoints/files.rb +2 -2
  215. data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
  216. data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
  217. data/lib/slack/web/api/endpoints/functions.rb +0 -0
  218. data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
  219. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
  220. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
  221. data/lib/slack/web/api/endpoints/migration.rb +0 -0
  222. data/lib/slack/web/api/endpoints/oauth.rb +0 -0
  223. data/lib/slack/web/api/endpoints/oauth_v2.rb +4 -0
  224. data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
  225. data/lib/slack/web/api/endpoints/openid_connect.rb +2 -0
  226. data/lib/slack/web/api/endpoints/pins.rb +0 -0
  227. data/lib/slack/web/api/endpoints/reactions.rb +0 -0
  228. data/lib/slack/web/api/endpoints/reminders.rb +0 -0
  229. data/lib/slack/web/api/endpoints/rtm.rb +0 -0
  230. data/lib/slack/web/api/endpoints/search.rb +0 -0
  231. data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
  232. data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
  233. data/lib/slack/web/api/endpoints/slackLists_download.rb +0 -0
  234. data/lib/slack/web/api/endpoints/slackLists_items.rb +0 -0
  235. data/lib/slack/web/api/endpoints/stars.rb +0 -0
  236. data/lib/slack/web/api/endpoints/team.rb +0 -0
  237. data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
  238. data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
  239. data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
  240. data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
  241. data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
  242. data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
  243. data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
  244. data/lib/slack/web/api/endpoints/users.rb +1 -1
  245. data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
  246. data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
  247. data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
  248. data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
  249. data/lib/slack/web/api/endpoints/views.rb +1 -0
  250. data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
  251. data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
  252. data/lib/slack/web/api/endpoints.rb +12 -0
  253. data/lib/slack/web/api/error.rb +0 -0
  254. data/lib/slack/web/api/errors/server_error.rb +0 -0
  255. data/lib/slack/web/api/errors/slack_error.rb +0 -0
  256. data/lib/slack/web/api/errors/too_many_requests_error.rb +0 -0
  257. data/lib/slack/web/api/errors.rb +178 -4
  258. data/lib/slack/web/api/helpers/files.rb +4 -1
  259. data/lib/slack/web/api/helpers.rb +0 -0
  260. data/lib/slack/web/api/mixins/conversations.id.rb +0 -0
  261. data/lib/slack/web/api/mixins/ids.id.rb +3 -1
  262. data/lib/slack/web/api/mixins/users.id.json +0 -0
  263. data/lib/slack/web/api/mixins/users.id.rb +0 -0
  264. data/lib/slack/web/api/mixins/users.search.json +0 -0
  265. data/lib/slack/web/api/mixins/users.search.rb +0 -0
  266. data/lib/slack/web/api/mixins.rb +0 -0
  267. data/lib/slack/web/api/options.rb +0 -0
  268. data/lib/slack/web/api/patches/.gitkeep +0 -0
  269. data/lib/slack/web/api/schema/group.json +0 -0
  270. data/lib/slack/web/api/schema/method.json +0 -0
  271. data/lib/slack/web/api/templates/command.erb +0 -0
  272. data/lib/slack/web/api/templates/endpoints.erb +0 -0
  273. data/lib/slack/web/api/templates/errors.erb +0 -0
  274. data/lib/slack/web/api/templates/method.erb +3 -1
  275. data/lib/slack/web/api/templates/method_spec.erb +32 -3
  276. data/lib/slack/web/client.rb +0 -0
  277. data/lib/slack/web/config.rb +0 -0
  278. data/lib/slack/web/faraday/connection.rb +0 -0
  279. data/lib/slack/web/faraday/options.rb +0 -0
  280. data/lib/slack/web/faraday/request.rb +0 -0
  281. data/lib/slack/web/faraday/response/raise_error.rb +0 -0
  282. data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
  283. data/lib/slack/web/pagination/cursor.rb +0 -0
  284. data/lib/slack-ruby-client.rb +0 -0
  285. data/lib/slack.rb +0 -0
  286. data/lib/slack_ruby_client.rb +0 -0
  287. data/lib/tasks/git.rake +0 -0
  288. data/lib/tasks/update.rake +0 -0
  289. data/lib/tasks/web.rake +7 -2
  290. data/slack-ruby-client.gemspec +0 -0
  291. data/slack.png +0 -0
  292. metadata +17 -9
  293. data/.github/workflows/pr_lint.yml +0 -21
  294. data/Gemfile.danger +0 -6
@@ -9,6 +9,8 @@ module Slack
9
9
  #
10
10
  # Approve an app for installation on a workspace.
11
11
  #
12
+ # @option options [boolean] :allow_child_auto_install
13
+ # Auto-create an Admin-Approved App automation rule that pre-approves future child app installs from this manager app.
12
14
  # @option options [string] :app_id
13
15
  # The id of the app to approve.
14
16
  # @option options [string] :request_id
@@ -17,6 +19,10 @@ module Slack
17
19
  # The ID of the workspace to approve the app on.
18
20
  # @option options [Object] :enterprise_id
19
21
  # The ID of the enterprise to approve the app on.
22
+ # @option options [string] :user_scopes
23
+ # User scopes to approve for the app.
24
+ # @option options [string] :bot_scopes
25
+ # Bot scopes to approve for the app.
20
26
  # @see https://api.slack.com/methods/admin.apps.approve
21
27
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.approve.json
22
28
  def admin_apps_approve(options = {})
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -57,6 +57,21 @@ module Slack
57
57
  post('admin.conversations.bulkMove', options)
58
58
  end
59
59
 
60
+ #
61
+ # Exclude channels from Slack AI in bulk
62
+ #
63
+ # @option options [array] :channel_ids
64
+ # An array of channel IDs to exclude from Slack AI.
65
+ # @option options [boolean] :exclude
66
+ # Whether the channels should be excluded from Slack AI.
67
+ # @see https://api.slack.com/methods/admin.conversations.bulkSetExcludeFromSlackAi
68
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkSetExcludeFromSlackAi.json
69
+ def admin_conversations_bulkSetExcludeFromSlackAi(options = {})
70
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
71
+ raise ArgumentError, 'Required arguments :exclude missing' if options[:exclude].nil?
72
+ post('admin.conversations.bulkSetExcludeFromSlackAi', options)
73
+ end
74
+
60
75
  #
61
76
  # Convert a public channel to a private channel.
62
77
  #
File without changes
@@ -7,12 +7,14 @@ module Slack
7
7
  module Endpoints
8
8
  module AdminFunctions
9
9
  #
10
- # Look up functions by a set of apps
10
+ # Look up functions by a set of apps.
11
11
  #
12
12
  # @option options [Object] :team_id
13
13
  # The team context to retrieve functions from.
14
14
  # @option options [array] :app_ids
15
15
  # Comma-separated array of app IDs to get functions for; max 50.
16
+ # @option options [boolean] :include_non_distributed_functions
17
+ # Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app.
16
18
  # @option options [string] :cursor
17
19
  # Set cursor to next_cursor returned by the previous call to list items in the next page.
18
20
  # @option options [integer] :limit
@@ -19,7 +19,7 @@ module Slack
19
19
  end
20
20
 
21
21
  #
22
- # Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities
22
+ # Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.
23
23
  #
24
24
  # @option options [string] :function_id
25
25
  # The function ID to set permissions for.
@@ -27,11 +27,12 @@ module Slack
27
27
  # The function visibility.
28
28
  # @option options [array] :user_ids
29
29
  # List of user IDs to allow for named_entities visibility.
30
+ # @option options [array] :permissions
31
+ # Array of permissions for the function.
30
32
  # @see https://api.slack.com/methods/admin.functions.permissions.set
31
33
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.set.json
32
34
  def admin_functions_permissions_set(options = {})
33
35
  raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
34
- raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
35
36
  post('admin.functions.permissions.set', options)
36
37
  end
37
38
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -27,6 +27,19 @@ module Slack
27
27
  post('admin.users.assign', options)
28
28
  end
29
29
 
30
+ #
31
+ # Fetches the expiration timestamp for a guest
32
+ #
33
+ # @option options [Object] :user_id
34
+ # The ID of the guest user to get the expiration for.
35
+ # @option options [Object] :target_team
36
+ # If an org token is passed in and this team is on the org, it will operate on the workspace level on the specified team. Otherwise it will operate on the org or team in context.
37
+ # @see https://api.slack.com/methods/admin.users.getExpiration
38
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.getExpiration.json
39
+ def admin_users_getExpiration(options = {})
40
+ post('admin.users.getExpiration', options)
41
+ end
42
+
30
43
  #
31
44
  # Invite a user to a workspace.
32
45
  #
@@ -72,6 +85,10 @@ module Slack
72
85
  # Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.
73
86
  # @option options [boolean] :only_guests
74
87
  # If true, returns only guests and their expiration dates that belong to the team_id.
88
+ # @option options [boolean] :include_admins
89
+ # If true, only admin users will be returned (excludes owners). Returns all admins and owners when combined with include_owners. Cannot be used together with only_guests.
90
+ # @option options [boolean] :include_owners
91
+ # If true, only owner users will be returned. Cannot be used together with only_guests.
75
92
  # @option options [integer] :limit
76
93
  # Limit for how many users to be retrieved per page.
77
94
  # @see https://api.slack.com/methods/admin.users.list
@@ -102,10 +119,10 @@ module Slack
102
119
  end
103
120
 
104
121
  #
105
- # Set an existing regular user or owner to be a workspace admin.
122
+ # Set an existing regular user or owner to be a workspace or org admin.
106
123
  #
107
124
  # @option options [Object] :team_id
108
- # The ID (T1234) of the workspace.
125
+ # The ID of the workspace or organization.
109
126
  # @option options [string] :user_id
110
127
  # The ID of the user to designate as an admin.
111
128
  # @see https://api.slack.com/methods/admin.users.setAdmin
@@ -134,12 +151,12 @@ module Slack
134
151
  end
135
152
 
136
153
  #
137
- # Set an existing regular user or admin to be a workspace owner.
154
+ # Set an existing regular user or admin to be a workspace or org owner.
138
155
  #
139
156
  # @option options [Object] :team_id
140
- # The ID (T1234) of the workspace.
157
+ # The ID of the workspace or organization.
141
158
  # @option options [Object] :user_id
142
- # Id of the user to promote to owner.
159
+ # ID of the user to promote to owner.
143
160
  # @see https://api.slack.com/methods/admin.users.setOwner
144
161
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setOwner.json
145
162
  def admin_users_setOwner(options = {})
@@ -152,7 +169,7 @@ module Slack
152
169
  # Set an existing guest user, admin user, or owner to be a regular user.
153
170
  #
154
171
  # @option options [Object] :team_id
155
- # The ID (T1234) of the workspace.
172
+ # The ID of the workspace or organization.
156
173
  # @option options [string] :user_id
157
174
  # The ID of the user to designate as a regular user.
158
175
  # @see https://api.slack.com/methods/admin.users.setRegular
File without changes
File without changes
@@ -7,10 +7,10 @@ module Slack
7
7
  module Endpoints
8
8
  module AdminWorkflowsTriggersTypesPermissions
9
9
  #
10
- # list the permissions for using each trigger type
10
+ # List the permissions for using each trigger type.
11
11
  #
12
12
  # @option options [array] :trigger_type_ids
13
- # The trigger types IDs for which to get the permissions.
13
+ # The trigger type IDs for which to get the permissions.
14
14
  # @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup
15
15
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json
16
16
  def admin_workflows_triggers_types_permissions_lookup(options = {})
@@ -27,11 +27,11 @@ module Slack
27
27
  # The function visibility.
28
28
  # @option options [array] :user_ids
29
29
  # List of user IDs to allow for named_entities visibility.
30
+ # @option options [object] :permissions
30
31
  # @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set
31
32
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json
32
33
  def admin_workflows_triggers_types_permissions_set(options = {})
33
34
  raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
34
- raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
35
35
  post('admin.workflows.triggers.types.permissions.set', options)
36
36
  end
37
37
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,28 @@
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 AppsIcon
9
+ #
10
+ # Sets the app icon
11
+ #
12
+ # @option options [Object] :app_id
13
+ # The ID of the app whose icon you want to set.
14
+ # @option options [file] :file
15
+ # File contents via multipart/form-data.
16
+ # @option options [string] :url
17
+ # URL of a publicly hosted image.
18
+ # @see https://api.slack.com/methods/apps.icon.set
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.icon/apps.icon.set.json
20
+ def apps_icon_set(options = {})
21
+ raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
22
+ post('apps.icon.set', options)
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -11,6 +11,8 @@ module Slack
11
11
  #
12
12
  # @option options [string] :manifest
13
13
  # A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.
14
+ # @option options [string] :team_id
15
+ # When called with an org token, which specific team to create app on.
14
16
  # @see https://api.slack.com/methods/apps.manifest.create
15
17
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.create.json
16
18
  def apps_manifest_create(options = {})
@@ -20,7 +22,7 @@ module Slack
20
22
  end
21
23
 
22
24
  #
23
- # Permanently deletes an app created through app manifests
25
+ # Permanently deletes an app created through app manifests. When called with a manager app token, this method can only delete apps that were created by that manager app.
24
26
  #
25
27
  # @option options [Object] :app_id
26
28
  # The ID of the app you want to delete.
@@ -32,7 +34,7 @@ module Slack
32
34
  end
33
35
 
34
36
  #
35
- # Export an app manifest from an existing app
37
+ # Export an app manifest from an existing app. When called with a manager app token, this method can only export apps that were created by that manager app.
36
38
  #
37
39
  # @option options [Object] :app_id
38
40
  # The ID of the app whose configuration you want to export as a manifest.
@@ -44,7 +46,7 @@ module Slack
44
46
  end
45
47
 
46
48
  #
47
- # Update an app from an app manifest
49
+ # Update an app from an app manifest. When called with a manager app token, this method can only update apps that were created by that manager app.
48
50
  #
49
51
  # @option options [string] :manifest
50
52
  # A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely _replaces_ any previous configuration, manifest must contain both unmodified and modified fields.
@@ -0,0 +1,27 @@
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 AppsUserConnection
9
+ #
10
+ # Updates the connection status between a user and an app.
11
+ #
12
+ # @option options [string] :user_id
13
+ # The ID of the user for the status update.
14
+ # @option options [enum] :status
15
+ # The status that should be set for the user.
16
+ # @see https://api.slack.com/methods/apps.user.connection.update
17
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.user.connection/apps.user.connection.update.json
18
+ def apps_user_connection_update(options = {})
19
+ raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
20
+ raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
21
+ post('apps.user.connection.update', options)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -7,7 +7,7 @@ module Slack
7
7
  module Endpoints
8
8
  module AssistantSearch
9
9
  #
10
- # Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.
10
+ # Searches messages, files, channels and users across your Slack organization.
11
11
  #
12
12
  # @option options [string] :query
13
13
  # User prompt or search query.
@@ -18,7 +18,9 @@ module Slack
18
18
  # @option options [array] :content_types
19
19
  # Content types to include, a comma-separated list of any combination of messages, files, channels, users.
20
20
  # @option options [boolean] :include_bots
21
- # If you want the results to include bots.
21
+ # Whether the results should include bots.
22
+ # @option options [boolean] :include_deleted_users
23
+ # Whether to include deleted users in the user search results. Defaults to false.
22
24
  # @option options [integer] :before
23
25
  # UNIX timestamp filter. If present, filters for results before this date.
24
26
  # @option options [integer] :after
@@ -28,7 +30,7 @@ module Slack
28
30
  # @option options [Object] :context_channel_id
29
31
  # Context channel ID to support scoping the search when applicable.
30
32
  # @option options [string] :cursor
31
- # The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.
33
+ # The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results.
32
34
  # @option options [integer] :limit
33
35
  # Number of results to return, up to a max of 20. Defaults to 20.
34
36
  # @option options [enum] :sort
@@ -40,7 +42,13 @@ module Slack
40
42
  # @option options [boolean] :highlight
41
43
  # Whether to highlight the search query in the results. Defaults to false if unspecified.
42
44
  # @option options [array] :term_clauses
43
- # A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).
45
+ # A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e., conjunctive normal form).
46
+ # @option options [string] :modifiers
47
+ # A string containing only modifiers in the format of modifier:value. Search results returned will match the modifier value. For now modifiers only affect term clauses.
48
+ # @option options [boolean] :include_archived_channels
49
+ # Whether to include archived channels in the search results.
50
+ # @option options [boolean] :disable_semantic_search
51
+ # Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false.
44
52
  # @see https://api.slack.com/methods/assistant.search.context
45
53
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json
46
54
  def assistant_search_context(options = {})
@@ -9,12 +9,20 @@ module Slack
9
9
  #
10
10
  # Set the status for an AI assistant thread.
11
11
  #
12
- # @option options [Object] :channel_id
12
+ # @option options [string] :channel_id
13
13
  # Channel ID containing the assistant thread.
14
14
  # @option options [string] :thread_ts
15
15
  # Message timestamp of the thread of where to set the status.
16
16
  # @option options [string] :status
17
- # Status of the specified bot user, e.g. 'is thinking...'.
17
+ # Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent.
18
+ # @option options [array] :loading_messages
19
+ # The list of messages to rotate through as a loading indicator. Maximum of 10 messages.
20
+ # @option options [string] :icon_emoji
21
+ # Emoji to use as the icon for this message. Overrides icon_url.
22
+ # @option options [string] :icon_url
23
+ # Image URL to use as the icon for this message.
24
+ # @option options [string] :username
25
+ # The bot's username to display.
18
26
  # @see https://api.slack.com/methods/assistant.threads.setStatus
19
27
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
20
28
  def assistant_threads_setStatus(options = {})
@@ -39,7 +47,6 @@ module Slack
39
47
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setSuggestedPrompts.json
40
48
  def assistant_threads_setSuggestedPrompts(options = {})
41
49
  raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
42
- raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
43
50
  raise ArgumentError, 'Required arguments :prompts missing' if options[:prompts].nil?
44
51
  post('assistant.threads.setSuggestedPrompts', options)
45
52
  end
File without changes
File without changes
@@ -0,0 +1,28 @@
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 Blocks
9
+ #
10
+ # Validates blocks, messages, and views Block Kit JSON payloads.
11
+ #
12
+ # @option options [string] :blocks
13
+ # A JSON-encoded array of structured blocks. Provide exactly one of blocks, view, or message.
14
+ # @option options [string] :message
15
+ # A JSON-encoded message payload to validate. Provide exactly one of blocks, view, or message.
16
+ # @option options [string] :view
17
+ # A JSON-encoded view payload to validate. Provide exactly one of blocks, view, or message.
18
+ # @see https://api.slack.com/methods/blocks.validate
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/blocks/blocks.validate.json
20
+ def blocks_validate(options = {})
21
+ options = encode_options_as_json(options, %i[blocks message view])
22
+ post('blocks.validate', options)
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -10,7 +10,7 @@ module Slack
10
10
  # Add bookmark to a channel.
11
11
  #
12
12
  # @option options [string] :channel_id
13
- # Channel to add bookmark in.
13
+ # Channel to add bookmark in. Required for public channels.
14
14
  # @option options [string] :title
15
15
  # Title for the bookmark.
16
16
  # @option options [string] :link
@@ -28,7 +28,6 @@ module Slack
28
28
  # @see https://api.slack.com/methods/bookmarks.add
29
29
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.add.json
30
30
  def bookmarks_add(options = {})
31
- raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
32
31
  raise ArgumentError, 'Required arguments :title missing' if options[:title].nil?
33
32
  raise ArgumentError, 'Required arguments :type missing' if options[:type].nil?
34
33
  post('bookmarks.add', options)
@@ -38,9 +37,9 @@ module Slack
38
37
  # Edit bookmark.
39
38
  #
40
39
  # @option options [string] :channel_id
41
- # Channel to update bookmark in.
40
+ # Channel to update bookmark in. Required for public channels.
42
41
  # @option options [string] :bookmark_id
43
- # Bookmark to update.
42
+ # Bookmark to update. Required for public channels.
44
43
  # @option options [string] :title
45
44
  # Title for the bookmark.
46
45
  # @option options [string] :link
@@ -50,8 +49,6 @@ module Slack
50
49
  # @see https://api.slack.com/methods/bookmarks.edit
51
50
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.edit.json
52
51
  def bookmarks_edit(options = {})
53
- raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
54
- raise ArgumentError, 'Required arguments :bookmark_id missing' if options[:bookmark_id].nil?
55
52
  post('bookmarks.edit', options)
56
53
  end
57
54
 
@@ -59,11 +56,10 @@ module Slack
59
56
  # List bookmark for the channel.
60
57
  #
61
58
  # @option options [string] :channel_id
62
- # Channel to list bookmarks in.
59
+ # Channel to list bookmarks in. Required for public channels.
63
60
  # @see https://api.slack.com/methods/bookmarks.list
64
61
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.list.json
65
62
  def bookmarks_list(options = {})
66
- raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
67
63
  post('bookmarks.list', options)
68
64
  end
69
65
 
@@ -71,16 +67,14 @@ module Slack
71
67
  # Remove bookmark from the channel.
72
68
  #
73
69
  # @option options [string] :channel_id
74
- # Channel to remove bookmark.
70
+ # Channel to remove bookmark. Required for public channels.
75
71
  # @option options [string] :bookmark_id
76
- # Bookmark to remove.
72
+ # Bookmark to remove. Required for public channels.
77
73
  # @option options [string] :quip_section_id
78
74
  # Quip section ID to unbookmark.
79
75
  # @see https://api.slack.com/methods/bookmarks.remove
80
76
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.remove.json
81
77
  def bookmarks_remove(options = {})
82
- raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
83
- raise ArgumentError, 'Required arguments :bookmark_id missing' if options[:bookmark_id].nil?
84
78
  post('bookmarks.remove', options)
85
79
  end
86
80
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes