slack-ruby-client 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.github/workflows/integration_test.yml +19 -0
  4. data/.github/workflows/pr_lint.yml +1 -1
  5. data/.github/workflows/test.yml +1 -0
  6. data/CHANGELOG.md +9 -0
  7. data/README.md +18 -14
  8. data/SECURITY.md +9 -0
  9. data/bin/commands/admin_analytics.rb +16 -10
  10. data/bin/commands/admin_apps.rb +48 -42
  11. data/bin/commands/admin_apps_approved.rb +17 -11
  12. data/bin/commands/admin_apps_requests.rb +27 -21
  13. data/bin/commands/admin_apps_restricted.rb +17 -11
  14. data/bin/commands/admin_audit_anomaly_allow.rb +22 -16
  15. data/bin/commands/admin_auth_policy.rb +37 -31
  16. data/bin/commands/admin_barriers.rb +44 -38
  17. data/bin/commands/admin_conversations.rb +221 -165
  18. data/bin/commands/admin_conversations_ekm.rb +17 -11
  19. data/bin/commands/admin_conversations_restrictAccess.rb +35 -29
  20. data/bin/commands/admin_emoji.rb +50 -44
  21. data/bin/commands/admin_inviteRequests.rb +34 -28
  22. data/bin/commands/admin_inviteRequests_approved.rb +16 -10
  23. data/bin/commands/admin_inviteRequests_denied.rb +16 -10
  24. data/bin/commands/admin_roles.rb +46 -0
  25. data/bin/commands/admin_teams.rb +26 -20
  26. data/bin/commands/admin_teams_admins.rb +16 -10
  27. data/bin/commands/admin_teams_owners.rb +16 -10
  28. data/bin/commands/admin_teams_settings.rb +59 -53
  29. data/bin/commands/admin_usergroups.rb +45 -39
  30. data/bin/commands/admin_users.rb +91 -85
  31. data/bin/commands/admin_users_session.rb +72 -66
  32. data/bin/commands/admin_users_unsupportedVersions.rb +15 -9
  33. data/bin/commands/api.rb +14 -8
  34. data/bin/commands/apps.rb +15 -9
  35. data/bin/commands/apps_connections.rb +13 -7
  36. data/bin/commands/apps_event_authorizations.rb +16 -10
  37. data/bin/commands/apps_manifest.rb +48 -42
  38. data/bin/commands/auth.rb +21 -15
  39. data/bin/commands/auth_teams.rb +16 -10
  40. data/bin/commands/bookmarks.rb +50 -44
  41. data/bin/commands/bots.rb +15 -9
  42. data/bin/commands/calls.rb +49 -43
  43. data/bin/commands/calls_participants.rb +24 -18
  44. data/bin/commands/chat.rb +150 -144
  45. data/bin/commands/chat_scheduledMessages.rb +19 -13
  46. data/bin/commands/conversations.rb +233 -227
  47. data/bin/commands/dialog.rb +15 -9
  48. data/bin/commands/dnd.rb +46 -40
  49. data/bin/commands/emoji.rb +14 -7
  50. data/bin/commands/files.rb +110 -105
  51. data/bin/commands/files_comments.rb +15 -9
  52. data/bin/commands/files_remote.rb +73 -67
  53. data/bin/commands/functions_workflows_steps.rb +22 -0
  54. data/bin/commands/functions_workflows_steps_responses.rb +22 -0
  55. data/bin/commands/migration.rb +16 -10
  56. data/bin/commands/oauth.rb +18 -12
  57. data/bin/commands/oauth_v2.rb +28 -22
  58. data/bin/commands/openid_connect.rb +26 -20
  59. data/bin/commands/pins.rb +33 -26
  60. data/bin/commands/reactions.rb +52 -46
  61. data/bin/commands/reminders.rb +53 -47
  62. data/bin/commands/rtm.rb +15 -9
  63. data/bin/commands/search.rb +43 -37
  64. data/bin/commands/stars.rb +38 -32
  65. data/bin/commands/team.rb +47 -39
  66. data/bin/commands/team_billing.rb +13 -7
  67. data/bin/commands/team_preferences.rb +13 -7
  68. data/bin/commands/team_profile.rb +14 -8
  69. data/bin/commands/tooling_tokens.rb +14 -8
  70. data/bin/commands/usergroups.rb +64 -58
  71. data/bin/commands/usergroups_users.rb +27 -21
  72. data/bin/commands/users.rb +111 -105
  73. data/bin/commands/users_admin.rb +28 -22
  74. data/bin/commands/users_prefs.rb +13 -7
  75. data/bin/commands/users_profile.rb +26 -20
  76. data/bin/commands/views.rb +47 -41
  77. data/bin/commands/workflows.rb +36 -30
  78. data/bin/slack +48 -43
  79. data/lib/slack/version.rb +1 -1
  80. data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
  81. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
  82. data/lib/slack/web/api/endpoints/admin_conversations.rb +78 -0
  83. data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
  84. data/lib/slack/web/api/endpoints/chat.rb +2 -2
  85. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  86. data/lib/slack/web/api/endpoints/emoji.rb +2 -0
  87. data/lib/slack/web/api/endpoints/files.rb +0 -2
  88. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +28 -0
  89. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +28 -0
  90. data/lib/slack/web/api/endpoints/pins.rb +2 -0
  91. data/lib/slack/web/api/endpoints/team.rb +11 -1
  92. data/lib/slack/web/api/endpoints/usergroups.rb +1 -1
  93. data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
  94. data/lib/slack/web/api/endpoints.rb +6 -0
  95. data/lib/slack/web/api/errors.rb +62 -0
  96. data/lib/slack/web/api/templates/command.erb +18 -12
  97. data/lib/tasks/web.rake +0 -6
  98. data/slack-ruby-client.gemspec +0 -1
  99. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +31 -0
  100. data/spec/slack/web/api/endpoints/admin_roles_spec.rb +30 -0
  101. data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +13 -0
  102. data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +13 -0
  103. metadata +13 -19
  104. data/bin/commands.rb +0 -69
  105. data/lib/slack/web/api/templates/commands.erb +0 -6
