Skip to content

Commit

Permalink
tsdoc
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Aug 28, 2024
1 parent e5cc25a commit 7c411e8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/plugins/query_enhancements/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,40 @@ import { API, SEARCH_STRATEGY } from '../../common';
import { registerQueryAssistRoutes } from './query_assist';
import { registerDataSourceConnectionsRoutes } from './data_source_connection';

/**
* Defines a route for a specific search strategy.
*
* @experimental This function is experimental and might change in future releases.
*
* @param logger - The logger instance.
* @param router - The router instance.
* @param searchStrategies - The available search strategies.
* @param searchStrategyId - The ID of the search strategy to use.
*
* @example
* API Request Body:
* ```json
* {
* "query": {
* "query": "SELECT * FROM my_index",
* "language": "sql",
* "dataset": {
* "id": "my_dataset_id",
* "title": "My Dataset"
* },
* "format": "json"
* },
* @experimental
* "aggConfig": {
* // Optional aggregation configuration
* },
* @deprecated
* "df": {
* // Optional data frame configuration
* }
* }
* ```
*/
function defineRoute(
logger: Logger,
router: IRouter,
Expand Down Expand Up @@ -126,6 +160,16 @@ function defineRoute(
);
}

/**
* Defines routes for various search strategies and registers additional routes.
*
* @experimental This function is experimental and might change in future releases.
*
* @param logger - The logger instance.
* @param router - The router instance.
* @param client - The client instance.
* @param searchStrategies - The available search strategies.
*/
export function defineRoutes(
logger: Logger,
router: IRouter,
Expand Down

0 comments on commit 7c411e8

Please sign in to comment.