slack-ruby-client 2.3.0 → 2.5.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/workflows/test.yml +22 -12
- data/.github/workflows/update_api.yml +1 -1
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +43 -13
- data/CHANGELOG.md +19 -0
- data/CONTRIBUTING.md +7 -7
- data/Gemfile +1 -0
- data/README.md +68 -25
- data/bin/commands/admin_conversations.rb +21 -0
- data/bin/commands/admin_emoji.rb +1 -1
- data/bin/commands/admin_users.rb +4 -4
- data/bin/commands/admin_users_session.rb +1 -1
- data/bin/commands/admin_workflows.rb +6 -2
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
- data/bin/commands/apps_datastore.rb +46 -0
- data/bin/commands/assistant_threads.rb +45 -0
- data/bin/commands/bookmarks.rb +1 -0
- data/bin/commands/canvases.rb +40 -0
- data/bin/commands/canvases_access.rb +34 -0
- data/bin/commands/canvases_sections.rb +21 -0
- data/bin/commands/chat.rb +7 -3
- data/bin/commands/conversations.rb +6 -6
- data/bin/commands/conversations_canvases.rb +21 -0
- data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
- data/bin/commands/conversations_requestSharedInvite.rb +48 -0
- data/bin/commands/files.rb +2 -1
- data/bin/commands/functions_distributions_permissions.rb +59 -0
- data/bin/commands/oauth.rb +2 -2
- data/bin/commands/oauth_v2.rb +2 -2
- data/bin/commands/reminders.rb +1 -1
- data/bin/commands/team_externalTeams.rb +35 -0
- data/bin/commands/usergroups.rb +5 -0
- data/bin/commands/usergroups_users.rb +2 -0
- data/bin/commands/users_discoverableContacts.rb +20 -0
- data/bin/commands/workflows_triggers_permissions.rb +60 -0
- data/examples/files_upload_v2/.env.example +1 -0
- data/examples/files_upload_v2/Gemfile +5 -0
- data/examples/files_upload_v2/README.md +13 -0
- data/examples/files_upload_v2/files_upload_v2.rb +37 -0
- data/examples/oauth_v2/.env.example +4 -0
- data/examples/oauth_v2/Gemfile +7 -0
- data/examples/oauth_v2/README.md +33 -0
- data/examples/oauth_v2/oauth_v2.rb +60 -0
- data/lib/slack/messages/formatting.rb +13 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_users.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_users_session.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_workflows.rb +10 -2
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -0
- data/lib/slack/web/api/endpoints/apps_datastore.rb +71 -0
- data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +2 -0
- data/lib/slack/web/api/endpoints/canvases.rb +52 -0
- data/lib/slack/web/api/endpoints/canvases_access.rb +47 -0
- data/lib/slack/web/api/endpoints/canvases_sections.rb +27 -0
- data/lib/slack/web/api/endpoints/chat.rb +12 -3
- data/lib/slack/web/api/endpoints/conversations.rb +5 -5
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +26 -0
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
- data/lib/slack/web/api/endpoints/dnd.rb +1 -0
- data/lib/slack/web/api/endpoints/files.rb +3 -1
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +80 -0
- data/lib/slack/web/api/endpoints/oauth.rb +2 -2
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
- data/lib/slack/web/api/endpoints/reminders.rb +1 -1
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +10 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +4 -0
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
- data/lib/slack/web/api/endpoints.rb +24 -0
- data/lib/slack/web/api/errors.rb +118 -8
- data/lib/slack/web/api/helpers/files.rb +87 -0
- data/lib/slack/web/api/helpers.rb +13 -0
- data/lib/slack/web/api/templates/method.erb +1 -0
- data/lib/slack/web/api/templates/method_spec.erb +6 -4
- data/lib/slack/web/client.rb +1 -0
- data/lib/slack/web/faraday/connection.rb +13 -26
- data/lib/slack/web/faraday/options.rb +24 -0
- data/lib/slack/web/faraday/request.rb +2 -1
- data/lib/slack-ruby-client.rb +2 -0
- data/slack-ruby-client.gemspec +2 -1
- metadata +52 -144
- data/screenshots/create-app.png +0 -0
- data/spec/fixtures/slack/web/429_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_success.yml +0 -81
- data/spec/fixtures/slack/web/conversations_info.yml +0 -167
- data/spec/fixtures/slack/web/conversations_setTopic.yml +0 -84
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +0 -172
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +0 -253
- data/spec/fixtures/slack/web/paginated_users_list.yml +0 -613
- data/spec/fixtures/slack/web/rtm_connect.yml +0 -391
- data/spec/fixtures/slack/web/users_info.yml +0 -214
- data/spec/fixtures/slack/web/users_list.yml +0 -133
- data/spec/fixtures/slack/web/views_open_error.yml +0 -83
- data/spec/integration/integration_spec.rb +0 -207
- data/spec/slack/config_spec.rb +0 -16
- data/spec/slack/events/config_spec.rb +0 -35
- data/spec/slack/events/request_spec.rb +0 -199
- data/spec/slack/messages/formatting_spec.rb +0 -124
- data/spec/slack/real_time/api/message_spec.rb +0 -20
- data/spec/slack/real_time/api/ping_spec.rb +0 -17
- data/spec/slack/real_time/api/typing_spec.rb +0 -19
- data/spec/slack/real_time/client_spec.rb +0 -601
- data/spec/slack/real_time/concurrency/clients/async_spec.rb +0 -16
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -21
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -47
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -16
- data/spec/slack/real_time/event_handlers/im_spec.rb +0 -51
- data/spec/slack/real_time/event_handlers/private_channel_spec.rb +0 -99
- data/spec/slack/real_time/event_handlers/public_channel_spec.rb +0 -123
- data/spec/slack/real_time/event_handlers/team_spec.rb +0 -63
- data/spec/slack/real_time/event_handlers/user_spec.rb +0 -65
- data/spec/slack/real_time/rtm_connect_spec.rb +0 -14
- data/spec/slack/real_time/stores/store_spec.rb +0 -50
- data/spec/slack/slack_spec.rb +0 -93
- data/spec/slack/version_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_activities_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_config_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +0 -35
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +0 -32
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +0 -133
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_functions_permissions_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/admin_functions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +0 -30
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +0 -53
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +0 -41
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +0 -67
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_workflows_collaborators_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/admin_workflows_permissions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_workflows_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/api_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_activities_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_auth_external_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_datastore_spec.rb +0 -45
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +0 -44
- data/spec/slack/web/api/endpoints/apps_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/auth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/bots_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/calls_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/chat_spec.rb +0 -134
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -27
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -206
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +0 -112
- data/spec/slack/web/api/endpoints/dialog_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/files_spec.rb +0 -57
- data/spec/slack/web/api/endpoints/functions_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/migration_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/openid_connect_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/pins_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/search_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/stars_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_billing_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/users_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/views_spec.rb +0 -65
- data/spec/slack/web/api/endpoints/workflows_spec.rb +0 -34
- data/spec/slack/web/api/error_spec.rb +0 -14
- data/spec/slack/web/api/errors/slack_error_spec.rb +0 -33
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +0 -21
- data/spec/slack/web/api/mixins/conversations_spec.rb +0 -45
- data/spec/slack/web/api/mixins/users_spec.rb +0 -52
- data/spec/slack/web/api/options_spec.rb +0 -69
- data/spec/slack/web/api/pagination/cursor_spec.rb +0 -102
- data/spec/slack/web/client_spec.rb +0 -359
- data/spec/slack/web/faraday/request_spec.rb +0 -80
- data/spec/slack/web/faraday/response/raise_error_spec.rb +0 -86
- data/spec/spec_helper.rb +0 -30
- data/spec/support/queue_with_timeout.rb +0 -35
- data/spec/support/real_time/concurrency/mock.rb +0 -31
- data/spec/support/real_time/connected_client.rb +0 -21
- data/spec/support/real_time/event.rb +0 -12
- data/spec/support/real_time/loaded_client.rb +0 -120
- data/spec/support/token.rb +0 -11
- data/spec/support/vcr.rb +0 -45
@@ -112,6 +112,8 @@ module Slack
|
|
112
112
|
# URL to an image to use as the icon for this message.
|
113
113
|
# @option options [boolean] :link_names
|
114
114
|
# Find and link channel names and usernames.
|
115
|
+
# @option options [string] :markdown_text
|
116
|
+
# 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.
|
115
117
|
# @option options [string] :parse
|
116
118
|
# Change how messages are treated. Defaults to none. See below.
|
117
119
|
# @option options [string] :thread_ts
|
@@ -133,7 +135,7 @@ module Slack
|
|
133
135
|
# Sends a message to a channel.
|
134
136
|
#
|
135
137
|
# @option options [channel] :channel
|
136
|
-
#
|
138
|
+
# 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.
|
137
139
|
# @option options [string] :attachments
|
138
140
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
139
141
|
# @option options [blocks[] as string] :blocks
|
@@ -141,13 +143,15 @@ module Slack
|
|
141
143
|
# @option options [string] :text
|
142
144
|
# How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
|
143
145
|
# @option options [boolean] :as_user
|
144
|
-
# (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic
|
146
|
+
# (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.
|
145
147
|
# @option options [string] :icon_emoji
|
146
148
|
# Emoji to use as the icon for this message. Overrides icon_url.
|
147
149
|
# @option options [string] :icon_url
|
148
150
|
# URL to an image to use as the icon for this message.
|
149
151
|
# @option options [boolean] :link_names
|
150
152
|
# Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
|
153
|
+
# @option options [string] :markdown_text
|
154
|
+
# 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.
|
151
155
|
# @option options [string] :metadata
|
152
156
|
# 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.
|
153
157
|
# @option options [boolean] :mrkdwn
|
@@ -169,6 +173,7 @@ module Slack
|
|
169
173
|
def chat_postMessage(options = {})
|
170
174
|
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
171
175
|
raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
|
176
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
172
177
|
options = encode_options_as_json(options, %i[attachments blocks metadata])
|
173
178
|
post('chat.postMessage', options)
|
174
179
|
end
|
@@ -190,6 +195,8 @@ module Slack
|
|
190
195
|
# Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.
|
191
196
|
# @option options [boolean] :link_names
|
192
197
|
# Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
|
198
|
+
# @option options [string] :markdown_text
|
199
|
+
# 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
200
|
# @option options [string] :metadata
|
194
201
|
# 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.
|
195
202
|
# @option options [enum] :parse
|
@@ -248,7 +255,7 @@ module Slack
|
|
248
255
|
# Updates a message.
|
249
256
|
#
|
250
257
|
# @option options [channel] :channel
|
251
|
-
# Channel containing the message to be updated.
|
258
|
+
# Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with D) instead of a User ID (starts with either U or W).
|
252
259
|
# @option options [timestamp] :ts
|
253
260
|
# Timestamp of the message to be updated.
|
254
261
|
# @option options [string] :attachments
|
@@ -263,6 +270,8 @@ module Slack
|
|
263
270
|
# Array of new file ids that will be sent with this message.
|
264
271
|
# @option options [boolean] :link_names
|
265
272
|
# Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.
|
273
|
+
# @option options [string] :markdown_text
|
274
|
+
# 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.
|
266
275
|
# @option options [string] :metadata
|
267
276
|
# 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.
|
268
277
|
# @option options [string] :parse
|
@@ -112,7 +112,7 @@ module Slack
|
|
112
112
|
# @option options [timestamp] :latest
|
113
113
|
# Only messages before this Unix timestamp will be included in results. Default is the current time.
|
114
114
|
# @option options [number] :limit
|
115
|
-
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the
|
115
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the conversation history hasn't been reached. Maximum of 999.
|
116
116
|
# @option options [timestamp] :oldest
|
117
117
|
# Only messages after this Unix timestamp will be included in results.
|
118
118
|
# @see https://api.slack.com/methods/conversations.history
|
@@ -172,7 +172,7 @@ module Slack
|
|
172
172
|
# @option options [array] :emails
|
173
173
|
# Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
|
174
174
|
# @option options [boolean] :external_limited
|
175
|
-
# Optional boolean on whether invite is to
|
175
|
+
# Optional boolean on whether invite is to an external limited member. Defaults to true.
|
176
176
|
# @option options [array] :user_ids
|
177
177
|
# Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.
|
178
178
|
# @see https://api.slack.com/methods/conversations.inviteShared
|
@@ -378,12 +378,12 @@ module Slack
|
|
378
378
|
end
|
379
379
|
|
380
380
|
#
|
381
|
-
# Sets the
|
381
|
+
# Sets the channel description.
|
382
382
|
#
|
383
383
|
# @option options [channel] :channel
|
384
|
-
#
|
384
|
+
# Channel to set the description of.
|
385
385
|
# @option options [string] :purpose
|
386
|
-
#
|
386
|
+
# The description.
|
387
387
|
# @see https://api.slack.com/methods/conversations.setPurpose
|
388
388
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.setPurpose.json
|
389
389
|
def conversations_setPurpose(options = {})
|
@@ -0,0 +1,26 @@
|
|
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 ConversationsCanvases
|
9
|
+
#
|
10
|
+
# Create a channel canvas for a channel
|
11
|
+
#
|
12
|
+
# @option options [string] :channel_id
|
13
|
+
# Channel ID of the channel we create the channel canvas for.
|
14
|
+
# @option options [Object] :document_content
|
15
|
+
# Structure describing the type and value of the content to create.
|
16
|
+
# @see https://api.slack.com/methods/conversations.canvases.create
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.canvases/conversations.canvases.create.json
|
18
|
+
def conversations_canvases_create(options = {})
|
19
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
20
|
+
post('conversations.canvases.create', options)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -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 ConversationsExternalinvitepermissions
|
9
|
+
#
|
10
|
+
# Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'.
|
11
|
+
#
|
12
|
+
# @option options [enum] :action
|
13
|
+
# Type of action to be taken: upgrade or downgrade.
|
14
|
+
# @option options [channel] :channel
|
15
|
+
# The channel ID to change external invite permissions for.
|
16
|
+
# @option options [Object] :target_team
|
17
|
+
# The encoded team ID of the target team. Must be in the specified channel.
|
18
|
+
# @see https://api.slack.com/methods/conversations.externalInvitePermissions.set
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.externalInvitePermissions/conversations.externalInvitePermissions.set.json
|
20
|
+
def conversations_externalInvitePermissions_set(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :action missing' if options[:action].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
23
|
+
raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil?
|
24
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
25
|
+
post('conversations.externalInvitePermissions.set', options)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module ConversationsRequestsharedinvite
|
9
|
+
#
|
10
|
+
# Approves a request to add an external user to a channel and sends them a Slack Connect invite
|
11
|
+
#
|
12
|
+
# @option options [Object] :invite_id
|
13
|
+
# ID of the requested shared channel invite to approve.
|
14
|
+
# @option options [string] :channel_id
|
15
|
+
# Optional channel_id to which external user will be invited to. Will override the value on the requested invite.
|
16
|
+
# @option options [boolean] :is_external_limited
|
17
|
+
# Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.
|
18
|
+
# @option options [object] :message
|
19
|
+
# Object describing the text to send along with the invite. If this object is specified, both text and is_override are required properties. If is_override is set to true, text will override the original invitation message. Otherwise, text will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If is_override is set to false, the length of text and the user specified message on the invite request in total must be less than 560 characters.
|
20
|
+
# @see https://api.slack.com/methods/conversations.requestSharedInvite.approve
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.requestSharedInvite/conversations.requestSharedInvite.approve.json
|
22
|
+
def conversations_requestSharedInvite_approve(options = {})
|
23
|
+
raise ArgumentError, 'Required arguments :invite_id missing' if options[:invite_id].nil?
|
24
|
+
post('conversations.requestSharedInvite.approve', options)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Denies a request to invite an external user to a channel
|
29
|
+
#
|
30
|
+
# @option options [Object] :invite_id
|
31
|
+
# ID of the requested shared channel invite to deny.
|
32
|
+
# @option options [string] :message
|
33
|
+
# Optional message explaining why the request to invite was denied.
|
34
|
+
# @see https://api.slack.com/methods/conversations.requestSharedInvite.deny
|
35
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.requestSharedInvite/conversations.requestSharedInvite.deny.json
|
36
|
+
def conversations_requestSharedInvite_deny(options = {})
|
37
|
+
raise ArgumentError, 'Required arguments :invite_id missing' if options[:invite_id].nil?
|
38
|
+
post('conversations.requestSharedInvite.deny', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Lists requests to add external users to channels with ability to filter.
|
43
|
+
#
|
44
|
+
# @option options [string] :cursor
|
45
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail.
|
46
|
+
# @option options [boolean] :include_approved
|
47
|
+
# When true approved invitation requests will be returned, otherwise they will be excluded.
|
48
|
+
# @option options [boolean] :include_denied
|
49
|
+
# When true denied invitation requests will be returned, otherwise they will be excluded.
|
50
|
+
# @option options [boolean] :include_expired
|
51
|
+
# When true expired invitation requests will be returned, otherwise they will be excluded.
|
52
|
+
# @option options [array] :invite_ids
|
53
|
+
# An optional list of invitation ids to look up.
|
54
|
+
# @option options [integer] :limit
|
55
|
+
# The number of items to return. Must be between 1 - 1000 (inclusive).
|
56
|
+
# @option options [Object] :user_id
|
57
|
+
# Optional filter to return invitation requests for the inviting user.
|
58
|
+
# @see https://api.slack.com/methods/conversations.requestSharedInvite.list
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.requestSharedInvite/conversations.requestSharedInvite.list.json
|
60
|
+
def conversations_requestSharedInvite_list(options = {})
|
61
|
+
if block_given?
|
62
|
+
Pagination::Cursor.new(self, :conversations_requestSharedInvite_list, options).each do |page|
|
63
|
+
yield page
|
64
|
+
end
|
65
|
+
else
|
66
|
+
post('conversations.requestSharedInvite.list', options)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -46,6 +46,7 @@ module Slack
|
|
46
46
|
# @see https://api.slack.com/methods/dnd.setSnooze
|
47
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json
|
48
48
|
def dnd_setSnooze(options = {})
|
49
|
+
raise ArgumentError, 'Required arguments :num_minutes missing' if options[:num_minutes].nil?
|
49
50
|
post('dnd.setSnooze', options)
|
50
51
|
end
|
51
52
|
|
@@ -13,10 +13,12 @@ module Slack
|
|
13
13
|
# Array of file ids and their corresponding (optional) titles.
|
14
14
|
# @option options [Object] :channel_id
|
15
15
|
# Channel ID where the file will be shared. If not specified the file will be private.
|
16
|
+
# @option options [string] :channels
|
17
|
+
# Comma-separated string of channel IDs where the file will be shared.
|
16
18
|
# @option options [string] :initial_comment
|
17
19
|
# The message text introducing the file in specified channels.
|
18
20
|
# @option options [string] :thread_ts
|
19
|
-
# Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.
|
21
|
+
# 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'.
|
20
22
|
# @see https://api.slack.com/methods/files.completeUploadExternal
|
21
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.completeUploadExternal.json
|
22
24
|
def files_completeUploadExternal(options = {})
|
@@ -0,0 +1,80 @@
|
|
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 FunctionsDistributionsPermissions
|
9
|
+
#
|
10
|
+
# Grant users access to a custom slack function if its permission_type is set to named_entities
|
11
|
+
#
|
12
|
+
# @option options [string] :function_app_id
|
13
|
+
# The encoded ID of the app.
|
14
|
+
# @option options [string] :function_callback_id
|
15
|
+
# The callback ID defined in the function's definition file.
|
16
|
+
# @option options [string] :function_id
|
17
|
+
# The encoded ID of the function.
|
18
|
+
# @option options [array] :user_ids
|
19
|
+
# List of encoded user IDs.
|
20
|
+
# @see https://api.slack.com/methods/functions.distributions.permissions.add
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.add.json
|
22
|
+
def functions_distributions_permissions_add(options = {})
|
23
|
+
post('functions.distributions.permissions.add', options)
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities
|
28
|
+
#
|
29
|
+
# @option options [string] :function_app_id
|
30
|
+
# The encoded ID of the app.
|
31
|
+
# @option options [string] :function_callback_id
|
32
|
+
# The callback ID defined in the function's definition file.
|
33
|
+
# @option options [string] :function_id
|
34
|
+
# The encoded ID of the function.
|
35
|
+
# @see https://api.slack.com/methods/functions.distributions.permissions.list
|
36
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.list.json
|
37
|
+
def functions_distributions_permissions_list(options = {})
|
38
|
+
post('functions.distributions.permissions.list', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Revoke user access to a custom slack function if permission_type set to named_entities
|
43
|
+
#
|
44
|
+
# @option options [string] :function_app_id
|
45
|
+
# The encoded ID of the app.
|
46
|
+
# @option options [string] :function_callback_id
|
47
|
+
# The callback ID defined in the function's definition file.
|
48
|
+
# @option options [string] :function_id
|
49
|
+
# The encoded ID of the function.
|
50
|
+
# @option options [array] :user_ids
|
51
|
+
# List of encoded user IDs.
|
52
|
+
# @see https://api.slack.com/methods/functions.distributions.permissions.remove
|
53
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.remove.json
|
54
|
+
def functions_distributions_permissions_remove(options = {})
|
55
|
+
post('functions.distributions.permissions.remove', options)
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities
|
60
|
+
#
|
61
|
+
# @option options [enum] :permission_type
|
62
|
+
# The type of permission that defines how the function can be distributed.
|
63
|
+
# @option options [string] :function_app_id
|
64
|
+
# The encoded ID of the app.
|
65
|
+
# @option options [string] :function_callback_id
|
66
|
+
# The callback ID defined in the function's definition file.
|
67
|
+
# @option options [string] :function_id
|
68
|
+
# The encoded ID of the function.
|
69
|
+
# @option options [array] :user_ids
|
70
|
+
# List of encoded user IDs.
|
71
|
+
# @see https://api.slack.com/methods/functions.distributions.permissions.set
|
72
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.set.json
|
73
|
+
def functions_distributions_permissions_set(options = {})
|
74
|
+
post('functions.distributions.permissions.set', options)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -10,9 +10,9 @@ module Slack
|
|
10
10
|
# Exchanges a temporary OAuth verifier code for an access token.
|
11
11
|
#
|
12
12
|
# @option options [string] :client_id
|
13
|
-
# Issued when you created your application.
|
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
14
|
# @option options [string] :client_secret
|
15
|
-
# Issued when you created your application.
|
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
18
|
# @option options [string] :redirect_uri
|
@@ -10,9 +10,9 @@ module Slack
|
|
10
10
|
# Exchanges a temporary OAuth verifier code for an access token.
|
11
11
|
#
|
12
12
|
# @option options [string] :client_id
|
13
|
-
# Issued when you created your application.
|
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
14
|
# @option options [string] :client_secret
|
15
|
-
# Issued when you created your application.
|
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
18
|
# @option options [string] :grant_type
|
@@ -12,7 +12,7 @@ module Slack
|
|
12
12
|
# @option options [string] :text
|
13
13
|
# The content of the reminder.
|
14
14
|
# @option options [string] :time
|
15
|
-
# When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").
|
15
|
+
# Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").
|
16
16
|
# @option options [object] :recurrence
|
17
17
|
# Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.
|
18
18
|
# @option options [string] :team_id
|
@@ -0,0 +1,53 @@
|
|
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 TeamExternalteams
|
9
|
+
#
|
10
|
+
# Disconnect an external organization.
|
11
|
+
#
|
12
|
+
# @option options [Object] :target_team
|
13
|
+
# The team ID of the target team.
|
14
|
+
# @see https://api.slack.com/methods/team.externalTeams.disconnect
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.externalTeams/team.externalTeams.disconnect.json
|
16
|
+
def team_externalTeams_disconnect(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil?
|
18
|
+
post('team.externalTeams.disconnect', options)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Returns a list of all the external teams connected and details about the connection.
|
23
|
+
#
|
24
|
+
# @option options [enum] :connection_status_filter
|
25
|
+
# Status of the connected team.
|
26
|
+
# @option options [string] :cursor
|
27
|
+
# Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail.
|
28
|
+
# @option options [integer] :limit
|
29
|
+
# The maximum number of items to return per page.
|
30
|
+
# @option options [array] :slack_connect_pref_filter
|
31
|
+
# Filters connected orgs by Slack Connect pref override(s). Value can be: approved_orgs_only allow_sc_file_uploads profile_visibility away_team_sc_invite_permissions accept_sc_invites sc_mpdm_to_private require_sc_channel_for_sc_dm external_awareness_context_bar.
|
32
|
+
# @option options [enum] :sort_direction
|
33
|
+
# Direction to sort in asc or desc.
|
34
|
+
# @option options [enum] :sort_field
|
35
|
+
# Name of the parameter that we are sorting by.
|
36
|
+
# @option options [array] :workspace_filter
|
37
|
+
# Shows connected orgs which are connected on a specified encoded workspace ID.
|
38
|
+
# @see https://api.slack.com/methods/team.externalTeams.list
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.externalTeams/team.externalTeams.list.json
|
40
|
+
def team_externalTeams_list(options = {})
|
41
|
+
if block_given?
|
42
|
+
Pagination::Cursor.new(self, :team_externalTeams_list, options).each do |page|
|
43
|
+
yield page
|
44
|
+
end
|
45
|
+
else
|
46
|
+
post('team.externalTeams.list', options)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -11,10 +11,14 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [string] :name
|
13
13
|
# A name for the User Group. Must be unique among User Groups.
|
14
|
+
# @option options [array] :additional_channels
|
15
|
+
# A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
|
14
16
|
# @option options [array] :channels
|
15
17
|
# A comma separated string of encoded channel IDs for which the User Group uses as a default.
|
16
18
|
# @option options [string] :description
|
17
19
|
# A short description of the User Group.
|
20
|
+
# @option options [boolean] :enable_section
|
21
|
+
# Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
|
18
22
|
# @option options [string] :handle
|
19
23
|
# A mention handle. Must be unique among channels, users and User Groups.
|
20
24
|
# @option options [boolean] :include_count
|
@@ -71,6 +75,8 @@ module Slack
|
|
71
75
|
# Include the list of users for each User Group.
|
72
76
|
# @option options [string] :team_id
|
73
77
|
# encoded team id to list user groups in, required if org token is used.
|
78
|
+
# @option options [Object] :usergroup_id
|
79
|
+
# The id of the usergroup you would like to filter the results down to.
|
74
80
|
# @see https://api.slack.com/methods/usergroups.list
|
75
81
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json
|
76
82
|
def usergroups_list(options = {})
|
@@ -82,10 +88,14 @@ module Slack
|
|
82
88
|
#
|
83
89
|
# @option options [Object] :usergroup
|
84
90
|
# The encoded ID of the User Group to update.
|
91
|
+
# @option options [array] :additional_channels
|
92
|
+
# A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
|
85
93
|
# @option options [array] :channels
|
86
94
|
# A comma separated string of encoded channel IDs for which the User Group uses as a default.
|
87
95
|
# @option options [string] :description
|
88
96
|
# A short description of the User Group.
|
97
|
+
# @option options [boolean] :enable_section
|
98
|
+
# Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.
|
89
99
|
# @option options [string] :handle
|
90
100
|
# A mention handle. Must be unique among channels, users and User Groups.
|
91
101
|
# @option options [boolean] :include_count
|
@@ -29,8 +29,12 @@ module Slack
|
|
29
29
|
# The encoded ID of the user group to update.
|
30
30
|
# @option options [array] :users
|
31
31
|
# A comma separated string of encoded user IDs that represent the entire list of users for the user group.
|
32
|
+
# @option options [array] :additional_channels
|
33
|
+
# A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.
|
32
34
|
# @option options [boolean] :include_count
|
33
35
|
# Include the number of users in the user group.
|
36
|
+
# @option options [boolean] :is_shared
|
37
|
+
# Boolean to identify if the API is getting called when a shared section is getting shared.
|
34
38
|
# @option options [string] :team_id
|
35
39
|
# encoded team id where the user group exists, required if org token is used.
|
36
40
|
# @see https://api.slack.com/methods/usergroups.users.update
|
@@ -0,0 +1,24 @@
|
|
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 UsersDiscoverablecontacts
|
9
|
+
#
|
10
|
+
# Look up an email address to see if someone is discoverable on Slack
|
11
|
+
#
|
12
|
+
# @option options [string] :email
|
13
|
+
# .
|
14
|
+
# @see https://api.slack.com/methods/users.discoverableContacts.lookup
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.discoverableContacts/users.discoverableContacts.lookup.json
|
16
|
+
def users_discoverableContacts_lookup(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
|
18
|
+
post('users.discoverableContacts.lookup', options)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,87 @@
|
|
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 WorkflowsTriggersPermissions
|
9
|
+
#
|
10
|
+
# Allows users to run a trigger that has its permission type set to named_entities
|
11
|
+
#
|
12
|
+
# @option options [string] :trigger_id
|
13
|
+
# Encoded ID of the trigger.
|
14
|
+
# @option options [array] :channel_ids
|
15
|
+
# List of encoded channel IDs.
|
16
|
+
# @option options [array] :org_ids
|
17
|
+
# List of encoded organization IDs.
|
18
|
+
# @option options [array] :team_ids
|
19
|
+
# List of encoded workspace IDs.
|
20
|
+
# @option options [array] :user_ids
|
21
|
+
# List of encoded user IDs.
|
22
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.add
|
23
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.add.json
|
24
|
+
def workflows_triggers_permissions_add(options = {})
|
25
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
26
|
+
post('workflows.triggers.permissions.add', options)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
|
31
|
+
#
|
32
|
+
# @option options [string] :trigger_id
|
33
|
+
# Encoded ID of the trigger.
|
34
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.list
|
35
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.list.json
|
36
|
+
def workflows_triggers_permissions_list(options = {})
|
37
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
38
|
+
post('workflows.triggers.permissions.list', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Revoke an entity's access to a trigger that has its permission type set to named_entities
|
43
|
+
#
|
44
|
+
# @option options [string] :trigger_id
|
45
|
+
# Encoded ID of the trigger.
|
46
|
+
# @option options [array] :channel_ids
|
47
|
+
# List of encoded channel IDs.
|
48
|
+
# @option options [array] :org_ids
|
49
|
+
# List of encoded organization IDs.
|
50
|
+
# @option options [array] :team_ids
|
51
|
+
# List of encoded workspace IDs.
|
52
|
+
# @option options [array] :user_ids
|
53
|
+
# List of encoded user IDs.
|
54
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.remove
|
55
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.remove.json
|
56
|
+
def workflows_triggers_permissions_remove(options = {})
|
57
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
58
|
+
post('workflows.triggers.permissions.remove', options)
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Set the permission type for who can run a trigger
|
63
|
+
#
|
64
|
+
# @option options [enum] :permission_type
|
65
|
+
# The type of permission that defines who can run a trigger.
|
66
|
+
# @option options [string] :trigger_id
|
67
|
+
# Encoded ID of the trigger.
|
68
|
+
# @option options [array] :channel_ids
|
69
|
+
# List of encoded channel IDs.
|
70
|
+
# @option options [array] :org_ids
|
71
|
+
# List of encoded organization IDs.
|
72
|
+
# @option options [array] :team_ids
|
73
|
+
# List of encoded workspace IDs.
|
74
|
+
# @option options [array] :user_ids
|
75
|
+
# List of encoded user IDs.
|
76
|
+
# @see https://api.slack.com/methods/workflows.triggers.permissions.set
|
77
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.set.json
|
78
|
+
def workflows_triggers_permissions_set(options = {})
|
79
|
+
raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil?
|
80
|
+
raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
|
81
|
+
post('workflows.triggers.permissions.set', options)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|