data/bin/slack CHANGED
@@ -2,50 +2,55 @@
2
2
  require 'gli'
3
3
  require 'slack_ruby_client'
4
4
 
5
- include GLI::App
6
-
7
- program_desc 'Slack client.'
8
-
9
- default_command :help
10
-
11
- switch %i[d debug], desc: 'Enable debug-level logging.', default_value: false
12
- flag [:t, 'slack-api-token'], desc: 'Slack API token.', default_value: ENV['SLACK_API_TOKEN']
13
- flag ['vcr-cassette-name'], desc: 'Offline VCR cassette.'
14
-
15
- pre do |global_options, _command, options, _args|
16
- # global Slack configuration
17
- Slack.config.token = global_options['slack-api-token']
18
- help_now! 'Set Slack API token via --slack-api-token or SLACK_API_TOKEN.' unless Slack.config.token && !Slack.config.token.empty?
19
-
20
- if global_options['debug']
21
- require 'logger'
22
- logger = Logger.new(STDOUT)
23
- logger.level = Logger::DEBUG
24
- Slack::Web::Client.config.logger = logger
25
- end
26
-
27
- $client = Slack::Web::Client.new
28
-
29
- # Offline VCR cassette
30
- if global_options['vcr-cassette-name']
31
- require 'webmock'
32
- WebMock.enable!
33
- require 'vcr'
34
- VCR.configure do |config|
35
- config.cassette_library_dir = 'spec/fixtures/slack'
36
- config.hook_into :webmock
37
- config.default_cassette_options = { record: :new_episodes }
5
+ module Slack
6
+ module Cli
7
+ class App
8
+ extend GLI::App
9
+
10
+ program_desc 'Slack client.'
11
+
12
+ default_command :help
13
+
14
+ switch %i[d debug], desc: 'Enable debug-level logging.', default_value: false
15
+ flag [:t, 'slack-api-token'], desc: 'Slack API token.', default_value: ENV['SLACK_API_TOKEN']
16
+ flag ['vcr-cassette-name'], desc: 'Offline VCR cassette.'
17
+
18
+ commands_from File.expand_path('commands', __dir__)
19
+
20
+ pre do |global_options, _command, options, _args|
21
+ # global Slack configuration
22
+ Slack.config.token = global_options['slack-api-token']
23
+ help_now! 'Set Slack API token via --slack-api-token or SLACK_API_TOKEN.' unless Slack.config.token && !Slack.config.token.empty?
24
+
25
+ if global_options['debug']
26
+ require 'logger'
27
+ logger = Logger.new(STDOUT)
28
+ logger.level = Logger::DEBUG
29
+ Slack::Web::Client.config.logger = logger
30
+ end
31
+
32
+ @client = Slack::Web::Client.new
33
+
34
+ # Offline VCR cassette
35
+ if global_options['vcr-cassette-name']
36
+ require 'webmock'
37
+ WebMock.enable!
38
+ require 'vcr'
39
+ VCR.configure do |config|
40
+ config.cassette_library_dir = 'spec/fixtures/slack'
41
+ config.hook_into :webmock
42
+ config.default_cassette_options = { record: :new_episodes }
43
+ end
44
+ VCR.insert_cassette global_options['vcr-cassette-name']
45
+ end
46
+
47
+ # remove any nil values from options
48
+ options.compact!
49
+
50
+ true
51
+ end
38
52
  end
