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
|
@@ -14,9 +14,15 @@ module Slack
|
|
|
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
|
|
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
18
|
# @option options [array] :loading_messages
|
|
19
|
-
# The list of messages to rotate through as a loading indicator.
|
|
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.
|
|
20
26
|
# @see https://api.slack.com/methods/assistant.threads.setStatus
|
|
21
27
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
|
|
22
28
|
def assistant_threads_setStatus(options = {})
|
|
@@ -32,7 +38,7 @@ module Slack
|
|
|
32
38
|
# @option options [Object] :channel_id
|
|
33
39
|
# Channel ID containing the assistant thread.
|
|
34
40
|
# @option options [string] :thread_ts
|
|
35
|
-
# Message timestamp of the thread to set suggested prompts for.
|
|
41
|
+
# Message timestamp of the thread to set suggested prompts for. If not provided, the prompts will be set for the latest message in the channel.
|
|
36
42
|
# @option options [Object] :prompts
|
|
37
43
|
# Each prompt should be supplied with its title and message attribute.
|
|
38
44
|
# @option options [string] :title
|
|
@@ -41,7 +47,6 @@ module Slack
|
|
|
41
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setSuggestedPrompts.json
|
|
42
48
|
def assistant_threads_setSuggestedPrompts(options = {})
|
|
43
49
|
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
|
44
|
-
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
|
45
50
|
raise ArgumentError, 'Required arguments :prompts missing' if options[:prompts].nil?
|
|
46
51
|
post('assistant.threads.setSuggestedPrompts', options)
|
|
47
52
|
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 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
|
|
@@ -12,7 +12,7 @@ module Slack
|
|
|
12
12
|
# @option options [string] :title
|
|
13
13
|
# Title of the newly created canvas.
|
|
14
14
|
# @option options [Object] :document_content
|
|
15
|
-
# Structure describing the type and value of the content to create.
|
|
15
|
+
# Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).
|
|
16
16
|
# @option options [string] :channel_id
|
|
17
17
|
# Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.
|
|
18
18
|
# @see https://api.slack.com/methods/canvases.create
|
|
@@ -39,7 +39,7 @@ module Slack
|
|
|
39
39
|
# @option options [Object] :canvas_id
|
|
40
40
|
# Encoded ID of the canvas.
|
|
41
41
|
# @option options [array] :changes
|
|
42
|
-
# List of changes to apply on the specified canvas.
|
|
42
|
+
# List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters).
|
|
43
43
|
# @see https://api.slack.com/methods/canvases.edit
|
|
44
44
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.edit.json
|
|
45
45
|
def canvases_edit(options = {})
|
|
@@ -47,6 +47,20 @@ module Slack
|
|
|
47
47
|
raise ArgumentError, 'Required arguments :changes missing' if options[:changes].nil?
|
|
48
48
|
post('canvases.edit', options)
|
|
49
49
|
end
|
|
50
|
+
|
|
51
|
+
#
|
|
52
|
+
# Get the content of a canvas as markdown (default) or HTML.
|
|
53
|
+
#
|
|
54
|
+
# @option options [Object] :canvas_id
|
|
55
|
+
# Encoded ID of the canvas.
|
|
56
|
+
# @option options [enum] :content_type
|
|
57
|
+
# Format in which to return the canvas content. Defaults to markdown.
|
|
58
|
+
# @see https://api.slack.com/methods/canvases.getContent
|
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.getContent.json
|
|
60
|
+
def canvases_getContent(options = {})
|
|
61
|
+
raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
|
|
62
|
+
post('canvases.getContent', options)
|
|
63
|
+
end
|
|
50
64
|
end
|
|
51
65
|
end
|
|
52
66
|
end
|
|
@@ -11,6 +11,8 @@ module Slack
|
|
|
11
11
|
#
|
|
12
12
|
# @option options [channel] :channel
|
|
13
13
|
# An encoded ID that represents a channel, private group, or DM.
|
|
14
|
+
# @option options [array] :chunks
|
|
15
|
+
# Array of streaming chunks.
|
|
14
16
|
# @option options [timestamp] :ts
|
|
15
17
|
# The timestamp of the streaming message.
|
|
16
18
|
# @option options [string] :markdown_text
|
|
@@ -20,7 +22,6 @@ module Slack
|
|
|
20
22
|
def chat_appendStream(options = {})
|
|
21
23
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
22
24
|
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
23
|
-
raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
|
|
24
25
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
25
26
|
post('chat.appendStream', options)
|
|
26
27
|
end
|
|
@@ -129,6 +130,8 @@ module Slack
|
|
|
129
130
|
# Find and link channel names and usernames.
|
|
130
131
|
# @option options [string] :markdown_text
|
|
131
132
|
# 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.
|
|
133
|
+
# @option options [string] :metadata
|
|
134
|
+
# 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.
|
|
132
135
|
# @option options [string] :parse
|
|
133
136
|
# Change how messages are treated. Defaults to none. See below.
|
|
134
137
|
# @option options [string] :text
|
|
@@ -144,9 +147,10 @@ module Slack
|
|
|
144
147
|
def chat_postEphemeral(options = {})
|
|
145
148
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
146
149
|
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
|
|
147
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
150
|
+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
|
|
151
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
148
152
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
|
149
|
-
options = encode_options_as_json(options, %i[attachments blocks])
|
|
153
|
+
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
150
154
|
post('chat.postEphemeral', options)
|
|
151
155
|
end
|
|
152
156
|
|
|
@@ -172,7 +176,7 @@ module Slack
|
|
|
172
176
|
# @option options [string] :markdown_text
|
|
173
177
|
# 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.
|
|
174
178
|
# @option options [string] :metadata
|
|
175
|
-
# 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.
|
|
179
|
+
# 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.
|
|
176
180
|
# @option options [boolean] :mrkdwn
|
|
177
181
|
# Disable Slack markup parsing by setting to false. Enabled by default.
|
|
178
182
|
# @option options [string] :parse
|
|
@@ -189,11 +193,14 @@ module Slack
|
|
|
189
193
|
# Pass false to disable unfurling of media content.
|
|
190
194
|
# @option options [string] :username
|
|
191
195
|
# Set your bot's user name.
|
|
196
|
+
# @option options [boolean] :unfurl_app_links
|
|
197
|
+
# 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.
|
|
192
198
|
# @see https://api.slack.com/methods/chat.postMessage
|
|
193
199
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
|
|
194
200
|
def chat_postMessage(options = {})
|
|
195
201
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
196
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
202
|
+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
|
|
203
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
197
204
|
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
198
205
|
post('chat.postMessage', options)
|
|
199
206
|
end
|
|
@@ -234,7 +241,8 @@ module Slack
|
|
|
234
241
|
def chat_scheduleMessage(options = {})
|
|
235
242
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
236
243
|
raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
|
|
237
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
244
|
+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
|
|
245
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
238
246
|
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
239
247
|
post('chat.scheduleMessage', options)
|
|
240
248
|
end
|
|
@@ -243,20 +251,29 @@ module Slack
|
|
|
243
251
|
# Starts a new streaming conversation.
|
|
244
252
|
#
|
|
245
253
|
# @option options [channel] :channel
|
|
246
|
-
# An encoded ID that represents a channel,
|
|
254
|
+
# An encoded ID that represents a channel, thread, or DM.
|
|
255
|
+
# @option options [array] :chunks
|
|
256
|
+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
|
|
247
257
|
# @option options [string] :markdown_text
|
|
248
258
|
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
249
259
|
# @option options [string] :thread_ts
|
|
250
|
-
# Provide another message's ts value to reply to.
|
|
260
|
+
# 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.
|
|
251
261
|
# @option options [Object] :recipient_user_id
|
|
252
262
|
# The encoded ID of the user to receive the streaming text. Required when streaming to channels.
|
|
253
263
|
# @option options [string] :recipient_team_id
|
|
254
264
|
# The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
|
|
265
|
+
# @option options [enum] :task_display_mode
|
|
266
|
+
# 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.
|
|
267
|
+
# @option options [string] :icon_emoji
|
|
268
|
+
# Emoji to use as the icon for this message. Overrides icon_url.
|
|
269
|
+
# @option options [string] :icon_url
|
|
270
|
+
# Image URL to use as the icon for this message.
|
|
271
|
+
# @option options [string] :username
|
|
272
|
+
# The bot's username to display.
|
|
255
273
|
# @see https://api.slack.com/methods/chat.startStream
|
|
256
274
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
|
|
257
275
|
def chat_startStream(options = {})
|
|
258
276
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
259
|
-
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
|
260
277
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
261
278
|
post('chat.startStream', options)
|
|
262
279
|
end
|
|
@@ -266,6 +283,8 @@ module Slack
|
|
|
266
283
|
#
|
|
267
284
|
# @option options [channel] :channel
|
|
268
285
|
# An encoded ID that represents a channel, private group, or DM.
|
|
286
|
+
# @option options [array] :chunks
|
|
287
|
+
# Array of streaming chunks. Can include markdown text chunk objects, task update chunk objects, plan update chunks, or blocks chunks.
|
|
269
288
|
# @option options [timestamp] :ts
|
|
270
289
|
# The timestamp of the streaming message.
|
|
271
290
|
# @option options [string] :markdown_text
|
|
@@ -274,6 +293,8 @@ module Slack
|
|
|
274
293
|
# A list of blocks that will be rendered at the bottom of the finalized message.
|
|
275
294
|
# @option options [string] :metadata
|
|
276
295
|
# 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.
|
|
296
|
+
# @option options [enum] :session_status
|
|
297
|
+
# The session status to set after stopping the stream.
|
|
277
298
|
# @see https://api.slack.com/methods/chat.stopStream
|
|
278
299
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
|
|
279
300
|
def chat_stopStream(options = {})
|
|
@@ -288,11 +309,11 @@ module Slack
|
|
|
288
309
|
# Provide custom unfurl behavior for user-posted URLs
|
|
289
310
|
#
|
|
290
311
|
# @option options [channel] :channel
|
|
291
|
-
# Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.
|
|
312
|
+
# 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.
|
|
292
313
|
# @option options [timestamp] :ts
|
|
293
|
-
# Timestamp of the message to add unfurl behavior to.
|
|
314
|
+
# Timestamp of the message to add unfurl behavior to. Required for public channels.
|
|
294
315
|
# @option options [string] :unfurls
|
|
295
|
-
# URL-encoded JSON map with keys set to URLs featured in the
|
|
316
|
+
# 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.
|
|
296
317
|
# @option options [string] :user_auth_message
|
|
297
318
|
# 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.
|
|
298
319
|
# @option options [boolean] :user_auth_required
|
|
@@ -305,13 +326,11 @@ module Slack
|
|
|
305
326
|
# The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.
|
|
306
327
|
# @option options [enum] :source
|
|
307
328
|
# 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.
|
|
308
|
-
# @option options [string] :metadata
|
|
309
|
-
# JSON object with entity_type and entity_payload fields, presented as a URL-encoded string. Either unfurls or metadata must be provided.
|
|
310
329
|
# @see https://api.slack.com/methods/chat.unfurl
|
|
311
330
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
|
|
312
331
|
def chat_unfurl(options = {})
|
|
313
332
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
314
|
-
options = encode_options_as_json(options, %i[unfurls user_auth_blocks
|
|
333
|
+
options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
|
|
315
334
|
post('chat.unfurl', options)
|
|
316
335
|
end
|
|
317
336
|
|
|
@@ -322,6 +341,8 @@ module Slack
|
|
|
322
341
|
# Pass true to update the message as the authed user. Bot users in this context are considered authed users.
|
|
323
342
|
# @option options [string] :attachments
|
|
324
343
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
344
|
+
# @option options [string] :unfurled_attachments
|
|
345
|
+
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
325
346
|
# @option options [string] :blocks
|
|
326
347
|
# A JSON-based array of structured blocks, presented as a URL-encoded string.
|
|
327
348
|
# @option options [string] :markdown_text
|
|
@@ -347,9 +368,10 @@ module Slack
|
|
|
347
368
|
def chat_update(options = {})
|
|
348
369
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
349
370
|
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
350
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
371
|
+
raise ArgumentError, 'At least one of :attachments, :blocks, :text, :markdown_text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil? && options[:markdown_text].nil?
|
|
372
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
351
373
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
352
|
-
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
374
|
+
options = encode_options_as_json(options, %i[attachments unfurled_attachments blocks metadata])
|
|
353
375
|
post('chat.update', options)
|
|
354
376
|
end
|
|
355
377
|
end
|
|
@@ -34,7 +34,7 @@ module Slack
|
|
|
34
34
|
# @option options [Object] :invite_id
|
|
35
35
|
# ID of the shared channel invite to approve.
|
|
36
36
|
# @option options [Object] :target_team
|
|
37
|
-
# The team or enterprise
|
|
37
|
+
# The team or enterprise ID of the receiving party involved in the invitation you are approving.
|
|
38
38
|
# @see https://api.slack.com/methods/conversations.approveSharedInvite
|
|
39
39
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.approveSharedInvite.json
|
|
40
40
|
def conversations_approveSharedInvite(options = {})
|
|
@@ -154,7 +154,7 @@ module Slack
|
|
|
154
154
|
# @option options [boolean] :force
|
|
155
155
|
# When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.
|
|
156
156
|
# @option options [string] :users
|
|
157
|
-
# A comma separated list of user IDs. Up to
|
|
157
|
+
# A comma separated list of user IDs. Up to 1000 users may be listed.
|
|
158
158
|
# @see https://api.slack.com/methods/conversations.invite
|
|
159
159
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json
|
|
160
160
|
def conversations_invite(options = {})
|
|
@@ -12,7 +12,7 @@ module Slack
|
|
|
12
12
|
# @option options [string] :channel_id
|
|
13
13
|
# Channel ID of the channel the canvas will be tabbed in.
|
|
14
14
|
# @option options [Object] :document_content
|
|
15
|
-
# Structure describing the type and value of the content to create.
|
|
15
|
+
# Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters).
|
|
16
16
|
# @option options [string] :title
|
|
17
17
|
# Title of the newly created canvas.
|
|
18
18
|
# @see https://api.slack.com/methods/conversations.canvases.create
|
|
@@ -6,6 +6,54 @@ module Slack
|
|
|
6
6
|
module Api
|
|
7
7
|
module Endpoints
|
|
8
8
|
module Entity
|
|
9
|
+
#
|
|
10
|
+
# 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
|
+
#
|
|
12
|
+
# @option options [string] :trigger_id
|
|
13
|
+
# A reference to the original user action that initiated the comment mutation.
|
|
14
|
+
# @option options [object] :comment
|
|
15
|
+
# The full comment data. Required for edit and post actions. See the comment schema for the full list of properties.
|
|
16
|
+
# @option options [string] :error
|
|
17
|
+
# Error message if the action failed in the app. When present, signals that the mutation could not be completed.
|
|
18
|
+
# @see https://api.slack.com/methods/entity.acknowledgeCommentAction
|
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.acknowledgeCommentAction.json
|
|
20
|
+
def entity_acknowledgeCommentAction(options = {})
|
|
21
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
22
|
+
post('entity.acknowledgeCommentAction', options)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client.
|
|
27
|
+
#
|
|
28
|
+
# @option options [array] :comments
|
|
29
|
+
# Array of comments to present to the user. See the comment schema for the full list of properties.
|
|
30
|
+
# @option options [string] :cursor
|
|
31
|
+
# App supplied cursor used for pagination, will be sent in the next request for comments.
|
|
32
|
+
# @option options [boolean] :can_post_comment
|
|
33
|
+
# Indicates whether the user has permissions to post comments.
|
|
34
|
+
# @option options [string] :trigger_id
|
|
35
|
+
# A reference to the original user action that initiated the request.
|
|
36
|
+
# @option options [string] :delete_action_id
|
|
37
|
+
# The block action id that will be sent when a delete request is initiated for a comment.
|
|
38
|
+
# @option options [boolean] :user_auth_required
|
|
39
|
+
# Set to true (or 1) to indicate that the user must authenticate to see the comments data.
|
|
40
|
+
# @option options [string] :user_auth_url
|
|
41
|
+
# A custom URL to which users are directed for authentication if required.
|
|
42
|
+
# @option options [Object] :error
|
|
43
|
+
# @see https://api.slack.com/methods/entity.presentComments
|
|
44
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.presentComments.json
|
|
45
|
+
def entity_presentComments(options = {})
|
|
46
|
+
raise ArgumentError, 'Required arguments :comments missing' if options[:comments].nil?
|
|
47
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
48
|
+
if block_given?
|
|
49
|
+
Pagination::Cursor.new(self, :entity_presentComments, options).each do |page|
|
|
50
|
+
yield page
|
|
51
|
+
end
|
|
52
|
+
else
|
|
53
|
+
post('entity.presentComments', options)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
9
57
|
#
|
|
10
58
|
# Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.
|
|
11
59
|
#
|
|
@@ -21,6 +21,12 @@ module Slack
|
|
|
21
21
|
# The message text introducing the file in specified channels.
|
|
22
22
|
# @option options [string] :blocks
|
|
23
23
|
# 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.
|
|
24
|
+
# @option options [string] :username
|
|
25
|
+
# Set your bot's user name for the file share message. Requires the chat:write.customize scope.
|
|
26
|
+
# @option options [string] :icon_url
|
|
27
|
+
# URL to an image to use as the icon for the file share message. Requires the chat:write.customize scope.
|
|
28
|
+
# @option options [string] :icon_emoji
|
|
29
|
+
# Emoji to use as the icon for the file share message. Overrides icon_url. Requires the chat:write.customize scope.
|
|
24
30
|
# @see https://api.slack.com/methods/files.completeUploadExternal
|
|
25
31
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
|
|
26
32
|
def files_completeUploadExternal(options = {})
|
|
@@ -100,7 +106,7 @@ module Slack
|
|
|
100
106
|
end
|
|
101
107
|
|
|
102
108
|
#
|
|
103
|
-
# List for a team, in a channel, or from a user with applied filters.
|
|
109
|
+
# List files for a team, in a channel, or from a user with applied filters.
|
|
104
110
|
#
|
|
105
111
|
# @option options [channel] :channel
|
|
106
112
|
# Filter files appearing in a specific channel, indicated by its ID.
|
|
@@ -186,6 +192,7 @@ module Slack
|
|
|
186
192
|
# @see https://api.slack.com/methods/files.upload
|
|
187
193
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json
|
|
188
194
|
def files_upload(options = {})
|
|
195
|
+
options = options.merge(filename: 'file') if options[:file] && !options[:filename]
|
|
189
196
|
post('files.upload', options)
|
|
190
197
|
end
|
|
191
198
|
end
|
|
@@ -23,12 +23,47 @@ module Slack
|
|
|
23
23
|
# The grant_type param as described in the OAuth spec.
|
|
24
24
|
# @option options [string] :refresh_token
|
|
25
25
|
# The refresh_token param as described in the OAuth spec.
|
|
26
|
+
# @option options [string] :assertion
|
|
27
|
+
# Identity assertion JWT authorization grant.
|
|
26
28
|
# @see https://api.slack.com/methods/oauth.v2.access
|
|
27
29
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json
|
|
28
30
|
def oauth_v2_access(options = {})
|
|
29
31
|
post('oauth.v2.access', options)
|
|
30
32
|
end
|
|
31
33
|
|
|
34
|
+
#
|
|
35
|
+
# 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.
|
|
36
|
+
#
|
|
37
|
+
# @option options [string] :client_id
|
|
38
|
+
# Issued when you created your application. Must be the app the token being rotated was issued to.
|
|
39
|
+
# @option options [string] :client_secret
|
|
40
|
+
# Issued when you created your application.
|
|
41
|
+
# @see https://api.slack.com/methods/oauth.v2.beginShortTokenRotation
|
|
42
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.beginShortTokenRotation.json
|
|
43
|
+
def oauth_v2_beginShortTokenRotation(options = {})
|
|
44
|
+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
|
|
45
|
+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
|
|
46
|
+
post('oauth.v2.beginShortTokenRotation', options)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
#
|
|
50
|
+
# 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.
|
|
51
|
+
#
|
|
52
|
+
# @option options [string] :client_id
|
|
53
|
+
# Issued when you created your application. Must be the app the token being rotated was issued to.
|
|
54
|
+
# @option options [string] :client_secret
|
|
55
|
+
# Issued when you created your application.
|
|
56
|
+
# @option options [string] :new_token
|
|
57
|
+
# The new xoxp token returned by oauth.v2.beginShortTokenRotation.
|
|
58
|
+
# @see https://api.slack.com/methods/oauth.v2.completeShortTokenRotation
|
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.completeShortTokenRotation.json
|
|
60
|
+
def oauth_v2_completeShortTokenRotation(options = {})
|
|
61
|
+
raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil?
|
|
62
|
+
raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil?
|
|
63
|
+
raise ArgumentError, 'Required arguments :new_token missing' if options[:new_token].nil?
|
|
64
|
+
post('oauth.v2.completeShortTokenRotation', options)
|
|
65
|
+
end
|
|
66
|
+
|
|
32
67
|
#
|
|
33
68
|
# Exchanges a legacy access token for a new expiring access token and refresh token
|
|
34
69
|
#
|
|
@@ -0,0 +1,37 @@
|
|
|
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 OauthV2User
|
|
9
|
+
#
|
|
10
|
+
# Exchanges a temporary OAuth verifier code for a user access token.
|
|
11
|
+
#
|
|
12
|
+
# @option options [string] :client_id
|
|
13
|
+
# 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
|
+
# @option options [string] :client_secret
|
|
15
|
+
# 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.
|
|
16
|
+
# @option options [string] :code
|
|
17
|
+
# The code param returned via the OAuth callback.
|
|
18
|
+
# @option options [string] :code_verifier
|
|
19
|
+
# The code_verifier param used to generate the code_challenge originally. Used for PKCE.
|
|
20
|
+
# @option options [string] :redirect_uri
|
|
21
|
+
# This must match the originally submitted URI (if one was sent).
|
|
22
|
+
# @option options [string] :grant_type
|
|
23
|
+
# The grant_type param as described in the OAuth spec.
|
|
24
|
+
# @option options [string] :refresh_token
|
|
25
|
+
# The refresh_token param as described in the OAuth spec.
|
|
26
|
+
# @option options [string] :assertion
|
|
27
|
+
# Identity assertion JWT authorization grant.
|
|
28
|
+
# @see https://api.slack.com/methods/oauth.v2.user.access
|
|
29
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2.user/oauth.v2.user.access.json
|
|
30
|
+
def oauth_v2_user_access(options = {})
|
|
31
|
+
post('oauth.v2.user.access', options)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -21,6 +21,8 @@ module Slack
|
|
|
21
21
|
# The grant_type param as described in the OAuth spec.
|
|
22
22
|
# @option options [string] :refresh_token
|
|
23
23
|
# The refresh_token param as described in the OAuth spec.
|
|
24
|
+
# @option options [string] :code_verifier
|
|
25
|
+
# PKCE code verifier (RFC 7636). Required when the authorization request included a code_challenge.
|
|
24
26
|
# @see https://api.slack.com/methods/openid.connect.token
|
|
25
27
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/openid.connect/openid.connect.token.json
|
|
26
28
|
def openid_connect_token(options = {})
|
|
@@ -13,6 +13,12 @@ module Slack
|
|
|
13
13
|
# ID of the List to export.
|
|
14
14
|
# @option options [string] :job_id
|
|
15
15
|
# The ID of the recently started job to export the List.
|
|
16
|
+
# @option options [Object] :format
|
|
17
|
+
# Format the export was started with. Must match the format passed to slackLists.download.start. Defaults to csv.
|
|
18
|
+
# @option options [boolean] :include_threads
|
|
19
|
+
# 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.
|
|
20
|
+
# @option options [boolean] :include_attachments
|
|
21
|
+
# 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.
|
|
16
22
|
# @see https://api.slack.com/methods/slackLists.download.get
|
|
17
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.download/slackLists.download.get.json
|
|
18
24
|
def slackLists_download_get(options = {})
|
|
@@ -27,6 +33,12 @@ module Slack
|
|
|
27
33
|
# @option options [string] :list_id
|
|
28
34
|
# ID of the List to export.
|
|
29
35
|
# @option options [boolean] :include_archived
|
|
36
|
+
# @option options [Object] :format
|
|
37
|
+
# Format of the export. Defaults to csv for backward compatibility. Use json for a complete, hierarchical export.
|
|
38
|
+
# @option options [boolean] :include_threads
|
|
39
|
+
# Include each item's conversation thread in the export. Only applies when format is json.
|
|
40
|
+
# @option options [boolean] :include_attachments
|
|
41
|
+
# Include file attachment metadata and access paths in the export. Only applies when format is json.
|
|
30
42
|
# @see https://api.slack.com/methods/slackLists.download.start
|
|
31
43
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.download/slackLists.download.start.json
|
|
32
44
|
def slackLists_download_start(options = {})
|
|
@@ -82,6 +82,8 @@ module Slack
|
|
|
82
82
|
# Next cursor for pagination.
|
|
83
83
|
# @option options [boolean] :archived
|
|
84
84
|
# Boolean indicating whether archived items or normal items should be returned.
|
|
85
|
+
# @option options [boolean] :include_list
|
|
86
|
+
# 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.
|
|
85
87
|
# @see https://api.slack.com/methods/slackLists.items.list
|
|
86
88
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/slackLists.items/slackLists.items.list.json
|
|
87
89
|
def slackLists_items_list(options = {})
|
|
@@ -7,12 +7,14 @@ module Slack
|
|
|
7
7
|
module Endpoints
|
|
8
8
|
module Users
|
|
9
9
|
#
|
|
10
|
-
# List conversations the calling user
|
|
10
|
+
# List conversations the calling user is a member of.
|
|
11
11
|
#
|
|
12
12
|
# @option options [string] :cursor
|
|
13
13
|
# 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.
|
|
14
14
|
# @option options [boolean] :exclude_archived
|
|
15
15
|
# Set to true to exclude archived channels from the list.
|
|
16
|
+
# @option options [boolean] :exclude_muted
|
|
17
|
+
# Set to true to exclude muted channels from the list.
|
|
16
18
|
# @option options [number] :limit
|
|
17
19
|
# 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.
|
|
18
20
|
# @option options [string] :team_id
|
|
@@ -74,7 +76,6 @@ module Slack
|
|
|
74
76
|
# @see https://api.slack.com/methods/users.info
|
|
75
77
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.info.json
|
|
76
78
|
def users_info(options = {})
|
|
77
|
-
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
|
|
78
79
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
|
79
80
|
post('users.info', options)
|
|
80
81
|
end
|
|
@@ -33,6 +33,7 @@ module Slack
|
|
|
33
33
|
# A view payload. This must be a JSON-encoded string.
|
|
34
34
|
# @option options [string] :hash
|
|
35
35
|
# A string that represents view state to protect against possible race conditions.
|
|
36
|
+
# @option options [string] :interactivity_pointer
|
|
36
37
|
# @see https://api.slack.com/methods/views.publish
|
|
37
38
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/views/views.publish.json
|
|
38
39
|
def views_publish(options = {})
|