diff --git a/elastic_enterprise_search/_async/client/app_search.py b/elastic_enterprise_search/_async/client/app_search.py index d6ff01f..6c6fdb5 100644 --- a/elastic_enterprise_search/_async/client/app_search.py +++ b/elastic_enterprise_search/_async/client/app_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import SKIP_IN_PATH, _quote, _rewrite_parameters from ._base import BaseClient @@ -29,7 +31,7 @@ async def get_adaptive_relevance_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance settings @@ -54,7 +56,7 @@ async def put_adaptive_relevance_settings( *, engine_name: str, curation: t.Mapping[str, t.Any], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update adaptive relevance settings @@ -88,7 +90,7 @@ async def list_adaptive_relevance_suggestions( current_page: t.Optional[int] = None, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance @@ -130,7 +132,7 @@ async def put_adaptive_relevance_suggestions( body: t.Union[ t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update adaptive relevance @@ -163,7 +165,7 @@ async def get_adaptive_relevance_suggestions( current_page: t.Optional[int] = None, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance for a single query @@ -206,7 +208,7 @@ async def refresh_adaptive_relevance_update_process( *, engine_name: str, adaptive_relevance_suggestion_type: t.Union["t.Literal['curation']", str], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update suggestions process refresh @@ -238,7 +240,7 @@ async def get_top_clicks_analytics( filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, query: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the number of clicks received by a document in descending order @@ -278,7 +280,7 @@ async def get_count_analytics( engine_name: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, interval: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the number of clicks and total number of queries over a period @@ -314,7 +316,7 @@ async def get_top_queries_analytics( engine_name: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns queries analytics by usage count @@ -353,7 +355,7 @@ async def log_clickthrough( query: str, request_id: t.Optional[str] = None, tags: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Tracks results that were clicked after a query @@ -396,7 +398,7 @@ async def get_crawler_url_extraction_result( *, engine_name: str, body: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs an HTTP request to a given URL and extracts content from the page using standard App Search Crawler extraction pipeline. @@ -431,7 +433,7 @@ async def create_crawler_crawl_request( seed_urls: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, sitemap_discovery_disabled: t.Optional[bool] = None, sitemap_urls: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a request to perform a crawl of a given engine with the Crawler. @@ -474,7 +476,7 @@ async def list_crawler_crawl_requests( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of latest crawl requests for a given engine. @@ -505,7 +507,7 @@ async def get_crawler_crawl_request( *, engine_name: str, crawl_request_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns crawl request details. @@ -530,7 +532,7 @@ async def get_crawler_active_crawl_request( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns active crawl request details. @@ -552,7 +554,7 @@ async def delete_crawler_active_crawl_request( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Cancels an active crawl request, stopping a running crawl if needed. @@ -582,7 +584,7 @@ async def create_crawler_crawl_rule( policy: t.Union["t.Literal['allow', 'deny']", str], rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str], created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawl rule for a given engine and domain @@ -641,7 +643,7 @@ async def put_crawler_crawl_rule( policy: t.Union["t.Literal['allow', 'deny']", str], rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str], created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates crawl rule configuration @@ -696,7 +698,7 @@ async def delete_crawler_crawl_rule( engine_name: str, domain_id: str, crawl_rule_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawl rule from a given domain @@ -724,7 +726,7 @@ async def get_crawler_crawl_schedule( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the current crawl schedule for a given engine @@ -750,7 +752,7 @@ async def put_crawler_crawl_schedule( engine_name: str, frequency: int, unit: t.Union["t.Literal['day', 'hour', 'month', 'week']", str], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Sets up a crawl schedule for a given engine @@ -784,7 +786,7 @@ async def delete_crawler_crawl_schedule( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawl schedule for a given engine @@ -807,7 +809,7 @@ async def get_crawler_process_crawl_denied_urls( *, engine_name: str, process_crawl_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Provides a sample list of urls identified for deletion by the given process crawl id. @@ -835,7 +837,7 @@ async def list_crawler_domains( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of crawler domains @@ -877,7 +879,7 @@ async def create_crawler_domain( sitemaps: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler domain configuration for a given engine @@ -916,7 +918,7 @@ async def get_crawler_domain( *, engine_name: str, domain_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns crawler domain configuration details @@ -954,7 +956,7 @@ async def put_crawler_domain( sitemaps: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates crawler domain configuration for a given domain @@ -996,7 +998,7 @@ async def delete_crawler_domain( *, engine_name: str, domain_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes crawler domain configuration for a given domain @@ -1026,7 +1028,7 @@ async def create_crawler_entry_point( domain_id: str, value: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler domain entry point for a given engine and domain @@ -1067,7 +1069,7 @@ async def put_crawler_entry_point( entry_point_id: str, value: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates a crawler entry point with a new value @@ -1107,7 +1109,7 @@ async def delete_crawler_entry_point( engine_name: str, domain_id: str, entry_point_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawler entry point @@ -1133,7 +1135,7 @@ async def delete_crawler_entry_point( @_rewrite_parameters() async def get_crawler_metrics( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a momentary snapshot of key crawler metrics, including global and node-level crawler health @@ -1150,7 +1152,7 @@ async def get_crawler_overview( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves crawler configuration overview of a given engine, including configured domains @@ -1177,7 +1179,7 @@ async def create_crawler_process_crawl( engine_name: str, domains: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, dry_run: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Queues a task to reprocess crawled documents with current crawl configuration @@ -1211,7 +1213,7 @@ async def list_crawler_process_crawls( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of latest process crawls for a given engine @@ -1242,7 +1244,7 @@ async def get_crawler_process_crawl( *, engine_name: str, process_crawl_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns process crawl details. @@ -1272,7 +1274,7 @@ async def create_crawler_sitemap( domain_id: str, url: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler sitemap configuration for a given engine and domain @@ -1313,7 +1315,7 @@ async def put_crawler_sitemap( sitemap_id: str, url: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates sitemap configuration @@ -1353,7 +1355,7 @@ async def delete_crawler_sitemap( engine_name: str, domain_id: str, sitemap_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a sitemap from a given domain @@ -1384,7 +1386,7 @@ async def get_crawler_url_tracing_result( *, engine_name: str, url: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns information about the history of a given URL with the App Search Crawler. @@ -1433,7 +1435,7 @@ async def get_crawler_url_validation_result( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs a number of checks on a given URL to make sure it is ready to be crawled and ingested into App Search. @@ -1468,7 +1470,7 @@ async def get_crawler_domain_validation_result( self, *, body: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs a number of checks on a given domain name to make sure it is ready to be crawled and ingested into App Search. @@ -1488,7 +1490,7 @@ async def get_crawler_domain_validation_result( @_rewrite_parameters() async def get_crawler_user_agent( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves the currently configured value for the User-Agent header used for all Crawler HTTP requests @@ -1506,7 +1508,7 @@ async def list_api_keys( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ List the details of all API keys @@ -1537,7 +1539,7 @@ async def create_api_key( engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, read: t.Optional[bool] = None, write: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates an App Search API key @@ -1577,7 +1579,7 @@ async def get_api_key( self, *, api_key_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves details of an API key @@ -1605,7 +1607,7 @@ async def put_api_key( engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, read: t.Optional[bool] = None, write: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an API key @@ -1651,7 +1653,7 @@ async def delete_api_key( self, *, api_key_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a given API key @@ -1675,7 +1677,7 @@ async def list_curations( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve available curations for the given engine @@ -1711,7 +1713,7 @@ async def create_curation( hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, suggestion: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create a new curation for the engine @@ -1750,7 +1752,7 @@ async def get_curation( *, engine_name: str, curation_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a curation by ID @@ -1782,7 +1784,7 @@ async def put_curation( hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, suggestion: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an existing curation @@ -1824,7 +1826,7 @@ async def delete_curation( *, engine_name: str, curation_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a curation set by ID @@ -1850,7 +1852,7 @@ async def get_documents( *, engine_name: str, document_ids: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves one or more documents by id @@ -1882,7 +1884,7 @@ async def index_documents( documents: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create or update documents @@ -1915,7 +1917,7 @@ async def delete_documents( *, engine_name: str, document_ids: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes documents for given Document IDs @@ -1950,7 +1952,7 @@ async def put_documents( documents: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update specific document fields by id and field @@ -1982,7 +1984,7 @@ async def list_documents( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Lists up to 10,000 documents @@ -2013,7 +2015,7 @@ async def list_engines( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all engines with optional pagination support @@ -2048,7 +2050,7 @@ async def create_engine( ] = None, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, type: t.Optional[t.Union["t.Literal['default', 'meta']", str]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates an App Search Engine @@ -2083,7 +2085,7 @@ async def get_engine( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves details of a given engine by its name @@ -2103,7 +2105,7 @@ async def delete_engine( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Delete an engine by name @@ -2126,7 +2128,7 @@ async def delete_meta_engine_source( *, engine_name: str, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a source engine from a given meta engine @@ -2159,7 +2161,7 @@ async def add_meta_engine_source( *, engine_name: str, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Adds a source engine to a given meta engine @@ -2195,7 +2197,7 @@ async def get_api_logs( page: t.Optional[t.Mapping[str, t.Any]] = None, query: t.Optional[str] = None, sort_direction: t.Optional[t.Union["t.Literal['asc', 'desc']", str]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ The API Log displays API request and response data at the Engine level @@ -2238,7 +2240,7 @@ async def query_suggestion( query: t.Optional[str] = None, size: t.Optional[int] = None, types: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Provide relevant query suggestions for incomplete queries @@ -2273,7 +2275,7 @@ async def get_schema( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve current schema for the engine @@ -2296,7 +2298,7 @@ async def put_schema( *, engine_name: str, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update schema for the current engine @@ -2341,7 +2343,7 @@ async def search( sort: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Submit a search and receive a set of results with meta data @@ -2402,7 +2404,7 @@ async def get_search_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve current search settings for the engine @@ -2430,7 +2432,7 @@ async def put_search_settings( precision: t.Optional[int] = None, result_fields: t.Optional[t.Mapping[str, t.Any]] = None, search_fields: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates search settings for the engine @@ -2468,7 +2470,7 @@ async def reset_search_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Resets search settings for the engine @@ -2492,7 +2494,7 @@ async def list_synonym_sets( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all available synonym sets for the engine @@ -2525,7 +2527,7 @@ async def create_synonym_set( *, engine_name: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a new synonym set for the engine @@ -2555,7 +2557,7 @@ async def get_synonym_set( *, engine_name: str, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a synonym set by ID @@ -2584,7 +2586,7 @@ async def put_synonym_set( engine_name: str, synonym_set_id: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates a synonym set by ID @@ -2617,7 +2619,7 @@ async def delete_synonym_set( *, engine_name: str, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a synonym set by ID diff --git a/elastic_enterprise_search/_async/client/enterprise_search.py b/elastic_enterprise_search/_async/client/enterprise_search.py index 854e454..e4b3c9d 100644 --- a/elastic_enterprise_search/_async/client/enterprise_search.py +++ b/elastic_enterprise_search/_async/client/enterprise_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import _quote_query_form, _rewrite_parameters from ._base import BaseClient @@ -27,7 +29,7 @@ class AsyncEnterpriseSearch(BaseClient): @_rewrite_parameters() async def get_health( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get information on the health of a deployment and basic statistics around resource usage @@ -42,7 +44,7 @@ async def get_health( @_rewrite_parameters() async def get_read_only( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get the read-only flag's state @@ -60,7 +62,7 @@ async def put_read_only( self, *, enabled: bool, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update the read-only flag's state @@ -83,7 +85,7 @@ async def get_stats( self, *, include: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get information about the resource usage of the application, the state of different internal queues, etc. @@ -103,7 +105,7 @@ async def get_stats( @_rewrite_parameters() async def get_version( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get version information for this server diff --git a/elastic_enterprise_search/_async/client/workplace_search.py b/elastic_enterprise_search/_async/client/workplace_search.py index ebfabef..fd65652 100644 --- a/elastic_enterprise_search/_async/client/workplace_search.py +++ b/elastic_enterprise_search/_async/client/workplace_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import SKIP_IN_PATH, _quote, _rewrite_parameters from ._base import BaseClient @@ -37,7 +39,7 @@ async def create_content_source( indexing: t.Optional[t.Mapping[str, t.Any]] = None, is_searchable: t.Optional[bool] = None, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create a custom content source @@ -79,7 +81,7 @@ async def list_content_sources( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all content sources @@ -103,7 +105,7 @@ async def get_content_source( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a content source by ID @@ -133,7 +135,7 @@ async def put_content_source( facets: t.Optional[t.Mapping[str, t.Any]] = None, indexing: t.Optional[t.Mapping[str, t.Any]] = None, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update a content source @@ -183,7 +185,7 @@ async def delete_content_source( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a content source by ID @@ -210,7 +212,7 @@ async def put_content_source_icons( content_source_id: str, alt_icon: t.Optional[str] = None, main_icon: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Upload content source icons @@ -246,7 +248,7 @@ async def delete_documents_by_query( *, content_source_id: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes documents by query in a custom content source @@ -290,7 +292,7 @@ async def list_documents( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Lists documents from a custom content source @@ -339,7 +341,7 @@ async def index_documents( documents: t.Union[ t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Indexes one or more new documents into a custom content source, or updates one or more existing documents @@ -371,7 +373,7 @@ async def delete_documents( *, content_source_id: str, document_ids: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Remove documents from a Custom API Source @@ -400,7 +402,7 @@ async def get_document( *, content_source_id: str, document_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a document by ID from the specified content source @@ -429,7 +431,7 @@ async def list_external_identities( content_source_id: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all external identities @@ -467,7 +469,7 @@ async def create_external_identity( t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], permissions: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Adds a new external identity @@ -510,7 +512,7 @@ async def get_external_identity( *, content_source_id: str, external_user_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves an external identity @@ -544,7 +546,7 @@ async def put_external_identity( t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, permissions: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an external identity @@ -582,7 +584,7 @@ async def delete_external_identity( *, content_source_id: str, external_user_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes an external identity @@ -627,7 +629,7 @@ async def command_sync_jobs( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Control a content source's sync jobs @@ -660,7 +662,7 @@ async def get_synonym_set( self, *, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve a synonym set by ID @@ -683,7 +685,7 @@ async def put_synonym_set( *, synonym_set_id: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update a synonym set @@ -712,7 +714,7 @@ async def delete_synonym_set( self, *, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Delete a synonym set @@ -737,7 +739,7 @@ async def list_synonym_sets( filter: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, sort: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve a list of synonym sets @@ -776,7 +778,7 @@ async def create_batch_synonym_sets( t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, synonyms: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create batched synonym sets @@ -800,7 +802,7 @@ async def create_batch_synonym_sets( @_rewrite_parameters() async def get_triggers_blocklist( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get current triggers blocklist @@ -814,7 +816,7 @@ async def get_triggers_blocklist( @_rewrite_parameters() async def put_triggers_blocklist( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update current triggers blocklist @@ -830,7 +832,7 @@ async def get_auto_query_refinement_details( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a content source's automatic query refinement details @@ -851,7 +853,7 @@ async def get_auto_query_refinement_details( @_rewrite_parameters() async def get_current_user( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get the authenticated user @@ -869,7 +871,7 @@ async def create_analytics_event( self, *, body: t.Any, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Capture Analytic events for click and feedback @@ -913,7 +915,7 @@ async def search( t.Union["t.Literal['all', 'remote', 'standard']", str] ] = None, timeout: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Issue a Search Query diff --git a/elastic_enterprise_search/_sync/client/app_search.py b/elastic_enterprise_search/_sync/client/app_search.py index 0ab6fa1..1af1ea1 100644 --- a/elastic_enterprise_search/_sync/client/app_search.py +++ b/elastic_enterprise_search/_sync/client/app_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import SKIP_IN_PATH, _quote, _rewrite_parameters from ._base import BaseClient @@ -29,7 +31,7 @@ def get_adaptive_relevance_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance settings @@ -54,7 +56,7 @@ def put_adaptive_relevance_settings( *, engine_name: str, curation: t.Mapping[str, t.Any], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update adaptive relevance settings @@ -88,7 +90,7 @@ def list_adaptive_relevance_suggestions( current_page: t.Optional[int] = None, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance @@ -130,7 +132,7 @@ def put_adaptive_relevance_suggestions( body: t.Union[ t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update adaptive relevance @@ -163,7 +165,7 @@ def get_adaptive_relevance_suggestions( current_page: t.Optional[int] = None, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve adaptive relevance for a single query @@ -206,7 +208,7 @@ def refresh_adaptive_relevance_update_process( *, engine_name: str, adaptive_relevance_suggestion_type: t.Union["t.Literal['curation']", str], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update suggestions process refresh @@ -238,7 +240,7 @@ def get_top_clicks_analytics( filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, query: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the number of clicks received by a document in descending order @@ -278,7 +280,7 @@ def get_count_analytics( engine_name: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, interval: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the number of clicks and total number of queries over a period @@ -314,7 +316,7 @@ def get_top_queries_analytics( engine_name: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns queries analytics by usage count @@ -353,7 +355,7 @@ def log_clickthrough( query: str, request_id: t.Optional[str] = None, tags: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Tracks results that were clicked after a query @@ -396,7 +398,7 @@ def get_crawler_url_extraction_result( *, engine_name: str, body: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs an HTTP request to a given URL and extracts content from the page using standard App Search Crawler extraction pipeline. @@ -431,7 +433,7 @@ def create_crawler_crawl_request( seed_urls: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, sitemap_discovery_disabled: t.Optional[bool] = None, sitemap_urls: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a request to perform a crawl of a given engine with the Crawler. @@ -474,7 +476,7 @@ def list_crawler_crawl_requests( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of latest crawl requests for a given engine. @@ -505,7 +507,7 @@ def get_crawler_crawl_request( *, engine_name: str, crawl_request_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns crawl request details. @@ -530,7 +532,7 @@ def get_crawler_active_crawl_request( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns active crawl request details. @@ -552,7 +554,7 @@ def delete_crawler_active_crawl_request( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Cancels an active crawl request, stopping a running crawl if needed. @@ -582,7 +584,7 @@ def create_crawler_crawl_rule( policy: t.Union["t.Literal['allow', 'deny']", str], rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str], created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawl rule for a given engine and domain @@ -641,7 +643,7 @@ def put_crawler_crawl_rule( policy: t.Union["t.Literal['allow', 'deny']", str], rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str], created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates crawl rule configuration @@ -696,7 +698,7 @@ def delete_crawler_crawl_rule( engine_name: str, domain_id: str, crawl_rule_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawl rule from a given domain @@ -724,7 +726,7 @@ def get_crawler_crawl_schedule( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns the current crawl schedule for a given engine @@ -750,7 +752,7 @@ def put_crawler_crawl_schedule( engine_name: str, frequency: int, unit: t.Union["t.Literal['day', 'hour', 'month', 'week']", str], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Sets up a crawl schedule for a given engine @@ -784,7 +786,7 @@ def delete_crawler_crawl_schedule( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawl schedule for a given engine @@ -807,7 +809,7 @@ def get_crawler_process_crawl_denied_urls( *, engine_name: str, process_crawl_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Provides a sample list of urls identified for deletion by the given process crawl id. @@ -835,7 +837,7 @@ def list_crawler_domains( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of crawler domains @@ -877,7 +879,7 @@ def create_crawler_domain( sitemaps: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler domain configuration for a given engine @@ -916,7 +918,7 @@ def get_crawler_domain( *, engine_name: str, domain_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns crawler domain configuration details @@ -954,7 +956,7 @@ def put_crawler_domain( sitemaps: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates crawler domain configuration for a given domain @@ -996,7 +998,7 @@ def delete_crawler_domain( *, engine_name: str, domain_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes crawler domain configuration for a given domain @@ -1026,7 +1028,7 @@ def create_crawler_entry_point( domain_id: str, value: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler domain entry point for a given engine and domain @@ -1067,7 +1069,7 @@ def put_crawler_entry_point( entry_point_id: str, value: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates a crawler entry point with a new value @@ -1107,7 +1109,7 @@ def delete_crawler_entry_point( engine_name: str, domain_id: str, entry_point_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a crawler entry point @@ -1133,7 +1135,7 @@ def delete_crawler_entry_point( @_rewrite_parameters() def get_crawler_metrics( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a momentary snapshot of key crawler metrics, including global and node-level crawler health @@ -1150,7 +1152,7 @@ def get_crawler_overview( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves crawler configuration overview of a given engine, including configured domains @@ -1177,7 +1179,7 @@ def create_crawler_process_crawl( engine_name: str, domains: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, dry_run: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Queues a task to reprocess crawled documents with current crawl configuration @@ -1211,7 +1213,7 @@ def list_crawler_process_crawls( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns a list of latest process crawls for a given engine @@ -1242,7 +1244,7 @@ def get_crawler_process_crawl( *, engine_name: str, process_crawl_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns process crawl details. @@ -1272,7 +1274,7 @@ def create_crawler_sitemap( domain_id: str, url: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a crawler sitemap configuration for a given engine and domain @@ -1313,7 +1315,7 @@ def put_crawler_sitemap( sitemap_id: str, url: str, created_at: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates sitemap configuration @@ -1353,7 +1355,7 @@ def delete_crawler_sitemap( engine_name: str, domain_id: str, sitemap_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a sitemap from a given domain @@ -1384,7 +1386,7 @@ def get_crawler_url_tracing_result( *, engine_name: str, url: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Returns information about the history of a given URL with the App Search Crawler. @@ -1433,7 +1435,7 @@ def get_crawler_url_validation_result( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs a number of checks on a given URL to make sure it is ready to be crawled and ingested into App Search. @@ -1468,7 +1470,7 @@ def get_crawler_domain_validation_result( self, *, body: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Performs a number of checks on a given domain name to make sure it is ready to be crawled and ingested into App Search. @@ -1488,7 +1490,7 @@ def get_crawler_domain_validation_result( @_rewrite_parameters() def get_crawler_user_agent( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves the currently configured value for the User-Agent header used for all Crawler HTTP requests @@ -1506,7 +1508,7 @@ def list_api_keys( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ List the details of all API keys @@ -1537,7 +1539,7 @@ def create_api_key( engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, read: t.Optional[bool] = None, write: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates an App Search API key @@ -1577,7 +1579,7 @@ def get_api_key( self, *, api_key_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves details of an API key @@ -1605,7 +1607,7 @@ def put_api_key( engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, read: t.Optional[bool] = None, write: t.Optional[bool] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an API key @@ -1651,7 +1653,7 @@ def delete_api_key( self, *, api_key_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a given API key @@ -1675,7 +1677,7 @@ def list_curations( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve available curations for the given engine @@ -1711,7 +1713,7 @@ def create_curation( hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, suggestion: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create a new curation for the engine @@ -1750,7 +1752,7 @@ def get_curation( *, engine_name: str, curation_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a curation by ID @@ -1782,7 +1784,7 @@ def put_curation( hidden: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, promoted: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, suggestion: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an existing curation @@ -1824,7 +1826,7 @@ def delete_curation( *, engine_name: str, curation_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a curation set by ID @@ -1850,7 +1852,7 @@ def get_documents( *, engine_name: str, document_ids: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves one or more documents by id @@ -1882,7 +1884,7 @@ def index_documents( documents: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create or update documents @@ -1915,7 +1917,7 @@ def delete_documents( *, engine_name: str, document_ids: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes documents for given Document IDs @@ -1950,7 +1952,7 @@ def put_documents( documents: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update specific document fields by id and field @@ -1982,7 +1984,7 @@ def list_documents( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Lists up to 10,000 documents @@ -2013,7 +2015,7 @@ def list_engines( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all engines with optional pagination support @@ -2048,7 +2050,7 @@ def create_engine( ] = None, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, type: t.Optional[t.Union["t.Literal['default', 'meta']", str]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates an App Search Engine @@ -2083,7 +2085,7 @@ def get_engine( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves details of a given engine by its name @@ -2103,7 +2105,7 @@ def delete_engine( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Delete an engine by name @@ -2126,7 +2128,7 @@ def delete_meta_engine_source( *, engine_name: str, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a source engine from a given meta engine @@ -2159,7 +2161,7 @@ def add_meta_engine_source( *, engine_name: str, source_engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Adds a source engine to a given meta engine @@ -2195,7 +2197,7 @@ def get_api_logs( page: t.Optional[t.Mapping[str, t.Any]] = None, query: t.Optional[str] = None, sort_direction: t.Optional[t.Union["t.Literal['asc', 'desc']", str]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ The API Log displays API request and response data at the Engine level @@ -2238,7 +2240,7 @@ def query_suggestion( query: t.Optional[str] = None, size: t.Optional[int] = None, types: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Provide relevant query suggestions for incomplete queries @@ -2273,7 +2275,7 @@ def get_schema( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve current schema for the engine @@ -2296,7 +2298,7 @@ def put_schema( *, engine_name: str, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update schema for the current engine @@ -2341,7 +2343,7 @@ def search( sort: t.Optional[ t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Submit a search and receive a set of results with meta data @@ -2402,7 +2404,7 @@ def get_search_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve current search settings for the engine @@ -2430,7 +2432,7 @@ def put_search_settings( precision: t.Optional[int] = None, result_fields: t.Optional[t.Mapping[str, t.Any]] = None, search_fields: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates search settings for the engine @@ -2468,7 +2470,7 @@ def reset_search_settings( self, *, engine_name: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Resets search settings for the engine @@ -2492,7 +2494,7 @@ def list_synonym_sets( engine_name: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all available synonym sets for the engine @@ -2525,7 +2527,7 @@ def create_synonym_set( *, engine_name: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Creates a new synonym set for the engine @@ -2555,7 +2557,7 @@ def get_synonym_set( *, engine_name: str, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a synonym set by ID @@ -2584,7 +2586,7 @@ def put_synonym_set( engine_name: str, synonym_set_id: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates a synonym set by ID @@ -2617,7 +2619,7 @@ def delete_synonym_set( *, engine_name: str, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a synonym set by ID diff --git a/elastic_enterprise_search/_sync/client/enterprise_search.py b/elastic_enterprise_search/_sync/client/enterprise_search.py index 59c0027..2302fe6 100644 --- a/elastic_enterprise_search/_sync/client/enterprise_search.py +++ b/elastic_enterprise_search/_sync/client/enterprise_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import _quote_query_form, _rewrite_parameters from ._base import BaseClient @@ -27,7 +29,7 @@ class EnterpriseSearch(BaseClient): @_rewrite_parameters() def get_health( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get information on the health of a deployment and basic statistics around resource usage @@ -42,7 +44,7 @@ def get_health( @_rewrite_parameters() def get_read_only( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get the read-only flag's state @@ -60,7 +62,7 @@ def put_read_only( self, *, enabled: bool, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update the read-only flag's state @@ -83,7 +85,7 @@ def get_stats( self, *, include: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get information about the resource usage of the application, the state of different internal queues, etc. @@ -103,7 +105,7 @@ def get_stats( @_rewrite_parameters() def get_version( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get version information for this server diff --git a/elastic_enterprise_search/_sync/client/workplace_search.py b/elastic_enterprise_search/_sync/client/workplace_search.py index a08b616..fe1a2ec 100644 --- a/elastic_enterprise_search/_sync/client/workplace_search.py +++ b/elastic_enterprise_search/_sync/client/workplace_search.py @@ -17,6 +17,8 @@ import typing as t +from elastic_transport import ObjectApiResponse + from ..._utils import SKIP_IN_PATH, _quote, _rewrite_parameters from ._base import BaseClient @@ -37,7 +39,7 @@ def create_content_source( indexing: t.Optional[t.Mapping[str, t.Any]] = None, is_searchable: t.Optional[bool] = None, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create a custom content source @@ -79,7 +81,7 @@ def list_content_sources( *, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all content sources @@ -103,7 +105,7 @@ def get_content_source( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a content source by ID @@ -133,7 +135,7 @@ def put_content_source( facets: t.Optional[t.Mapping[str, t.Any]] = None, indexing: t.Optional[t.Mapping[str, t.Any]] = None, schema: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update a content source @@ -183,7 +185,7 @@ def delete_content_source( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes a content source by ID @@ -210,7 +212,7 @@ def put_content_source_icons( content_source_id: str, alt_icon: t.Optional[str] = None, main_icon: t.Optional[str] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Upload content source icons @@ -246,7 +248,7 @@ def delete_documents_by_query( *, content_source_id: str, filters: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes documents by query in a custom content source @@ -290,7 +292,7 @@ def list_documents( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Lists documents from a custom content source @@ -339,7 +341,7 @@ def index_documents( documents: t.Union[ t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Indexes one or more new documents into a custom content source, or updates one or more existing documents @@ -371,7 +373,7 @@ def delete_documents( *, content_source_id: str, document_ids: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Remove documents from a Custom API Source @@ -400,7 +402,7 @@ def get_document( *, content_source_id: str, document_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a document by ID from the specified content source @@ -429,7 +431,7 @@ def list_external_identities( content_source_id: str, current_page: t.Optional[int] = None, page_size: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves all external identities @@ -467,7 +469,7 @@ def create_external_identity( t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...] ], permissions: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Adds a new external identity @@ -510,7 +512,7 @@ def get_external_identity( *, content_source_id: str, external_user_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves an external identity @@ -544,7 +546,7 @@ def put_external_identity( t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, permissions: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Updates an external identity @@ -582,7 +584,7 @@ def delete_external_identity( *, content_source_id: str, external_user_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Deletes an external identity @@ -627,7 +629,7 @@ def command_sync_jobs( ], ] ] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Control a content source's sync jobs @@ -660,7 +662,7 @@ def get_synonym_set( self, *, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve a synonym set by ID @@ -683,7 +685,7 @@ def put_synonym_set( *, synonym_set_id: str, synonyms: t.Union[t.List[str], t.Tuple[str, ...]], - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update a synonym set @@ -712,7 +714,7 @@ def delete_synonym_set( self, *, synonym_set_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Delete a synonym set @@ -737,7 +739,7 @@ def list_synonym_sets( filter: t.Optional[t.Mapping[str, t.Any]] = None, page_size: t.Optional[int] = None, sort: t.Optional[t.Mapping[str, t.Any]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieve a list of synonym sets @@ -776,7 +778,7 @@ def create_batch_synonym_sets( t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]] ] = None, synonyms: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Create batched synonym sets @@ -800,7 +802,7 @@ def create_batch_synonym_sets( @_rewrite_parameters() def get_triggers_blocklist( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get current triggers blocklist @@ -814,7 +816,7 @@ def get_triggers_blocklist( @_rewrite_parameters() def put_triggers_blocklist( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Update current triggers blocklist @@ -830,7 +832,7 @@ def get_auto_query_refinement_details( self, *, content_source_id: str, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Retrieves a content source's automatic query refinement details @@ -851,7 +853,7 @@ def get_auto_query_refinement_details( @_rewrite_parameters() def get_current_user( self, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Get the authenticated user @@ -869,7 +871,7 @@ def create_analytics_event( self, *, body: t.Any, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Capture Analytic events for click and feedback @@ -913,7 +915,7 @@ def search( t.Union["t.Literal['all', 'remote', 'standard']", str] ] = None, timeout: t.Optional[int] = None, - ) -> t.Any: + ) -> ObjectApiResponse[t.Any]: """ Issue a Search Query