39
- VCR.insert_cassette global_options['vcr-cassette-name']
40
53
  end
41
-
42
- # remove any nil values from options
43
- options.compact!
44
-
45
- true
46
54
  end
47
55
 
48
- $LOAD_PATH.push File.expand_path(__dir__)
49
- require 'commands'
50
-
51
- exit run(ARGV)
56
+ exit Slack::Cli::App.run(ARGV)
data/lib/slack/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Slack
3
- VERSION = '2.0.0'
3
+ VERSION = '2.1.0'
4
4
  end
@@ -12,7 +12,7 @@ module Slack
12
12
  # @option options [string] :type
13
13
  # The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).
14
14
  # @option options [date] :date
15
- # Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC.
15
+ # Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC. Required unless metadata_only is set to true.
16
16
  # @option options [boolean] :metadata_only
17
17
  # Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.
18
18
  # @see https://api.slack.com/methods/admin.analytics.getFile
@@ -7,7 +7,7 @@ module Slack
7
7
  module Endpoints
8
8
  module AdminAppsRequests
9
9
  #
10
- # Cancel approval request for team
10
+ # Cancel app request for team
11
11
  #
12
12
  # @option options [string] :request_id
13
13
  # The id of the request to cancel.
@@ -18,6 +18,45 @@ module Slack
18
18
  post('admin.conversations.archive', options)
19
19
  end
20
20
 
21
+ #
22
+ # Archive public or private channels in bulk.
23
+ #
24
+ # @option options [array] :channel_ids
25
+ # An array of channel IDs to archive.
26
+ # @see https://api.slack.com/methods/admin.conversations.bulkArchive
27
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkArchive.json
28
+ def admin_conversations_bulkArchive(options = {})
29
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
30
+ post('admin.conversations.bulkArchive', options)
31
+ end
32
+
33
+ #
34
+ # Delete public or private channels in bulk
35
+ #
36
+ # @option options [array] :channel_ids
37
+ # An array of channel IDs.
38
+ # @see https://api.slack.com/methods/admin.conversations.bulkDelete
39
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkDelete.json
40
+ def admin_conversations_bulkDelete(options = {})
41
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
42
+ post('admin.conversations.bulkDelete', options)
43
+ end
44
+
45
+ #
46
+ # Move public or private channels in bulk.
47
+ #
48
+ # @option options [array] :channel_ids
49
+ # An array of channel IDs.
50
+ # @option options [string] :target_team_id
51
+ # Target team ID.
52
+ # @see https://api.slack.com/methods/admin.conversations.bulkMove
53
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkMove.json
54
+ def admin_conversations_bulkMove(options = {})
55
+ raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
56
+ raise ArgumentError, 'Required arguments :target_team_id missing' if options[:target_team_id].nil?
57
+ post('admin.conversations.bulkMove', options)
58
+ end
59
+
21
60
  #
