-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update API from slack-api-ref@1ee282e (2025-02-28)
- Loading branch information
Showing
15 changed files
with
111 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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 across your Slack organization—perfect for broad, specific, and real-time data retrieval.' | ||
g.long_desc %( Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval. ) | ||
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.' | ||
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 'include_bots', desc: 'If you want the results to include bots.' | ||
c.flag 'limit', desc: 'Number of results to return, up to a max of 20. Defaults to 20.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.assistant_search_context(options)) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module AssistantSearch | ||
# | ||
# Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval. | ||
# | ||
# @option options [string] :query | ||
# User prompt or search query. | ||
# @option options [string] :action_token | ||
# Send action_token as received in a message event. | ||
# @option options [array] :channel_types | ||
# Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. | ||
# @option options [array] :content_types | ||
# Content types to include, a comma-separated list of any combination of messages, files. | ||
# @option options [Object] :context_channel_id | ||
# Context channel ID to support scoping the search when applicable. | ||
# @option options [string] :cursor | ||
# The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results. | ||
# @option options [boolean] :include_bots | ||
# If you want the results to include bots. | ||
# @option options [integer] :limit | ||
# Number of results to return, up to a max of 20. Defaults to 20. | ||
# @see https://api.slack.com/methods/assistant.search.context | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json | ||
def assistant_search_context(options = {}) | ||
raise ArgumentError, 'Required arguments :query missing' if options[:query].nil? | ||
if block_given? | ||
Pagination::Cursor.new(self, :assistant_search_context, options).each do |page| | ||
yield page | ||
end | ||
else | ||
post('assistant.search.context', options) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule slack-api-ref
updated
13 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
require 'spec_helper' | ||
|
||
RSpec.describe Slack::Web::Api::Endpoints::AssistantSearch do | ||
let(:client) { Slack::Web::Client.new } | ||
context 'assistant.search_context' do | ||
it 'requires query' do | ||
expect { client.assistant_search_context }.to raise_error ArgumentError, /Required arguments :query missing/ | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters