slack-ruby-client 2.7.0 → 3.0.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 +3 -10
- data/.rubocop_todo.yml +45 -67
- data/CHANGELOG.md +7 -0
- data/Gemfile +0 -9
- data/LICENSE.md +1 -1
- data/README.md +16 -219
- data/Rakefile +0 -1
- data/UPGRADING.md +4 -0
- data/bin/commands/admin_analytics.rb +1 -1
- data/bin/commands/admin_apps.rb +4 -4
- data/bin/commands/admin_apps_activities.rb +7 -7
- data/bin/commands/admin_apps_approved.rb +4 -4
- data/bin/commands/admin_apps_config.rb +3 -1
- data/bin/commands/admin_apps_requests.rb +5 -5
- data/bin/commands/admin_apps_restricted.rb +4 -4
- data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
- data/bin/commands/admin_auth_policy.rb +5 -5
- data/bin/commands/admin_barriers.rb +3 -3
- data/bin/commands/admin_conversations.rb +15 -15
- data/bin/commands/admin_conversations_ekm.rb +2 -2
- data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
- data/bin/commands/admin_emoji.rb +5 -5
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_inviteRequests.rb +3 -3
- data/bin/commands/admin_inviteRequests_approved.rb +1 -1
- data/bin/commands/admin_inviteRequests_denied.rb +1 -1
- data/bin/commands/admin_roles.rb +3 -3
- data/bin/commands/admin_teams.rb +3 -3
- data/bin/commands/admin_teams_admins.rb +2 -2
- data/bin/commands/admin_teams_owners.rb +2 -2
- data/bin/commands/admin_teams_settings.rb +5 -5
- data/bin/commands/admin_usergroups.rb +4 -4
- data/bin/commands/admin_users.rb +12 -11
- data/bin/commands/admin_users_session.rb +6 -5
- data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
- data/bin/commands/admin_workflows.rb +6 -6
- data/bin/commands/admin_workflows_collaborators.rb +2 -2
- data/bin/commands/apps_activities.rb +7 -7
- data/bin/commands/apps_auth_external.rb +1 -1
- data/bin/commands/apps_datastore.rb +12 -12
- data/bin/commands/apps_event_authorizations.rb +3 -3
- data/bin/commands/apps_manifest.rb +1 -1
- data/bin/commands/assistant_search.rb +18 -2
- data/bin/commands/assistant_threads.rb +2 -2
- data/bin/commands/auth.rb +1 -1
- data/bin/commands/auth_teams.rb +1 -1
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/calls.rb +5 -5
- data/bin/commands/canvases.rb +2 -2
- data/bin/commands/canvases_access.rb +1 -1
- data/bin/commands/chat.rb +23 -24
- data/bin/commands/conversations.rb +8 -8
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
- data/bin/commands/conversations_requestSharedInvite.rb +4 -4
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +5 -5
- data/bin/commands/files_remote.rb +1 -1
- data/bin/commands/functions.rb +1 -1
- data/bin/commands/functions_distributions_permissions.rb +15 -15
- data/bin/commands/functions_workflows_steps.rb +2 -2
- data/bin/commands/functions_workflows_steps_responses.rb +2 -2
- data/bin/commands/migration.rb +2 -2
- data/bin/commands/oauth_v2.rb +1 -1
- data/bin/commands/openid_connect.rb +1 -1
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +2 -2
- data/bin/commands/rtm.rb +15 -0
- data/bin/commands/search.rb +4 -4
- data/bin/commands/slackLists.rb +37 -0
- data/bin/commands/slackLists_access.rb +34 -0
- data/bin/commands/slackLists_download.rb +31 -0
- data/bin/commands/slackLists_items.rb +76 -0
- data/bin/commands/team.rb +1 -1
- data/bin/commands/team_externalTeams.rb +4 -4
- data/bin/commands/usergroups.rb +10 -10
- data/bin/commands/usergroups_users.rb +5 -5
- data/bin/commands/users.rb +1 -1
- data/bin/commands/users_discoverableContacts.rb +1 -1
- data/bin/commands/views.rb +4 -4
- data/bin/commands/workflows_featured.rb +50 -0
- data/bin/commands/workflows_triggers_permissions.rb +7 -7
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
- data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
- data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
- data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
- data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
- data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
- data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
- data/lib/slack/web/api/endpoints/calls.rb +10 -10
- data/lib/slack/web/api/endpoints/canvases.rb +4 -4
- data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
- data/lib/slack/web/api/endpoints/chat.rb +53 -55
- data/lib/slack/web/api/endpoints/conversations.rb +16 -16
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
- data/lib/slack/web/api/endpoints/dnd.rb +2 -2
- data/lib/slack/web/api/endpoints/files.rb +11 -11
- data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
- data/lib/slack/web/api/endpoints/functions.rb +3 -3
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
- data/lib/slack/web/api/endpoints/migration.rb +1 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
- data/lib/slack/web/api/endpoints/reactions.rb +6 -6
- data/lib/slack/web/api/endpoints/reminders.rb +4 -4
- data/lib/slack/web/api/endpoints/rtm.rb +23 -0
- data/lib/slack/web/api/endpoints/search.rb +8 -8
- data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
- data/lib/slack/web/api/endpoints/team.rb +3 -3
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
- data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
- data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
- data/lib/slack/web/api/endpoints/users.rb +2 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
- data/lib/slack/web/api/endpoints/views.rb +9 -9
- data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
- data/lib/slack/web/api/endpoints.rb +10 -2
- data/lib/slack/web/api/errors.rb +88 -46
- data/lib/slack/web/faraday/response/raise_error.rb +20 -2
- data/lib/slack-ruby-client.rb +0 -12
- data/lib/tasks/update.rake +0 -1
- data/lib/tasks/web.rake +0 -4
- metadata +12 -35
- data/.github/workflows/integration_test.yml +0 -45
- data/bin/commands/workflows.rb +0 -44
- data/examples/hi_real_time_and_web/Gemfile +0 -6
- data/examples/hi_real_time_and_web/hi.gif +0 -0
- data/examples/hi_real_time_and_web/hi.rb +0 -28
- data/examples/hi_real_time_async_async/Gemfile +0 -7
- data/examples/hi_real_time_async_async/Procfile +0 -2
- data/examples/hi_real_time_async_async/hi.rb +0 -41
- data/lib/slack/real_time/api/message.rb +0 -23
- data/lib/slack/real_time/api/message_id.rb +0 -15
- data/lib/slack/real_time/api/ping.rb +0 -19
- data/lib/slack/real_time/api/schema/event.json +0 -23
- data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
- data/lib/slack/real_time/api/typing.rb +0 -20
- data/lib/slack/real_time/client.rb +0 -271
- data/lib/slack/real_time/concurrency/async.rb +0 -142
- data/lib/slack/real_time/concurrency.rb +0 -8
- data/lib/slack/real_time/config.rb +0 -62
- data/lib/slack/real_time/models/base.rb +0 -11
- data/lib/slack/real_time/models/bot.rb +0 -9
- data/lib/slack/real_time/models/channel.rb +0 -13
- data/lib/slack/real_time/models/im.rb +0 -9
- data/lib/slack/real_time/models/mpim.rb +0 -9
- data/lib/slack/real_time/models/team.rb +0 -9
- data/lib/slack/real_time/models/user.rb +0 -9
- data/lib/slack/real_time/models.rb +0 -9
- data/lib/slack/real_time/socket.rb +0 -118
- data/lib/slack/real_time/stores/base.rb +0 -47
- data/lib/slack/real_time/stores/starter.rb +0 -449
- data/lib/slack/real_time/stores/store.rb +0 -624
- data/lib/slack/real_time/stores.rb +0 -5
- data/lib/slack/web/api/endpoints/workflows.rb +0 -63
- data/lib/tasks/real_time.rake +0 -81
@@ -14,7 +14,6 @@ module Slack
|
|
14
14
|
# @option options [array] :ids
|
15
15
|
# IDs of items to be deleted.
|
16
16
|
# @option options [Object] :app_id
|
17
|
-
# .
|
18
17
|
# @see https://api.slack.com/methods/apps.datastore.bulkDelete
|
19
18
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkDelete.json
|
20
19
|
def apps_datastore_bulkDelete(options = {})
|
@@ -31,7 +30,6 @@ module Slack
|
|
31
30
|
# @option options [array] :ids
|
32
31
|
# items' ids.
|
33
32
|
# @option options [Object] :app_id
|
34
|
-
# .
|
35
33
|
# @see https://api.slack.com/methods/apps.datastore.bulkGet
|
36
34
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkGet.json
|
37
35
|
def apps_datastore_bulkGet(options = {})
|
@@ -48,7 +46,6 @@ module Slack
|
|
48
46
|
# @option options [array] :items
|
49
47
|
# attribute names and values of the items; limit of 25.
|
50
48
|
# @option options [Object] :app_id
|
51
|
-
# .
|
52
49
|
# @see https://api.slack.com/methods/apps.datastore.bulkPut
|
53
50
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkPut.json
|
54
51
|
def apps_datastore_bulkPut(options = {})
|
@@ -62,14 +59,14 @@ module Slack
|
|
62
59
|
#
|
63
60
|
# @option options [string] :datastore
|
64
61
|
# Name of the datastore.
|
65
|
-
# @option options [Object] :app_id
|
66
|
-
# Required if calling with user token.
|
67
62
|
# @option options [string] :expression
|
68
|
-
# A query filter expression
|
63
|
+
# A query filter expression.
|
69
64
|
# @option options [object] :expression_attributes
|
70
65
|
# A map of attributes referenced in expression.
|
71
66
|
# @option options [object] :expression_values
|
72
67
|
# A map of values referenced in expression.
|
68
|
+
# @option options [Object] :app_id
|
69
|
+
# Required if calling with user token.
|
73
70
|
# @see https://api.slack.com/methods/apps.datastore.count
|
74
71
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.count.json
|
75
72
|
def apps_datastore_count(options = {})
|
@@ -85,7 +82,6 @@ module Slack
|
|
85
82
|
# @option options [string] :id
|
86
83
|
# item id.
|
87
84
|
# @option options [Object] :app_id
|
88
|
-
# .
|
89
85
|
# @see https://api.slack.com/methods/apps.datastore.delete
|
90
86
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.delete.json
|
91
87
|
def apps_datastore_delete(options = {})
|
@@ -102,7 +98,6 @@ module Slack
|
|
102
98
|
# @option options [string] :id
|
103
99
|
# item id.
|
104
100
|
# @option options [Object] :app_id
|
105
|
-
# .
|
106
101
|
# @see https://api.slack.com/methods/apps.datastore.get
|
107
102
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.get.json
|
108
103
|
def apps_datastore_get(options = {})
|
@@ -119,7 +114,6 @@ module Slack
|
|
119
114
|
# @option options [object] :item
|
120
115
|
# attribute names and values of the item.
|
121
116
|
# @option options [Object] :app_id
|
122
|
-
# .
|
123
117
|
# @see https://api.slack.com/methods/apps.datastore.put
|
124
118
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.put.json
|
125
119
|
def apps_datastore_put(options = {})
|
@@ -133,16 +127,16 @@ module Slack
|
|
133
127
|
#
|
134
128
|
# @option options [string] :datastore
|
135
129
|
# Name of the datastore.
|
136
|
-
# @option options [Object] :app_id
|
137
|
-
# Required if calling with user token.
|
138
|
-
# @option options [string] :cursor
|
139
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
140
130
|
# @option options [string] :expression
|
141
|
-
# A query filter expression
|
131
|
+
# A query filter expression.
|
142
132
|
# @option options [object] :expression_attributes
|
143
133
|
# A map of attributes referenced in expression.
|
144
134
|
# @option options [object] :expression_values
|
145
135
|
# A map of values referenced in expression.
|
136
|
+
# @option options [Object] :app_id
|
137
|
+
# Required if calling with user token.
|
138
|
+
# @option options [string] :cursor
|
139
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
146
140
|
# @option options [integer] :limit
|
147
141
|
# The maximum number of items to evaluate for a given request (not necessarily the number of matching items). If the given request dataset size exceeds 1 MB before reaching the limit, the returned item count will likely be less than the limit. In any case where there are more items available beyond an imposed limit, a next_cursor value will be provided for use in subsequent requests.
|
148
142
|
# @see https://api.slack.com/methods/apps.datastore.query
|
@@ -166,7 +160,6 @@ module Slack
|
|
166
160
|
# @option options [object] :item
|
167
161
|
# attribute names and values to be updated.
|
168
162
|
# @option options [Object] :app_id
|
169
|
-
# .
|
170
163
|
# @see https://api.slack.com/methods/apps.datastore.update
|
171
164
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.update.json
|
172
165
|
def apps_datastore_update(options = {})
|
@@ -10,11 +10,8 @@ module Slack
|
|
10
10
|
# Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.
|
11
11
|
#
|
12
12
|
# @option options [string] :event_context
|
13
|
-
# .
|
14
13
|
# @option options [string] :cursor
|
15
|
-
# .
|
16
14
|
# @option options [integer] :limit
|
17
|
-
# .
|
18
15
|
# @see https://api.slack.com/methods/apps.event.authorizations.list
|
19
16
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.event.authorizations/apps.event.authorizations.list.json
|
20
17
|
def apps_event_authorizations_list(options = {})
|
@@ -9,7 +9,7 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Create an app from an app manifest.
|
11
11
|
#
|
12
|
-
# @option options [
|
12
|
+
# @option options [string] :manifest
|
13
13
|
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.
|
14
14
|
# @see https://api.slack.com/methods/apps.manifest.create
|
15
15
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.create.json
|
@@ -46,15 +46,15 @@ module Slack
|
|
46
46
|
#
|
47
47
|
# Update an app from an app manifest
|
48
48
|
#
|
49
|
+
# @option options [string] :manifest
|
50
|
+
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely _replaces_ any previous configuration, manifest must contain both unmodified and modified fields.
|
49
51
|
# @option options [Object] :app_id
|
50
52
|
# The ID of the app whose configuration you want to update.
|
51
|
-
# @option options [manifest object as string] :manifest
|
52
|
-
# A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.
|
53
53
|
# @see https://api.slack.com/methods/apps.manifest.update
|
54
54
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.manifest/apps.manifest.update.json
|
55
55
|
def apps_manifest_update(options = {})
|
56
|
-
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
57
56
|
raise ArgumentError, 'Required arguments :manifest missing' if options[:manifest].nil?
|
57
|
+
raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
|
58
58
|
options = encode_options_as_json(options, %i[manifest])
|
59
59
|
post('apps.manifest.update', options)
|
60
60
|
end
|
@@ -62,7 +62,7 @@ module Slack
|
|
62
62
|
#
|
63
63
|
# Validate an app manifest
|
64
64
|
#
|
65
|
-
# @option options [
|
65
|
+
# @option options [string] :manifest
|
66
66
|
# The manifest to be validated. Will be validated against the app manifest schema - read our guide.
|
67
67
|
# @option options [Object] :app_id
|
68
68
|
# The ID of the app whose configuration you want to validate.
|
@@ -16,15 +16,31 @@ module Slack
|
|
16
16
|
# @option options [array] :channel_types
|
17
17
|
# Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.
|
18
18
|
# @option options [array] :content_types
|
19
|
-
# Content types to include, a comma-separated list of any combination of messages, files.
|
19
|
+
# Content types to include, a comma-separated list of any combination of messages, files, channels, users.
|
20
|
+
# @option options [boolean] :include_bots
|
21
|
+
# If you want the results to include bots.
|
22
|
+
# @option options [integer] :before
|
23
|
+
# UNIX timestamp filter. If present, filters for results before this date.
|
24
|
+
# @option options [integer] :after
|
25
|
+
# UNIX timestamp filter. If present, filters for results after this date.
|
26
|
+
# @option options [boolean] :include_context_messages
|
27
|
+
# Whether to include context messages surrounding the main message result. Defaults to false if unspecified.
|
20
28
|
# @option options [Object] :context_channel_id
|
21
29
|
# Context channel ID to support scoping the search when applicable.
|
22
30
|
# @option options [string] :cursor
|
23
31
|
# The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results.
|
24
|
-
# @option options [boolean] :include_bots
|
25
|
-
# If you want the results to include bots.
|
26
32
|
# @option options [integer] :limit
|
27
33
|
# Number of results to return, up to a max of 20. Defaults to 20.
|
34
|
+
# @option options [enum] :sort
|
35
|
+
# The field to sort the results by. Defaults to score. Can be one of: score, timestamp.
|
36
|
+
# @option options [enum] :sort_dir
|
37
|
+
# The direction to sort the results by. Defaults to desc.
|
38
|
+
# @option options [boolean] :include_message_blocks
|
39
|
+
# Whether to return the message blocks in the response.
|
40
|
+
# @option options [boolean] :highlight
|
41
|
+
# Whether to highlight the search query in the results. Defaults to false if unspecified.
|
42
|
+
# @option options [array] :term_clauses
|
43
|
+
# A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).
|
28
44
|
# @see https://api.slack.com/methods/assistant.search.context
|
29
45
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json
|
30
46
|
def assistant_search_context(options = {})
|
@@ -37,6 +53,15 @@ module Slack
|
|
37
53
|
post('assistant.search.context', options)
|
38
54
|
end
|
39
55
|
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Returns search capabilities on a given team.
|
59
|
+
#
|
60
|
+
# @see https://api.slack.com/methods/assistant.search.info
|
61
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.info.json
|
62
|
+
def assistant_search_info(options = {})
|
63
|
+
post('assistant.search.info', options)
|
64
|
+
end
|
40
65
|
end
|
41
66
|
end
|
42
67
|
end
|
@@ -11,16 +11,16 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [Object] :channel_id
|
13
13
|
# Channel ID containing the assistant thread.
|
14
|
-
# @option options [string] :status
|
15
|
-
# Status of the specified bot user, e.g. 'is thinking...'.
|
16
14
|
# @option options [string] :thread_ts
|
17
15
|
# Message timestamp of the thread of where to set the status.
|
16
|
+
# @option options [string] :status
|
17
|
+
# Status of the specified bot user, e.g. 'is thinking...'.
|
18
18
|
# @see https://api.slack.com/methods/assistant.threads.setStatus
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setStatus.json
|
20
20
|
def assistant_threads_setStatus(options = {})
|
21
21
|
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
22
|
-
raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
|
23
22
|
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
23
|
+
raise ArgumentError, 'Required arguments :status missing' if options[:status].nil?
|
24
24
|
post('assistant.threads.setStatus', options)
|
25
25
|
end
|
26
26
|
|
@@ -29,18 +29,18 @@ module Slack
|
|
29
29
|
#
|
30
30
|
# @option options [Object] :channel_id
|
31
31
|
# Channel ID containing the assistant thread.
|
32
|
-
# @option options [Object] :prompts
|
33
|
-
# Each prompt should be supplied with its title and message attribute.
|
34
32
|
# @option options [string] :thread_ts
|
35
33
|
# Message timestamp of the thread to set suggested prompts for.
|
34
|
+
# @option options [Object] :prompts
|
35
|
+
# Each prompt should be supplied with its title and message attribute.
|
36
36
|
# @option options [string] :title
|
37
37
|
# Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.
|
38
38
|
# @see https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
|
39
39
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.threads/assistant.threads.setSuggestedPrompts.json
|
40
40
|
def assistant_threads_setSuggestedPrompts(options = {})
|
41
41
|
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
42
|
-
raise ArgumentError, 'Required arguments :prompts missing' if options[:prompts].nil?
|
43
42
|
raise ArgumentError, 'Required arguments :thread_ts missing' if options[:thread_ts].nil?
|
43
|
+
raise ArgumentError, 'Required arguments :prompts missing' if options[:prompts].nil?
|
44
44
|
post('assistant.threads.setSuggestedPrompts', options)
|
45
45
|
end
|
46
46
|
|
@@ -10,7 +10,7 @@ module Slack
|
|
10
10
|
# Revokes a token.
|
11
11
|
#
|
12
12
|
# @option options [boolean] :test
|
13
|
-
# Setting this parameter to 1 triggers a
|
13
|
+
# Setting this parameter to 1 triggers a _testing mode_ where the specified token will not actually be revoked.
|
14
14
|
# @see https://api.slack.com/methods/auth.revoke
|
15
15
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth/auth.revoke.json
|
16
16
|
def auth_revoke(options = {})
|
@@ -9,12 +9,12 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Obtain a full list of workspaces your org-wide app has been approved for.
|
11
11
|
#
|
12
|
+
# @option options [integer] :limit
|
13
|
+
# The maximum number of workspaces to return. Must be a positive integer no larger than 1000.
|
12
14
|
# @option options [string] :cursor
|
13
15
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
14
16
|
# @option options [boolean] :include_icon
|
15
17
|
# Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace.
|
16
|
-
# @option options [integer] :limit
|
17
|
-
# The maximum number of workspaces to return. Must be a positive integer no larger than 1000.
|
18
18
|
# @see https://api.slack.com/methods/auth.teams.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth.teams/auth.teams.list.json
|
20
20
|
def auth_teams_list(options = {})
|
@@ -13,16 +13,16 @@ module Slack
|
|
13
13
|
# Channel to add bookmark in.
|
14
14
|
# @option options [string] :title
|
15
15
|
# Title for the bookmark.
|
16
|
+
# @option options [string] :link
|
17
|
+
# Link to bookmark.
|
16
18
|
# @option options [string] :type
|
17
19
|
# Type of the bookmark i.e link.
|
18
|
-
# @option options [enum] :access_level
|
19
|
-
# The level that we are setting the file's permission to (read or write).
|
20
20
|
# @option options [string] :emoji
|
21
21
|
# Emoji tag to apply to the link.
|
22
22
|
# @option options [string] :entity_id
|
23
23
|
# ID of the entity being bookmarked. Only applies to message and file types.
|
24
|
-
# @option options [
|
25
|
-
#
|
24
|
+
# @option options [enum] :access_level
|
25
|
+
# The level that we are setting the file's permission to (read or write).
|
26
26
|
# @option options [string] :parent_id
|
27
27
|
# Id of this bookmark's parent.
|
28
28
|
# @see https://api.slack.com/methods/bookmarks.add
|
@@ -37,21 +37,21 @@ module Slack
|
|
37
37
|
#
|
38
38
|
# Edit bookmark.
|
39
39
|
#
|
40
|
-
# @option options [string] :bookmark_id
|
41
|
-
# Bookmark to update.
|
42
40
|
# @option options [string] :channel_id
|
43
41
|
# Channel to update bookmark in.
|
44
|
-
# @option options [string] :
|
45
|
-
#
|
46
|
-
# @option options [string] :link
|
47
|
-
# Link to bookmark.
|
42
|
+
# @option options [string] :bookmark_id
|
43
|
+
# Bookmark to update.
|
48
44
|
# @option options [string] :title
|
49
45
|
# Title for the bookmark.
|
46
|
+
# @option options [string] :link
|
47
|
+
# Link to bookmark.
|
48
|
+
# @option options [string] :emoji
|
49
|
+
# Emoji tag to apply to the link.
|
50
50
|
# @see https://api.slack.com/methods/bookmarks.edit
|
51
51
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.edit.json
|
52
52
|
def bookmarks_edit(options = {})
|
53
|
-
raise ArgumentError, 'Required arguments :bookmark_id missing' if options[:bookmark_id].nil?
|
54
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
55
|
post('bookmarks.edit', options)
|
56
56
|
end
|
57
57
|
|
@@ -70,17 +70,17 @@ module Slack
|
|
70
70
|
#
|
71
71
|
# Remove bookmark from the channel.
|
72
72
|
#
|
73
|
-
# @option options [string] :bookmark_id
|
74
|
-
# Bookmark to remove.
|
75
73
|
# @option options [string] :channel_id
|
76
74
|
# Channel to remove bookmark.
|
75
|
+
# @option options [string] :bookmark_id
|
76
|
+
# Bookmark to remove.
|
77
77
|
# @option options [string] :quip_section_id
|
78
78
|
# Quip section ID to unbookmark.
|
79
79
|
# @see https://api.slack.com/methods/bookmarks.remove
|
80
80
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.remove.json
|
81
81
|
def bookmarks_remove(options = {})
|
82
|
-
raise ArgumentError, 'Required arguments :bookmark_id missing' if options[:bookmark_id].nil?
|
83
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
84
|
post('bookmarks.remove', options)
|
85
85
|
end
|
86
86
|
end
|
@@ -11,18 +11,18 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [string] :external_unique_id
|
13
13
|
# An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.
|
14
|
+
# @option options [string] :external_display_id
|
15
|
+
# An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.
|
14
16
|
# @option options [string] :join_url
|
15
17
|
# The URL required for a client to join the Call.
|
16
|
-
# @option options [string] :created_by
|
17
|
-
# The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.
|
18
|
-
# @option options [integer] :date_start
|
19
|
-
# Unix timestamp of the call start time.
|
20
18
|
# @option options [string] :desktop_app_join_url
|
21
19
|
# When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
|
22
|
-
# @option options [
|
23
|
-
#
|
20
|
+
# @option options [integer] :date_start
|
21
|
+
# Unix timestamp of the call start time.
|
24
22
|
# @option options [string] :title
|
25
23
|
# The name of the Call.
|
24
|
+
# @option options [string] :created_by
|
25
|
+
# The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.
|
26
26
|
# @option options [array] :users
|
27
27
|
# The list of users to register as participants in the Call. Read more on how to specify users here.
|
28
28
|
# @see https://api.slack.com/methods/calls.add
|
@@ -64,12 +64,12 @@ module Slack
|
|
64
64
|
#
|
65
65
|
# @option options [string] :id
|
66
66
|
# id returned by the calls.add method.
|
67
|
-
# @option options [string] :desktop_app_join_url
|
68
|
-
# When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
|
69
|
-
# @option options [string] :join_url
|
70
|
-
# The URL required for a client to join the Call.
|
71
67
|
# @option options [string] :title
|
72
68
|
# The name of the Call.
|
69
|
+
# @option options [string] :join_url
|
70
|
+
# The URL required for a client to join the Call.
|
71
|
+
# @option options [string] :desktop_app_join_url
|
72
|
+
# When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
|
73
73
|
# @see https://api.slack.com/methods/calls.update
|
74
74
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/calls/calls.update.json
|
75
75
|
def calls_update(options = {})
|
@@ -9,12 +9,12 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Create canvas for a user
|
11
11
|
#
|
12
|
-
# @option options [string] :channel_id
|
13
|
-
# Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.
|
14
|
-
# @option options [Object] :document_content
|
15
|
-
# Structure describing the type and value of the content to create.
|
16
12
|
# @option options [string] :title
|
17
13
|
# Title of the newly created canvas.
|
14
|
+
# @option options [Object] :document_content
|
15
|
+
# Structure describing the type and value of the content to create.
|
16
|
+
# @option options [string] :channel_id
|
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
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.create.json
|
20
20
|
def canvases_create(options = {})
|
@@ -25,10 +25,10 @@ module Slack
|
|
25
25
|
#
|
26
26
|
# Sets the access level to a canvas for specified entities
|
27
27
|
#
|
28
|
-
# @option options [enum] :access_level
|
29
|
-
# Desired level of access.
|
30
28
|
# @option options [Object] :canvas_id
|
31
29
|
# Encoded ID of the canvas.
|
30
|
+
# @option options [enum] :access_level
|
31
|
+
# Desired level of access.
|
32
32
|
# @option options [array] :channel_ids
|
33
33
|
# List of channels you wish to update access for. Can only be used if user_ids is not provided.
|
34
34
|
# @option options [array] :user_ids
|
@@ -36,8 +36,8 @@ module Slack
|
|
36
36
|
# @see https://api.slack.com/methods/canvases.access.set
|
37
37
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases.access/canvases.access.set.json
|
38
38
|
def canvases_access_set(options = {})
|
39
|
-
raise ArgumentError, 'Required arguments :access_level missing' if options[:access_level].nil?
|
40
39
|
raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
|
40
|
+
raise ArgumentError, 'Required arguments :access_level missing' if options[:access_level].nil?
|
41
41
|
post('canvases.access.set', options)
|
42
42
|
end
|
43
43
|
end
|