22
61
  # Convert a public channel to a private channel.
23
62
  #
@@ -32,6 +71,18 @@ module Slack
32
71
  post('admin.conversations.convertToPrivate', options)
33
72
  end
34
73
 
74
+ #
75
+ # Convert a private channel to a public channel.
76
+ #
77
+ # @option options [Object] :channel_id
78
+ # The channel to convert to public.
79
+ # @see https://api.slack.com/methods/admin.conversations.convertToPublic
80
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.convertToPublic.json
81
+ def admin_conversations_convertToPublic(options = {})
82
+ raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
83
+ post('admin.conversations.convertToPublic', options)
84
+ end
85
+
35
86
  #
36
87
  # Create a public or private channel-based conversation.
37
88
  #
@@ -140,6 +191,33 @@ module Slack
140
191
  post('admin.conversations.invite', options)
141
192
  end
142
193
 
194
+ #
195
+ # Returns channels on the given team using the filters.
196
+ #
197
+ # @option options [integer] :last_message_activity_before
198
+ # Filter by public channels where the most recent message was sent before last_message_activity.
199
+ # @option options [array] :team_ids
200
+ # Array of team IDs to filter by.
201
+ # @option options [string] :cursor
202
+ # Set cursor to next_cursor returned in the previous call, to fetch the next page.
203
+ # @option options [integer] :limit
204
+ # Maximum number of results.
205
+ # @option options [integer] :max_member_count
206
+ # Filter by public channels with member count equal to or less than the specified number.
207
+ # @see https://api.slack.com/methods/admin.conversations.lookup
208
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.lookup.json
209
+ def admin_conversations_lookup(options = {})
210
+ raise ArgumentError, 'Required arguments :last_message_activity_before missing' if options[:last_message_activity_before].nil?
211
+ raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
212
+ if block_given?
213
+ Pagination::Cursor.new(self, :admin_conversations_lookup, options).each do |page|
214
+ yield page
215
+ end
216
+ else
217
+ post('admin.conversations.lookup', options)
218
+ end
219
+ end
220
+
143
221
  #
144
222
  # This API endpoint can be used by any admin to remove a conversation's retention policy.
145
223
  #
@@ -0,0 +1,73 @@
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 AdminRoles
9
+ #
10
+ # Adds members to the specified role with the specified scopes
11
+ #
12
+ # @option options [array] :entity_ids
13
+ # List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
14
+ # @option options [string] :role_id
15
+ # ID of the role to which users will be assigned.
16
+ # @option options [array] :user_ids
17
+ # List of IDs from the users to be added to the given role.
18
+ # @see https://api.slack.com/methods/admin.roles.addAssignments
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.addAssignments.json
20
+ def admin_roles_addAssignments(options = {})
21
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
22
+ raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
23
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
24
+ post('admin.roles.addAssignments', options)
25
+ end
26
+
27
+ #
28
+ # Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities
29
+ #
30
+ # @option options [string] :cursor
31
+ # Set cursor to next_cursor returned by the previous call to list items in the next page.
32
+ # @option options [array] :entity_ids
33
+ # The entities for which the roles apply.
34
+ # @option options [integer] :limit
35
+ # The maximum number of items to return. Must be between 1 - 100 both inclusive.
36
+ # @option options [array] :role_ids
37
+ # collection of role ids to scope results by.
38
+ # @option options [string] :sort_dir
39
+ # Sort direction. Default is descending on date_create, can be either ASC or DESC.
40
+ # @see https://api.slack.com/methods/admin.roles.listAssignments
41
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.listAssignments.json
42
+ def admin_roles_listAssignments(options = {})
43
+ if block_given?
44
+ Pagination::Cursor.new(self, :admin_roles_listAssignments, options).each do |page|
45
+ yield page
46
+ end
47
+ else
48
+ post('admin.roles.listAssignments', options)
49
+ end
50
+ end
51
+
52
+ #
53
+ # Removes a set of users from a role for the given scopes and entities
54
+ #
55
+ # @option options [array] :entity_ids
56
+ # List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
57
+ # @option options [string] :role_id
58
+ # ID of the role to which users will be assigned.
59
+ # @option options [array] :user_ids
60
+ # List of IDs of the users whose roles will be revoked.
61
+ # @see https://api.slack.com/methods/admin.roles.removeAssignments
62
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.removeAssignments.json
63
+ def admin_roles_removeAssignments(options = {})
64
+ raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
65
+ raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
66
+ raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
67
+ post('admin.roles.removeAssignments', options)
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -101,7 +101,7 @@ module Slack
101
101
  # @option options [user] :user
