slack-ruby-client 3.1.0 → 3.3.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.
- checksums.yaml +4 -4
- data/.github/prompts/changelog-entries.prompt.yml +32 -0
- data/.github/workflows/danger-comment.yml +11 -0
- data/.github/workflows/danger.yml +13 -0
- data/.github/workflows/lint.yml +3 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/update_api.yml +94 -16
- data/.rubocop.yml +2 -1
- data/.rubocop_todo.yml +18 -4
- data/AGENTS.md +12 -0
- data/CHANGELOG.md +43 -1
- data/CONTRIBUTING.md +10 -1
- data/Dangerfile +4 -1
- data/Gemfile +20 -5
- data/README.md +47 -2
- data/RELEASING.md +2 -2
- data/Rakefile +7 -3
- data/UPGRADING.md +16 -0
- data/bin/commands/admin_analytics_messages.rb +36 -0
- data/bin/commands/admin_apps.rb +3 -0
- data/bin/commands/admin_apps_mcp_servers.rb +21 -0
- data/bin/commands/admin_apps_mcp_servers_permissions.rb +33 -0
- data/bin/commands/admin_apps_permissions.rb +58 -0
- data/bin/commands/admin_conversations.rb +20 -0
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_functions_permissions.rb +1 -0
- data/bin/commands/admin_usergroups.rb +74 -0
- data/bin/commands/admin_users.rb +10 -8
- data/bin/commands/admin_users_session.rb +0 -1
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
- data/bin/commands/agents_sessions.rb +38 -0
- data/bin/commands/apps_icon.rb +22 -0
- data/bin/commands/apps_managed_permissions.rb +21 -0
- data/bin/commands/apps_manifest.rb +7 -6
- data/bin/commands/apps_user_connection.rb +21 -0
- data/bin/commands/assistant_search.rb +3 -2
- data/bin/commands/assistant_threads.rb +6 -3
- data/bin/commands/blocks.rb +22 -0
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/canvases.rb +12 -2
- data/bin/commands/chat.rb +17 -7
- data/bin/commands/conversations.rb +2 -2
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/entity.rb +27 -0
- data/bin/commands/files.rb +5 -2
- data/bin/commands/oauth_v2.rb +22 -0
- data/bin/commands/oauth_v2_user.rb +27 -0
- data/bin/commands/openid_connect.rb +1 -0
- data/bin/commands/slackLists_download.rb +6 -0
- data/bin/commands/slackLists_items.rb +1 -0
- data/bin/commands/users.rb +3 -2
- data/bin/commands/views.rb +1 -0
- data/bin/slack +5 -1
- data/examples/files_upload_v2/files_upload_v2.rb +1 -1
- data/examples/hi_web/hi.rb +1 -1
- data/examples/new_ticket/new_ticket.rb +1 -1
- data/examples/oauth_v2/oauth_v2.rb +6 -6
- data/lib/slack/events/config.rb +1 -1
- data/lib/slack/events/request.rb +2 -2
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +6 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers.rb +31 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers_permissions.rb +46 -0
- data/lib/slack/web/api/endpoints/admin_apps_permissions.rb +83 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +30 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -1
- data/lib/slack/web/api/endpoints/admin_functions.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +2 -1
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +111 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +11 -6
- data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -2
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
- data/lib/slack/web/api/endpoints/agents_sessions.rb +54 -0
- data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
- data/lib/slack/web/api/endpoints/apps_managed_permissions.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
- data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +3 -1
- data/lib/slack/web/api/endpoints/assistant_threads.rb +9 -4
- data/lib/slack/web/api/endpoints/blocks.rb +28 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
- data/lib/slack/web/api/endpoints/canvases.rb +16 -2
- data/lib/slack/web/api/endpoints/chat.rb +39 -17
- data/lib/slack/web/api/endpoints/conversations.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/entity.rb +48 -0
- data/lib/slack/web/api/endpoints/files.rb +8 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +35 -0
- data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +12 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +2 -0
- data/lib/slack/web/api/endpoints/users.rb +3 -2
- data/lib/slack/web/api/endpoints/views.rb +1 -0
- data/lib/slack/web/api/endpoints.rb +20 -0
- data/lib/slack/web/api/errors/server_error.rb +1 -1
- data/lib/slack/web/api/errors/slack_error.rb +1 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -1
- data/lib/slack/web/api/errors.rb +230 -6
- data/lib/slack/web/api/helpers/files.rb +2 -2
- data/lib/slack/web/api/mixins/conversations.id.rb +2 -1
- data/lib/slack/web/api/mixins/ids.id.rb +3 -1
- data/lib/slack/web/api/mixins/users.id.rb +2 -1
- data/lib/slack/web/api/mixins/users.search.rb +1 -1
- data/lib/slack/web/api/patches/files.default-filename.patch +12 -0
- data/lib/slack/web/api/templates/method.erb +3 -1
- data/lib/slack/web/api/templates/method_spec.erb +32 -3
- data/lib/slack/web/client.rb +29 -0
- data/lib/slack/web/faraday/request.rb +22 -2
- data/lib/tasks/web.rake +5 -2
- data/slack-ruby-client.gemspec +0 -1
- metadata +32 -19
- data/.github/workflows/pr_lint.yml +0 -21
- data/Gemfile.danger +0 -6
data/bin/commands/bookmarks.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Slack
|
|
|
9
9
|
g.desc 'Add bookmark to a channel.'
|
|
10
10
|
g.long_desc %( Add bookmark to a channel. )
|
|
11
11
|
g.command 'add' do |c|
|
|
12
|
-
c.flag 'channel_id', desc: 'Channel to add bookmark in.'
|
|
12
|
+
c.flag 'channel_id', desc: 'Channel to add bookmark in. Required for public channels.'
|
|
13
13
|
c.flag 'title', desc: 'Title for the bookmark.'
|
|
14
14
|
c.flag 'link', desc: 'Link to bookmark.'
|
|
15
15
|
c.flag 'type', desc: 'Type of the bookmark i.e link.'
|
|
@@ -25,8 +25,8 @@ module Slack
|
|
|
25
25
|
g.desc 'Edit bookmark.'
|
|
26
26
|
g.long_desc %( Edit bookmark. )
|
|
27
27
|
g.command 'edit' do |c|
|
|
28
|
-
c.flag 'channel_id', desc: 'Channel to update bookmark in.'
|
|
29
|
-
c.flag 'bookmark_id', desc: 'Bookmark to update.'
|
|
28
|
+
c.flag 'channel_id', desc: 'Channel to update bookmark in. Required for public channels.'
|
|
29
|
+
c.flag 'bookmark_id', desc: 'Bookmark to update. Required for public channels.'
|
|
30
30
|
c.flag 'title', desc: 'Title for the bookmark.'
|
|
31
31
|
c.flag 'link', desc: 'Link to bookmark.'
|
|
32
32
|
c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
|
|
@@ -38,7 +38,7 @@ module Slack
|
|
|
38
38
|
g.desc 'List bookmark for the channel.'
|
|
39
39
|
g.long_desc %( List bookmark for the channel. )
|
|
40
40
|
g.command 'list' do |c|
|
|
41
|
-
c.flag 'channel_id', desc: 'Channel to list bookmarks in.'
|
|
41
|
+
c.flag 'channel_id', desc: 'Channel to list bookmarks in. Required for public channels.'
|
|
42
42
|
c.action do |_global_options, options, _args|
|
|
43
43
|
puts JSON.dump(@client.bookmarks_list(options))
|
|
44
44
|
end
|
|
@@ -47,8 +47,8 @@ module Slack
|
|
|
47
47
|
g.desc 'Remove bookmark from the channel.'
|
|
48
48
|
g.long_desc %( Remove bookmark from the channel. )
|
|
49
49
|
g.command 'remove' do |c|
|
|
50
|
-
c.flag 'channel_id', desc: 'Channel to remove bookmark.'
|
|
51
|
-
c.flag 'bookmark_id', desc: 'Bookmark to remove.'
|
|
50
|
+
c.flag 'channel_id', desc: 'Channel to remove bookmark. Required for public channels.'
|
|
51
|
+
c.flag 'bookmark_id', desc: 'Bookmark to remove. Required for public channels.'
|
|
52
52
|
c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
|
|
53
53
|
c.action do |_global_options, options, _args|
|
|
54
54
|
puts JSON.dump(@client.bookmarks_remove(options))
|
data/bin/commands/canvases.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Slack
|
|
|
10
10
|
g.long_desc %( Create canvas for a user )
|
|
11
11
|
g.command 'create' do |c|
|
|
12
12
|
c.flag 'title', desc: 'Title of the newly created canvas.'
|
|
13
|
-
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
|
|
13
|
+
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).'
|
|
14
14
|
c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.'
|
|
15
15
|
c.action do |_global_options, options, _args|
|
|
16
16
|
puts JSON.dump(@client.canvases_create(options))
|
|
@@ -30,11 +30,21 @@ module Slack
|
|
|
30
30
|
g.long_desc %( Update an existing canvas )
|
|
31
31
|
g.command 'edit' do |c|
|
|
32
32
|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
|
|
33
|
-
c.flag 'changes', desc: 'List of changes to apply on the specified canvas.'
|
|
33
|
+
c.flag 'changes', desc: 'List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters).'
|
|
34
34
|
c.action do |_global_options, options, _args|
|
|
35
35
|
puts JSON.dump(@client.canvases_edit(options))
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
|
+
|
|
39
|
+
g.desc 'Get the content of a canvas as markdown (default) or HTML.'
|
|
40
|
+
g.long_desc %( Get the content of a canvas as markdown (default) or HTML. )
|
|
41
|
+
g.command 'getContent' do |c|
|
|
42
|
+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
|
|
43
|
+
c.flag 'content_type', desc: 'Format in which to return the canvas content. Defaults to markdown.'
|
|
44
|
+
c.action do |_global_options, options, _args|
|
|
45
|
+
puts JSON.dump(@client.canvases_getContent(options))
|
|
46
|
+
end
|
|
47
|
+
end
|
|
38
48
|
end
|
|
39
49
|
end
|
|
40
50
|
end
|
data/bin/commands/chat.rb
CHANGED
|
@@ -10,6 +10,7 @@ module Slack
|
|
|
10
10
|
g.long_desc %( Appends text to an existing streaming conversation. )
|
|
11
11
|
g.command 'appendStream' do |c|
|
|
12
12
|
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
|
|
13
|
+
c.flag 'chunks', desc: 'Array of streaming chunks.'
|
|
13
14
|
c.flag 'ts', desc: 'The timestamp of the streaming message.'
|
|
14
15
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far.'
|
|
15
16
|
c.action do |_global_options, options, _args|
|
|
@@ -81,6 +82,7 @@ module Slack
|
|
|
81
82
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
|
|
82
83
|
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
|
|
83
84
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
|
85
|
+
c.flag 'metadata', desc: 'JSON object with an entities array of work object entity metadata, presented as a URL-encoded string. Only entity metadata is supported: ephemeral messages are not persisted and never dispatch message_metadata_* events, so event_type/event_payload message metadata is ignored here. Each entity requires entity_type, entity_payload, external_ref, and url.'
|
|
84
86
|
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
|
|
85
87
|
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
|
86
88
|
c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread."
|
|
@@ -103,7 +105,7 @@ module Slack
|
|
|
103
105
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
|
|
104
106
|
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
|
|
105
107
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
|
106
|
-
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
|
108
|
+
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
|
107
109
|
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
|
|
108
110
|
c.flag 'parse', desc: 'Change how messages are treated. See below.'
|
|
109
111
|
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
|
|
@@ -112,6 +114,7 @@ module Slack
|
|
|
112
114
|
c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
|
|
113
115
|
c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
|
|
114
116
|
c.flag 'username', desc: "Set your bot's user name."
|
|
117
|
+
c.flag 'unfurl_app_links', desc: 'Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the unfurl_links setting.'
|
|
115
118
|
c.action do |_global_options, options, _args|
|
|
116
119
|
puts JSON.dump(@client.chat_postMessage(options))
|
|
117
120
|
end
|
|
@@ -142,11 +145,16 @@ module Slack
|
|
|
142
145
|
g.desc 'Starts a new streaming conversation.'
|
|
143
146
|
g.long_desc %( Starts a new streaming conversation. )
|
|
144
147
|
g.command 'startStream' do |c|
|
|
145
|
-
c.flag 'channel', desc: 'An encoded ID that represents a channel,
|
|
148
|
+
c.flag 'channel', desc: 'An encoded ID that represents a channel, thread, or DM.'
|
|
149
|
+
c.flag 'chunks', desc: 'Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.'
|
|
146
150
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
|
|
147
|
-
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to.
|
|
151
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to reply to. Omit it to stream a top-level message instead of a thread reply; this is only supported in channels where the whole channel is one session, such as Slack Code, and returns invalid_thread_ts elsewhere. Passing '0' is equivalent to omitting it."
|
|
148
152
|
c.flag 'recipient_user_id', desc: 'The encoded ID of the user to receive the streaming text. Required when streaming to channels.'
|
|
149
153
|
c.flag 'recipient_team_id', desc: 'The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.'
|
|
154
|
+
c.flag 'task_display_mode', desc: 'Specifies how tasks are displayed in the message. timeline task updates render as individual task cards interleaved with streamed text. plan task updates render together in a plan block.'
|
|
155
|
+
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
|
|
156
|
+
c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.'
|
|
157
|
+
c.flag 'username', desc: "The bot's username to display."
|
|
150
158
|
c.action do |_global_options, options, _args|
|
|
151
159
|
puts JSON.dump(@client.chat_startStream(options))
|
|
152
160
|
end
|
|
@@ -156,10 +164,12 @@ module Slack
|
|
|
156
164
|
g.long_desc %( Stops a streaming conversation. )
|
|
157
165
|
g.command 'stopStream' do |c|
|
|
158
166
|
c.flag 'channel', desc: 'An encoded ID that represents a channel, private group, or DM.'
|
|
167
|
+
c.flag 'chunks', desc: 'Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.'
|
|
159
168
|
c.flag 'ts', desc: 'The timestamp of the streaming message.'
|
|
160
169
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. Limit this field to 12,000 characters.'
|
|
161
170
|
c.flag 'blocks', desc: 'A list of blocks that will be rendered at the bottom of the finalized message.'
|
|
162
171
|
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
|
172
|
+
c.flag 'session_status', desc: 'The session status to set after stopping the stream.'
|
|
163
173
|
c.action do |_global_options, options, _args|
|
|
164
174
|
puts JSON.dump(@client.chat_stopStream(options))
|
|
165
175
|
end
|
|
@@ -168,16 +178,15 @@ module Slack
|
|
|
168
178
|
g.desc 'Provide custom unfurl behavior for user-posted URLs'
|
|
169
179
|
g.long_desc %( Provide custom unfurl behavior for user-posted URLs )
|
|
170
180
|
g.command 'unfurl' do |c|
|
|
171
|
-
c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
|
|
172
|
-
c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
|
|
173
|
-
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the
|
|
181
|
+
c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together. Required for public channels.'
|
|
182
|
+
c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to. Required for public channels.'
|
|
183
|
+
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the message, pointing to their unfurl blocks or message attachments. Required for public channels.'
|
|
174
184
|
c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
|
|
175
185
|
c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
|
|
176
186
|
c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
|
|
177
187
|
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
|
|
178
188
|
c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
|
|
179
189
|
c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
|
|
180
|
-
c.flag 'metadata', desc: 'JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.'
|
|
181
190
|
c.action do |_global_options, options, _args|
|
|
182
191
|
puts JSON.dump(@client.chat_unfurl(options))
|
|
183
192
|
end
|
|
@@ -188,6 +197,7 @@ module Slack
|
|
|
188
197
|
g.command 'update' do |c|
|
|
189
198
|
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
|
|
190
199
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
|
200
|
+
c.flag 'unfurled_attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
|
191
201
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
|
192
202
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
|
193
203
|
c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
|
|
@@ -24,7 +24,7 @@ module Slack
|
|
|
24
24
|
g.long_desc %( Approves an invitation to a Slack Connect channel )
|
|
25
25
|
g.command 'approveSharedInvite' do |c|
|
|
26
26
|
c.flag 'invite_id', desc: 'ID of the shared channel invite to approve.'
|
|
27
|
-
c.flag 'target_team', desc: 'The team or enterprise
|
|
27
|
+
c.flag 'target_team', desc: 'The team or enterprise ID of the receiving party involved in the invitation you are approving.'
|
|
28
28
|
c.action do |_global_options, options, _args|
|
|
29
29
|
puts JSON.dump(@client.conversations_approveSharedInvite(options))
|
|
30
30
|
end
|
|
@@ -100,7 +100,7 @@ module Slack
|
|
|
100
100
|
g.command 'invite' do |c|
|
|
101
101
|
c.flag 'channel', desc: 'The ID of the public or private channel to invite user(s) to.'
|
|
102
102
|
c.flag 'force', desc: 'When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.'
|
|
103
|
-
c.flag 'users', desc: 'A comma separated list of user IDs. Up to
|
|
103
|
+
c.flag 'users', desc: 'A comma separated list of user IDs. Up to 1000 users may be listed.'
|
|
104
104
|
c.action do |_global_options, options, _args|
|
|
105
105
|
puts JSON.dump(@client.conversations_invite(options))
|
|
106
106
|
end
|
|
@@ -10,7 +10,7 @@ module Slack
|
|
|
10
10
|
g.long_desc %( Create a channel canvas for a channel )
|
|
11
11
|
g.command 'create' do |c|
|
|
12
12
|
c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in.'
|
|
13
|
-
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
|
|
13
|
+
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).'
|
|
14
14
|
c.flag 'title', desc: 'Title of the newly created canvas.'
|
|
15
15
|
c.action do |_global_options, options, _args|
|
|
16
16
|
puts JSON.dump(@client.conversations_canvases_create(options))
|
data/bin/commands/entity.rb
CHANGED
|
@@ -6,6 +6,33 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'Entity methods.'
|
|
8
8
|
command 'entity' do |g|
|
|
9
|
+
g.desc 'Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user.'
|
|
10
|
+
g.long_desc %( Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user. )
|
|
11
|
+
g.command 'acknowledgeCommentAction' do |c|
|
|
12
|
+
c.flag 'trigger_id', desc: 'A reference to the original user action that initiated the comment mutation.'
|
|
13
|
+
c.flag 'comment', desc: 'The full comment data. Required for edit and post actions. See the comment schema for the full list of properties.'
|
|
14
|
+
c.flag 'error', desc: 'Error message if the action failed in the app. When present, signals that the mutation could not be completed.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.entity_acknowledgeCommentAction(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
g.desc 'Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client.'
|
|
21
|
+
g.long_desc %( Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client. )
|
|
22
|
+
g.command 'presentComments' do |c|
|
|
23
|
+
c.flag 'comments', desc: 'Array of comments to present to the user. See the comment schema for the full list of properties.'
|
|
24
|
+
c.flag 'cursor', desc: 'App supplied cursor used for pagination, will be sent in the next request for comments.'
|
|
25
|
+
c.flag 'can_post_comment', desc: 'Indicates whether the user has permissions to post comments.'
|
|
26
|
+
c.flag 'trigger_id', desc: 'A reference to the original user action that initiated the request.'
|
|
27
|
+
c.flag 'delete_action_id', desc: 'The block action id that will be sent when a delete request is initiated for a comment.'
|
|
28
|
+
c.flag 'user_auth_required', desc: 'Set to true (or 1) to indicate that the user must authenticate to see the comments data.'
|
|
29
|
+
c.flag 'user_auth_url', desc: 'A custom URL to which users are directed for authentication if required.'
|
|
30
|
+
c.flag 'error', desc: ''
|
|
31
|
+
c.action do |_global_options, options, _args|
|
|
32
|
+
puts JSON.dump(@client.entity_presentComments(options))
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
9
36
|
g.desc 'Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.'
|
|
10
37
|
g.long_desc %( Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. )
|
|
11
38
|
g.command 'presentDetails' do |c|
|
data/bin/commands/files.rb
CHANGED
|
@@ -15,6 +15,9 @@ module Slack
|
|
|
15
15
|
c.flag 'channels', desc: 'Comma-separated string of channel IDs or user IDs where the file will be shared.'
|
|
16
16
|
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
|
17
17
|
c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
|
|
18
|
+
c.flag 'username', desc: "Set your bot's user name for the file share message. Requires the chat:write.customize scope."
|
|
19
|
+
c.flag 'icon_url', desc: 'URL to an image to use as the icon for the file share message. Requires the chat:write.customize scope.'
|
|
20
|
+
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for the file share message. Overrides icon_url. Requires the chat:write.customize scope.'
|
|
18
21
|
c.action do |_global_options, options, _args|
|
|
19
22
|
puts JSON.dump(@client.files_completeUploadExternal(options))
|
|
20
23
|
end
|
|
@@ -63,8 +66,8 @@ module Slack
|
|
|
63
66
|
end
|
|
64
67
|
end
|
|
65
68
|
|
|
66
|
-
g.desc 'List for a team, in a channel, or from a user with applied filters.'
|
|
67
|
-
g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
|
|
69
|
+
g.desc 'List files for a team, in a channel, or from a user with applied filters.'
|
|
70
|
+
g.long_desc %( List files for a team, in a channel, or from a user with applied filters. )
|
|
68
71
|
g.command 'list' do |c|
|
|
69
72
|
c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
|
|
70
73
|
c.flag 'show_files_hidden_by_limit', desc: 'Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.'
|
data/bin/commands/oauth_v2.rb
CHANGED
|
@@ -16,11 +16,33 @@ module Slack
|
|
|
16
16
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
|
17
17
|
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
|
18
18
|
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
|
19
|
+
c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
|
|
19
20
|
c.action do |_global_options, options, _args|
|
|
20
21
|
puts JSON.dump(@client.oauth_v2_access(options))
|
|
21
22
|
end
|
|
22
23
|
end
|
|
23
24
|
|
|
25
|
+
g.desc 'Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change.'
|
|
26
|
+
g.long_desc %( Call this to rotate the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.completeShortTokenRotation to confirm the change. )
|
|
27
|
+
g.command 'beginShortTokenRotation' do |c|
|
|
28
|
+
c.flag 'client_id', desc: 'Issued when you created your application. Must be the app the token being rotated was issued to.'
|
|
29
|
+
c.flag 'client_secret', desc: 'Issued when you created your application.'
|
|
30
|
+
c.action do |_global_options, options, _args|
|
|
31
|
+
puts JSON.dump(@client.oauth_v2_beginShortTokenRotation(options))
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
g.desc 'Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process.'
|
|
36
|
+
g.long_desc %( Call this to finish rotating the secret on an old API token with a short secret. Must be paired with a call to oauth.v2.beginShortTokenRotation to start the process. )
|
|
37
|
+
g.command 'completeShortTokenRotation' do |c|
|
|
38
|
+
c.flag 'client_id', desc: 'Issued when you created your application. Must be the app the token being rotated was issued to.'
|
|
39
|
+
c.flag 'client_secret', desc: 'Issued when you created your application.'
|
|
40
|
+
c.flag 'new_token', desc: 'The new xoxp token returned by oauth.v2.beginShortTokenRotation.'
|
|
41
|
+
c.action do |_global_options, options, _args|
|
|
42
|
+
puts JSON.dump(@client.oauth_v2_completeShortTokenRotation(options))
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
24
46
|
g.desc 'Exchanges a legacy access token for a new expiring access token and refresh token'
|
|
25
47
|
g.long_desc %( Exchanges a legacy access token for a new expiring access token and refresh token )
|
|
26
48
|
g.command 'exchange' do |c|
|
|
@@ -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 Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'OauthV2User methods.'
|
|
8
|
+
command 'oauth_v2_user' do |g|
|
|
9
|
+
g.desc 'Exchanges a temporary OAuth verifier code for a user access token.'
|
|
10
|
+
g.long_desc %( Exchanges a temporary OAuth verifier code for a user access token. )
|
|
11
|
+
g.command 'access' do |c|
|
|
12
|
+
c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
|
13
|
+
c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
|
14
|
+
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
|
|
15
|
+
c.flag 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
|
|
16
|
+
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
|
17
|
+
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
|
18
|
+
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
|
19
|
+
c.flag 'assertion', desc: 'Identity assertion JWT authorization grant.'
|
|
20
|
+
c.action do |_global_options, options, _args|
|
|
21
|
+
puts JSON.dump(@client.oauth_v2_user_access(options))
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -15,6 +15,7 @@ module Slack
|
|
|
15
15
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
|
16
16
|
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
|
17
17
|
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
|
18
|
+
c.flag 'code_verifier', desc: 'PKCE code verifier (RFC 7636). Required when the authorization request included a code_challenge.'
|
|
18
19
|
c.action do |_global_options, options, _args|
|
|
19
20
|
puts JSON.dump(@client.openid_connect_token(options))
|
|
20
21
|
end
|
|
@@ -11,6 +11,9 @@ module Slack
|
|
|
11
11
|
g.command 'get' do |c|
|
|
12
12
|
c.flag 'list_id', desc: 'ID of the List to export.'
|
|
13
13
|
c.flag 'job_id', desc: 'The ID of the recently started job to export the List.'
|
|
14
|
+
c.flag 'format', desc: 'Format the export was started with. Must match the format passed to slackLists.download.start. Defaults to csv.'
|
|
15
|
+
c.flag 'include_threads', desc: 'Must match the include_threads passed to slackLists.download.start. The returned download_url carries this through so the served export matches what was generated. Only applies when format is json.'
|
|
16
|
+
c.flag 'include_attachments', desc: 'Must match the include_attachments passed to slackLists.download.start. The returned download_url carries this through so the served export matches what was generated. Only applies when format is json.'
|
|
14
17
|
c.action do |_global_options, options, _args|
|
|
15
18
|
puts JSON.dump(@client.slackLists_download_get(options))
|
|
16
19
|
end
|
|
@@ -21,6 +24,9 @@ module Slack
|
|
|
21
24
|
g.command 'start' do |c|
|
|
22
25
|
c.flag 'list_id', desc: 'ID of the List to export.'
|
|
23
26
|
c.flag 'include_archived', desc: ''
|
|
27
|
+
c.flag 'format', desc: 'Format of the export. Defaults to csv for backward compatibility. Use json for a complete, hierarchical export.'
|
|
28
|
+
c.flag 'include_threads', desc: "Include each item's conversation thread in the export. Only applies when format is json."
|
|
29
|
+
c.flag 'include_attachments', desc: 'Include file attachment metadata and access paths in the export. Only applies when format is json.'
|
|
24
30
|
c.action do |_global_options, options, _args|
|
|
25
31
|
puts JSON.dump(@client.slackLists_download_start(options))
|
|
26
32
|
end
|
|
@@ -56,6 +56,7 @@ module Slack
|
|
|
56
56
|
c.flag 'limit', desc: 'The maximum number of records to return.'
|
|
57
57
|
c.flag 'cursor', desc: 'Next cursor for pagination.'
|
|
58
58
|
c.flag 'archived', desc: 'Boolean indicating whether archived items or normal items should be returned.'
|
|
59
|
+
c.flag 'include_list', desc: 'Set to true to also return the parent list object, including its title, column schema, and total row count. Defaults to false to keep the response small.'
|
|
59
60
|
c.action do |_global_options, options, _args|
|
|
60
61
|
puts JSON.dump(@client.slackLists_items_list(options))
|
|
61
62
|
end
|
data/bin/commands/users.rb
CHANGED
|
@@ -6,11 +6,12 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'Users methods.'
|
|
8
8
|
command 'users' do |g|
|
|
9
|
-
g.desc 'List conversations the calling user
|
|
10
|
-
g.long_desc %( List conversations the calling user
|
|
9
|
+
g.desc 'List conversations the calling user is a member of.'
|
|
10
|
+
g.long_desc %( List conversations the calling user is a member of. )
|
|
11
11
|
g.command 'conversations' do |c|
|
|
12
12
|
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
|
13
13
|
c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
|
|
14
|
+
c.flag 'exclude_muted', desc: 'Set to true to exclude muted channels from the list.'
|
|
14
15
|
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer with a max value of 999."
|
|
15
16
|
c.flag 'team_id', desc: 'encoded team id to list conversations in, required if org token is used.'
|
|
16
17
|
c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
|
data/bin/commands/views.rb
CHANGED
|
@@ -23,6 +23,7 @@ module Slack
|
|
|
23
23
|
c.flag 'user_id', desc: 'id of the user you want publish a view to.'
|
|
24
24
|
c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
|
|
25
25
|
c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
|
|
26
|
+
c.flag 'interactivity_pointer', desc: ''
|
|
26
27
|
c.action do |_global_options, options, _args|
|
|
27
28
|
puts JSON.dump(@client.views_publish(options))
|
|
28
29
|
end
|
data/bin/slack
CHANGED
data/examples/hi_web/hi.rb
CHANGED
|
@@ -18,8 +18,8 @@ server.mount_proc '/' do |req, res|
|
|
|
18
18
|
|
|
19
19
|
response = client.oauth_v2_access(
|
|
20
20
|
req.query.merge(
|
|
21
|
-
client_id: ENV
|
|
22
|
-
client_secret: ENV
|
|
21
|
+
client_id: ENV.fetch('SLACK_CLIENT_ID', nil),
|
|
22
|
+
client_secret: ENV.fetch('SLACK_CLIENT_SECRET', nil),
|
|
23
23
|
grant_type: 'authorization_code'
|
|
24
24
|
)
|
|
25
25
|
)
|
|
@@ -47,10 +47,10 @@ server.mount_proc '/' do |req, res|
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
query = {
|
|
50
|
-
client_id: ENV
|
|
51
|
-
redirect_uri: ENV
|
|
52
|
-
scope: ENV
|
|
53
|
-
user_scope: ENV
|
|
50
|
+
client_id: ENV.fetch('SLACK_CLIENT_ID', nil),
|
|
51
|
+
redirect_uri: ENV.fetch('REDIRECT_URI', nil),
|
|
52
|
+
scope: ENV.fetch('SCOPE', nil),
|
|
53
|
+
user_scope: ENV.fetch('USER_SCOPE', nil)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
url = "https://slack.com/oauth/v2/authorize?#{query.to_query}"
|
data/lib/slack/events/config.rb
CHANGED
data/lib/slack/events/request.rb
CHANGED
data/lib/slack/version.rb
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
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 AdminAnalyticsMessages
|
|
9
|
+
#
|
|
10
|
+
# Retrieves activity metrics for messages from a given channel.
|
|
11
|
+
#
|
|
12
|
+
# @option options [channel] :channel
|
|
13
|
+
# Channel ID for channel of the message activity to query.
|
|
14
|
+
# @option options [string] :oldest_ts
|
|
15
|
+
# Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.
|
|
16
|
+
# @option options [string] :latest_ts
|
|
17
|
+
# Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.
|
|
18
|
+
# @option options [string] :cursor
|
|
19
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.
|
|
20
|
+
# @option options [integer] :limit
|
|
21
|
+
# Maximum number of entries to return. Defaults to 50 if not passed. Max allowed is 100.
|
|
22
|
+
# @see https://api.slack.com/methods/admin.analytics.messages.activity
|
|
23
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.activity.json
|
|
24
|
+
def admin_analytics_messages_activity(options = {})
|
|
25
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
26
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
27
|
+
if block_given?
|
|
28
|
+
Pagination::Cursor.new(self, :admin_analytics_messages_activity, options).each do |page|
|
|
29
|
+
yield page
|
|
30
|
+
end
|
|
31
|
+
else
|
|
32
|
+
post('admin.analytics.messages.activity', options)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
#
|
|
37
|
+
# Retrieves metadata for a list of messages from a given channel.
|
|
38
|
+
#
|
|
39
|
+
# @option options [channel] :channel
|
|
40
|
+
# Channel ID for channel containing the messages to query.
|
|
41
|
+
# @option options [string] :oldest_ts
|
|
42
|
+
# Oldest timestamp to include in the results.
|
|
43
|
+
# @option options [string] :latest_ts
|
|
44
|
+
# Most recent timestamp to include in the results. If not passed, defaults to current time.
|
|
45
|
+
# @option options [string] :cursor
|
|
46
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
|
47
|
+
# @see https://api.slack.com/methods/admin.analytics.messages.metadata
|
|
48
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics.messages/admin.analytics.messages.metadata.json
|
|
49
|
+
def admin_analytics_messages_metadata(options = {})
|
|
50
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
51
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
52
|
+
if block_given?
|
|
53
|
+
Pagination::Cursor.new(self, :admin_analytics_messages_metadata, options).each do |page|
|
|
54
|
+
yield page
|
|
55
|
+
end
|
|
56
|
+
else
|
|
57
|
+
post('admin.analytics.messages.metadata', options)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -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 = {})
|
|
@@ -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 Web
|
|
6
|
+
module Api
|
|
7
|
+
module Endpoints
|
|
8
|
+
module AdminAppsMcpServers
|
|
9
|
+
#
|
|
10
|
+
# List third-party app MCP servers approved for an organization, derived from the org's MCP server allowlist. Entries reflect allowlist state, not install/scope liveness: servers of apps that are uninstalled (but not deleted) are still listed.
|
|
11
|
+
#
|
|
12
|
+
# @option options [integer] :limit
|
|
13
|
+
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
|
14
|
+
# @option options [string] :cursor
|
|
15
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
|
16
|
+
# @see https://api.slack.com/methods/admin.apps.mcp.servers.list
|
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps.mcp.servers/admin.apps.mcp.servers.list.json
|
|
18
|
+
def admin_apps_mcp_servers_list(options = {})
|
|
19
|
+
if block_given?
|
|
20
|
+
Pagination::Cursor.new(self, :admin_apps_mcp_servers_list, options).each do |page|
|
|
21
|
+
yield page
|
|
22
|
+
end
|
|
23
|
+
else
|
|
24
|
+
post('admin.apps.mcp.servers.list', options)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|