-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathassistant_search.rb
More file actions
47 lines (45 loc) · 3.39 KB
/
assistant_search.rb
File metadata and controls
47 lines (45 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'AssistantSearch methods.'
command 'assistant_search' do |g|
g.desc 'Searches messages, files, channels and users across your Slack organization.'
g.long_desc %( Searches messages, files, channels and users across your Slack organization. )
g.command 'context' do |c|
c.flag 'query', desc: 'User prompt or search query.'
c.flag 'action_token', desc: 'Send action_token as received in a message event.'
c.flag 'channel_types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
c.flag 'content_types', desc: 'Content types to include, a comma-separated list of any combination of messages, files, channels, users.'
c.flag 'include_bots', desc: 'Whether the results should include bots.'
c.flag 'include_deleted_users', desc: 'Whether to include deleted users in the user search results. Defaults to false.'
c.flag 'before', desc: 'UNIX timestamp filter. If present, filters for results before this date.'
c.flag 'after', desc: 'UNIX timestamp filter. If present, filters for results after this date.'
c.flag 'include_context_messages', desc: 'Whether to include context messages surrounding the main message result. Defaults to false if unspecified.'
c.flag 'context_channel_id', desc: 'Context channel ID to support scoping the search when applicable.'
c.flag 'cursor', desc: 'The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results.'
c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.'
c.flag 'sort', desc: 'The field to sort the results by. Defaults to score. Can be one of: score, timestamp.'
c.flag 'sort_dir', desc: 'The direction to sort the results by. Defaults to desc.'
c.flag 'include_message_blocks', desc: 'Whether to return the message blocks in the response.'
c.flag 'highlight', desc: 'Whether to highlight the search query in the results. Defaults to false if unspecified.'
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).'
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.'
c.flag 'include_archived_channels', desc: 'Whether to include archived channels in the search results.'
c.flag 'disable_semantic_search', desc: 'Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.assistant_search_context(options))
end
end
g.desc 'Returns search capabilities on a given team.'
g.long_desc %( Returns search capabilities on a given team. )
g.command 'info' do |c|
c.action do |_global_options, options, _args|
puts JSON.dump(@client.assistant_search_info(options))
end
end
end
end
end
end