102
102
  # id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.
103
103
  # @option options [boolean] :as_user
104
- # Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.
104
+ # (Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.
105
105
  # @option options [string] :attachments
106
106
  # A JSON-based array of structured attachments, presented as a URL-encoded string.
107
107
  # @option options [blocks[] as string] :blocks
@@ -152,7 +152,7 @@ module Slack
152
152
  # @option options [string] :text
153
153
  # The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications.
154
154
  # @option options [boolean] :as_user
155
- # Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See authorship below.
155
+ # (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic Slack apps. See authorship below.
156
156
  # @option options [string] :icon_emoji
157
157
  # Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
158
158
  # @option options [string] :icon_url
@@ -19,7 +19,7 @@ module Slack
19
19
  # See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation.
20
20
  # @option options [boolean] :is_private
21
21
  # Whether the channel should be private.
22
- # @option options [string] :team_id
22
+ # @option options [Object] :team_id
23
23
  # The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the team_id argument is required.
24
24
  # @see https://api.slack.com/methods/conversations.acceptSharedInvite
25
25
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.acceptSharedInvite.json
@@ -9,6 +9,8 @@ module Slack
9
9
  #
10
10
  # Lists custom emoji for a team.
11
11
  #
12
+ # @option options [boolean] :include_categories
13
+ # Include a list of categories for Unicode emoji and the emoji in each category.
12
14
  # @see https://api.slack.com/methods/emoji.list
13
15
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json
14
16
  def emoji_list(options = {})
@@ -99,8 +99,6 @@ module Slack
99
99
  #
100
100
  # @option options [channel] :channel
101
101
  # Filter files appearing in a specific channel, indicated by its ID.
102
- # @option options [string] :files
103
- # .
104
102
  # @option options [boolean] :show_files_hidden_by_limit
105
103
  # Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.
106
104
  # @option options [string] :team_id
