diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 9d19ba4b80..e25e67ceb2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -91058,11 +91058,19 @@ "properties": { "query": { "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "aggregations": { + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" + } + }, + "size": { + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "type": "number" } - }, - "required": [ - "query" - ] + } }, "watcher._types:SearchTemplateRequestBody": { "type": "object", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 70a2f9d645..57a33ed54c 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -107240,7 +107240,7 @@ "name": "ConnectionScheme", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L39-L42" + "specLocation": "watcher/_types/Input.ts#L40-L43" }, { "docId": "cron-expressions", @@ -107422,7 +107422,7 @@ "name": "HttpInputMethod", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L59-L65" + "specLocation": "watcher/_types/Input.ts#L60-L66" }, { "kind": "enum", @@ -107441,7 +107441,7 @@ "name": "InputType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L100-L104" + "specLocation": "watcher/_types/Input.ts#L101-L105" }, { "kind": "enum", @@ -107557,7 +107557,7 @@ "name": "ResponseContentType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L106-L110" + "specLocation": "watcher/_types/Input.ts#L107-L111" }, { "codegenNames": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 8990b13a4b..8cd64aa689 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -221670,7 +221670,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L35-L37" + "specLocation": "watcher/_types/Input.ts#L36-L38" }, { "kind": "interface", @@ -221840,7 +221840,7 @@ "name": "ConnectionScheme", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L39-L42" + "specLocation": "watcher/_types/Input.ts#L40-L43" }, { "kind": "type_alias", @@ -222861,7 +222861,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L44-L48" + "specLocation": "watcher/_types/Input.ts#L45-L49" }, { "kind": "interface", @@ -222882,7 +222882,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L50-L52" + "specLocation": "watcher/_types/Input.ts#L51-L53" }, { "kind": "interface", @@ -222914,7 +222914,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L54-L57" + "specLocation": "watcher/_types/Input.ts#L55-L58" }, { "kind": "enum", @@ -222939,7 +222939,7 @@ "name": "HttpInputMethod", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L59-L65" + "specLocation": "watcher/_types/Input.ts#L60-L66" }, { "kind": "interface", @@ -222971,7 +222971,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L67-L70" + "specLocation": "watcher/_types/Input.ts#L68-L71" }, { "kind": "interface", @@ -223146,7 +223146,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L72-L86" + "specLocation": "watcher/_types/Input.ts#L73-L87" }, { "kind": "interface", @@ -223429,7 +223429,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L90-L98", + "specLocation": "watcher/_types/Input.ts#L91-L99", "variants": { "kind": "container" } @@ -223451,7 +223451,7 @@ "name": "InputType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L100-L104" + "specLocation": "watcher/_types/Input.ts#L101-L105" }, { "kind": "interface", @@ -224032,7 +224032,7 @@ "name": "ResponseContentType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Input.ts#L106-L110" + "specLocation": "watcher/_types/Input.ts#L107-L111" }, { "kind": "interface", @@ -224350,7 +224350,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L112-L116" + "specLocation": "watcher/_types/Input.ts#L113-L117" }, { "kind": "interface", @@ -224361,7 +224361,7 @@ "properties": [ { "name": "query", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -224369,9 +224369,48 @@ "namespace": "_types.query_dsl" } } + }, + { + "aliases": [ + "aggs" + ], + "description": "Defines the aggregations that are run as part of the search request.", + "name": "aggregations", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AggregationContainer", + "namespace": "_types.aggregations" + } + } + } + }, + { + "description": "The number of hits to return.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "name": "size", + "required": false, + "serverDefault": 10, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } } ], - "specLocation": "watcher/_types/Input.ts#L147-L149" + "specLocation": "watcher/_types/Input.ts#L148-L161" }, { "kind": "interface", @@ -224450,7 +224489,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L118-L125" + "specLocation": "watcher/_types/Input.ts#L119-L126" }, { "kind": "interface", @@ -224526,7 +224565,7 @@ } } ], - "specLocation": "watcher/_types/Input.ts#L128-L145" + "specLocation": "watcher/_types/Input.ts#L129-L146" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e2549e3808..54ec8fe6cb 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -21216,7 +21216,10 @@ export interface WatcherSearchInput { } export interface WatcherSearchInputRequestBody { - query: QueryDslQueryContainer + query?: QueryDslQueryContainer + aggregations?: Record + aggs?: Record + size?: integer } export interface WatcherSearchInputRequestDefinition { diff --git a/specification/watcher/_types/Input.ts b/specification/watcher/_types/Input.ts index 7504ab6c9e..943fcb45fb 100644 --- a/specification/watcher/_types/Input.ts +++ b/specification/watcher/_types/Input.ts @@ -19,6 +19,7 @@ import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { AggregationContainer } from '@_types/aggregations/AggregationContainer' import { Id, IndexName, @@ -28,7 +29,7 @@ import { Username } from '@_types/common' import { Host } from '@_types/Networking' -import { uint } from '@_types/Numeric' +import { integer, uint } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { Duration } from '@_types/Time' @@ -145,7 +146,18 @@ export class SearchTemplateRequestBody { } export class SearchInputRequestBody { - query: QueryContainer + query?: QueryContainer + /** + * Defines the aggregations that are run as part of the search request. + * @aliases aggs */ // ES uses "aggregations" in serialization + aggregations?: Dictionary + /** + * The number of hits to return. + * By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. + * To page through more hits, use the `search_after` parameter. + * @server_default 10 + */ + size?: integer } export class SimpleInput {