slack-ruby-client 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/prompts/changelog-entries.prompt.yml +32 -0
- data/.github/workflows/danger-comment.yml +11 -0
- data/.github/workflows/danger.yml +13 -0
- data/.github/workflows/lint.yml +3 -1
- data/.github/workflows/test.yml +1 -1
- data/.github/workflows/update_api.yml +94 -16
- data/.rubocop.yml +2 -1
- data/.rubocop_todo.yml +18 -4
- data/AGENTS.md +12 -0
- data/CHANGELOG.md +43 -1
- data/CONTRIBUTING.md +10 -1
- data/Dangerfile +4 -1
- data/Gemfile +20 -5
- data/README.md +47 -2
- data/RELEASING.md +2 -2
- data/Rakefile +7 -3
- data/UPGRADING.md +16 -0
- data/bin/commands/admin_analytics_messages.rb +36 -0
- data/bin/commands/admin_apps.rb +3 -0
- data/bin/commands/admin_apps_mcp_servers.rb +21 -0
- data/bin/commands/admin_apps_mcp_servers_permissions.rb +33 -0
- data/bin/commands/admin_apps_permissions.rb +58 -0
- data/bin/commands/admin_conversations.rb +20 -0
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_functions_permissions.rb +1 -0
- data/bin/commands/admin_usergroups.rb +74 -0
- data/bin/commands/admin_users.rb +10 -8
- data/bin/commands/admin_users_session.rb +0 -1
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -3
- data/bin/commands/agents_sessions.rb +38 -0
- data/bin/commands/apps_icon.rb +22 -0
- data/bin/commands/apps_managed_permissions.rb +21 -0
- data/bin/commands/apps_manifest.rb +7 -6
- data/bin/commands/apps_user_connection.rb +21 -0
- data/bin/commands/assistant_search.rb +3 -2
- data/bin/commands/assistant_threads.rb +6 -3
- data/bin/commands/blocks.rb +22 -0
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/canvases.rb +12 -2
- data/bin/commands/chat.rb +17 -7
- data/bin/commands/conversations.rb +2 -2
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/entity.rb +27 -0
- data/bin/commands/files.rb +5 -2
- data/bin/commands/oauth_v2.rb +22 -0
- data/bin/commands/oauth_v2_user.rb +27 -0
- data/bin/commands/openid_connect.rb +1 -0
- data/bin/commands/slackLists_download.rb +6 -0
- data/bin/commands/slackLists_items.rb +1 -0
- data/bin/commands/users.rb +3 -2
- data/bin/commands/views.rb +1 -0
- data/bin/slack +5 -1
- data/examples/files_upload_v2/files_upload_v2.rb +1 -1
- data/examples/hi_web/hi.rb +1 -1
- data/examples/new_ticket/new_ticket.rb +1 -1
- data/examples/oauth_v2/oauth_v2.rb +6 -6
- data/lib/slack/events/config.rb +1 -1
- data/lib/slack/events/request.rb +2 -2
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics_messages.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +6 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers.rb +31 -0
- data/lib/slack/web/api/endpoints/admin_apps_mcp_servers_permissions.rb +46 -0
- data/lib/slack/web/api/endpoints/admin_apps_permissions.rb +83 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +30 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +0 -1
- data/lib/slack/web/api/endpoints/admin_functions.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +2 -1
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +111 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +11 -6
- data/lib/slack/web/api/endpoints/admin_users_session.rb +0 -2
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +3 -3
- data/lib/slack/web/api/endpoints/agents_sessions.rb +54 -0
- data/lib/slack/web/api/endpoints/apps_icon.rb +28 -0
- data/lib/slack/web/api/endpoints/apps_managed_permissions.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -3
- data/lib/slack/web/api/endpoints/apps_user_connection.rb +27 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +3 -1
- data/lib/slack/web/api/endpoints/assistant_threads.rb +9 -4
- data/lib/slack/web/api/endpoints/blocks.rb +28 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +6 -12
- data/lib/slack/web/api/endpoints/canvases.rb +16 -2
- data/lib/slack/web/api/endpoints/chat.rb +39 -17
- data/lib/slack/web/api/endpoints/conversations.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/entity.rb +48 -0
- data/lib/slack/web/api/endpoints/files.rb +8 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +35 -0
- data/lib/slack/web/api/endpoints/oauth_v2_user.rb +37 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +12 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +2 -0
- data/lib/slack/web/api/endpoints/users.rb +3 -2
- data/lib/slack/web/api/endpoints/views.rb +1 -0
- data/lib/slack/web/api/endpoints.rb +20 -0
- data/lib/slack/web/api/errors/server_error.rb +1 -1
- data/lib/slack/web/api/errors/slack_error.rb +1 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +1 -1
- data/lib/slack/web/api/errors.rb +230 -6
- data/lib/slack/web/api/helpers/files.rb +2 -2
- data/lib/slack/web/api/mixins/conversations.id.rb +2 -1
- data/lib/slack/web/api/mixins/ids.id.rb +3 -1
- data/lib/slack/web/api/mixins/users.id.rb +2 -1
- data/lib/slack/web/api/mixins/users.search.rb +1 -1
- data/lib/slack/web/api/patches/files.default-filename.patch +12 -0
- data/lib/slack/web/api/templates/method.erb +3 -1
- data/lib/slack/web/api/templates/method_spec.erb +32 -3
- data/lib/slack/web/client.rb +29 -0
- data/lib/slack/web/faraday/request.rb +22 -2
- data/lib/tasks/web.rake +5 -2
- data/slack-ruby-client.gemspec +0 -1
- metadata +32 -19
- data/.github/workflows/pr_lint.yml +0 -21
- data/Gemfile.danger +0 -6
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAnalyticsMessages methods.'
|
|
8
|
+
command 'admin_analytics_messages' do |g|
|
|
9
|
+
g.desc 'Retrieves activity metrics for messages from a given channel.'
|
|
10
|
+
g.long_desc %( Retrieves activity metrics for messages from a given channel. )
|
|
11
|
+
g.command 'activity' do |c|
|
|
12
|
+
c.flag 'channel', desc: 'Channel ID for channel of the message activity to query.'
|
|
13
|
+
c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.'
|
|
14
|
+
c.flag 'latest_ts', desc: 'Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.'
|
|
15
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection."
|
|
16
|
+
c.flag 'limit', desc: 'Maximum number of entries to return. Defaults to 50 if not passed. Max allowed is 100.'
|
|
17
|
+
c.action do |_global_options, options, _args|
|
|
18
|
+
puts JSON.dump(@client.admin_analytics_messages_activity(options))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
g.desc 'Retrieves metadata for a list of messages from a given channel.'
|
|
23
|
+
g.long_desc %( Retrieves metadata for a list of messages from a given channel. )
|
|
24
|
+
g.command 'metadata' do |c|
|
|
25
|
+
c.flag 'channel', desc: 'Channel ID for channel containing the messages to query.'
|
|
26
|
+
c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results.'
|
|
27
|
+
c.flag 'latest_ts', desc: 'Most recent timestamp to include in the results. If not passed, defaults to current time.'
|
|
28
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
|
29
|
+
c.action do |_global_options, options, _args|
|
|
30
|
+
puts JSON.dump(@client.admin_analytics_messages_metadata(options))
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
data/bin/commands/admin_apps.rb
CHANGED
|
@@ -9,10 +9,13 @@ module Slack
|
|
|
9
9
|
g.desc 'Approve an app for installation on a workspace.'
|
|
10
10
|
g.long_desc %( Approve an app for installation on a workspace. )
|
|
11
11
|
g.command 'approve' do |c|
|
|
12
|
+
c.flag 'allow_child_auto_install', desc: 'Auto-create an Admin-Approved App automation rule that pre-approves future child app installs from this manager app.'
|
|
12
13
|
c.flag 'app_id', desc: 'The id of the app to approve.'
|
|
13
14
|
c.flag 'request_id', desc: 'The id of the request to approve.'
|
|
14
15
|
c.flag 'team_id', desc: 'The ID of the workspace to approve the app on.'
|
|
15
16
|
c.flag 'enterprise_id', desc: 'The ID of the enterprise to approve the app on.'
|
|
17
|
+
c.flag 'user_scopes', desc: 'User scopes to approve for the app.'
|
|
18
|
+
c.flag 'bot_scopes', desc: 'Bot scopes to approve for the app.'
|
|
16
19
|
c.action do |_global_options, options, _args|
|
|
17
20
|
puts JSON.dump(@client.admin_apps_approve(options))
|
|
18
21
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAppsMcpServers methods.'
|
|
8
|
+
command 'admin_apps_mcp_servers' do |g|
|
|
9
|
+
g.desc "List third-party app MCP servers approved for an organization, derived from the org's MCP server allowlist. Entries reflect allowlist state, not install/scope liveness: servers of apps that are uninstalled (but not deleted) are still listed."
|
|
10
|
+
g.long_desc %( List third-party app MCP servers approved for an organization, derived from the org's MCP server allowlist. Entries reflect allowlist state, not install/scope liveness: servers of apps that are uninstalled (but not deleted) are still listed. )
|
|
11
|
+
g.command 'list' do |c|
|
|
12
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
|
13
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
14
|
+
c.action do |_global_options, options, _args|
|
|
15
|
+
puts JSON.dump(@client.admin_apps_mcp_servers_list(options))
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAppsMcpServersPermissions methods.'
|
|
8
|
+
command 'admin_apps_mcp_servers_permissions' do |g|
|
|
9
|
+
g.desc 'List MCP servers for an app with their access control permissions'
|
|
10
|
+
g.long_desc %( List MCP servers for an app with their access control permissions )
|
|
11
|
+
g.command 'list' do |c|
|
|
12
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
13
|
+
c.action do |_global_options, options, _args|
|
|
14
|
+
puts JSON.dump(@client.admin_apps_mcp_servers_permissions_list(options))
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
g.desc 'Set the access control permission for who can use an MCP server'
|
|
19
|
+
g.long_desc %( Set the access control permission for who can use an MCP server )
|
|
20
|
+
g.command 'set' do |c|
|
|
21
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
22
|
+
c.flag 'server_id', desc: 'Encoded ID of the MCP server.'
|
|
23
|
+
c.flag 'permission_type', desc: 'The type of permission that defines who can use this MCP server.'
|
|
24
|
+
c.flag 'user_ids', desc: 'List of user IDs to set for named_entities or named_entities_exclude.'
|
|
25
|
+
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
|
|
26
|
+
c.action do |_global_options, options, _args|
|
|
27
|
+
puts JSON.dump(@client.admin_apps_mcp_servers_permissions_set(options))
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAppsPermissions methods.'
|
|
8
|
+
command 'admin_apps_permissions' do |g|
|
|
9
|
+
g.desc 'Grant permission for entities to access an app that has its permission type set to named_entities'
|
|
10
|
+
g.long_desc %( Grant permission for entities to access an app that has its permission type set to named_entities )
|
|
11
|
+
g.command 'add' do |c|
|
|
12
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
13
|
+
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
|
|
14
|
+
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
|
|
15
|
+
c.flag 'channel_ids', desc: "List of encoded channel IDs to add to the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method."
|
|
16
|
+
c.action do |_global_options, options, _args|
|
|
17
|
+
puts JSON.dump(@client.admin_apps_permissions_add(options))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
g.desc 'Returns the permission type of an app and if applicable, includes the entities that have been granted access'
|
|
22
|
+
g.long_desc %( Returns the permission type of an app and if applicable, includes the entities that have been granted access )
|
|
23
|
+
g.command 'list' do |c|
|
|
24
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
25
|
+
c.action do |_global_options, options, _args|
|
|
26
|
+
puts JSON.dump(@client.admin_apps_permissions_list(options))
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
g.desc "Revoke an entity's access to an app that has its permission type set to named_entities"
|
|
31
|
+
g.long_desc %( Revoke an entity's access to an app that has its permission type set to named_entities )
|
|
32
|
+
g.command 'remove' do |c|
|
|
33
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
34
|
+
c.flag 'user_ids', desc: 'List of user IDs whose named_entities access will be revoked.'
|
|
35
|
+
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
|
|
36
|
+
c.flag 'channel_ids', desc: "List of encoded channel IDs to remove from the channel restriction list. Interpretation depends on the app's channel_restriction_mode, which is configured via the admin.apps.permissions.set method."
|
|
37
|
+
c.action do |_global_options, options, _args|
|
|
38
|
+
puts JSON.dump(@client.admin_apps_permissions_remove(options))
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
g.desc 'Set the permission type for who can access an app'
|
|
43
|
+
g.long_desc %( Set the permission type for who can access an app )
|
|
44
|
+
g.command 'set' do |c|
|
|
45
|
+
c.flag 'app_id', desc: 'Encoded ID of the app.'
|
|
46
|
+
c.flag 'permission_type', desc: 'The type of permission that defines who can access the app.'
|
|
47
|
+
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
|
|
48
|
+
c.flag 'usergroup_ids', desc: 'List of encoded usergroup IDs.'
|
|
49
|
+
c.flag 'channel_restriction_mode', desc: 'The mode that defines where the app can be used in channels.'
|
|
50
|
+
c.flag 'channel_ids', desc: 'List of encoded channel IDs for channel restrictions. Semantics depend on channel_restriction_mode: allowlist for specific_channels, exclusion list for all_channels_except.'
|
|
51
|
+
c.action do |_global_options, options, _args|
|
|
52
|
+
puts JSON.dump(@client.admin_apps_permissions_set(options))
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -43,6 +43,26 @@ module Slack
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
g.desc 'Exclude channels from Slack AI in bulk.'
|
|
47
|
+
g.long_desc %( Exclude channels from Slack AI in bulk. )
|
|
48
|
+
g.command 'bulkSetExcludeFromSlackAi' do |c|
|
|
49
|
+
c.flag 'channel_ids', desc: 'An array of channel IDs to exclude from Slack AI.'
|
|
50
|
+
c.flag 'exclude', desc: 'Whether the channels should be excluded from Slack AI.'
|
|
51
|
+
c.action do |_global_options, options, _args|
|
|
52
|
+
puts JSON.dump(@client.admin_conversations_bulkSetExcludeFromSlackAi(options))
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
g.desc 'Set properties on channels in bulk.'
|
|
57
|
+
g.long_desc %( Set properties on channels in bulk. )
|
|
58
|
+
g.command 'bulkSetProperties' do |c|
|
|
59
|
+
c.flag 'channel_ids', desc: 'An array of channel IDs on which to set the property.'
|
|
60
|
+
c.flag 'property', desc: 'The property for this channel in a key value format. Only one property can be updated at a time.'
|
|
61
|
+
c.action do |_global_options, options, _args|
|
|
62
|
+
puts JSON.dump(@client.admin_conversations_bulkSetProperties(options))
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
46
66
|
g.desc 'Convert a public channel to a private channel.'
|
|
47
67
|
g.long_desc %( Convert a public channel to a private channel. )
|
|
48
68
|
g.command 'convertToPrivate' do |c|
|
|
@@ -11,7 +11,7 @@ module Slack
|
|
|
11
11
|
g.command 'list' do |c|
|
|
12
12
|
c.flag 'team_id', desc: 'The team context to retrieve functions from.'
|
|
13
13
|
c.flag 'app_ids', desc: 'Comma-separated array of app IDs to get functions for; max 50.'
|
|
14
|
-
c.flag 'include_non_distributed_functions', desc: 'Whether to also include functions that are not yet distributed to any users in the function
|
|
14
|
+
c.flag 'include_non_distributed_functions', desc: 'Whether to also include functions that are not yet distributed to any users in the function list. This is needed for admins that are approving an app request and will only work if the team owns the app.'
|
|
15
15
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
16
16
|
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.'
|
|
17
17
|
c.action do |_global_options, options, _args|
|
|
@@ -21,6 +21,7 @@ module Slack
|
|
|
21
21
|
c.flag 'function_id', desc: 'The function ID to set permissions for.'
|
|
22
22
|
c.flag 'visibility', desc: 'The function visibility.'
|
|
23
23
|
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
|
|
24
|
+
c.flag 'permissions', desc: 'Array of permissions for the function.'
|
|
24
25
|
c.action do |_global_options, options, _args|
|
|
25
26
|
puts JSON.dump(@client.admin_functions_permissions_set(options))
|
|
26
27
|
end
|
|
@@ -28,6 +28,37 @@ module Slack
|
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
g.desc 'Add members to an existing organizational usergroup. This method is only available to Enterprise Grid organizations.'
|
|
32
|
+
g.long_desc %( Add members to an existing organizational usergroup. This method is only available to Enterprise Grid organizations. )
|
|
33
|
+
g.command 'addUsers' do |c|
|
|
34
|
+
c.flag 'id', desc: 'ID of the usergroup to add users to.'
|
|
35
|
+
c.flag 'users', desc: 'The encoded user IDs to add to the usergroup, provided as a JSON array or a comma-separated string.'
|
|
36
|
+
c.action do |_global_options, options, _args|
|
|
37
|
+
puts JSON.dump(@client.admin_usergroups_addUsers(options))
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
g.desc 'Create a new organizational usergroup. This method is only available to Enterprise Grid organizations.'
|
|
42
|
+
g.long_desc %( Create a new organizational usergroup. This method is only available to Enterprise Grid organizations. )
|
|
43
|
+
g.command 'create' do |c|
|
|
44
|
+
c.flag 'name', desc: 'Unique name for the usergroup.'
|
|
45
|
+
c.flag 'handle', desc: 'Optional handle used to mention the usergroup in channel, must be unique.'
|
|
46
|
+
c.flag 'purpose', desc: 'Optional purpose that describes what the usergroup is about.'
|
|
47
|
+
c.flag 'is_visible', desc: 'Configure whether or not this usergroup should be visible in the client.'
|
|
48
|
+
c.action do |_global_options, options, _args|
|
|
49
|
+
puts JSON.dump(@client.admin_usergroups_create(options))
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
g.desc 'Fetch an organizational usergroup.'
|
|
54
|
+
g.long_desc %( Fetch an organizational usergroup. )
|
|
55
|
+
g.command 'fetch' do |c|
|
|
56
|
+
c.flag 'id', desc: 'ID of the usergroup to fetch.'
|
|
57
|
+
c.action do |_global_options, options, _args|
|
|
58
|
+
puts JSON.dump(@client.admin_usergroups_fetch(options))
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
31
62
|
g.desc 'List the channels linked to an org-level IDP group (user group).'
|
|
32
63
|
g.long_desc %( List the channels linked to an org-level IDP group (user group). )
|
|
33
64
|
g.command 'listChannels' do |c|
|
|
@@ -48,6 +79,49 @@ module Slack
|
|
|
48
79
|
puts JSON.dump(@client.admin_usergroups_removeChannels(options))
|
|
49
80
|
end
|
|
50
81
|
end
|
|
82
|
+
|
|
83
|
+
g.desc 'Remove one or more default workspaces from an organization-wide IDP Group or Admin Group.'
|
|
84
|
+
g.long_desc %( Remove one or more default workspaces from an organization-wide IDP Group or Admin Group. )
|
|
85
|
+
g.command 'removeTeams' do |c|
|
|
86
|
+
c.flag 'usergroup_id', desc: 'An encoded usergroup (IDP Group) ID.'
|
|
87
|
+
c.flag 'team_ids', desc: 'A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.'
|
|
88
|
+
c.action do |_global_options, options, _args|
|
|
89
|
+
puts JSON.dump(@client.admin_usergroups_removeTeams(options))
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
g.desc 'Remove members from an existing organizational usergroup. This method is only available to Enterprise Grid organizations.'
|
|
94
|
+
g.long_desc %( Remove members from an existing organizational usergroup. This method is only available to Enterprise Grid organizations. )
|
|
95
|
+
g.command 'removeUsers' do |c|
|
|
96
|
+
c.flag 'id', desc: 'ID of the usergroup to remove users from.'
|
|
97
|
+
c.flag 'users', desc: 'The encoded user IDs to remove from the usergroup, provided as a JSON array or a comma-separated string.'
|
|
98
|
+
c.action do |_global_options, options, _args|
|
|
99
|
+
puts JSON.dump(@client.admin_usergroups_removeUsers(options))
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
g.desc 'Update one or more properties of an existing organizational usergroup.'
|
|
104
|
+
g.long_desc %( Update one or more properties of an existing organizational usergroup. )
|
|
105
|
+
g.command 'update' do |c|
|
|
106
|
+
c.flag 'id', desc: 'ID of the usergroup to update.'
|
|
107
|
+
c.flag 'name', desc: 'The name of the group.'
|
|
108
|
+
c.flag 'handle', desc: 'The handle used for mentioning the group in a channel, must be unique.'
|
|
109
|
+
c.flag 'description', desc: "The usergroup's purpose or description."
|
|
110
|
+
c.flag 'is_visible', desc: 'Configure whether or not this usergroup should be visible in the client.'
|
|
111
|
+
c.action do |_global_options, options, _args|
|
|
112
|
+
puts JSON.dump(@client.admin_usergroups_update(options))
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
g.desc 'Add members to an existing organizational usergroup in bulk via CSV upload. This method is only available to Enterprise Grid organizations.'
|
|
117
|
+
g.long_desc %( Add members to an existing organizational usergroup in bulk via CSV upload. This method is only available to Enterprise Grid organizations. )
|
|
118
|
+
g.command 'uploadUsers' do |c|
|
|
119
|
+
c.flag 'id', desc: 'ID of the usergroup to upload users to.'
|
|
120
|
+
c.flag 'file', desc: 'Csv of users to upload in format member id, email.'
|
|
121
|
+
c.action do |_global_options, options, _args|
|
|
122
|
+
puts JSON.dump(@client.admin_usergroups_uploadUsers(options))
|
|
123
|
+
end
|
|
124
|
+
end
|
|
51
125
|
end
|
|
52
126
|
end
|
|
53
127
|
end
|
data/bin/commands/admin_users.rb
CHANGED
|
@@ -55,6 +55,8 @@ module Slack
|
|
|
55
55
|
c.flag 'is_active', desc: 'If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.'
|
|
56
56
|
c.flag 'include_deactivated_user_workspaces', desc: 'Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.'
|
|
57
57
|
c.flag 'only_guests', desc: 'If true, returns only guests and their expiration dates that belong to the team_id.'
|
|
58
|
+
c.flag 'include_admins', desc: 'If true, only admin users will be returned (excludes owners). Returns all admins and owners when combined with include_owners. Cannot be used together with only_guests.'
|
|
59
|
+
c.flag 'include_owners', desc: 'If true, only owner users will be returned. Cannot be used together with only_guests.'
|
|
58
60
|
c.flag 'limit', desc: 'Limit for how many users to be retrieved per page.'
|
|
59
61
|
c.action do |_global_options, options, _args|
|
|
60
62
|
puts JSON.dump(@client.admin_users_list(options))
|
|
@@ -71,10 +73,10 @@ module Slack
|
|
|
71
73
|
end
|
|
72
74
|
end
|
|
73
75
|
|
|
74
|
-
g.desc 'Set an existing regular user or owner to be a workspace admin.'
|
|
75
|
-
g.long_desc %( Set an existing regular user or owner to be a workspace admin. )
|
|
76
|
+
g.desc 'Set an existing regular user or owner to be a workspace or org admin.'
|
|
77
|
+
g.long_desc %( Set an existing regular user or owner to be a workspace or org admin. )
|
|
76
78
|
g.command 'setAdmin' do |c|
|
|
77
|
-
c.flag 'team_id', desc: 'The ID
|
|
79
|
+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
|
|
78
80
|
c.flag 'user_id', desc: 'The ID of the user to designate as an admin.'
|
|
79
81
|
c.action do |_global_options, options, _args|
|
|
80
82
|
puts JSON.dump(@client.admin_users_setAdmin(options))
|
|
@@ -92,11 +94,11 @@ module Slack
|
|
|
92
94
|
end
|
|
93
95
|
end
|
|
94
96
|
|
|
95
|
-
g.desc 'Set an existing regular user or admin to be a workspace owner.'
|
|
96
|
-
g.long_desc %( Set an existing regular user or admin to be a workspace owner. )
|
|
97
|
+
g.desc 'Set an existing regular user or admin to be a workspace or org owner.'
|
|
98
|
+
g.long_desc %( Set an existing regular user or admin to be a workspace or org owner. )
|
|
97
99
|
g.command 'setOwner' do |c|
|
|
98
|
-
c.flag 'team_id', desc: 'The ID
|
|
99
|
-
c.flag 'user_id', desc: '
|
|
100
|
+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
|
|
101
|
+
c.flag 'user_id', desc: 'ID of the user to promote to owner.'
|
|
100
102
|
c.action do |_global_options, options, _args|
|
|
101
103
|
puts JSON.dump(@client.admin_users_setOwner(options))
|
|
102
104
|
end
|
|
@@ -105,7 +107,7 @@ module Slack
|
|
|
105
107
|
g.desc 'Set an existing guest user, admin user, or owner to be a regular user.'
|
|
106
108
|
g.long_desc %( Set an existing guest user, admin user, or owner to be a regular user. )
|
|
107
109
|
g.command 'setRegular' do |c|
|
|
108
|
-
c.flag 'team_id', desc: 'The ID
|
|
110
|
+
c.flag 'team_id', desc: 'The ID of the workspace or organization.'
|
|
109
111
|
c.flag 'user_id', desc: 'The ID of the user to designate as a regular user.'
|
|
110
112
|
c.action do |_global_options, options, _args|
|
|
111
113
|
puts JSON.dump(@client.admin_users_setRegular(options))
|
|
@@ -27,7 +27,6 @@ module Slack
|
|
|
27
27
|
g.desc 'Revoke a single session for a user. The user will be forced to login to Slack.'
|
|
28
28
|
g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
|
|
29
29
|
g.command 'invalidate' do |c|
|
|
30
|
-
c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
|
|
31
30
|
c.flag 'user_id', desc: 'ID of the user that the session belongs to.'
|
|
32
31
|
c.flag 'session_id', desc: 'ID of the session to invalidate.'
|
|
33
32
|
c.action do |_global_options, options, _args|
|
|
@@ -6,10 +6,10 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'AdminWorkflowsTriggersTypesPermissions methods.'
|
|
8
8
|
command 'admin_workflows_triggers_types_permissions' do |g|
|
|
9
|
-
g.desc '
|
|
10
|
-
g.long_desc %(
|
|
9
|
+
g.desc 'List the permissions for using each trigger type.'
|
|
10
|
+
g.long_desc %( List the permissions for using each trigger type. )
|
|
11
11
|
g.command 'lookup' do |c|
|
|
12
|
-
c.flag 'trigger_type_ids', desc: 'The trigger
|
|
12
|
+
c.flag 'trigger_type_ids', desc: 'The trigger type IDs for which to get the permissions.'
|
|
13
13
|
c.action do |_global_options, options, _args|
|
|
14
14
|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options))
|
|
15
15
|
end
|
|
@@ -21,6 +21,7 @@ module Slack
|
|
|
21
21
|
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
|
|
22
22
|
c.flag 'visibility', desc: 'The function visibility.'
|
|
23
23
|
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
|
|
24
|
+
c.flag 'permissions', desc: ''
|
|
24
25
|
c.action do |_global_options, options, _args|
|
|
25
26
|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(options))
|
|
26
27
|
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AgentsSessions methods.'
|
|
8
|
+
command 'agents_sessions' do |g|
|
|
9
|
+
g.desc 'Rename an agent session.'
|
|
10
|
+
g.long_desc %( Rename an agent session. )
|
|
11
|
+
g.command 'rename' do |c|
|
|
12
|
+
c.flag 'channel_id', desc: 'ID of the channel containing the agent session. Required for public channels.'
|
|
13
|
+
c.flag 'title', desc: 'New title for the agent session (1-200 characters). For a session channel, this also renames the channel.'
|
|
14
|
+
c.flag 'thread_ts', desc: 'Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.agents_sessions_rename(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
g.desc "Set an agent session's lifecycle status, creating the session if needed."
|
|
21
|
+
g.long_desc %( Set an agent session's lifecycle status, creating the session if needed. )
|
|
22
|
+
g.command 'setStatus' do |c|
|
|
23
|
+
c.flag 'channel_id', desc: 'ID of the channel containing the agent session. Required for public channels.'
|
|
24
|
+
c.flag 'status', desc: 'The lifecycle status to set.'
|
|
25
|
+
c.flag 'thread_ts', desc: 'Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels.'
|
|
26
|
+
c.flag 'title', desc: 'Title for the agent session (max 200 characters). Only used when creating a new session; ignored if the session already exists. To rename an existing session, use agents.sessions.rename.'
|
|
27
|
+
c.flag 'initiator_user_id', desc: 'The user who initiated the session. Only used when creating a new session; ignored if the session already exists. Must be a member of the channel.'
|
|
28
|
+
c.flag 'icon_emoji', desc: "Emoji to use as the agent's icon. Takes priority over icon_url. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope."
|
|
29
|
+
c.flag 'icon_url', desc: "URL to an image to use as the agent's icon. Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope."
|
|
30
|
+
c.flag 'username', desc: 'Display name override for the agent (max 200 characters). Remains in effect until you clear it (pass null) or set a new value. Requires the chat:write.customize scope.'
|
|
31
|
+
c.action do |_global_options, options, _args|
|
|
32
|
+
puts JSON.dump(@client.agents_sessions_setStatus(options))
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AppsIcon methods.'
|
|
8
|
+
command 'apps_icon' do |g|
|
|
9
|
+
g.desc 'Sets the app icon'
|
|
10
|
+
g.long_desc %( Sets the app icon )
|
|
11
|
+
g.command 'set' do |c|
|
|
12
|
+
c.flag 'app_id', desc: 'The ID of the app whose icon you want to set.'
|
|
13
|
+
c.flag 'file', desc: 'File contents via multipart/form-data.'
|
|
14
|
+
c.flag 'url', desc: 'URL of a publicly hosted image.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.apps_icon_set(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AppsManagedPermissions methods.'
|
|
8
|
+
command 'apps_managed_permissions' do |g|
|
|
9
|
+
g.desc "Set who can interact with a managed app. Lets the builder who created a managed app on a partner platform configure the app's permissions as themselves, using a user token from the manager app. Permissions can only be set before the app is installed: if the app is already installed, this method makes no change and returns the app's current permissions."
|
|
10
|
+
g.long_desc %( Set who can interact with a managed app. Lets the builder who created a managed app on a partner platform configure the app's permissions as themselves, using a user token from the manager app. Permissions can only be set before the app is installed: if the app is already installed, this method makes no change and returns the app's current permissions. )
|
|
11
|
+
g.command 'set' do |c|
|
|
12
|
+
c.flag 'app_id', desc: 'Encoded ID of the managed app to configure.'
|
|
13
|
+
c.flag 'permissions', desc: "Who can interact with the app. Use everyone to allow all members, or app_owner to restrict access to the app's owner."
|
|
14
|
+
c.action do |_global_options, options, _args|
|
|
15
|
+
puts JSON.dump(@client.apps_managed_permissions_set(options))
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -10,13 +10,14 @@ module Slack
|
|
|
10
10
|
g.long_desc %( Create an app from an app manifest. )
|
|
11
11
|
g.command 'create' do |c|
|
|
12
12
|
c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.'
|
|
13
|
+
c.flag 'team_id', desc: 'When called with an org token, which specific team to create app on.'
|
|
13
14
|
c.action do |_global_options, options, _args|
|
|
14
15
|
puts JSON.dump(@client.apps_manifest_create(options))
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
|
|
18
|
-
g.desc 'Permanently deletes an app created through app manifests'
|
|
19
|
-
g.long_desc %( Permanently deletes an app created through app manifests )
|
|
19
|
+
g.desc 'Permanently deletes an app created through app manifests. When called with a manager app token, this method can only delete apps that were created by that manager app.'
|
|
20
|
+
g.long_desc %( Permanently deletes an app created through app manifests. When called with a manager app token, this method can only delete apps that were created by that manager app. )
|
|
20
21
|
g.command 'delete' do |c|
|
|
21
22
|
c.flag 'app_id', desc: 'The ID of the app you want to delete.'
|
|
22
23
|
c.action do |_global_options, options, _args|
|
|
@@ -24,8 +25,8 @@ module Slack
|
|
|
24
25
|
end
|
|
25
26
|
end
|
|
26
27
|
|
|
27
|
-
g.desc 'Export an app manifest from an existing app'
|
|
28
|
-
g.long_desc %( Export an app manifest from an existing app )
|
|
28
|
+
g.desc 'Export an app manifest from an existing app. When called with a manager app token, this method can only export apps that were created by that manager app.'
|
|
29
|
+
g.long_desc %( Export an app manifest from an existing app. When called with a manager app token, this method can only export apps that were created by that manager app. )
|
|
29
30
|
g.command 'export' do |c|
|
|
30
31
|
c.flag 'app_id', desc: 'The ID of the app whose configuration you want to export as a manifest.'
|
|
31
32
|
c.action do |_global_options, options, _args|
|
|
@@ -33,8 +34,8 @@ module Slack
|
|
|
33
34
|
end
|
|
34
35
|
end
|
|
35
36
|
|
|
36
|
-
g.desc 'Update an app from an app manifest'
|
|
37
|
-
g.long_desc %( Update an app from an app manifest )
|
|
37
|
+
g.desc 'Update an app from an app manifest. When called with a manager app token, this method can only update apps that were created by that manager app.'
|
|
38
|
+
g.long_desc %( Update an app from an app manifest. When called with a manager app token, this method can only update apps that were created by that manager app. )
|
|
38
39
|
g.command 'update' do |c|
|
|
39
40
|
c.flag 'manifest', desc: '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.'
|
|
40
41
|
c.flag 'app_id', desc: 'The ID of the app whose configuration you want to update.'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AppsUserConnection methods.'
|
|
8
|
+
command 'apps_user_connection' do |g|
|
|
9
|
+
g.desc 'Updates the connection status between a user and an app.'
|
|
10
|
+
g.long_desc %( Updates the connection status between a user and an app. )
|
|
11
|
+
g.command 'update' do |c|
|
|
12
|
+
c.flag 'user_id', desc: 'The ID of the user for the status update.'
|
|
13
|
+
c.flag 'status', desc: 'The status that should be set for the user.'
|
|
14
|
+
c.action do |_global_options, options, _args|
|
|
15
|
+
puts JSON.dump(@client.apps_user_connection_update(options))
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -6,8 +6,8 @@ module Slack
|
|
|
6
6
|
class App
|
|
7
7
|
desc 'AssistantSearch methods.'
|
|
8
8
|
command 'assistant_search' do |g|
|
|
9
|
-
g.desc 'Searches messages across your Slack organization
|
|
10
|
-
g.long_desc %( Searches messages across your Slack organization
|
|
9
|
+
g.desc 'Searches messages, files, channels and users across your Slack organization.'
|
|
10
|
+
g.long_desc %( Searches messages, files, channels and users across your Slack organization. )
|
|
11
11
|
g.command 'context' do |c|
|
|
12
12
|
c.flag 'query', desc: 'User prompt or search query.'
|
|
13
13
|
c.flag 'action_token', desc: 'Send action_token as received in a message event.'
|
|
@@ -28,6 +28,7 @@ module Slack
|
|
|
28
28
|
c.flag 'term_clauses', desc: '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).'
|
|
29
29
|
c.flag 'modifiers', desc: 'A string containing only modifiers in the format of modifier:value. Search results returned will match the modifier value. For now modifiers only affect term clauses.'
|
|
30
30
|
c.flag 'include_archived_channels', desc: 'Whether to include archived channels in the search results.'
|
|
31
|
+
c.flag 'disable_semantic_search', desc: 'Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false.'
|
|
31
32
|
c.action do |_global_options, options, _args|
|
|
32
33
|
puts JSON.dump(@client.assistant_search_context(options))
|
|
33
34
|
end
|
|
@@ -11,8 +11,11 @@ module Slack
|
|
|
11
11
|
g.command 'setStatus' do |c|
|
|
12
12
|
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
|
13
13
|
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
|
|
14
|
-
c.flag 'status', desc: "Status of the specified bot user, e.g
|
|
15
|
-
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator.'
|
|
14
|
+
c.flag 'status', desc: "Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent."
|
|
15
|
+
c.flag 'loading_messages', desc: 'The list of messages to rotate through as a loading indicator. Maximum of 10 messages.'
|
|
16
|
+
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
|
|
17
|
+
c.flag 'icon_url', desc: 'Image URL to use as the icon for this message.'
|
|
18
|
+
c.flag 'username', desc: "The bot's username to display."
|
|
16
19
|
c.action do |_global_options, options, _args|
|
|
17
20
|
puts JSON.dump(@client.assistant_threads_setStatus(options))
|
|
18
21
|
end
|
|
@@ -22,7 +25,7 @@ module Slack
|
|
|
22
25
|
g.long_desc %( Set suggested prompts for the given assistant thread )
|
|
23
26
|
g.command 'setSuggestedPrompts' do |c|
|
|
24
27
|
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
|
25
|
-
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
|
|
28
|
+
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for. If not provided, the prompts will be set for the latest message in the channel.'
|
|
26
29
|
c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
|
|
27
30
|
c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
|
|
28
31
|
c.action do |_global_options, options, _args|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'Blocks methods.'
|
|
8
|
+
command 'blocks' do |g|
|
|
9
|
+
g.desc 'Validates blocks, messages, and views Block Kit JSON payloads.'
|
|
10
|
+
g.long_desc %( Validates blocks, messages, and views Block Kit JSON payloads. )
|
|
11
|
+
g.command 'validate' do |c|
|
|
12
|
+
c.flag 'blocks', desc: 'A JSON-encoded array of structured blocks. Provide exactly one of blocks, view, or message.'
|
|
13
|
+
c.flag 'message', desc: 'A JSON-encoded message payload to validate. Provide exactly one of blocks, view, or message.'
|
|
14
|
+
c.flag 'view', desc: 'A JSON-encoded view payload to validate. Provide exactly one of blocks, view, or message.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.blocks_validate(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|