@@ -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 FunctionsWorkflowsSteps
9
+ #
10
+ # List the steps of a specific function of a workflow's versions
11
+ #
12
+ # @option options [string] :function_id
13
+ # .
14
+ # @option options [string] :workflow
15
+ # The workflow encoded ID or workflow reference.
16
+ # @option options [string] :workflow_id
17
+ # The workflow ID, starts with Wf*.
18
+ # @see https://api.slack.com/methods/functions.workflows.steps.list
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps/functions.workflows.steps.list.json
20
+ def functions_workflows_steps_list(options = {})
21
+ raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
22
+ post('functions.workflows.steps.list', options)
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -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 FunctionsWorkflowsStepsResponses
9
+ #
10
+ # Download form responses of a workflow
11
+ #
12
+ # @option options [string] :step_id
13
+ # .
14
+ # @option options [string] :workflow
15
+ # The workflow encoded ID or workflow reference.
16
+ # @option options [string] :workflow_id
17
+ # The workflow ID, starts with Wf*.
18
+ # @see https://api.slack.com/methods/functions.workflows.steps.responses.export
19
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.workflows.steps.responses/functions.workflows.steps.responses.export.json
20
+ def functions_workflows_steps_responses_export(options = {})
21
+ raise ArgumentError, 'Required arguments :step_id missing' if options[:step_id].nil?
22
+ post('functions.workflows.steps.responses.export', 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 [channel] :channel
13
13
  # Channel to pin the messsage to. You must also include a timestamp when pinning messages.
14
+ # @option options [string] :quip_component_id
15
+ # Component ID for the pins component that was inserted into the channel canvas, if any.
14
16
  # @option options [string] :timestamp
15
17
  # Timestamp of the message to pin. You must also include the channel.
16
18
  # @see https://api.slack.com/methods/pins.add
@@ -22,6 +22,10 @@ module Slack
22
22
  #
23
23
  # Gets billable users information for the current team.
24
24
  #
25
+ # @option options [string] :cursor
26
+ # Set cursor to next_cursor returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.
27
+ # @option options [integer] :limit
28
+ # The maximum number of items to return.
25
29
  # @option options [string] :team_id
26
30
  # encoded team id to get the billable information from, required if org token is used.
27
31
  # @option options [user] :user
@@ -30,7 +34,13 @@ module Slack
30
34
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.billableInfo.json
31
35
  def team_billableInfo(options = {})
32
36
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
33
- post('team.billableInfo', options)
37
+ if block_given?
38
+ Pagination::Cursor.new(self, :team_billableInfo, options).each do |page|
39
+ yield page
40
+ end
41
+ else
42
+ post('team.billableInfo', options)
43
+ end
34
44
  end
35
45
 
36
46
  #
@@ -36,7 +36,7 @@ module Slack
36
36
  # @option options [boolean] :include_count
37
37
  # Include the number of users in the User Group.
38
38
  # @option options [Object] :team_id
39
- # Encoded team id where the user group is, required if org token is used.
39
+ # Encoded target team id where the user group is, required if org token is used.
40
40
  # @see https://api.slack.com/methods/usergroups.disable
41
41
  # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.disable.json
42
42
  def usergroups_disable(options = {})
@@ -28,7 +28,7 @@ module Slack
28
28
  # @option options [string] :profile
29
29
  # Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
30
30
  # @option options [user] :user
31
- # ID of user to change. This argument may only be specified by team admins on paid teams.
31
+ # ID of user to change. This argument may only be specified by admins on paid teams.
32
32
  # @option options [string] :value
33
33
  # Value to set a single key to. Usable only if profile is not passed.
34
34
  # @see https://api.slack.com/methods/users.profile.set
@@ -16,6 +16,7 @@ require_relative 'endpoints/admin_emoji'
16
16
  require_relative 'endpoints/admin_inviteRequests'
17
17
  require_relative 'endpoints/admin_inviteRequests_approved'
18
18
  require_relative 'endpoints/admin_inviteRequests_denied'
19
+ require_relative 'endpoints/admin_roles'
19
20
  require_relative 'endpoints/admin_teams'
20
21
  require_relative 'endpoints/admin_teams_admins'
21
22
  require_relative 'endpoints/admin_teams_owners'
@@ -44,6 +45,8 @@ require_relative 'endpoints/emoji'
44
45
  require_relative 'endpoints/files'
45
46
  require_relative 'endpoints/files_comments'
46
47
  require_relative 'endpoints/files_remote'
48
+ require_relative 'endpoints/functions_workflows_steps'
49
+ require_relative 'endpoints/functions_workflows_steps_responses'
47
50
  require_relative 'endpoints/migration'
48
51
  require_relative 'endpoints/oauth'
49
52
  require_relative 'endpoints/oauth_v2'
@@ -90,6 +93,7 @@ module Slack
90
93
  include AdminInviterequests
91
94
  include AdminInviterequestsApproved
92
95
  include AdminInviterequestsDenied
96
+ include AdminRoles
93
97
  include AdminTeams
94
98
  include AdminTeamsAdmins
95
99
  include AdminTeamsOwners
@@ -118,6 +122,8 @@ module Slack
118
122
  include Files
119
123
  include FilesComments
120
124
  include FilesRemote
125
+ include FunctionsWorkflowsSteps
126
+ include FunctionsWorkflowsStepsResponses
121
127
  include Migration
122
128
  include Oauth
123
129
  include OauthV2