slack-ruby-client 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.coveralls.yml +0 -0
- data/.github/FUNDING.yml +0 -0
- data/.github/dependabot.yml +0 -0
- data/.github/workflows/danger-comment.yml +11 -0
- data/.github/workflows/danger.yml +13 -0
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/update_api.yml +8 -10
- data/.gitignore +0 -0
- data/.gitmodules +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +0 -0
- data/.rubocop_todo.yml +5 -2
- data/.ruby-version +0 -0
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +0 -0
- data/Dangerfile +4 -1
- data/Gemfile +3 -0
- data/LICENSE.md +0 -0
- data/README.md +1 -1
- data/RELEASING.md +0 -0
- data/Rakefile +0 -0
- data/SECURITY.md +0 -0
- data/UPGRADING.md +4 -0
- data/bin/commands/admin_analytics.rb +0 -0
- data/bin/commands/admin_analytics_messages.rb +36 -0
- data/bin/commands/admin_apps.rb +3 -0
- data/bin/commands/admin_apps_activities.rb +0 -0
- data/bin/commands/admin_apps_approved.rb +0 -0
- data/bin/commands/admin_apps_config.rb +0 -0
- data/bin/commands/admin_apps_requests.rb +0 -0
- data/bin/commands/admin_apps_restricted.rb +0 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +0 -0
- data/bin/commands/admin_auth_policy.rb +0 -0
- data/bin/commands/admin_barriers.rb +0 -0
- data/bin/commands/admin_conversations.rb +10 -0
- data/bin/commands/admin_conversations_ekm.rb +0 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +0 -0
- data/bin/commands/admin_emoji.rb +0 -0
- data/bin/commands/admin_functions.rb +3 -2
- data/bin/commands/admin_functions_permissions.rb +3 -2
- data/bin/commands/admin_inviteRequests.rb +0 -0
- data/bin/commands/admin_inviteRequests_approved.rb +0 -0
- data/bin/commands/admin_inviteRequests_denied.rb +0 -0
- data/bin/commands/admin_roles.rb +0 -0
- data/bin/commands/admin_teams.rb +0 -0
- data/bin/commands/admin_teams_admins.rb +0 -0
- data/bin/commands/admin_teams_owners.rb +0 -0
- data/bin/commands/admin_teams_settings.rb +0 -0
- data/bin/commands/admin_usergroups.rb +0 -0
- data/bin/commands/admin_users.rb +20 -8
- data/bin/commands/admin_users_session.rb +0 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +0 -0
- data/bin/commands/admin_workflows.rb +0 -0
- data/bin/commands/admin_workflows_collaborators.rb +0 -0
- data/bin/commands/admin_workflows_permissions.rb +0 -0
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
- data/bin/commands/api.rb +0 -0
- data/bin/commands/apps.rb +0 -0
- data/bin/commands/apps_activities.rb +0 -0
- data/bin/commands/apps_auth_external.rb +0 -0
- data/bin/commands/apps_connections.rb +0 -0
- data/bin/commands/apps_datastore.rb +0 -0
- data/bin/commands/apps_event_authorizations.rb +0 -0
- data/bin/commands/apps_icon.rb +22 -0
- data/bin/commands/apps_manifest.rb +7 -6
- data/bin/commands/apps_user_connection.rb +21 -0
- data/bin/commands/assistant_search.rb +9 -5
- data/bin/commands/assistant_threads.rb +5 -1
- data/bin/commands/auth.rb +0 -0
- data/bin/commands/auth_teams.rb +0 -0
- data/bin/commands/blocks.rb +22 -0
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/bots.rb +0 -0
- data/bin/commands/calls.rb +0 -0
- data/bin/commands/calls_participants.rb +0 -0
- data/bin/commands/canvases.rb +0 -0
- data/bin/commands/canvases_access.rb +0 -0
- data/bin/commands/canvases_sections.rb +0 -0
- data/bin/commands/chat.rb +50 -4
- data/bin/commands/chat_scheduledMessages.rb +0 -0
- data/bin/commands/conversations.rb +1 -1
- data/bin/commands/conversations_canvases.rb +0 -0
- data/bin/commands/conversations_externalInvitePermissions.rb +0 -0
- data/bin/commands/conversations_requestSharedInvite.rb +0 -0
- data/bin/commands/dialog.rb +0 -0
- data/bin/commands/dnd.rb +0 -0
- data/bin/commands/emoji.rb +0 -0
- data/bin/commands/entity.rb +24 -0
- data/bin/commands/files.rb +3 -3
- data/bin/commands/files_comments.rb +0 -0
- data/bin/commands/files_remote.rb +0 -0
- data/bin/commands/functions.rb +0 -0
- data/bin/commands/functions_distributions_permissions.rb +0 -0
- data/bin/commands/functions_workflows_steps.rb +0 -0
- data/bin/commands/functions_workflows_steps_responses.rb +0 -0
- data/bin/commands/migration.rb +0 -0
- data/bin/commands/oauth.rb +0 -0
- data/bin/commands/oauth_v2.rb +2 -0
- data/bin/commands/oauth_v2_user.rb +27 -0
- data/bin/commands/openid_connect.rb +1 -0
- data/bin/commands/pins.rb +0 -0
- data/bin/commands/reactions.rb +0 -0
- data/bin/commands/reminders.rb +0 -0
- data/bin/commands/rtm.rb +0 -0
- data/bin/commands/search.rb +0 -0
- data/bin/commands/slackLists.rb +0 -0
- data/bin/commands/slackLists_access.rb +0 -0
- data/bin/commands/slackLists_download.rb +0 -0
- data/bin/commands/slackLists_items.rb +0 -0
- data/bin/commands/stars.rb +0 -0
- data/bin/commands/team.rb +0 -0
- data/bin/commands/team_billing.rb +0 -0
- data/bin/commands/team_externalTeams.rb +0 -0
- data/bin/commands/team_preferences.rb +0 -0
- data/bin/commands/team_profile.rb +0 -0
- data/bin/commands/tooling_tokens.rb +0 -0
- data/bin/commands/usergroups.rb +0 -0
- data/bin/commands/usergroups_users.rb +0 -0
- data/bin/commands/users.rb +2 -2
- data/bin/commands/users_admin.rb +0 -0
- data/bin/commands/users_discoverableContacts.rb +0 -0
- data/bin/commands/users_prefs.rb +0 -0
- data/bin/commands/users_profile.rb +0 -0
- data/bin/commands/views.rb +1 -0
- data/bin/commands/workflows_featured.rb +0 -0
- data/bin/commands/workflows_triggers_permissions.rb +0 -0
- data/examples/files_upload_v2/.env.example +0 -0
- data/examples/files_upload_v2/Gemfile +0 -0
- data/examples/files_upload_v2/README.md +0 -0
- data/examples/files_upload_v2/files_upload_v2.rb +0 -0
- data/examples/hi_web/Gemfile +0 -0
- data/examples/hi_web/hi.gif +0 -0
- data/examples/hi_web/hi.rb +0 -0
- data/examples/new_ticket/Gemfile +0 -0
- data/examples/new_ticket/new_ticket.rb +0 -0
- data/examples/oauth_v2/.env.example +0 -0
- data/examples/oauth_v2/Gemfile +0 -0
- data/examples/oauth_v2/README.md +3 -3
- data/lib/slack/config.rb +0 -0
- data/lib/slack/events/config.rb +0 -0
- data/lib/slack/events/request.rb +0 -0
- data/lib/slack/logger.rb +0 -0
- data/lib/slack/messages/formatting.rb +0 -0
- data/lib/slack/messages/message.rb +0 -0
- data/lib/slack/utils/security.rb +0 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +0 -0
- 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_activities.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +15 -0
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_functions.rb +3 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +3 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +23 -6
- data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
- data/lib/slack/web/api/endpoints/api.rb +0 -0
- data/lib/slack/web/api/endpoints/apps.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_activities.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_datastore.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -0
- data/lib/slack/web/api/endpoints/apps_icon.rb +28 -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 +12 -4
- data/lib/slack/web/api/endpoints/assistant_threads.rb +10 -3
- data/lib/slack/web/api/endpoints/auth.rb +0 -0
- data/lib/slack/web/api/endpoints/auth_teams.rb +0 -0
- 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/bots.rb +0 -0
- data/lib/slack/web/api/endpoints/calls.rb +0 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +0 -0
- data/lib/slack/web/api/endpoints/canvases.rb +0 -0
- data/lib/slack/web/api/endpoints/canvases_access.rb +0 -0
- data/lib/slack/web/api/endpoints/canvases_sections.rb +0 -0
- data/lib/slack/web/api/endpoints/chat.rb +95 -12
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +0 -0
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +0 -0
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +0 -0
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +0 -0
- data/lib/slack/web/api/endpoints/dialog.rb +0 -0
- data/lib/slack/web/api/endpoints/dnd.rb +0 -0
- data/lib/slack/web/api/endpoints/emoji.rb +0 -0
- data/lib/slack/web/api/endpoints/entity.rb +32 -0
- data/lib/slack/web/api/endpoints/files.rb +2 -2
- data/lib/slack/web/api/endpoints/files_comments.rb +0 -0
- data/lib/slack/web/api/endpoints/files_remote.rb +0 -0
- data/lib/slack/web/api/endpoints/functions.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +0 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +0 -0
- data/lib/slack/web/api/endpoints/migration.rb +0 -0
- data/lib/slack/web/api/endpoints/oauth.rb +0 -0
- data/lib/slack/web/api/endpoints/oauth_v2.rb +4 -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/pins.rb +0 -0
- data/lib/slack/web/api/endpoints/reactions.rb +0 -0
- data/lib/slack/web/api/endpoints/reminders.rb +0 -0
- data/lib/slack/web/api/endpoints/rtm.rb +0 -0
- data/lib/slack/web/api/endpoints/search.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +0 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +0 -0
- data/lib/slack/web/api/endpoints/stars.rb +0 -0
- data/lib/slack/web/api/endpoints/team.rb +0 -0
- data/lib/slack/web/api/endpoints/team_billing.rb +0 -0
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +0 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +0 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +0 -0
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +0 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +0 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +0 -0
- data/lib/slack/web/api/endpoints/users.rb +1 -1
- data/lib/slack/web/api/endpoints/users_admin.rb +0 -0
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +0 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +0 -0
- data/lib/slack/web/api/endpoints/views.rb +1 -0
- data/lib/slack/web/api/endpoints/workflows_featured.rb +0 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +0 -0
- data/lib/slack/web/api/endpoints.rb +12 -0
- data/lib/slack/web/api/error.rb +0 -0
- data/lib/slack/web/api/errors/server_error.rb +0 -0
- data/lib/slack/web/api/errors/slack_error.rb +0 -0
- data/lib/slack/web/api/errors/too_many_requests_error.rb +0 -0
- data/lib/slack/web/api/errors.rb +178 -4
- data/lib/slack/web/api/helpers/files.rb +4 -1
- data/lib/slack/web/api/helpers.rb +0 -0
- data/lib/slack/web/api/mixins/conversations.id.rb +0 -0
- data/lib/slack/web/api/mixins/ids.id.rb +3 -1
- data/lib/slack/web/api/mixins/users.id.json +0 -0
- data/lib/slack/web/api/mixins/users.id.rb +0 -0
- data/lib/slack/web/api/mixins/users.search.json +0 -0
- data/lib/slack/web/api/mixins/users.search.rb +0 -0
- data/lib/slack/web/api/mixins.rb +0 -0
- data/lib/slack/web/api/options.rb +0 -0
- data/lib/slack/web/api/patches/.gitkeep +0 -0
- data/lib/slack/web/api/schema/group.json +0 -0
- data/lib/slack/web/api/schema/method.json +0 -0
- data/lib/slack/web/api/templates/command.erb +0 -0
- data/lib/slack/web/api/templates/endpoints.erb +0 -0
- data/lib/slack/web/api/templates/errors.erb +0 -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 +0 -0
- data/lib/slack/web/config.rb +0 -0
- data/lib/slack/web/faraday/connection.rb +0 -0
- data/lib/slack/web/faraday/options.rb +0 -0
- data/lib/slack/web/faraday/request.rb +0 -0
- data/lib/slack/web/faraday/response/raise_error.rb +0 -0
- data/lib/slack/web/faraday/response/wrap_error.rb +0 -0
- data/lib/slack/web/pagination/cursor.rb +0 -0
- data/lib/slack-ruby-client.rb +0 -0
- data/lib/slack.rb +0 -0
- data/lib/slack_ruby_client.rb +0 -0
- data/lib/tasks/git.rake +0 -0
- data/lib/tasks/update.rake +0 -0
- data/lib/tasks/web.rake +7 -2
- data/slack-ruby-client.gemspec +0 -0
- data/slack.png +0 -0
- metadata +17 -9
- data/.github/workflows/pr_lint.yml +0 -21
- data/Gemfile.danger +0 -6
|
@@ -6,6 +6,27 @@ module Slack
|
|
|
6
6
|
module Api
|
|
7
7
|
module Endpoints
|
|
8
8
|
module Chat
|
|
9
|
+
#
|
|
10
|
+
# Appends text to an existing streaming conversation.
|
|
11
|
+
#
|
|
12
|
+
# @option options [channel] :channel
|
|
13
|
+
# An encoded ID that represents a channel, private group, or DM.
|
|
14
|
+
# @option options [array] :chunks
|
|
15
|
+
# Array of streaming chunks.
|
|
16
|
+
# @option options [timestamp] :ts
|
|
17
|
+
# The timestamp of the streaming message.
|
|
18
|
+
# @option options [string] :markdown_text
|
|
19
|
+
# 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.
|
|
20
|
+
# @see https://api.slack.com/methods/chat.appendStream
|
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.appendStream.json
|
|
22
|
+
def chat_appendStream(options = {})
|
|
23
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
24
|
+
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
25
|
+
raise ArgumentError, 'Required arguments :markdown_text missing' if options[:markdown_text].nil?
|
|
26
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
27
|
+
post('chat.appendStream', options)
|
|
28
|
+
end
|
|
29
|
+
|
|
9
30
|
#
|
|
10
31
|
# Execute a slash command in a public channel (undocumented)
|
|
11
32
|
#
|
|
@@ -125,7 +146,8 @@ module Slack
|
|
|
125
146
|
def chat_postEphemeral(options = {})
|
|
126
147
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
127
148
|
raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
|
|
128
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
149
|
+
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?
|
|
150
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
129
151
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
|
130
152
|
options = encode_options_as_json(options, %i[attachments blocks])
|
|
131
153
|
post('chat.postEphemeral', options)
|
|
@@ -142,6 +164,8 @@ module Slack
|
|
|
142
164
|
# A JSON-based array of structured blocks, presented as a URL-encoded string.
|
|
143
165
|
# @option options [channel] :channel
|
|
144
166
|
# An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.
|
|
167
|
+
# @option options [string] :current_draft_last_updated_ts
|
|
168
|
+
# This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server.
|
|
145
169
|
# @option options [string] :icon_emoji
|
|
146
170
|
# Emoji to use as the icon for this message. Overrides icon_url.
|
|
147
171
|
# @option options [string] :icon_url
|
|
@@ -151,7 +175,7 @@ module Slack
|
|
|
151
175
|
# @option options [string] :markdown_text
|
|
152
176
|
# 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.
|
|
153
177
|
# @option options [string] :metadata
|
|
154
|
-
# 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.
|
|
178
|
+
# 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.
|
|
155
179
|
# @option options [boolean] :mrkdwn
|
|
156
180
|
# Disable Slack markup parsing by setting to false. Enabled by default.
|
|
157
181
|
# @option options [string] :parse
|
|
@@ -172,7 +196,8 @@ module Slack
|
|
|
172
196
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json
|
|
173
197
|
def chat_postMessage(options = {})
|
|
174
198
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
175
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
199
|
+
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?
|
|
200
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
176
201
|
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
177
202
|
post('chat.postMessage', options)
|
|
178
203
|
end
|
|
@@ -213,20 +238,78 @@ module Slack
|
|
|
213
238
|
def chat_scheduleMessage(options = {})
|
|
214
239
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
215
240
|
raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
|
|
216
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
241
|
+
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?
|
|
242
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
217
243
|
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
218
244
|
post('chat.scheduleMessage', options)
|
|
219
245
|
end
|
|
220
246
|
|
|
247
|
+
#
|
|
248
|
+
# Starts a new streaming conversation.
|
|
249
|
+
#
|
|
250
|
+
# @option options [channel] :channel
|
|
251
|
+
# An encoded ID that represents a channel thread or DM.
|
|
252
|
+
# @option options [array] :chunks
|
|
253
|
+
# Array of streaming chunks.
|
|
254
|
+
# @option options [string] :markdown_text
|
|
255
|
+
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
256
|
+
# @option options [string] :thread_ts
|
|
257
|
+
# Provide another message's ts value to reply to. Streamed messages should always be replies to a user request.
|
|
258
|
+
# @option options [Object] :recipient_user_id
|
|
259
|
+
# The encoded ID of the user to receive the streaming text. Required when streaming to channels.
|
|
260
|
+
# @option options [string] :recipient_team_id
|
|
261
|
+
# The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels.
|
|
262
|
+
# @option options [enum] :task_display_mode
|
|
263
|
+
# Specifies how tasks are displayed in the message. A timeline displays individual tasks with text in sequential order, plan displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and dense collapses consecutive tool calls into a single summarized task card.
|
|
264
|
+
# @option options [string] :icon_emoji
|
|
265
|
+
# Emoji to use as the icon for this message. Overrides icon_url.
|
|
266
|
+
# @option options [string] :icon_url
|
|
267
|
+
# Image URL to use as the icon for this message.
|
|
268
|
+
# @option options [string] :username
|
|
269
|
+
# The bot's username to display.
|
|
270
|
+
# @see https://api.slack.com/methods/chat.startStream
|
|
271
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.startStream.json
|
|
272
|
+
def chat_startStream(options = {})
|
|
273
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
274
|
+
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
|
275
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
276
|
+
post('chat.startStream', options)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
#
|
|
280
|
+
# Stops a streaming conversation.
|
|
281
|
+
#
|
|
282
|
+
# @option options [channel] :channel
|
|
283
|
+
# An encoded ID that represents a channel, private group, or DM.
|
|
284
|
+
# @option options [array] :chunks
|
|
285
|
+
# Array of streaming chunks.
|
|
286
|
+
# @option options [timestamp] :ts
|
|
287
|
+
# The timestamp of the streaming message.
|
|
288
|
+
# @option options [string] :markdown_text
|
|
289
|
+
# Accepts message text formatted in markdown. Limit this field to 12,000 characters.
|
|
290
|
+
# @option options [Object] :blocks
|
|
291
|
+
# A list of blocks that will be rendered at the bottom of the finalized message.
|
|
292
|
+
# @option options [string] :metadata
|
|
293
|
+
# 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.
|
|
294
|
+
# @see https://api.slack.com/methods/chat.stopStream
|
|
295
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.stopStream.json
|
|
296
|
+
def chat_stopStream(options = {})
|
|
297
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
298
|
+
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
299
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
300
|
+
options = encode_options_as_json(options, %i[metadata])
|
|
301
|
+
post('chat.stopStream', options)
|
|
302
|
+
end
|
|
303
|
+
|
|
221
304
|
#
|
|
222
305
|
# Provide custom unfurl behavior for user-posted URLs
|
|
223
306
|
#
|
|
224
307
|
# @option options [channel] :channel
|
|
225
|
-
# Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.
|
|
308
|
+
# 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.
|
|
226
309
|
# @option options [timestamp] :ts
|
|
227
|
-
# Timestamp of the message to add unfurl behavior to.
|
|
310
|
+
# Timestamp of the message to add unfurl behavior to. Required for public channels.
|
|
228
311
|
# @option options [string] :unfurls
|
|
229
|
-
# URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.
|
|
312
|
+
# URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels.
|
|
230
313
|
# @option options [string] :user_auth_message
|
|
231
314
|
# 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.
|
|
232
315
|
# @option options [boolean] :user_auth_required
|
|
@@ -242,9 +325,6 @@ module Slack
|
|
|
242
325
|
# @see https://api.slack.com/methods/chat.unfurl
|
|
243
326
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json
|
|
244
327
|
def chat_unfurl(options = {})
|
|
245
|
-
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
246
|
-
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
247
|
-
raise ArgumentError, 'Required arguments :unfurls missing' if options[:unfurls].nil?
|
|
248
328
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
249
329
|
options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
|
|
250
330
|
post('chat.unfurl', options)
|
|
@@ -257,6 +337,8 @@ module Slack
|
|
|
257
337
|
# Pass true to update the message as the authed user. Bot users in this context are considered authed users.
|
|
258
338
|
# @option options [string] :attachments
|
|
259
339
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
340
|
+
# @option options [string] :unfurled_attachments
|
|
341
|
+
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
260
342
|
# @option options [string] :blocks
|
|
261
343
|
# A JSON-based array of structured blocks, presented as a URL-encoded string.
|
|
262
344
|
# @option options [string] :markdown_text
|
|
@@ -282,9 +364,10 @@ module Slack
|
|
|
282
364
|
def chat_update(options = {})
|
|
283
365
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
|
284
366
|
raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
|
|
285
|
-
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
|
367
|
+
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?
|
|
368
|
+
raise ArgumentError, ':text, :markdown_text are mutually exclusive' if !options[:text].nil? && !options[:markdown_text].nil?
|
|
286
369
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
|
287
|
-
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
|
370
|
+
options = encode_options_as_json(options, %i[attachments unfurled_attachments blocks metadata])
|
|
288
371
|
post('chat.update', options)
|
|
289
372
|
end
|
|
290
373
|
end
|
|
File without changes
|
|
@@ -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 = {})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
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 Entity
|
|
9
|
+
#
|
|
10
|
+
# Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client.
|
|
11
|
+
#
|
|
12
|
+
# @option options [object] :metadata
|
|
13
|
+
# URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID.
|
|
14
|
+
# @option options [string] :trigger_id
|
|
15
|
+
# A reference to the original user action that initiated the request.
|
|
16
|
+
# @option options [boolean] :user_auth_required
|
|
17
|
+
# Set to true (or 1) to indicate that the user must authenticate to view full flexpane data.
|
|
18
|
+
# @option options [string] :user_auth_url
|
|
19
|
+
# A custom URL to which users are directed for authentication if required.
|
|
20
|
+
# @option options [Object] :error
|
|
21
|
+
# @see https://api.slack.com/methods/entity.presentDetails
|
|
22
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/entity/entity.presentDetails.json
|
|
23
|
+
def entity_presentDetails(options = {})
|
|
24
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
|
25
|
+
options = encode_options_as_json(options, %i[metadata])
|
|
26
|
+
post('entity.presentDetails', options)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -16,7 +16,7 @@ module Slack
|
|
|
16
16
|
# @option options [string] :thread_ts
|
|
17
17
|
# Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'.
|
|
18
18
|
# @option options [string] :channels
|
|
19
|
-
# Comma-separated string of channel IDs where the file will be shared.
|
|
19
|
+
# Comma-separated string of channel IDs or user IDs where the file will be shared.
|
|
20
20
|
# @option options [string] :initial_comment
|
|
21
21
|
# The message text introducing the file in specified channels.
|
|
22
22
|
# @option options [string] :blocks
|
|
@@ -100,7 +100,7 @@ module Slack
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
#
|
|
103
|
-
# List for a team, in a channel, or from a user with applied filters.
|
|
103
|
+
# List files for a team, in a channel, or from a user with applied filters.
|
|
104
104
|
#
|
|
105
105
|
# @option options [channel] :channel
|
|
106
106
|
# Filter files appearing in a specific channel, indicated by its ID.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -15,12 +15,16 @@ module Slack
|
|
|
15
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
16
|
# @option options [string] :code
|
|
17
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.
|
|
18
20
|
# @option options [string] :redirect_uri
|
|
19
21
|
# This must match the originally submitted URI (if one was sent).
|
|
20
22
|
# @option options [string] :grant_type
|
|
21
23
|
# The grant_type param as described in the OAuth spec.
|
|
22
24
|
# @option options [string] :refresh_token
|
|
23
25
|
# The refresh_token param as described in the OAuth spec.
|
|
26
|
+
# @option options [string] :assertion
|
|
27
|
+
# Identity assertion JWT authorization grant.
|
|
24
28
|
# @see https://api.slack.com/methods/oauth.v2.access
|
|
25
29
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json
|
|
26
30
|
def oauth_v2_access(options = {})
|
|
@@ -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 = {})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,7 @@ 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.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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 = {})
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
|
3
3
|
|
|
4
4
|
require_relative 'endpoints/admin_analytics'
|
|
5
|
+
require_relative 'endpoints/admin_analytics_messages'
|
|
5
6
|
require_relative 'endpoints/admin_apps'
|
|
6
7
|
require_relative 'endpoints/admin_apps_activities'
|
|
7
8
|
require_relative 'endpoints/admin_apps_approved'
|
|
@@ -40,11 +41,14 @@ require_relative 'endpoints/apps_auth_external'
|
|
|
40
41
|
require_relative 'endpoints/apps_connections'
|
|
41
42
|
require_relative 'endpoints/apps_datastore'
|
|
42
43
|
require_relative 'endpoints/apps_event_authorizations'
|
|
44
|
+
require_relative 'endpoints/apps_icon'
|
|
43
45
|
require_relative 'endpoints/apps_manifest'
|
|
46
|
+
require_relative 'endpoints/apps_user_connection'
|
|
44
47
|
require_relative 'endpoints/assistant_search'
|
|
45
48
|
require_relative 'endpoints/assistant_threads'
|
|
46
49
|
require_relative 'endpoints/auth'
|
|
47
50
|
require_relative 'endpoints/auth_teams'
|
|
51
|
+
require_relative 'endpoints/blocks'
|
|
48
52
|
require_relative 'endpoints/bookmarks'
|
|
49
53
|
require_relative 'endpoints/bots'
|
|
50
54
|
require_relative 'endpoints/calls'
|
|
@@ -61,6 +65,7 @@ require_relative 'endpoints/conversations_requestSharedInvite'
|
|
|
61
65
|
require_relative 'endpoints/dialog'
|
|
62
66
|
require_relative 'endpoints/dnd'
|
|
63
67
|
require_relative 'endpoints/emoji'
|
|
68
|
+
require_relative 'endpoints/entity'
|
|
64
69
|
require_relative 'endpoints/files'
|
|
65
70
|
require_relative 'endpoints/files_comments'
|
|
66
71
|
require_relative 'endpoints/files_remote'
|
|
@@ -71,6 +76,7 @@ require_relative 'endpoints/functions_workflows_steps_responses'
|
|
|
71
76
|
require_relative 'endpoints/migration'
|
|
72
77
|
require_relative 'endpoints/oauth'
|
|
73
78
|
require_relative 'endpoints/oauth_v2'
|
|
79
|
+
require_relative 'endpoints/oauth_v2_user'
|
|
74
80
|
require_relative 'endpoints/openid_connect'
|
|
75
81
|
require_relative 'endpoints/pins'
|
|
76
82
|
require_relative 'endpoints/reactions'
|
|
@@ -107,6 +113,7 @@ module Slack
|
|
|
107
113
|
include Slack::Web::Api::Mixins::Users
|
|
108
114
|
|
|
109
115
|
include AdminAnalytics
|
|
116
|
+
include AdminAnalyticsMessages
|
|
110
117
|
include AdminApps
|
|
111
118
|
include AdminAppsActivities
|
|
112
119
|
include AdminAppsApproved
|
|
@@ -145,11 +152,14 @@ module Slack
|
|
|
145
152
|
include AppsConnections
|
|
146
153
|
include AppsDatastore
|
|
147
154
|
include AppsEventAuthorizations
|
|
155
|
+
include AppsIcon
|
|
148
156
|
include AppsManifest
|
|
157
|
+
include AppsUserConnection
|
|
149
158
|
include AssistantSearch
|
|
150
159
|
include AssistantThreads
|
|
151
160
|
include Auth
|
|
152
161
|
include AuthTeams
|
|
162
|
+
include Blocks
|
|
153
163
|
include Bookmarks
|
|
154
164
|
include Bots
|
|
155
165
|
include Calls
|
|
@@ -166,6 +176,7 @@ module Slack
|
|
|
166
176
|
include Dialog
|
|
167
177
|
include Dnd
|
|
168
178
|
include Emoji
|
|
179
|
+
include Entity
|
|
169
180
|
include Files
|
|
170
181
|
include FilesComments
|
|
171
182
|
include FilesRemote
|
|
@@ -176,6 +187,7 @@ module Slack
|
|
|
176
187
|
include Migration
|
|
177
188
|
include Oauth
|
|
178
189
|
include OauthV2
|
|
190
|
+
include OauthV2User
|
|
179
191
|
include OpenidConnect
|
|
180
192
|
include Pins
|
|
181
193
|
include Reactions
|
data/lib/slack/web/api/error.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|