From fbaee7f54fb38801113c91e1825c793c7a25ce75 Mon Sep 17 00:00:00 2001 From: delvedor Date: Tue, 23 Nov 2021 14:08:33 +0100 Subject: [PATCH] API generation --- src/api/api/async_search.ts | 2 +- src/api/api/fleet.ts | 10 +- src/api/api/indices.ts | 2 +- src/api/api/ml.ts | 105 +-- src/api/api/rollup.ts | 2 +- src/api/api/search.ts | 2 +- src/api/api/security.ts | 2 +- src/api/kibana.ts | 5 +- src/api/types.ts | 1406 ++++++++++++++++++++------------- src/api/typesWithBodyKey.ts | 1450 ++++++++++++++++++++++------------- 10 files changed, 1862 insertions(+), 1124 deletions(-) diff --git a/src/api/api/async_search.ts b/src/api/api/async_search.ts index 4385269e7..00a7437dc 100644 --- a/src/api/api/async_search.ts +++ b/src/api/api/async_search.ts @@ -114,7 +114,7 @@ export default class AsyncSearch { async submit (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise> async submit (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index'] - const acceptedBody: string[] = ['aggregations', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] + const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/fleet.ts b/src/api/api/fleet.ts index 91a82d88c..84b15f358 100644 --- a/src/api/api/fleet.ts +++ b/src/api/api/fleet.ts @@ -43,19 +43,19 @@ export default class Fleet { this.transport = transport } - async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise + async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index'] const querystring: Record = {} const body = undefined - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } diff --git a/src/api/api/indices.ts b/src/api/api/indices.ts index b71fdc405..b6d6a5b00 100644 --- a/src/api/api/indices.ts +++ b/src/api/api/indices.ts @@ -1369,7 +1369,7 @@ export default class Indices { async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] - const acceptedBody: string[] = ['index_patterns', 'composed_of', 'overlapping', 'template'] + const acceptedBody: string[] = ['allow_auto_create', 'index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/ml.ts b/src/api/api/ml.ts index 4d0476bae..500f38024 100644 --- a/src/api/api/ml.ts +++ b/src/api/api/ml.ts @@ -48,11 +48,23 @@ export default class Ml { async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptions): Promise async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id'] + const acceptedBody: string[] = ['allow_no_match', 'force', 'timeout'] const querystring: Record = {} - const body = undefined + // @ts-expect-error + const userBody: any = params?.body + let body: Record | string + if (typeof userBody === 'string') { + body = userBody + } else { + body = userBody != null ? { ...userBody } : undefined + } for (const key in params) { - if (acceptedPath.includes(key)) { + if (acceptedBody.includes(key)) { + body = body ?? {} + // @ts-expect-error + body[key] = params[key] + } else if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { // @ts-expect-error @@ -425,10 +437,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } - async explainDataFrameAnalytics (this: That, params: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise - async explainDataFrameAnalytics (this: That, params: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> - async explainDataFrameAnalytics (this: That, params: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise - async explainDataFrameAnalytics (this: That, params: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise { + async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise + async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['id'] const acceptedBody: string[] = ['source', 'dest', 'analysis', 'description', 'model_memory_limit', 'max_num_threads', 'analyzed_fields', 'allow_lazy_start'] const querystring: Record = {} @@ -441,6 +453,7 @@ export default class Ml { body = userBody != null ? { ...userBody } : undefined } + params = params ?? {} for (const key in params) { if (acceptedBody.includes(key)) { body = body ?? {} @@ -471,7 +484,7 @@ export default class Ml { async flushJob (this: That, params: T.MlFlushJobRequest | TB.MlFlushJobRequest, options?: TransportRequestOptions): Promise async flushJob (this: That, params: T.MlFlushJobRequest | TB.MlFlushJobRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id'] - const acceptedBody: string[] = ['advance_time', 'calc_interim', 'end', 'start'] + const acceptedBody: string[] = ['advance_time', 'calc_interim', 'end', 'skip_time', 'start'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -539,7 +552,7 @@ export default class Ml { async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptions): Promise async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id', 'timestamp'] - const acceptedBody: string[] = ['anomaly_score', 'desc', 'exclude_interim', 'expand', 'sort', 'start', 'end'] + const acceptedBody: string[] = ['anomaly_score', 'desc', 'end', 'exclude_interim', 'expand', 'page', 'sort', 'start'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -929,7 +942,7 @@ export default class Ml { async getModelSnapshots (this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): Promise async getModelSnapshots (this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id', 'snapshot_id'] - const acceptedBody: string[] = ['start', 'end'] + const acceptedBody: string[] = ['desc', 'end', 'page', 'sort', 'start'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -970,11 +983,23 @@ export default class Ml { async getOverallBuckets (this: That, params: T.MlGetOverallBucketsRequest | TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions): Promise async getOverallBuckets (this: That, params: T.MlGetOverallBucketsRequest | TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id'] + const acceptedBody: string[] = ['allow_no_match', 'bucket_span', 'end', 'exclude_interim', 'overall_score', 'start', 'top_n'] const querystring: Record = {} - const body = undefined + // @ts-expect-error + const userBody: any = params?.body + let body: Record | string + if (typeof userBody === 'string') { + body = userBody + } else { + body = userBody != null ? { ...userBody } : undefined + } for (const key in params) { - if (acceptedPath.includes(key)) { + if (acceptedBody.includes(key)) { + body = body ?? {} + // @ts-expect-error + body[key] = params[key] + } else if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { // @ts-expect-error @@ -992,7 +1017,7 @@ export default class Ml { async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptions): Promise async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['job_id'] - const acceptedBody: string[] = ['desc', 'exclude_interim', 'page', 'record_score', 'sort', 'start', 'end'] + const acceptedBody: string[] = ['desc', 'end', 'exclude_interim', 'page', 'record_score', 'sort', 'start'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1021,28 +1046,6 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } - async getTrainedModelDeploymentStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async getTrainedModelDeploymentStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async getTrainedModelDeploymentStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async getTrainedModelDeploymentStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { - const acceptedPath: string[] = ['model_id'] - const querystring: Record = {} - const body = undefined - - params = params ?? {} - for (const key in params) { - if (acceptedPath.includes(key)) { - continue - } else if (key !== 'body') { - querystring[key] = params[key] - } - } - - const method = 'GET' - const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/deployment/_stats` - return await this.transport.request({ path, method, querystring, body }, options) - } - async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptions): Promise @@ -1332,7 +1335,7 @@ export default class Ml { async putCalendar (this: That, params: T.MlPutCalendarRequest | TB.MlPutCalendarRequest, options?: TransportRequestOptions): Promise async putCalendar (this: That, params: T.MlPutCalendarRequest | TB.MlPutCalendarRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['calendar_id'] - const acceptedBody: string[] = ['description'] + const acceptedBody: string[] = ['job_ids', 'description'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1422,7 +1425,7 @@ export default class Ml { async putDatafeed (this: That, params: T.MlPutDatafeedRequest | TB.MlPutDatafeedRequest, options?: TransportRequestOptions): Promise async putDatafeed (this: That, params: T.MlPutDatafeedRequest | TB.MlPutDatafeedRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['datafeed_id'] - const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indices_options', 'job_id', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size'] + const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'job_id', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1524,7 +1527,7 @@ export default class Ml { async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['model_id'] - const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'tags'] + const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'model_type', 'tags'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1803,7 +1806,7 @@ export default class Ml { async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptions): Promise async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['datafeed_id'] - const acceptedBody: string[] = ['force', 'timeout'] + const acceptedBody: string[] = ['allow_no_match', 'force', 'timeout'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1888,19 +1891,31 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } - async updateDatafeed (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async updateDatafeed (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async updateDatafeed (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async updateDatafeed (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> + async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise + async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['datafeed_id'] + const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size'] const querystring: Record = {} - const body = undefined + // @ts-expect-error + const userBody: any = params?.body + let body: Record | string + if (typeof userBody === 'string') { + body = userBody + } else { + body = userBody != null ? { ...userBody } : undefined + } - params = params ?? {} for (const key in params) { - if (acceptedPath.includes(key)) { + if (acceptedBody.includes(key)) { + body = body ?? {} + // @ts-expect-error + body[key] = params[key] + } else if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } diff --git a/src/api/api/rollup.ts b/src/api/api/rollup.ts index 848d0724e..cf9ed6ac8 100644 --- a/src/api/api/rollup.ts +++ b/src/api/api/rollup.ts @@ -213,7 +213,7 @@ export default class Rollup { async rollupSearch (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise> async rollupSearch (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index', 'type'] - const acceptedBody: string[] = ['aggregations', 'query', 'size'] + const acceptedBody: string[] = ['aggregations', 'aggs', 'query', 'size'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/search.ts b/src/api/api/search.ts index 12d7aa1c3..754e7b9f9 100644 --- a/src/api/api/search.ts +++ b/src/api/api/search.ts @@ -42,7 +42,7 @@ export default async function SearchApi (this: That, params export default async function SearchApi (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise> export default async function SearchApi (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index'] - const acceptedBody: string[] = ['aggregations', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] + const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/security.ts b/src/api/api/security.ts index c3430b533..78e12b4a1 100644 --- a/src/api/api/security.ts +++ b/src/api/api/security.ts @@ -71,7 +71,7 @@ export default class Security { async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptions): Promise async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['username'] - const acceptedBody: string[] = ['password'] + const acceptedBody: string[] = ['password', 'password_hash'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/kibana.ts b/src/api/kibana.ts index 4aab8b1eb..2e06a7d6d 100644 --- a/src/api/kibana.ts +++ b/src/api/kibana.ts @@ -158,7 +158,7 @@ interface KibanaClient { } fieldCaps: (params?: T.FieldCapsRequest| TB.FieldCapsRequest, options?: TransportRequestOptions) => Promise> fleet: { - globalCheckpoints: (params?: T.TODO, options?: TransportRequestOptions) => Promise> + globalCheckpoints: (params: T.FleetGlobalCheckpointsRequest| TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions) => Promise> msearch: (params?: T.TODO, options?: TransportRequestOptions) => Promise> search: (params?: T.TODO, options?: TransportRequestOptions) => Promise> } @@ -304,7 +304,6 @@ interface KibanaClient { getModelSnapshots: (params: T.MlGetModelSnapshotsRequest| TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions) => Promise> getOverallBuckets: (params: T.MlGetOverallBucketsRequest| TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions) => Promise> getRecords: (params: T.MlGetRecordsRequest| TB.MlGetRecordsRequest, options?: TransportRequestOptions) => Promise> - getTrainedModelDeploymentStats: (params?: T.TODO, options?: TransportRequestOptions) => Promise> getTrainedModels: (params?: T.MlGetTrainedModelsRequest| TB.MlGetTrainedModelsRequest, options?: TransportRequestOptions) => Promise> getTrainedModelsStats: (params?: T.MlGetTrainedModelsStatsRequest| TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions) => Promise> inferTrainedModelDeployment: (params?: T.TODO, options?: TransportRequestOptions) => Promise> @@ -334,7 +333,7 @@ interface KibanaClient { stopDatafeed: (params: T.MlStopDatafeedRequest| TB.MlStopDatafeedRequest, options?: TransportRequestOptions) => Promise> stopTrainedModelDeployment: (params?: T.TODO, options?: TransportRequestOptions) => Promise> updateDataFrameAnalytics: (params: T.MlUpdateDataFrameAnalyticsRequest| TB.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise> - updateDatafeed: (params?: T.TODO, options?: TransportRequestOptions) => Promise> + updateDatafeed: (params: T.MlUpdateDatafeedRequest| TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions) => Promise> updateFilter: (params: T.MlUpdateFilterRequest| TB.MlUpdateFilterRequest, options?: TransportRequestOptions) => Promise> updateJob: (params: T.MlUpdateJobRequest| TB.MlUpdateJobRequest, options?: TransportRequestOptions) => Promise> updateModelSnapshot: (params: T.MlUpdateModelSnapshotRequest| TB.MlUpdateModelSnapshotRequest, options?: TransportRequestOptions) => Promise> diff --git a/src/api/types.ts b/src/api/types.ts index 10df318d7..d4100af9c 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -62,7 +62,7 @@ export interface BulkRequest extends RequestBase { pipeline?: string refresh?: Refresh routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields timeout?: Time @@ -127,7 +127,7 @@ export interface CountRequest extends RequestBase { allow_no_indices?: boolean analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards ignore_throttled?: boolean @@ -186,7 +186,7 @@ export interface DeleteByQueryRequest extends RequestBase { analyzer?: string analyze_wildcard?: boolean conflicts?: Conflicts - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards from?: long @@ -206,7 +206,7 @@ export interface DeleteByQueryRequest extends RequestBase { size?: long slices?: long sort?: string[] - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stats?: string[] @@ -260,7 +260,7 @@ export interface ExistsRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -278,7 +278,7 @@ export interface ExistsSourceRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields version?: VersionNumber @@ -304,12 +304,12 @@ export interface ExplainRequest extends RequestBase { index: IndexName analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string lenient?: boolean preference?: string routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -353,22 +353,7 @@ export interface FieldCapsResponse { fields: Record> } -export interface GetRequest extends RequestBase { - id: Id - index: IndexName - preference?: string - realtime?: boolean - refresh?: boolean - routing?: Routing - _source?: boolean | Fields - _source_excludes?: Fields - _source_includes?: Fields - stored_fields?: Fields - version?: VersionNumber - version_type?: VersionType -} - -export interface GetResponse { +export interface GetGetResult { _index: IndexName fields?: Record found: boolean @@ -381,6 +366,23 @@ export interface GetResponse { _version?: VersionNumber } +export interface GetRequest extends RequestBase { + id: Id + index: IndexName + preference?: string + realtime?: boolean + refresh?: boolean + routing?: Routing + _source?: SearchSourceConfigParam + _source_excludes?: Fields + _source_includes?: Fields + stored_fields?: Fields + version?: VersionNumber + version_type?: VersionType +} + +export type GetResponse = GetGetResult + export interface GetScriptRequest extends RequestBase { id: Id master_timeout?: Time @@ -435,7 +437,7 @@ export interface GetSourceRequest { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -479,8 +481,8 @@ export interface InfoResponse { export interface KnnSearchRequest extends RequestBase { index: Indices routing?: Routing - _source?: boolean | Fields | SearchSourceFilter - docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[] + _source?: SearchSourceConfig + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] stored_fields?: Fields fields?: Fields knn: KnnSearchQuery @@ -504,27 +506,18 @@ export interface KnnSearchQuery { export type KnnSearchQueryVector = double[] -export interface MgetHit { - error?: ErrorCause - fields?: Record - found?: boolean +export interface MgetMultiGetError { + error: ErrorCause _id: Id _index: IndexName - _primary_term?: long - _routing?: Routing - _seq_no?: SequenceNumber - _source?: TDocument _type?: Type - _version?: VersionNumber } -export type MgetMultiGetId = string | integer - export interface MgetOperation { - _id: MgetMultiGetId + _id: Id _index?: IndexName routing?: Routing - _source?: boolean | Fields | SearchSourceFilter + _source?: SearchSourceConfig stored_fields?: Fields _type?: Type version?: VersionNumber @@ -537,30 +530,41 @@ export interface MgetRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields docs?: MgetOperation[] - ids?: MgetMultiGetId[] + ids?: Ids } export interface MgetResponse { - docs: MgetHit[] + docs: MgetResponseItem[] } -export interface MsearchBody { +export type MgetResponseItem = GetGetResult | MgetMultiGetError + +export interface MsearchMultiSearchItem extends SearchResponse { + status: integer +} + +export interface MsearchMultiSearchResult { + took: long + responses: MsearchResponseItem[] +} + +export interface MsearchMultisearchBody { aggregations?: Record aggs?: Record query?: QueryDslQueryContainer from?: integer size?: integer pit?: SearchPointInTimeReference - track_total_hits?: boolean | integer - suggest?: SearchSuggestContainer | Record + track_total_hits?: SearchTrackHits + suggest?: SearchSuggester } -export interface MsearchHeader { +export interface MsearchMultisearchHeader { allow_no_indices?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean @@ -584,17 +588,14 @@ export interface MsearchRequest extends RequestBase { search_type?: SearchType rest_total_hits_as_int?: boolean typed_keys?: boolean - searches?: (MsearchHeader | MsearchBody)[] + searches?: MsearchRequestItem[] } -export interface MsearchResponse { - took: long - responses: (MsearchSearchResult | ErrorResponseBase)[] -} +export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody -export interface MsearchSearchResult extends SearchResponse { - status: integer -} +export type MsearchResponse = MsearchMultiSearchResult + +export type MsearchResponseItem = MsearchMultiSearchItem | ErrorResponseBase export interface MsearchTemplateRequest extends RequestBase { index?: Indices @@ -603,18 +604,18 @@ export interface MsearchTemplateRequest extends RequestBase { search_type?: SearchType rest_total_hits_as_int?: boolean typed_keys?: boolean - search_templates?: MsearchTemplateTemplateItem[] + search_templates?: MsearchTemplateRequestItem[] } -export interface MsearchTemplateResponse { - responses: (SearchResponse | ErrorResponseBase)[] - took: long -} +export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig -export interface MsearchTemplateTemplateItem { +export type MsearchTemplateResponse = MsearchMultiSearchResult + +export interface MsearchTemplateTemplateConfig { + explain?: boolean id?: Id - index?: Indices params?: Record + profile?: boolean source?: string } @@ -667,7 +668,7 @@ export interface MtermvectorsTermVectorsResult { export interface OpenPointInTimeRequest extends RequestBase { index: Indices - keep_alive?: Time + keep_alive: Time } export interface OpenPointInTimeResponse { @@ -684,7 +685,7 @@ export interface PutScriptRequest extends RequestBase { context?: Name master_timeout?: Time timeout?: Time - script?: StoredScript + script: StoredScript } export interface PutScriptResponse extends AcknowledgedResponseBase { @@ -906,7 +907,7 @@ export interface ScriptsPainlessExecutePainlessContextSetup { export interface ScriptsPainlessExecuteRequest extends RequestBase { context?: string context_setup?: ScriptsPainlessExecutePainlessContextSetup - script?: InlineScript + script?: InlineScript | string } export interface ScriptsPainlessExecuteResponse { @@ -930,7 +931,7 @@ export interface SearchRequest extends RequestBase { analyze_wildcard?: boolean batched_reduce_size?: long ccs_minimize_roundtrips?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string docvalue_fields?: Fields expand_wildcards?: ExpandWildcards @@ -954,12 +955,12 @@ export interface SearchRequest extends RequestBase { suggest_text?: string terminate_after?: long timeout?: Time - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits track_scores?: boolean typed_keys?: boolean rest_total_hits_as_int?: boolean version?: boolean - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields seq_no_primary_term?: boolean @@ -980,8 +981,8 @@ export interface SearchRequest extends RequestBase { script_fields?: Record search_after?: SearchSortResults slice?: SlicedScroll - fields?: (Field | DateField)[] - suggest?: SearchSuggestContainer | Record + fields?: (QueryDslFieldAndFormat | Field)[] + suggest?: SearchSuggester pit?: SearchPointInTimeReference runtime_mappings?: MappingRuntimeFields } @@ -1069,6 +1070,8 @@ export interface SearchAggregationProfileDelegateDebugFilter { export type SearchBoundaryScanner = 'chars' | 'sentence' | 'word' +export type SearchBuiltinHighlighterType = 'plain' | 'fvh' | 'unified' + export interface SearchCollector { name: string reason: string @@ -1076,6 +1079,14 @@ export interface SearchCollector { children?: SearchCollector[] } +export interface SearchCompletionContext { + boost?: double + context: SearchContext + neighbours?: GeoHashPrecision[] + precision?: GeoHashPrecision + prefix?: boolean +} + export interface SearchCompletionSuggestOption { collate_match?: boolean contexts?: Record @@ -1090,14 +1101,14 @@ export interface SearchCompletionSuggestOption { } export interface SearchCompletionSuggester extends SearchSuggesterBase { - contexts?: Record + contexts?: Record fuzzy?: SearchSuggestFuzziness prefix?: string regex?: string skip_duplicates?: boolean } -export type SearchContext = string | QueryDslGeoLocation +export type SearchContext = string | GeoLocation export interface SearchDirectGenerator { field: Field @@ -1113,11 +1124,6 @@ export interface SearchDirectGenerator { suggest_mode?: SuggestMode } -export interface SearchDocValueField { - field: Field - format?: string -} - export interface SearchFetchProfile { type: string description: string @@ -1141,12 +1147,6 @@ export interface SearchFetchProfileDebug { fast_path?: integer } -export interface SearchFieldAndFormat { - field: Field - format?: string - include_unmapped?: boolean -} - export interface SearchFieldCollapse { field: Field inner_hits?: SearchInnerHits | SearchInnerHits[] @@ -1159,16 +1159,30 @@ export interface SearchFieldSort { nested?: SearchNestedSortValue order?: SearchSortOrder unmapped_type?: MappingFieldType + numeric_type?: SearchFieldSortNumericType + format?: string +} + +export type SearchFieldSortNumericType = 'long' | 'double' | 'date' | 'date_nanos' + +export interface SearchFieldSuggester { + completion?: SearchCompletionSuggester + phrase?: SearchPhraseSuggester + prefix?: string + regex?: string + term?: SearchTermSuggester + text?: string } export interface SearchGeoDistanceSortKeys { mode?: SearchSortMode distance_type?: GeoDistanceType + ignore_unmapped?: boolean order?: SearchSortOrder unit?: DistanceUnit } export type SearchGeoDistanceSort = SearchGeoDistanceSortKeys -& { [property: string]: QueryDslGeoLocation | QueryDslGeoLocation[] | SearchSortMode | GeoDistanceType | SearchSortOrder | DistanceUnit } +& { [property: string]: GeoLocation | GeoLocation[] | SearchSortMode | GeoDistanceType | boolean | SearchSortOrder | DistanceUnit } export interface SearchHighlight { fields: Record @@ -1214,7 +1228,7 @@ export interface SearchHighlightField { pre_tags?: string[] require_field_match?: boolean tags_schema?: SearchHighlighterTagsSchema - type?: SearchHighlighterType | string + type?: SearchHighlighterType } export type SearchHighlighterEncoder = 'default' | 'html' @@ -1225,7 +1239,7 @@ export type SearchHighlighterOrder = 'score' export type SearchHighlighterTagsSchema = 'styled' -export type SearchHighlighterType = 'plain' | 'fvh' | 'unified' +export type SearchHighlighterType = SearchBuiltinHighlighterType | string export interface SearchHit { _index: IndexName @@ -1260,7 +1274,7 @@ export interface SearchInnerHits { size?: integer from?: integer collapse?: SearchFieldCollapse - docvalue_fields?: (SearchFieldAndFormat | Field)[] + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] explain?: boolean highlight?: SearchHighlight ignore_unmapped?: boolean @@ -1268,20 +1282,14 @@ export interface SearchInnerHits { seq_no_primary_term?: boolean fields?: Fields sort?: SearchSort - _source?: boolean | SearchSourceFilter + _source?: SearchSourceConfig stored_field?: Fields track_scores?: boolean version?: boolean } -export interface SearchInnerHitsMetadata { - total: SearchTotalHits | long - hits: SearchHit>[] - max_score?: double -} - export interface SearchInnerHitsResult { - hits: SearchInnerHitsMetadata + hits: SearchHitsMetadata } export interface SearchLaplaceSmoothingModel { @@ -1303,6 +1311,7 @@ export interface SearchNestedIdentity { export interface SearchNestedSortValue { filter?: QueryDslQueryContainer max_children?: integer + nested?: SearchNestedSortValue path: Field } @@ -1397,16 +1406,19 @@ export interface SearchRescoreQuery { export type SearchScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' export interface SearchScoreSort { - mode?: SearchSortMode order?: SearchSortOrder } export interface SearchScriptSort { order?: SearchSortOrder script: Script - type?: string + type?: SearchScriptSortType + mode?: SearchSortMode + nested?: SearchNestedSortValue } +export type SearchScriptSortType = 'string' | 'number' + export interface SearchSearchProfile { collector: SearchCollector[] query: SearchQueryProfile[] @@ -1428,27 +1440,31 @@ export interface SearchSmoothingModelContainer { export type SearchSort = SearchSortCombinations | SearchSortCombinations[] -export type SearchSortCombinations = Field | SearchSortContainer | SearchSortOrder +export type SearchSortCombinations = Field | SearchSortOptions -export interface SearchSortContainerKeys { +export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' + +export interface SearchSortOptionsKeys { _score?: SearchScoreSort _doc?: SearchScoreSort _geo_distance?: SearchGeoDistanceSort _script?: SearchScriptSort } -export type SearchSortContainer = SearchSortContainerKeys +export type SearchSortOptions = SearchSortOptionsKeys & { [property: string]: SearchFieldSort | SearchSortOrder | SearchScoreSort | SearchGeoDistanceSort | SearchScriptSort } -export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' - -export type SearchSortOrder = 'asc' | 'desc' | '_doc' +export type SearchSortOrder = 'asc' | 'desc' export type SearchSortResults = (long | double | string | null)[] +export type SearchSourceConfig = boolean | SearchSourceFilter | Fields + +export type SearchSourceConfigParam = boolean | Fields + export interface SearchSourceFilter { excludes?: Fields - includes?: Fields exclude?: Fields + includes?: Fields include?: Fields } @@ -1465,23 +1481,6 @@ export interface SearchSuggest { text: string } -export interface SearchSuggestContainer { - completion?: SearchCompletionSuggester - phrase?: SearchPhraseSuggester - prefix?: string - regex?: string - term?: SearchTermSuggester - text?: string -} - -export interface SearchSuggestContextQuery { - boost?: double - context: SearchContext - neighbours?: Distance[] | integer[] - precision?: Distance | integer - prefix?: boolean -} - export interface SearchSuggestFuzziness { fuzziness: Fuzziness min_length: integer @@ -1494,6 +1493,12 @@ export type SearchSuggestOption = SearchCompletionSuggestOp export type SearchSuggestSort = 'score' | 'frequency' +export interface SearchSuggesterKeys { + text?: string +} +export type SearchSuggester = SearchSuggesterKeys +& { [property: string]: SearchFieldSuggester | string } + export interface SearchSuggesterBase { field: Field analyzer?: string @@ -1528,6 +1533,8 @@ export interface SearchTotalHits { export type SearchTotalHitsRelation = 'eq' | 'gte' +export type SearchTrackHits = boolean | integer + export interface SearchMvtRequest extends RequestBase { index: Indices field: Field @@ -1697,7 +1704,7 @@ export interface UpdateRequest routing?: Routing timeout?: Time wait_for_active_shards?: WaitForActiveShards - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields detect_noop?: boolean @@ -1718,7 +1725,7 @@ export interface UpdateByQueryRequest extends RequestBase { analyzer?: string analyze_wildcard?: boolean conflicts?: Conflicts - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards from?: long @@ -1737,7 +1744,7 @@ export interface UpdateByQueryRequest extends RequestBase { size?: long slices?: long sort?: string[] - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stats?: string[] @@ -1798,6 +1805,8 @@ export interface AcknowledgedResponseBase { export type AggregateName = string +export type BuiltinScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java' + export interface BulkIndexByScrollFailure { cause: ErrorCause id: Id @@ -1842,16 +1851,17 @@ export interface CompletionStats { export type Conflicts = 'abort' | 'proceed' +export interface CoordsGeoBounds { + top: double + bottom: double + left: double + right: double +} + export type DataStreamName = string export type DataStreamNames = DataStreamName | DataStreamName[] -export interface DateField { - field: Field - format?: string - include_unmapped?: boolean -} - export type DateFormat = string export type DateMath = string @@ -1860,8 +1870,6 @@ export type DateMathTime = string export type DateString = string -export type DefaultOperator = 'AND' | 'OR' - export interface DictionaryResponseBase { [key: string]: TValue } @@ -1908,9 +1916,9 @@ export interface ErrorResponseBase { status: integer } -export type ExpandWildcardOptions = 'all' | 'open' | 'closed' | 'hidden' | 'none' +export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none' -export type ExpandWildcards = ExpandWildcardOptions | ExpandWildcardOptions[] | string +export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] export type Field = string @@ -1924,6 +1932,8 @@ export interface FieldSizeUsage { size_in_bytes: long } +export type FieldValue = long | double | string | boolean + export interface FielddataStats { evictions?: long memory_size?: ByteSize @@ -1942,14 +1952,31 @@ export interface FlushStats { export type Fuzziness = string | integer +export type GeoBounds = CoordsGeoBounds | TopLeftBottomRightGeoBounds | TopRightBottomLeftGeoBounds | WktGeoBounds + export type GeoDistanceType = 'arc' | 'plane' -export type GeoHashPrecision = number +export type GeoHash = string + +export interface GeoHashLocation { + geohash: GeoHash +} + +export type GeoHashPrecision = number | string + +export interface GeoLine { + type: string + coordinates: double[][] +} + +export type GeoLocation = LatLonGeoLocation | GeoHashLocation | double[] | string export type GeoShape = any export type GeoShapeRelation = 'intersects' | 'disjoint' | 'within' | 'contains' +export type GeoTile = string + export type GeoTilePrecision = number export interface GetStats { @@ -1965,9 +1992,7 @@ export interface GetStats { total: long } -export type GroupBy = 'nodes' | 'parents' | 'none' - -export type Health = 'green' | 'yellow' | 'red' +export type HealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' export type Host = string @@ -1985,10 +2010,6 @@ export type IndexPattern = string export type IndexPatterns = IndexPattern[] -export interface IndexedScript extends ScriptBase { - id: Id -} - export interface IndexingStats { index_current: long delete_current: long @@ -2024,12 +2045,14 @@ export type InlineGet = InlineGetKeys & { [property: string]: any } export interface InlineScript extends ScriptBase { + lang?: ScriptLanguage + options?: Record source: string } export type Ip = string -export interface LatLon { +export interface LatLonGeoLocation { lat: double lon: double } @@ -2151,9 +2174,7 @@ export interface RecoveryStats { throttle_time_in_millis: long } -export type Refresh = boolean | RefreshOptions - -export type RefreshOptions = 'wait_for' +export type Refresh = boolean | 'true' | 'false' | 'wait_for' export interface RefreshStats { external_total: long @@ -2186,10 +2207,9 @@ export interface Retries { export type Routing = string -export type Script = InlineScript | IndexedScript | string +export type Script = InlineScript | string | StoredScriptId export interface ScriptBase { - lang?: ScriptLanguage | string params?: Record } @@ -2198,7 +2218,7 @@ export interface ScriptField { ignore_failure?: boolean } -export type ScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java' +export type ScriptLanguage = BuiltinScriptLanguage | string export interface ScriptTransform { lang: string @@ -2262,8 +2282,6 @@ export type SequenceNumber = long export type Service = string -export type ShapeRelation = 'intersects' | 'disjoint' | 'within' - export interface ShardFailure { index?: IndexName node?: string @@ -2284,8 +2302,6 @@ export interface ShardsOperationResponseBase { _shards: ShardStatistics } -export type Size = 'Raw' | 'k' | 'm' | 'g' | 't' | 'p' - export interface SlicedScroll { field?: Field id: integer @@ -2302,10 +2318,15 @@ export interface StoreStats { } export interface StoredScript { - lang?: ScriptLanguage | string + lang: ScriptLanguage + options?: Record source: string } +export interface StoredScriptId extends ScriptBase { + id: Id +} + export type SuggestMode = 'missing' | 'popular' | 'always' export type SuggestionName = string @@ -2324,6 +2345,16 @@ export type TimeZone = string export type Timestamp = string +export interface TopLeftBottomRightGeoBounds { + top_left: GeoLocation + bottom_right: GeoLocation +} + +export interface TopRightBottomLeftGeoBounds { + top_right: GeoLocation + bottom_left: GeoLocation +} + export interface Transform { } @@ -2365,8 +2396,6 @@ export type WaitForActiveShards = integer | WaitForActiveShardOptions export type WaitForEvents = 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid' -export type WaitForStatus = 'green' | 'yellow' | 'red' - export interface WarmerStats { current: long total: long @@ -2374,6 +2403,10 @@ export interface WarmerStats { total_time_in_millis: long } +export interface WktGeoBounds { + wkt: string +} + export interface WriteResponseBase { _id: Id _index: IndexName @@ -2402,11 +2435,19 @@ export type uint = number export type ulong = number +export interface AggregationsAdjacencyMatrixAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsAdjacencyMatrixAggregation extends AggregationsBucketAggregationBase { filters?: Record } -export type AggregationsAggregate = AggregationsSingleBucketAggregate | AggregationsAutoDateHistogramAggregate | AggregationsFiltersAggregate | AggregationsSignificantTermsAggregate | AggregationsTermsAggregate | AggregationsBucketAggregate | AggregationsCompositeBucketAggregate | AggregationsMultiBucketAggregate | AggregationsMatrixStatsAggregate | AggregationsKeyedValueAggregate | AggregationsMetricAggregate +export interface AggregationsAdjacencyMatrixBucketKeys extends AggregationsMultiBucketBase { +} +export type AggregationsAdjacencyMatrixBucket = AggregationsAdjacencyMatrixBucketKeys +& { [property: string]: AggregationsAggregate | long } + +export type AggregationsAggregate = AggregationsCardinalityAggregate | AggregationsHdrPercentilesAggregate | AggregationsHdrPercentileRanksAggregate | AggregationsTDigestPercentilesAggregate | AggregationsTDigestPercentileRanksAggregate | AggregationsPercentilesBucketAggregate | AggregationsMedianAbsoluteDeviationAggregate | AggregationsMinAggregate | AggregationsMaxAggregate | AggregationsSumAggregate | AggregationsAvgAggregate | AggregationsWeightedAvgAggregate | AggregationsValueCountAggregate | AggregationsSimpleValueAggregate | AggregationsDerivativeAggregate | AggregationsBucketMetricValueAggregate | AggregationsStatsAggregate | AggregationsStatsBucketAggregate | AggregationsExtendedStatsAggregate | AggregationsExtendedStatsBucketAggregate | AggregationsGeoBoundsAggregate | AggregationsGeoCentroidAggregate | AggregationsHistogramAggregate | AggregationsDateHistogramAggregate | AggregationsAutoDateHistogramAggregate | AggregationsVariableWidthHistogramAggregate | AggregationsStringTermsAggregate | AggregationsLongTermsAggregate | AggregationsDoubleTermsAggregate | AggregationsUnmappedTermsAggregate | AggregationsLongRareTermsAggregate | AggregationsStringRareTermsAggregate | AggregationsUnmappedRareTermsAggregate | AggregationsMultiTermsAggregate | AggregationsMissingAggregate | AggregationsNestedAggregate | AggregationsReverseNestedAggregate | AggregationsGlobalAggregate | AggregationsFilterAggregate | AggregationsSamplerAggregate | AggregationsGeoHashGridAggregate | AggregationsGeoTileGridAggregate | AggregationsRangeAggregate | AggregationsDateRangeAggregate | AggregationsGeoDistanceAggregate | AggregationsIpRangeAggregate | AggregationsFiltersAggregate | AggregationsAdjacencyMatrixAggregate | AggregationsSignificantLongTermsAggregate | AggregationsSignificantStringTermsAggregate | AggregationsUnmappedSignificantTermsAggregate | AggregationsCompositeAggregate | AggregationsScriptedMetricAggregate | AggregationsTopHitsAggregate | AggregationsInferenceAggregate | AggregationsStringStatsAggregate | AggregationsBoxPlotAggregate | AggregationsTopMetricsAggregate | AggregationsTTestAggregate | AggregationsRateAggregate | AggregationsCumulativeCardinalityAggregate | AggregationsMatrixStatsAggregate | AggregationsChildrenAggregate | AggregationsGeoLineAggregate export interface AggregationsAggregateBase { meta?: Record @@ -2418,10 +2459,10 @@ export interface AggregationsAggregation { } export interface AggregationsAggregationContainer { + aggregations?: Record aggs?: Record meta?: Record adjacency_matrix?: AggregationsAdjacencyMatrixAggregation - aggregations?: Record auto_date_histogram?: AggregationsAutoDateHistogramAggregation avg?: AggregationsAverageAggregation avg_bucket?: AggregationsAverageBucketAggregation @@ -2499,7 +2540,13 @@ export interface AggregationsAggregationRange { to?: double | string } -export interface AggregationsAutoDateHistogramAggregate extends AggregationsMultiBucketAggregate> { +export interface AggregationsArrayPercentilesItem { + key: string + value: double | null + value_as_string?: string +} + +export interface AggregationsAutoDateHistogramAggregate extends AggregationsMultiBucketAggregateBase { interval: DateMathTime } @@ -2521,32 +2568,35 @@ export interface AggregationsAverageAggregation extends AggregationsFormatMetric export interface AggregationsAverageBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsAvgAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsBoxPlotAggregate extends AggregationsAggregateBase { min: double max: double q1: double q2: double q3: double + lower: double + upper: double + min_as_string?: string + max_as_string?: string + q1_as_string?: string + q2_as_string?: string + q3_as_string?: string + lower_as_string?: string + upper_as_string?: string } export interface AggregationsBoxplotAggregation extends AggregationsMetricAggregationBase { compression?: double } -export type AggregationsBucket = AggregationsCompositeBucket | AggregationsDateHistogramBucket | AggregationsFiltersBucketItem | AggregationsIpRangeBucket | AggregationsRangeBucket | AggregationsRareTermsBucket | AggregationsSignificantTermsBucket | AggregationsKeyedBucket - -export interface AggregationsBucketAggregate extends AggregationsAggregateBase { - after_key: Record - bg_count: long - doc_count: long - doc_count_error_upper_bound: long - sum_other_doc_count: long - interval: DateMathTime - items: AggregationsBucket +export interface AggregationsBucketAggregationBase extends AggregationsAggregation { } -export interface AggregationsBucketAggregationBase extends AggregationsAggregation { - aggregations?: Record +export interface AggregationsBucketMetricValueAggregate extends AggregationsSingleMetricAggregateBase { + keys: string[] } export interface AggregationsBucketScriptAggregation extends AggregationsPipelineAggregationBase { @@ -2564,6 +2614,16 @@ export interface AggregationsBucketSortAggregation extends AggregationsAggregati sort?: SearchSort } +export type AggregationsBuckets = Record | TBucket[] + +export type AggregationsBucketsPath = string | string[] | Record + +export type AggregationsCalendarInterval = 'second' | '1s' | 'minute' | '1m' | 'hour' | '1h' | 'day' | '1d' | 'week' | '1w' | 'month' | '1M' | 'quarter' | '1q' | 'year' | '1Y' + +export interface AggregationsCardinalityAggregate extends AggregationsAggregateBase { + value: long +} + export interface AggregationsCardinalityAggregation extends AggregationsMetricAggregationBase { precision_threshold?: integer rehash?: boolean @@ -2574,6 +2634,14 @@ export interface AggregationsChiSquareHeuristic { include_negatives: boolean } +export interface AggregationsChildrenAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsChildrenAggregateBucketKeys extends AggregationsMultiBucketBase { +} +export type AggregationsChildrenAggregateBucket = AggregationsChildrenAggregateBucketKeys +& { [property: string]: AggregationsAggregate | long } + export interface AggregationsChildrenAggregation extends AggregationsBucketAggregationBase { type?: RelationName } @@ -2586,6 +2654,10 @@ export interface AggregationsClassificationInferenceOptions { top_classes_results_field?: string } +export interface AggregationsCompositeAggregate extends AggregationsMultiBucketAggregateBase { + after_key?: Record +} + export interface AggregationsCompositeAggregation extends AggregationsBucketAggregationBase { after?: Record size?: integer @@ -2599,13 +2671,15 @@ export interface AggregationsCompositeAggregationSource { geotile_grid?: AggregationsGeoTileGridAggregation } -export interface AggregationsCompositeBucketKeys { +export interface AggregationsCompositeBucketKeys extends AggregationsMultiBucketBase { + key: Record } export type AggregationsCompositeBucket = AggregationsCompositeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | Record | long } -export interface AggregationsCompositeBucketAggregate extends AggregationsMultiBucketAggregate> { - after_key: Record +export interface AggregationsCumulativeCardinalityAggregate extends AggregationsAggregateBase { + value: long + value_as_string?: string } export interface AggregationsCumulativeCardinalityAggregation extends AggregationsPipelineAggregationBase { @@ -2614,14 +2688,17 @@ export interface AggregationsCumulativeCardinalityAggregation extends Aggregatio export interface AggregationsCumulativeSumAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsDateHistogramAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsDateHistogramAggregation extends AggregationsBucketAggregationBase { - calendar_interval?: AggregationsDateInterval | Time - extended_bounds?: AggregationsExtendedBounds - hard_bounds?: AggregationsExtendedBounds + calendar_interval?: AggregationsCalendarInterval + extended_bounds?: AggregationsExtendedBounds + hard_bounds?: AggregationsExtendedBounds field?: Field - fixed_interval?: AggregationsDateInterval | Time + fixed_interval?: Time format?: string - interval?: AggregationsDateInterval | Time + interval?: Time min_doc_count?: integer missing?: DateString offset?: Time @@ -2632,12 +2709,15 @@ export interface AggregationsDateHistogramAggregation extends AggregationsBucket keyed?: boolean } -export interface AggregationsDateHistogramBucketKeys { +export interface AggregationsDateHistogramBucketKeys extends AggregationsMultiBucketBase { + key_as_string?: string + key: EpochMillis } export type AggregationsDateHistogramBucket = AggregationsDateHistogramBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | string | EpochMillis | long } -export type AggregationsDateInterval = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' +export interface AggregationsDateRangeAggregate extends AggregationsRangeAggregate { +} export interface AggregationsDateRangeAggregation extends AggregationsBucketAggregationBase { field?: Field @@ -2649,12 +2729,14 @@ export interface AggregationsDateRangeAggregation extends AggregationsBucketAggr } export interface AggregationsDateRangeExpression { - from?: DateMath | float - from_as_string?: string - to_as_string?: string + from?: AggregationsFieldDateMath key?: string - to?: DateMath | float - doc_count?: long + to?: AggregationsFieldDateMath +} + +export interface AggregationsDerivativeAggregate extends AggregationsSingleMetricAggregateBase { + normalized_value?: double + normalized_value_as_string?: string } export interface AggregationsDerivativeAggregation extends AggregationsPipelineAggregationBase { @@ -2668,49 +2750,74 @@ export interface AggregationsDiversifiedSamplerAggregation extends AggregationsB field?: Field } +export interface AggregationsDoubleTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsDoubleTermsBucketKeys extends AggregationsTermsBucketBase { + key: double + key_as_string?: string +} +export type AggregationsDoubleTermsBucket = AggregationsDoubleTermsBucketKeys +& { [property: string]: AggregationsAggregate | double | string | long } + export interface AggregationsEwmaModelSettings { alpha?: float } +export interface AggregationsEwmaMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'ewma' + settings: AggregationsEwmaModelSettings +} + export interface AggregationsExtendedBounds { max: T min: T } export interface AggregationsExtendedStatsAggregate extends AggregationsStatsAggregate { - std_deviation_bounds: AggregationsStandardDeviationBounds - sum_of_squares?: double - variance?: double - variance_population?: double - variance_sampling?: double - std_deviation?: double - std_deviation_population?: double - std_deviation_sampling?: double + sum_of_squares: double | null + variance: double | null + variance_population: double | null + variance_sampling: double | null + std_deviation: double | null + std_deviation_bounds?: AggregationsStandardDeviationBounds + sum_of_squares_as_string?: string + variance_as_string?: string + variance_population_as_string?: string + variance_sampling_as_string?: string + std_deviation_as_string?: string + std_deviation_bounds_as_string?: AggregationsStandardDeviationBoundsAsString } export interface AggregationsExtendedStatsAggregation extends AggregationsFormatMetricAggregationBase { sigma?: double } +export interface AggregationsExtendedStatsBucketAggregate extends AggregationsExtendedStatsAggregate { +} + export interface AggregationsExtendedStatsBucketAggregation extends AggregationsPipelineAggregationBase { sigma?: double } -export interface AggregationsFiltersAggregate extends AggregationsAggregateBase { - buckets: AggregationsFiltersBucketItem[] | Record +export type AggregationsFieldDateMath = DateMath | double + +export interface AggregationsFilterAggregate extends AggregationsSingleBucketAggregateBase { +} + +export interface AggregationsFiltersAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsFiltersAggregation extends AggregationsBucketAggregationBase { - filters?: Record | QueryDslQueryContainer[] + filters?: AggregationsBuckets other_bucket?: boolean other_bucket_key?: string keyed?: boolean } -export interface AggregationsFiltersBucketItemKeys { - doc_count: long +export interface AggregationsFiltersBucketKeys extends AggregationsMultiBucketBase { } -export type AggregationsFiltersBucketItem = AggregationsFiltersBucketItemKeys +export type AggregationsFiltersBucket = AggregationsFiltersBucketKeys & { [property: string]: AggregationsAggregate | long } export interface AggregationsFormatMetricAggregationBase extends AggregationsMetricAggregationBase { @@ -2723,13 +2830,8 @@ export interface AggregationsFormattableMetricAggregation extends AggregationsMe export type AggregationsGapPolicy = 'skip' | 'insert_zeros' -export interface AggregationsGeoBounds { - bottom_right: LatLon - top_left: LatLon -} - export interface AggregationsGeoBoundsAggregate extends AggregationsAggregateBase { - bounds: AggregationsGeoBounds + bounds: GeoBounds } export interface AggregationsGeoBoundsAggregation extends AggregationsMetricAggregationBase { @@ -2738,34 +2840,45 @@ export interface AggregationsGeoBoundsAggregation extends AggregationsMetricAggr export interface AggregationsGeoCentroidAggregate extends AggregationsAggregateBase { count: long - location: QueryDslGeoLocation + location?: GeoLocation } export interface AggregationsGeoCentroidAggregation extends AggregationsMetricAggregationBase { count?: long - location?: QueryDslGeoLocation + location?: GeoLocation +} + +export interface AggregationsGeoDistanceAggregate extends AggregationsRangeAggregate { } export interface AggregationsGeoDistanceAggregation extends AggregationsBucketAggregationBase { distance_type?: GeoDistanceType field?: Field - origin?: QueryDslGeoLocation | string + origin?: GeoLocation ranges?: AggregationsAggregationRange[] unit?: DistanceUnit } +export interface AggregationsGeoHashGridAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsGeoHashGridAggregation extends AggregationsBucketAggregationBase { - bounds?: QueryDslBoundingBox + bounds?: GeoBounds field?: Field precision?: GeoHashPrecision shard_size?: integer size?: integer } +export interface AggregationsGeoHashGridBucketKeys extends AggregationsMultiBucketBase { + key: GeoHash +} +export type AggregationsGeoHashGridBucket = AggregationsGeoHashGridBucketKeys +& { [property: string]: AggregationsAggregate | GeoHash | long } + export interface AggregationsGeoLineAggregate extends AggregationsAggregateBase { type: string - geometry: AggregationsLineStringGeoShape - properties: AggregationsGeoLineProperties + geometry: GeoLine } export interface AggregationsGeoLineAggregation { @@ -2780,21 +2893,28 @@ export interface AggregationsGeoLinePoint { field: Field } -export interface AggregationsGeoLineProperties { - complete: boolean - sort_values: double[] -} - export interface AggregationsGeoLineSort { field: Field } +export interface AggregationsGeoTileGridAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsGeoTileGridAggregation extends AggregationsBucketAggregationBase { field?: Field precision?: GeoTilePrecision shard_size?: integer size?: integer - bounds?: AggregationsGeoBounds + bounds?: GeoBounds +} + +export interface AggregationsGeoTileGridBucketKeys extends AggregationsMultiBucketBase { + key: GeoTile +} +export type AggregationsGeoTileGridBucket = AggregationsGeoTileGridBucketKeys +& { [property: string]: AggregationsAggregate | GeoTile | long } + +export interface AggregationsGlobalAggregate extends AggregationsSingleBucketAggregateBase { } export interface AggregationsGlobalAggregation extends AggregationsBucketAggregationBase { @@ -2808,13 +2928,13 @@ export interface AggregationsHdrMethod { number_of_significant_value_digits?: integer } -export interface AggregationsHdrPercentileItem { - key: double - value: double +export interface AggregationsHdrPercentileRanksAggregate extends AggregationsPercentilesAggregateBase { } -export interface AggregationsHdrPercentilesAggregate extends AggregationsAggregateBase { - values: AggregationsHdrPercentileItem[] +export interface AggregationsHdrPercentilesAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsHistogramAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsHistogramAggregation extends AggregationsBucketAggregationBase { @@ -2831,6 +2951,13 @@ export interface AggregationsHistogramAggregation extends AggregationsBucketAggr keyed?: boolean } +export interface AggregationsHistogramBucketKeys extends AggregationsMultiBucketBase { + key_as_string?: string + key: double +} +export type AggregationsHistogramBucket = AggregationsHistogramBucketKeys +& { [property: string]: AggregationsAggregate | string | double | long } + export interface AggregationsHistogramOrder { _count?: SearchSortOrder _key?: SearchSortOrder @@ -2841,6 +2968,11 @@ export interface AggregationsHoltLinearModelSettings { beta?: float } +export interface AggregationsHoltMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'holt' + settings: AggregationsHoltLinearModelSettings +} + export interface AggregationsHoltWintersModelSettings { alpha?: float beta?: float @@ -2850,18 +2982,52 @@ export interface AggregationsHoltWintersModelSettings { type?: AggregationsHoltWintersType } +export interface AggregationsHoltWintersMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'holt_winters' + settings: AggregationsHoltWintersModelSettings +} + export type AggregationsHoltWintersType = 'add' | 'mult' +export interface AggregationsInferenceAggregateKeys extends AggregationsAggregateBase { + value?: FieldValue + feature_importance?: AggregationsInferenceFeatureImportance[] + top_classes?: AggregationsInferenceTopClassEntry[] + warning?: string +} +export type AggregationsInferenceAggregate = AggregationsInferenceAggregateKeys +& { [property: string]: any } + export interface AggregationsInferenceAggregation extends AggregationsPipelineAggregationBase { model_id: Name inference_config?: AggregationsInferenceConfigContainer } +export interface AggregationsInferenceClassImportance { + class_name: string + importance: double +} + export interface AggregationsInferenceConfigContainer { regression?: AggregationsRegressionInferenceOptions classification?: AggregationsClassificationInferenceOptions } +export interface AggregationsInferenceFeatureImportance { + feature_name: string + importance?: double + classes?: AggregationsInferenceClassImportance[] +} + +export interface AggregationsInferenceTopClassEntry { + class_name: FieldValue + class_probability: double + class_score: double +} + +export interface AggregationsIpRangeAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsIpRangeAggregation extends AggregationsBucketAggregationBase { field?: Field ranges?: AggregationsIpRangeAggregationRange[] @@ -2873,67 +3039,92 @@ export interface AggregationsIpRangeAggregationRange { to?: string } -export interface AggregationsIpRangeBucketKeys { +export interface AggregationsIpRangeBucketKeys extends AggregationsMultiBucketBase { + from?: string + to?: string } export type AggregationsIpRangeBucket = AggregationsIpRangeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | string | long } -export interface AggregationsKeyedBucketKeys { - doc_count: long - key: TKey - key_as_string: string -} -export type AggregationsKeyedBucket = AggregationsKeyedBucketKeys -& { [property: string]: AggregationsAggregate | long | TKey | string } +export type AggregationsKeyedPercentiles = Record -export interface AggregationsKeyedValueAggregate extends AggregationsValueAggregate { - keys: string[] +export interface AggregationsLinearMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'linear' + settings: EmptyObject } -export interface AggregationsLineStringGeoShape { - coordinates: QueryDslGeoCoordinate[] +export interface AggregationsLongRareTermsAggregate extends AggregationsMultiBucketAggregateBase { } +export interface AggregationsLongRareTermsBucketKeys extends AggregationsMultiBucketBase { + key: long + key_as_string?: string +} +export type AggregationsLongRareTermsBucket = AggregationsLongRareTermsBucketKeys +& { [property: string]: AggregationsAggregate | long | string } + +export interface AggregationsLongTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsLongTermsBucketKeys extends AggregationsTermsBucketBase { + key: string + key_as_string?: string +} +export type AggregationsLongTermsBucket = AggregationsLongTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + export interface AggregationsMatrixAggregation extends AggregationsAggregation { fields?: Fields missing?: Record } export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateBase { - correlation: Record - covariance: Record - count: integer - kurtosis: double - mean: double - skewness: double - variance: double - name: string + doc_count: long + fields: AggregationsMatrixStatsFields[] } export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation { mode?: AggregationsMatrixStatsMode } +export interface AggregationsMatrixStatsFields { + name: Field + count: long + mean: double + variance: double + skewness: double + kurtosis: double + covariance: Record + correlation: Record +} + export type AggregationsMatrixStatsMode = 'avg' | 'min' | 'max' | 'sum' | 'median' +export interface AggregationsMaxAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMaxAggregation extends AggregationsFormatMetricAggregationBase { } export interface AggregationsMaxBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsMedianAbsoluteDeviationAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMedianAbsoluteDeviationAggregation extends AggregationsFormatMetricAggregationBase { compression?: double } -export type AggregationsMetricAggregate = AggregationsValueAggregate | AggregationsBoxPlotAggregate | AggregationsGeoBoundsAggregate | AggregationsGeoCentroidAggregate | AggregationsGeoLineAggregate | AggregationsPercentilesAggregate | AggregationsScriptedMetricAggregate | AggregationsStatsAggregate | AggregationsStringStatsAggregate | AggregationsTopHitsAggregate | AggregationsTopMetricsAggregate | AggregationsExtendedStatsAggregate | AggregationsTDigestPercentilesAggregate | AggregationsHdrPercentilesAggregate - export interface AggregationsMetricAggregationBase { field?: Field missing?: AggregationsMissing script?: Script } +export interface AggregationsMinAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMinAggregation extends AggregationsFormatMetricAggregationBase { } @@ -2944,6 +3135,9 @@ export type AggregationsMinimumInterval = 'second' | 'minute' | 'hour' | 'day' | export type AggregationsMissing = string | integer | double | boolean +export interface AggregationsMissingAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsMissingAggregation extends AggregationsBucketAggregationBase { field?: Field missing?: AggregationsMissing @@ -2951,18 +3145,14 @@ export interface AggregationsMissingAggregation extends AggregationsBucketAggreg export type AggregationsMissingOrder = 'first' | 'last' | 'default' -export interface AggregationsMovingAverageAggregation extends AggregationsPipelineAggregationBase { +export type AggregationsMovingAverageAggregation = AggregationsLinearMovingAverageAggregation | AggregationsSimpleMovingAverageAggregation | AggregationsEwmaMovingAverageAggregation | AggregationsHoltMovingAverageAggregation | AggregationsHoltWintersMovingAverageAggregation + +export interface AggregationsMovingAverageAggregationBase extends AggregationsPipelineAggregationBase { minimize?: boolean - model?: AggregationsMovingAverageModel - settings: AggregationsMovingAverageSettings predict?: integer window?: integer } -export type AggregationsMovingAverageModel = 'linear' | 'simple' | 'ewma' | 'holt' | 'holt_winters' - -export type AggregationsMovingAverageSettings = AggregationsEwmaModelSettings | AggregationsHoltLinearModelSettings | AggregationsHoltWintersModelSettings - export interface AggregationsMovingFunctionAggregation extends AggregationsPipelineAggregationBase { script?: string shift?: integer @@ -2975,23 +3165,41 @@ export interface AggregationsMovingPercentilesAggregation extends AggregationsPi keyed?: boolean } -export interface AggregationsMultiBucketAggregate extends AggregationsAggregateBase { - buckets: TBucket[] +export interface AggregationsMultiBucketAggregateBase extends AggregationsAggregateBase { + buckets: AggregationsBuckets +} + +export interface AggregationsMultiBucketBase { + doc_count: long } export interface AggregationsMultiTermLookup { field: Field } +export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggregateBase { +} + export interface AggregationsMultiTermsAggregation extends AggregationsBucketAggregationBase { terms: AggregationsMultiTermLookup[] } +export interface AggregationsMultiTermsBucketKeys extends AggregationsMultiBucketBase { + key: (long | double | string)[] + key_as_string?: string + doc_count_error_upper_bound?: long +} +export type AggregationsMultiTermsBucket = AggregationsMultiTermsBucketKeys +& { [property: string]: AggregationsAggregate | (long | double | string)[] | string | long } + export interface AggregationsMutualInformationHeuristic { background_is_superset?: boolean include_negatives?: boolean } +export interface AggregationsNestedAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsNestedAggregation extends AggregationsBucketAggregationBase { path?: Field } @@ -3009,11 +3217,6 @@ export interface AggregationsParentAggregation extends AggregationsBucketAggrega export interface AggregationsPercentageScoreHeuristic { } -export interface AggregationsPercentileItem { - percentile: double - value: double -} - export interface AggregationsPercentileRanksAggregation extends AggregationsFormatMetricAggregationBase { keyed?: boolean values?: double[] @@ -3021,8 +3224,10 @@ export interface AggregationsPercentileRanksAggregation extends AggregationsForm tdigest?: AggregationsTDigest } -export interface AggregationsPercentilesAggregate extends AggregationsAggregateBase { - items: AggregationsPercentileItem[] +export type AggregationsPercentiles = AggregationsKeyedPercentiles | AggregationsArrayPercentilesItem[] + +export interface AggregationsPercentilesAggregateBase extends AggregationsAggregateBase { + values: AggregationsPercentiles } export interface AggregationsPercentilesAggregation extends AggregationsFormatMetricAggregationBase { @@ -3032,16 +3237,22 @@ export interface AggregationsPercentilesAggregation extends AggregationsFormatMe tdigest?: AggregationsTDigest } +export interface AggregationsPercentilesBucketAggregate extends AggregationsPercentilesAggregateBase { +} + export interface AggregationsPercentilesBucketAggregation extends AggregationsPipelineAggregationBase { percents?: double[] } export interface AggregationsPipelineAggregationBase extends AggregationsAggregation { - buckets_path?: string | string[] | Record + buckets_path?: AggregationsBucketsPath format?: string gap_policy?: AggregationsGapPolicy } +export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsRangeAggregation extends AggregationsBucketAggregationBase { field?: Field missing?: integer @@ -3050,28 +3261,32 @@ export interface AggregationsRangeAggregation extends AggregationsBucketAggregat keyed?: boolean } -export interface AggregationsRangeBucketKeys { +export interface AggregationsRangeBucketKeys extends AggregationsMultiBucketBase { + from?: double + to?: double + from_as_string?: string + to_as_string?: string } export type AggregationsRangeBucket = AggregationsRangeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | double | string | long } export interface AggregationsRareTermsAggregation extends AggregationsBucketAggregationBase { - exclude?: string | string[] + exclude?: AggregationsTermsExclude field?: Field - include?: string | string[] | AggregationsTermsInclude + include?: AggregationsTermsInclude max_doc_count?: long missing?: AggregationsMissing precision?: double value_type?: string } -export interface AggregationsRareTermsBucketKeys { +export interface AggregationsRateAggregate extends AggregationsAggregateBase { + value: double + value_as_string?: string } -export type AggregationsRareTermsBucket = AggregationsRareTermsBucketKeys -& { [property: string]: AggregationsAggregate } export interface AggregationsRateAggregation extends AggregationsFormatMetricAggregationBase { - unit?: AggregationsDateInterval + unit?: AggregationsCalendarInterval mode?: AggregationsRateMode } @@ -3082,10 +3297,16 @@ export interface AggregationsRegressionInferenceOptions { num_top_feature_importance_values?: integer } +export interface AggregationsReverseNestedAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsReverseNestedAggregation extends AggregationsBucketAggregationBase { path?: Field } +export interface AggregationsSamplerAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsSamplerAggregation extends AggregationsBucketAggregationBase { shard_size?: integer } @@ -3112,15 +3333,29 @@ export interface AggregationsSerialDifferencingAggregation extends AggregationsP lag?: integer } -export interface AggregationsSignificantTermsAggregate extends AggregationsMultiBucketAggregate { - bg_count: long - doc_count: long +export interface AggregationsSignificantLongTermsAggregate extends AggregationsMultiBucketAggregateBase { } +export interface AggregationsSignificantLongTermsBucketKeys extends AggregationsSignificantTermsBucketBase { + key: long + key_as_string?: string +} +export type AggregationsSignificantLongTermsBucket = AggregationsSignificantLongTermsBucketKeys +& { [property: string]: AggregationsAggregate | long | string | double } + +export interface AggregationsSignificantStringTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsSignificantStringTermsBucketKeys extends AggregationsSignificantTermsBucketBase { + key: string +} +export type AggregationsSignificantStringTermsBucket = AggregationsSignificantStringTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | double | long } + export interface AggregationsSignificantTermsAggregation extends AggregationsBucketAggregationBase { background_filter?: QueryDslQueryContainer chi_square?: AggregationsChiSquareHeuristic - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field gnd?: AggregationsGoogleNormalizedDistanceHeuristic @@ -3134,15 +3369,15 @@ export interface AggregationsSignificantTermsAggregation extends AggregationsBuc size?: integer } -export interface AggregationsSignificantTermsBucketKeys { +export interface AggregationsSignificantTermsBucketBase extends AggregationsMultiBucketBase { + score: double + bg_count: long } -export type AggregationsSignificantTermsBucket = AggregationsSignificantTermsBucketKeys -& { [property: string]: AggregationsAggregate } export interface AggregationsSignificantTextAggregation extends AggregationsBucketAggregationBase { background_filter?: QueryDslQueryContainer chi_square?: AggregationsChiSquareHeuristic - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field filter_duplicate_text?: boolean @@ -3158,48 +3393,99 @@ export interface AggregationsSignificantTextAggregation extends AggregationsBuck source_fields?: Fields } -export interface AggregationsSingleBucketAggregateKeys extends AggregationsAggregateBase { - doc_count: double +export interface AggregationsSimpleMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'simple' + settings: EmptyObject +} + +export interface AggregationsSimpleValueAggregate extends AggregationsSingleMetricAggregateBase { +} + +export interface AggregationsSingleBucketAggregateBase extends AggregationsAggregateBase { + doc_count: long +} + +export interface AggregationsSingleMetricAggregateBase extends AggregationsAggregateBase { + value: double | null + value_as_string?: string } -export type AggregationsSingleBucketAggregate = AggregationsSingleBucketAggregateKeys -& { [property: string]: AggregationsAggregate | double | Record } export interface AggregationsStandardDeviationBounds { - lower?: double - upper?: double - lower_population?: double - upper_population?: double - lower_sampling?: double - upper_sampling?: double + upper: double | null + lower: double | null + upper_population: double | null + lower_population: double | null + upper_sampling: double | null + lower_sampling: double | null +} + +export interface AggregationsStandardDeviationBoundsAsString { + upper: string + lower: string + upper_population: string + lower_population: string + upper_sampling: string + lower_sampling: string } export interface AggregationsStatsAggregate extends AggregationsAggregateBase { - count: double + count: long + min: double | null + max: double | null + avg: double | null sum: double - avg?: double - max?: double - min?: double + min_as_string?: string + max_as_string?: string + avg_as_string?: string + sum_as_string?: string } export interface AggregationsStatsAggregation extends AggregationsFormatMetricAggregationBase { } +export interface AggregationsStatsBucketAggregate extends AggregationsStatsAggregate { +} + export interface AggregationsStatsBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsStringRareTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsStringRareTermsBucketKeys extends AggregationsMultiBucketBase { + key: string +} +export type AggregationsStringRareTermsBucket = AggregationsStringRareTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + export interface AggregationsStringStatsAggregate extends AggregationsAggregateBase { count: long - min_length: integer - max_length: integer - avg_length: double - entropy: double - distribution?: Record + min_length: integer | null + max_length: integer | null + avg_length: double | null + entropy: double | null + distribution?: string | null + min_length_as_string?: string + max_length_as_string?: string + avg_length_as_string?: string } export interface AggregationsStringStatsAggregation extends AggregationsMetricAggregationBase { show_distribution?: boolean } +export interface AggregationsStringTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsStringTermsBucketKeys extends AggregationsTermsBucketBase { + key: string +} +export type AggregationsStringTermsBucket = AggregationsStringTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + +export interface AggregationsSumAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsSumAggregation extends AggregationsFormatMetricAggregationBase { } @@ -3210,8 +3496,15 @@ export interface AggregationsTDigest { compression?: integer } -export interface AggregationsTDigestPercentilesAggregate extends AggregationsAggregateBase { - values: Record +export interface AggregationsTDigestPercentileRanksAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsTDigestPercentilesAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsTTestAggregate extends AggregationsAggregateBase { + value: double | null + value_as_string?: string } export interface AggregationsTTestAggregation extends AggregationsAggregation { @@ -3222,17 +3515,17 @@ export interface AggregationsTTestAggregation extends AggregationsAggregation { export type AggregationsTTestType = 'paired' | 'homoscedastic' | 'heteroscedastic' -export interface AggregationsTermsAggregate extends AggregationsMultiBucketAggregate { - doc_count_error_upper_bound: long +export interface AggregationsTermsAggregateBase extends AggregationsMultiBucketAggregateBase { + doc_count_error_upper_bound?: long sum_other_doc_count: long } export interface AggregationsTermsAggregation extends AggregationsBucketAggregationBase { collect_mode?: AggregationsTermsAggregationCollectMode - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field - include?: string | string[] | AggregationsTermsInclude + include?: AggregationsTermsInclude min_doc_count?: integer missing?: AggregationsMissing missing_order?: AggregationsMissingOrder @@ -3249,9 +3542,17 @@ export type AggregationsTermsAggregationCollectMode = 'depth_first' | 'breadth_f export type AggregationsTermsAggregationExecutionHint = 'map' | 'global_ordinals' | 'global_ordinals_hash' | 'global_ordinals_low_cardinality' -export type AggregationsTermsAggregationOrder = SearchSortOrder | Record | Record[] +export type AggregationsTermsAggregationOrder = Record | Record[] -export interface AggregationsTermsInclude { +export interface AggregationsTermsBucketBase extends AggregationsMultiBucketBase { + doc_count_error?: long +} + +export type AggregationsTermsExclude = string | string[] + +export type AggregationsTermsInclude = string | string[] | AggregationsTermsPartition + +export interface AggregationsTermsPartition { num_partitions: long partition: long } @@ -3263,7 +3564,7 @@ export interface AggregationsTestPopulation { } export interface AggregationsTopHitsAggregate extends AggregationsAggregateBase { - hits: SearchHitsMetadata> + hits: SearchHitsMetadata } export interface AggregationsTopHitsAggregation extends AggregationsMetricAggregationBase { @@ -3274,7 +3575,7 @@ export interface AggregationsTopHitsAggregation extends AggregationsMetricAggreg script_fields?: Record size?: integer sort?: SearchSort - _source?: boolean | SearchSourceFilter | Fields + _source?: SearchSourceConfig stored_fields?: Fields track_scores?: boolean version?: boolean @@ -3282,12 +3583,11 @@ export interface AggregationsTopHitsAggregation extends AggregationsMetricAggreg } export interface AggregationsTopMetrics { - sort: (long | double | string)[] - metrics: Record + sort: (FieldValue | null)[] + metrics: Record } -export interface AggregationsTopMetricsAggregate extends AggregationsAggregateBase { - top: AggregationsTopMetrics[] +export interface AggregationsTopMetricsAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsTopMetricsAggregation extends AggregationsMetricAggregationBase { @@ -3296,13 +3596,26 @@ export interface AggregationsTopMetricsAggregation extends AggregationsMetricAgg sort?: SearchSort } +export interface AggregationsTopMetricsBucketKeys extends AggregationsMultiBucketBase { + top: AggregationsTopMetrics[] +} +export type AggregationsTopMetricsBucket = AggregationsTopMetricsBucketKeys +& { [property: string]: AggregationsAggregate | AggregationsTopMetrics[] | long } + export interface AggregationsTopMetricsValue { field: Field } -export interface AggregationsValueAggregate extends AggregationsAggregateBase { - value: double - value_as_string?: string +export interface AggregationsUnmappedRareTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsUnmappedSignificantTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsUnmappedTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsValueCountAggregate extends AggregationsSingleMetricAggregateBase { } export interface AggregationsValueCountAggregation extends AggregationsFormattableMetricAggregation { @@ -3310,6 +3623,9 @@ export interface AggregationsValueCountAggregation extends AggregationsFormattab export type AggregationsValueType = 'string' | 'long' | 'double' | 'number' | 'date' | 'date_nanos' | 'ip' | 'numeric' | 'geo_point' | 'boolean' +export interface AggregationsVariableWidthHistogramAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsVariableWidthHistogramAggregation { field?: Field buckets?: integer @@ -3317,6 +3633,17 @@ export interface AggregationsVariableWidthHistogramAggregation { initial_buffer?: integer } +export interface AggregationsVariableWidthHistogramBucketKeys extends AggregationsMultiBucketBase { + min: double + key: double + max: double + min_as_string?: string + key_as_string?: string + max_as_string?: string +} +export type AggregationsVariableWidthHistogramBucket = AggregationsVariableWidthHistogramBucketKeys +& { [property: string]: AggregationsAggregate | double | string | long } + export interface AggregationsWeightedAverageAggregation extends AggregationsAggregation { format?: string value?: AggregationsWeightedAverageValue @@ -3330,6 +3657,9 @@ export interface AggregationsWeightedAverageValue { script?: Script } +export interface AggregationsWeightedAvgAggregate extends AggregationsSingleMetricAggregateBase { +} + export type AnalysisAnalyzer = AnalysisCustomAnalyzer | AnalysisFingerprintAnalyzer | AnalysisKeywordAnalyzer | AnalysisLanguageAnalyzer | AnalysisNoriAnalyzer | AnalysisPatternAnalyzer | AnalysisSimpleAnalyzer | AnalysisStandardAnalyzer | AnalysisStopAnalyzer | AnalysisWhitespaceAnalyzer | AnalysisIcuAnalyzer | AnalysisKuromojiAnalyzer | AnalysisSnowballAnalyzer | AnalysisDutchAnalyzer export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { @@ -3337,12 +3667,14 @@ export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase preserve_original: boolean } -export type AnalysisCharFilter = AnalysisHtmlStripCharFilter | AnalysisMappingCharFilter | AnalysisPatternReplaceCharFilter | AnalysisIcuNormalizationCharFilter | AnalysisKuromojiIterationMarkCharFilter +export type AnalysisCharFilter = string | AnalysisCharFilterDefinition export interface AnalysisCharFilterBase { version?: VersionString } +export type AnalysisCharFilterDefinition = AnalysisHtmlStripCharFilter | AnalysisMappingCharFilter | AnalysisPatternReplaceCharFilter | AnalysisIcuNormalizationCharFilter | AnalysisKuromojiIterationMarkCharFilter + export interface AnalysisCharGroupTokenizer extends AnalysisTokenizerBase { type: 'char_group' tokenize_on_chars: string[] @@ -3866,18 +4198,22 @@ export interface AnalysisSynonymTokenFilter extends AnalysisTokenFilterBase { export type AnalysisTokenChar = 'letter' | 'digit' | 'whitespace' | 'punctuation' | 'symbol' | 'custom' -export type AnalysisTokenFilter = AnalysisAsciiFoldingTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuTokenizer | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter +export type AnalysisTokenFilter = string | AnalysisTokenFilterDefinition export interface AnalysisTokenFilterBase { version?: VersionString } -export type AnalysisTokenizer = AnalysisCharGroupTokenizer | AnalysisEdgeNGramTokenizer | AnalysisKeywordTokenizer | AnalysisLetterTokenizer | AnalysisLowercaseTokenizer | AnalysisNGramTokenizer | AnalysisNoriTokenizer | AnalysisPathHierarchyTokenizer | AnalysisStandardTokenizer | AnalysisUaxEmailUrlTokenizer | AnalysisWhitespaceTokenizer | AnalysisKuromojiTokenizer | AnalysisPatternTokenizer | AnalysisIcuTokenizer +export type AnalysisTokenFilterDefinition = AnalysisAsciiFoldingTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuTokenizer | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter + +export type AnalysisTokenizer = string | AnalysisTokenizerDefinition export interface AnalysisTokenizerBase { version?: VersionString } +export type AnalysisTokenizerDefinition = AnalysisCharGroupTokenizer | AnalysisEdgeNGramTokenizer | AnalysisKeywordTokenizer | AnalysisLetterTokenizer | AnalysisLowercaseTokenizer | AnalysisNGramTokenizer | AnalysisNoriTokenizer | AnalysisPathHierarchyTokenizer | AnalysisStandardTokenizer | AnalysisUaxEmailUrlTokenizer | AnalysisWhitespaceTokenizer | AnalysisKuromojiTokenizer | AnalysisPatternTokenizer | AnalysisIcuTokenizer + export interface AnalysisTrimTokenFilter extends AnalysisTokenFilterBase { type: 'trim' } @@ -4062,7 +4398,7 @@ export interface MappingDoubleRangeProperty extends MappingRangePropertyBase { type: 'double_range' } -export type MappingDynamicMapping = 'strict' | 'runtime' | 'true' | 'false' +export type MappingDynamicMapping = boolean | 'strict' | 'runtime' | 'true' | 'false' export interface MappingDynamicTemplate { mapping?: MappingProperty @@ -4132,7 +4468,7 @@ export type MappingGeoOrientation = 'right' | 'RIGHT' | 'counterclockwise' | 'cc export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { ignore_malformed?: boolean ignore_z_value?: boolean - null_value?: QueryDslGeoLocation + null_value?: GeoLocation type: 'geo_point' } @@ -4258,7 +4594,7 @@ export interface MappingPropertyBase { name?: PropertyName properties?: Record ignore_above?: integer - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping fields?: Record } @@ -4350,7 +4686,7 @@ export interface MappingSuggestContext { precision?: integer | string } -export type MappingTermVectorOption = 'no' | 'yes' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' +export type MappingTermVectorOption = 'no' | 'yes' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' | 'with_positions_payloads' export interface MappingTextIndexPrefixes { max_chars: integer @@ -4389,7 +4725,7 @@ export interface MappingTokenCountProperty extends MappingDocValuesPropertyBase export interface MappingTypeMapping { all_field?: MappingAllField date_detection?: boolean - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping dynamic_date_formats?: string[] dynamic_templates?: Record | Record[] _field_names?: MappingFieldNamesField @@ -4432,18 +4768,6 @@ export interface QueryDslBoostingQuery extends QueryDslQueryBase { positive: QueryDslQueryContainer } -export interface QueryDslBoundingBox { - bottom_right?: QueryDslGeoLocation - top_left?: QueryDslGeoLocation - top_right?: QueryDslGeoLocation - bottom_left?: QueryDslGeoLocation - top?: double - left?: double - right?: double - bottom?: double - wkt?: string -} - export type QueryDslChildScoreMode = 'none' | 'avg' | 'sum' | 'max' | 'min' export type QueryDslCombinedFieldsOperator = 'or' | 'and' @@ -4521,6 +4845,12 @@ export interface QueryDslExistsQuery extends QueryDslQueryBase { field: Field } +export interface QueryDslFieldAndFormat { + field: Field + format?: string + include_unmapped?: boolean +} + export interface QueryDslFieldLookup { id: Id index?: IndexName @@ -4576,16 +4906,14 @@ export interface QueryDslGeoBoundingBoxQueryKeys extends QueryDslQueryBase { ignore_unmapped?: boolean } export type QueryDslGeoBoundingBoxQuery = QueryDslGeoBoundingBoxQueryKeys -& { [property: string]: QueryDslBoundingBox | QueryDslGeoExecution | QueryDslGeoValidationMethod | boolean | float | string } - -export type QueryDslGeoCoordinate = string | double[] | QueryDslThreeDimensionalPoint +& { [property: string]: GeoBounds | QueryDslGeoExecution | QueryDslGeoValidationMethod | boolean | float | string } export interface QueryDslGeoDecayFunctionKeys extends QueryDslDecayFunctionBase { } export type QueryDslGeoDecayFunction = QueryDslGeoDecayFunctionKeys -& { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } +& { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } -export interface QueryDslGeoDistanceFeatureQuery extends QueryDslDistanceFeatureQueryBase { +export interface QueryDslGeoDistanceFeatureQuery extends QueryDslDistanceFeatureQueryBase { } export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { @@ -4594,14 +4922,12 @@ export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { validation_method?: QueryDslGeoValidationMethod } export type QueryDslGeoDistanceQuery = QueryDslGeoDistanceQueryKeys -& { [property: string]: QueryDslGeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string } +& { [property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string } export type QueryDslGeoExecution = 'memory' | 'indexed' -export type QueryDslGeoLocation = string | double[] | QueryDslTwoDimensionalPoint - export interface QueryDslGeoPolygonPoints { - points: QueryDslGeoLocation[] + points: GeoLocation[] } export interface QueryDslGeoPolygonQueryKeys extends QueryDslQueryBase { @@ -4850,7 +5176,7 @@ export interface QueryDslNumericDecayFunctionKeys extends QueryDslDecayFunctionB export type QueryDslNumericDecayFunction = QueryDslNumericDecayFunctionKeys & { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } -export type QueryDslOperator = 'and' | 'or' +export type QueryDslOperator = 'and' | 'AND' | 'or' | 'OR' export interface QueryDslParentIdQuery extends QueryDslQueryBase { id?: Id @@ -4941,7 +5267,7 @@ export interface QueryDslQueryContainer { span_or?: QueryDslSpanOrQuery span_term?: Partial> span_within?: QueryDslSpanWithinQuery - term?: Partial> + term?: Partial> terms?: QueryDslTermsQuery terms_set?: Partial> wildcard?: Partial> @@ -5044,18 +5370,20 @@ export interface QueryDslScriptScoreQuery extends QueryDslQueryBase { } export interface QueryDslShapeFieldQuery { - ignore_unmapped?: boolean indexed_shape?: QueryDslFieldLookup - relation?: ShapeRelation + relation?: GeoShapeRelation shape?: GeoShape } export interface QueryDslShapeQueryKeys extends QueryDslQueryBase { + ignore_unmapped?: boolean } export type QueryDslShapeQuery = QueryDslShapeQueryKeys -& { [property: string]: QueryDslShapeFieldQuery | float | string } +& { [property: string]: QueryDslShapeFieldQuery | boolean | float | string } -export type QueryDslSimpleQueryStringFlags = 'NONE' | 'AND' | 'OR' | 'NOT' | 'PREFIX' | 'PHRASE' | 'PRECEDENCE' | 'ESCAPE' | 'WHITESPACE' | 'FUZZY' | 'NEAR' | 'SLOP' | 'ALL' +export type QueryDslSimpleQueryStringFlag = 'NONE' | 'AND' | 'OR' | 'NOT' | 'PREFIX' | 'PHRASE' | 'PRECEDENCE' | 'ESCAPE' | 'WHITESPACE' | 'FUZZY' | 'NEAR' | 'SLOP' | 'ALL' + +export type QueryDslSimpleQueryStringFlags = QueryDslSimpleQueryStringFlag | string export interface QueryDslSimpleQueryStringQuery extends QueryDslQueryBase { analyzer?: string @@ -5063,7 +5391,7 @@ export interface QueryDslSimpleQueryStringQuery extends QueryDslQueryBase { auto_generate_synonyms_phrase_query?: boolean default_operator?: QueryDslOperator fields?: Field[] - flags?: QueryDslSimpleQueryStringFlags | string + flags?: QueryDslSimpleQueryStringFlags fuzzy_max_expansions?: integer fuzzy_prefix_length?: integer fuzzy_transpositions?: boolean @@ -5135,7 +5463,7 @@ export interface QueryDslSpanWithinQuery extends QueryDslQueryBase { } export interface QueryDslTermQuery extends QueryDslQueryBase { - value: string | float | boolean + value: FieldValue case_insensitive?: boolean } @@ -5149,7 +5477,9 @@ export interface QueryDslTermsLookup { export interface QueryDslTermsQueryKeys extends QueryDslQueryBase { } export type QueryDslTermsQuery = QueryDslTermsQueryKeys -& { [property: string]: string[] | long[] | QueryDslTermsLookup | float | string } +& { [property: string]: QueryDslTermsQueryField | float | string } + +export type QueryDslTermsQueryField = FieldValue[] | QueryDslTermsLookup export interface QueryDslTermsSetQuery extends QueryDslQueryBase { minimum_should_match_field?: Field @@ -5159,17 +5489,6 @@ export interface QueryDslTermsSetQuery extends QueryDslQueryBase { export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix' -export interface QueryDslThreeDimensionalPoint { - lat: double - lon: double - z?: double -} - -export interface QueryDslTwoDimensionalPoint { - lat: double - lon: double -} - export interface QueryDslTypeQuery extends QueryDslQueryBase { value: string } @@ -5249,7 +5568,7 @@ export interface AsyncSearchSubmitRequest extends RequestBase { analyze_wildcard?: boolean batched_reduce_size?: long ccs_minimize_roundtrips?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string docvalue_fields?: Fields expand_wildcards?: ExpandWildcards @@ -5273,12 +5592,12 @@ export interface AsyncSearchSubmitRequest extends RequestBase { suggest_text?: string terminate_after?: long timeout?: Time - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits track_scores?: boolean typed_keys?: boolean rest_total_hits_as_int?: boolean version?: boolean - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields seq_no_primary_term?: boolean @@ -5299,8 +5618,8 @@ export interface AsyncSearchSubmitRequest extends RequestBase { script_fields?: Record search_after?: SearchSortResults slice?: SlicedScroll - fields?: (Field | DateField)[] - suggest?: SearchSuggestContainer | Record + fields?: (QueryDslFieldAndFormat | Field)[] + suggest?: SearchSuggester pit?: SearchPointInTimeReference runtime_mappings?: MappingRuntimeFields } @@ -5519,7 +5838,6 @@ export interface CatHealthHealthRecord { } export interface CatHealthRequest extends CatCatRequestBase { - include_timestamp?: boolean ts?: boolean } @@ -5828,7 +6146,7 @@ export interface CatIndicesRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes expand_wildcards?: ExpandWildcards - health?: Health + health?: HealthStatus include_unloaded_segments?: boolean pri?: boolean } @@ -6975,7 +7293,7 @@ export interface CatTemplatesTemplatesRecord { export interface CatThreadPoolRequest extends CatCatRequestBase { thread_pool_patterns?: Names - size?: Size | boolean + size?: CatThreadPoolThreadPoolSize } export type CatThreadPoolResponse = CatThreadPoolThreadPoolRecord[] @@ -7023,6 +7341,8 @@ export interface CatThreadPoolThreadPoolRecord { ka?: string } +export type CatThreadPoolThreadPoolSize = 'k' | 'm' | 'g' | 't' | 'p' + export interface CatTransformsRequest extends CatCatRequestBase { transform_id?: Id allow_no_match?: boolean @@ -7346,8 +7666,6 @@ export interface CcrUnfollowRequest extends RequestBase { export interface CcrUnfollowResponse extends AcknowledgedResponseBase { } -export type ClusterClusterStatus = 'green' | 'yellow' | 'red' - export interface ClusterComponentTemplate { name: Name component_template: ClusterComponentTemplateNode @@ -7539,7 +7857,7 @@ export interface ClusterHealthIndexHealthStats { number_of_shards: integer relocating_shards: integer shards?: Record - status: Health + status: HealthStatus unassigned_shards: integer } @@ -7555,7 +7873,7 @@ export interface ClusterHealthRequest extends RequestBase { wait_for_nodes?: string wait_for_no_initializing_shards?: boolean wait_for_no_relocating_shards?: boolean - wait_for_status?: WaitForStatus + wait_for_status?: HealthStatus } export interface ClusterHealthResponse { @@ -7571,7 +7889,7 @@ export interface ClusterHealthResponse { number_of_nodes: integer number_of_pending_tasks: integer relocating_shards: integer - status: Health + status: HealthStatus task_max_waiting_in_queue_millis: EpochMillis timed_out: boolean unassigned_shards: integer @@ -7582,7 +7900,7 @@ export interface ClusterHealthShardHealthStats { initializing_shards: integer primary_active: boolean relocating_shards: integer - status: Health + status: HealthStatus unassigned_shards: integer } @@ -7959,7 +8277,7 @@ export interface ClusterStatsResponse extends NodesNodesResponseBase { cluster_uuid: Uuid indices: ClusterStatsClusterIndices nodes: ClusterStatsClusterNodes - status: ClusterClusterStatus + status: HealthStatus timestamp: long } @@ -8172,8 +8490,8 @@ export interface EqlSearchRequest extends RequestBase { timestamp_field?: Field fetch_size?: uint filter?: QueryDslQueryContainer | QueryDslQueryContainer[] - size?: uint | float - fields?: (Field | EqlSearchSearchFieldFormatted)[] + size?: uint + fields?: QueryDslFieldAndFormat | Field result_position?: EqlSearchResultPosition } @@ -8182,11 +8500,6 @@ export interface EqlSearchResponse extends EqlEqlSearchRespons export type EqlSearchResultPosition = 'tail' | 'head' -export interface EqlSearchSearchFieldFormatted { - field: Field - format?: string -} - export interface FeaturesFeature { name: string description: string @@ -8206,6 +8519,21 @@ export interface FeaturesResetFeaturesResponse { features: FeaturesFeature[] } +export type FleetCheckpoint = long + +export interface FleetGlobalCheckpointsRequest extends RequestBase { + index: IndexName | IndexAlias + wait_for_advance?: boolean + wait_for_index?: boolean + checkpoints?: FleetCheckpoint[] + timeout?: Time +} + +export interface FleetGlobalCheckpointsResponse { + global_checkpoints: FleetCheckpoint[] + timed_out: boolean +} + export interface GraphConnection { doc_count: long source: long @@ -8270,13 +8598,11 @@ export interface GraphExploreResponse { vertices: GraphVertex[] } -export interface IlmAction { -} +export type IlmActions = any export interface IlmPhase { - actions?: Record | string[] + actions?: IlmActions min_age?: Time - configurations?: Record> } export interface IlmPhases { @@ -8436,15 +8762,13 @@ export interface IndicesDataStream { hidden?: boolean } -export type IndicesDataStreamHealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' - export interface IndicesFielddataFrequencyFilter { max: double min: double min_segment_size: integer } -export type IndicesIndexCheckOnStartup = 'false' | 'checksum' | 'true' +export type IndicesIndexCheckOnStartup = boolean | 'false' | 'checksum' | 'true' export interface IndicesIndexRouting { allocation?: IndicesIndexRoutingAllocation @@ -8621,14 +8945,10 @@ export interface IndicesIndexSettingsLifecycle { export interface IndicesIndexState { aliases?: Record mappings?: MappingTypeMapping - settings?: IndicesIndexSettings | IndicesIndexStatePrefixedSettings + settings?: IndicesIndexSettings data_stream?: DataStreamName } -export interface IndicesIndexStatePrefixedSettings { - index: IndicesIndexSettings -} - export interface IndicesIndexVersioning { created: VersionString } @@ -8639,11 +8959,6 @@ export interface IndicesNumericFielddata { export type IndicesNumericFielddataFormat = 'array' | 'disabled' -export interface IndicesOverlappingIndexTemplate { - name: Name - index_patterns?: IndexName[] -} - export type IndicesSegmentSortMissing = '_last' | '_first' export type IndicesSegmentSortMode = 'min' | 'max' @@ -8734,13 +9049,13 @@ export interface IndicesAnalyzeRequest extends RequestBase { index?: IndexName analyzer?: string attributes?: string[] - char_filter?: (string | AnalysisCharFilter)[] + char_filter?: AnalysisCharFilter[] explain?: boolean field?: Field - filter?: (string | AnalysisTokenFilter)[] + filter?: AnalysisTokenFilter[] normalizer?: string text?: IndicesAnalyzeTextToAnalyze - tokenizer?: string | AnalysisTokenizer + tokenizer?: AnalysisTokenizer } export interface IndicesAnalyzeResponse { @@ -9028,7 +9343,7 @@ export interface IndicesGetDataStreamIndicesGetDataStreamItem { template: Name hidden: boolean system?: boolean - status: IndicesDataStreamHealthStatus + status: HealthStatus ilm_policy?: Name _meta?: Metadata } @@ -9219,7 +9534,7 @@ export interface IndicesPutMappingRequest extends RequestBase { timeout?: Time write_index_only?: boolean date_detection?: boolean - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping dynamic_date_formats?: string[] dynamic_templates?: Record | Record[] _field_names?: MappingFieldNamesField @@ -9430,6 +9745,8 @@ export interface IndicesResolveIndexResponse { data_streams: IndicesResolveIndexResolveIndexDataStreamsItem[] } +export type IndicesRolloverIndexRolloverMapping = MappingTypeMapping | Record + export interface IndicesRolloverRequest extends RequestBase { alias: IndexAlias new_index?: IndexName @@ -9440,7 +9757,7 @@ export interface IndicesRolloverRequest extends RequestBase { wait_for_active_shards?: WaitForActiveShards aliases?: Record conditions?: IndicesRolloverRolloverConditions - mappings?: Record | MappingTypeMapping + mappings?: IndicesRolloverIndexRolloverMapping settings?: Record } @@ -9512,15 +9829,13 @@ export interface IndicesShardStoresRequest extends RequestBase { allow_no_indices?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean - status?: IndicesShardStoresShardStatus | IndicesShardStoresShardStatus[] + status?: IndicesShardStoresShardStoreStatus | IndicesShardStoresShardStoreStatus[] } export interface IndicesShardStoresResponse { indices: Record } -export type IndicesShardStoresShardStatus = 'green' | 'yellow' | 'red' | 'all' - export interface IndicesShardStoresShardStore { allocation: IndicesShardStoresShardStoreAllocation allocation_id: Id @@ -9539,6 +9854,8 @@ export interface IndicesShardStoresShardStoreException { type: string } +export type IndicesShardStoresShardStoreStatus = 'green' | 'yellow' | 'red' | 'all' + export interface IndicesShardStoresShardStoreWrapper { stores: IndicesShardStoresShardStore[] } @@ -9560,10 +9877,16 @@ export interface IndicesShrinkResponse extends AcknowledgedResponseBase { export interface IndicesSimulateIndexTemplateRequest extends RequestBase { name: Name - index_patterns?: IndexName[] + create?: boolean + master_timeout?: Time + allow_auto_create?: boolean + index_patterns?: Indices composed_of?: Name[] - overlapping?: IndicesOverlappingIndexTemplate[] - template?: IndicesTemplateMapping + template?: IndicesPutIndexTemplateIndexTemplateMapping + data_stream?: IndicesDataStream + priority?: integer + version?: VersionNumber + _meta?: Metadata } export interface IndicesSimulateIndexTemplateResponse { @@ -9815,7 +10138,7 @@ export interface IndicesValidateQueryRequest extends RequestBase { all_shards?: boolean analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards explain?: boolean @@ -9885,7 +10208,7 @@ export interface IngestCsvProcessor extends IngestProcessorBase { export interface IngestDateIndexNameProcessor extends IngestProcessorBase { date_formats: string[] - date_rounding: string | IngestDateRounding + date_rounding: string field: Field index_name_format: string index_name_prefix: string @@ -9901,8 +10224,6 @@ export interface IngestDateProcessor extends IngestProcessorBase { timezone?: string } -export type IngestDateRounding = 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y' - export interface IngestDissectProcessor extends IngestProcessorBase { append_separator: string field: Field @@ -10405,7 +10726,7 @@ export interface MigrationDeprecationsResponse { export interface MlAnalysisConfig { bucket_span: TimeSpan - categorization_analyzer?: MlCategorizationAnalyzer | string + categorization_analyzer?: MlCategorizationAnalyzer categorization_field_name?: Field categorization_filters?: string[] detectors: MlDetector[] @@ -10419,7 +10740,7 @@ export interface MlAnalysisConfig { export interface MlAnalysisConfigRead { bucket_span: TimeSpan - categorization_analyzer?: MlCategorizationAnalyzer | string + categorization_analyzer?: MlCategorizationAnalyzer categorization_field_name?: Field categorization_filters?: string[] detectors: MlDetector[] @@ -10485,17 +10806,16 @@ export interface MlAnomalyCause { export type MlAppliesTo = 'actual' | 'typical' | 'diff_from_typical' | 'time' export interface MlBucketInfluencer { + anomaly_score: double bucket_span: long - influencer_score: double influencer_field_name: Field - influencer_field_value: string - initial_influencer_score: double + initial_anomaly_score: double is_interim: boolean job_id: Id probability: double + raw_anomaly_score: double result_type: string timestamp: Time - foo?: string } export interface MlBucketSummary { @@ -10506,7 +10826,6 @@ export interface MlBucketSummary { initial_anomaly_score: double is_interim: boolean job_id: Id - partition_scores?: MlPartitionScore[] processing_time_ms: double result_type: string timestamp: Time @@ -10520,10 +10839,12 @@ export interface MlCalendarEvent { start_time: EpochMillis } -export interface MlCategorizationAnalyzer { - char_filter?: (string | AnalysisCharFilter)[] - filter?: (string | AnalysisTokenFilter)[] - tokenizer?: string | AnalysisTokenizer +export type MlCategorizationAnalyzer = string | MlCategorizationAnalyzerDefinition + +export interface MlCategorizationAnalyzerDefinition { + char_filter?: AnalysisCharFilter[] + filter?: AnalysisTokenFilter[] + tokenizer?: AnalysisTokenizer } export type MlCategorizationStatus = 'ok' | 'warn' @@ -10554,11 +10875,7 @@ export type MlChunkingMode = 'auto' | 'manual' | 'off' export type MlConditionOperator = 'gt' | 'gte' | 'lt' | 'lte' -export interface MlCustomSettings { - custom_urls?: XpackUsageUrlConfig[] - created_by?: string - job_tags?: Record -} +export type MlCustomSettings = any export interface MlDataCounts { bucket_count: long @@ -10674,9 +10991,7 @@ export interface MlDataframeAnalysis { training_percent?: Percentage } -export type MlDataframeAnalysisAnalyzedFields = string[] | MlDataframeAnalysisAnalyzedFieldsIncludeExclude - -export interface MlDataframeAnalysisAnalyzedFieldsIncludeExclude { +export interface MlDataframeAnalysisAnalyzedFields { includes: string[] excludes: string[] } @@ -10779,7 +11094,7 @@ export interface MlDataframeAnalyticsSource { index: Indices query?: QueryDslQueryContainer runtime_mappings?: MappingRuntimeFields - _source?: MlDataframeAnalysisAnalyzedFields + _source?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlDataframeAnalyticsStatsContainer { @@ -10828,7 +11143,7 @@ export interface MlDataframeAnalyticsSummary { description?: string model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] allow_lazy_start?: boolean create_time?: long version?: VersionString @@ -10975,6 +11290,20 @@ export interface MlInfluence { influencer_field_values: string[] } +export interface MlInfluencer { + bucket_span: long + influencer_score: double + influencer_field_name: Field + influencer_field_value: string + initial_influencer_score: double + is_interim: boolean + job_id: Id + probability: double + result_type: string + timestamp: Time + foo?: string +} + export interface MlJob { allow_lazy_open: boolean analysis_config: MlAnalysisConfig @@ -11083,10 +11412,10 @@ export interface MlModelSizeStats { job_id: Id log_time: Time memory_status: MlMemoryStatus - model_bytes: long - model_bytes_exceeded: long - model_bytes_memory_limit: long - peak_model_bytes: long + model_bytes: ByteSize + model_bytes_exceeded?: ByteSize + model_bytes_memory_limit?: ByteSize + peak_model_bytes?: ByteSize assignment_memory_basis?: string result_type: string total_by_field_count: long @@ -11143,14 +11472,6 @@ export interface MlPage { size?: integer } -export interface MlPartitionScore { - initial_record_score: double - partition_field_name: Field - partition_field_value: string - probability: double - record_score: double -} - export interface MlPerPartitionCategorization { enabled?: boolean stop_on_warn?: boolean @@ -11188,6 +11509,7 @@ export interface MlTotalFeatureImportanceStatistics { export interface MlTrainedModelConfig { model_id: Id + model_type: MlTrainedModelType tags: string[] version?: VersionString compressed_definition?: string @@ -11229,6 +11551,8 @@ export interface MlTrainedModelStats { ingest?: Record } +export type MlTrainedModelType = 'tree_ensemble' | 'lang_ident' | 'pytorch' + export interface MlValidationLoss { fold_values: string[] loss_type: string @@ -11452,11 +11776,11 @@ export interface MlExplainDataFrameAnalyticsRequest extends RequestBase { id?: Id source?: MlDataframeAnalyticsSource dest?: MlDataframeAnalyticsDestination - analysis: MlDataframeAnalysisContainer + analysis?: MlDataframeAnalysisContainer description?: string model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] allow_lazy_start?: boolean } @@ -11467,10 +11791,10 @@ export interface MlExplainDataFrameAnalyticsResponse { export interface MlFlushJobRequest extends RequestBase { job_id: Id - skip_time?: string advance_time?: DateString calc_interim?: boolean end?: DateString + skip_time?: string start?: DateString } @@ -11493,15 +11817,16 @@ export interface MlForecastResponse extends AcknowledgedResponseBase { export interface MlGetBucketsRequest extends RequestBase { job_id: Id timestamp?: Timestamp + anomaly_score?: double + desc?: boolean + end?: DateString + exclude_interim?: boolean + expand?: boolean from?: integer size?: integer - exclude_interim?: boolean sort?: Field - desc?: boolean start?: DateString - end?: DateString - anomaly_score?: double - expand?: boolean + page?: MlPage } export interface MlGetBucketsResponse { @@ -11511,11 +11836,11 @@ export interface MlGetBucketsResponse { export interface MlGetCalendarEventsRequest extends RequestBase { calendar_id: Id - job_id?: Id end?: DateString from?: integer - start?: string + job_id?: Id size?: integer + start?: string } export interface MlGetCalendarEventsResponse { @@ -11628,7 +11953,7 @@ export interface MlGetInfluencersRequest extends RequestBase { export interface MlGetInfluencersResponse { count: long - influencers: MlBucketInfluencer[] + influencers: MlInfluencer[] } export interface MlGetJobStatsRequest extends RequestBase { @@ -11661,6 +11986,7 @@ export interface MlGetModelSnapshotsRequest extends RequestBase { size?: integer sort?: Field start?: Time + page?: MlPage } export interface MlGetModelSnapshotsResponse { @@ -11686,15 +12012,15 @@ export interface MlGetOverallBucketsResponse { export interface MlGetRecordsRequest extends RequestBase { job_id: Id + desc?: boolean + end?: DateString exclude_interim?: boolean from?: integer - size?: integer - start?: DateString - end?: DateString - desc?: boolean - page?: MlPage record_score?: double + size?: integer sort?: Field + start?: DateString + page?: MlPage } export interface MlGetRecordsResponse { @@ -11816,7 +12142,7 @@ export interface MlPreviewDataFrameAnalyticsDataframePreviewConfig { analysis: MlDataframeAnalysisContainer model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlPreviewDataFrameAnalyticsRequest extends RequestBase { @@ -11840,6 +12166,7 @@ export interface MlPreviewDatafeedResponse { export interface MlPutCalendarRequest extends RequestBase { calendar_id: Id + job_ids?: Id[] description?: string } @@ -11864,7 +12191,7 @@ export interface MlPutDataFrameAnalyticsRequest extends RequestBase { id: Id allow_lazy_start?: boolean analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] description?: string dest: MlDataframeAnalyticsDestination max_num_threads?: integer @@ -11883,7 +12210,7 @@ export interface MlPutDataFrameAnalyticsResponse { allow_lazy_start: boolean max_num_threads: integer analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlPutDatafeedRequest extends RequestBase { @@ -12028,6 +12355,7 @@ export interface MlPutTrainedModelRequest extends RequestBase { inference_config: AggregationsInferenceConfigContainer input: MlPutTrainedModelInput metadata?: any + model_type?: MlTrainedModelType tags?: string[] } @@ -12115,8 +12443,8 @@ export interface MlStartDataFrameAnalyticsResponse extends AcknowledgedResponseB export interface MlStartDatafeedRequest extends RequestBase { datafeed_id: Id - start?: Time end?: Time + start?: Time timeout?: Time } @@ -12166,7 +12494,45 @@ export interface MlUpdateDataFrameAnalyticsResponse { allow_lazy_start: boolean max_num_threads: integer analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] +} + +export interface MlUpdateDatafeedRequest extends RequestBase { + datafeed_id: Id + allow_no_indices?: boolean + expand_wildcards?: ExpandWildcards + ignore_throttled?: boolean + ignore_unavailable?: boolean + aggregations?: Record + chunking_config?: MlChunkingConfig + delayed_data_check_config?: MlDelayedDataCheckConfig + frequency?: Time + indices?: string[] + indexes?: string[] + indices_options?: MlDatafeedIndicesOptions + max_empty_searches?: integer + query?: QueryDslQueryContainer + query_delay?: Time + runtime_mappings?: MappingRuntimeFields + script_fields?: Record + scroll_size?: integer +} + +export interface MlUpdateDatafeedResponse { + aggregations: Record + chunking_config: MlChunkingConfig + delayed_data_check_config?: MlDelayedDataCheckConfig + datafeed_id: Id + frequency: Time + indices: string[] + job_id: Id + indices_options?: MlDatafeedIndicesOptions + max_empty_searches: integer + query: QueryDslQueryContainer + query_delay: Time + runtime_mappings?: MappingRuntimeFields + script_fields?: Record + scroll_size: integer } export interface MlUpdateFilterRequest extends RequestBase { @@ -12503,9 +12869,10 @@ export interface NodesHotThreadsRequest extends RequestBase { ignore_idle_threads?: boolean interval?: Time snapshots?: long + master_timeout?: Time threads?: long - thread_type?: ThreadType timeout?: Time + type?: ThreadType } export interface NodesHotThreadsResponse { @@ -12680,7 +13047,7 @@ export interface NodesInfoNodeInfoSettingsClusterElection { } export interface NodesInfoNodeInfoSettingsHttp { - type: string | NodesInfoNodeInfoSettingsHttpType + type: NodesInfoNodeInfoSettingsHttpType | string 'type.default'?: string compression?: boolean | string port?: integer | string @@ -12738,7 +13105,7 @@ export interface NodesInfoNodeInfoSettingsNode { } export interface NodesInfoNodeInfoSettingsTransport { - type: string | NodesInfoNodeInfoSettingsTransportType + type: NodesInfoNodeInfoSettingsTransportType | string 'type.default'?: string features?: NodesInfoNodeInfoSettingsTransportFeatures } @@ -12859,16 +13226,12 @@ export interface NodesInfoResponse extends NodesNodesResponseBase { nodes: Record } -export interface NodesReloadSecureSettingsNodeReloadException { +export interface NodesReloadSecureSettingsNodeReloadError { name: Name - reload_exception?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy + reload_exception?: ErrorCause } -export interface NodesReloadSecureSettingsNodeReloadExceptionCausedBy { - type: string - reason: string - caused_by?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy -} +export type NodesReloadSecureSettingsNodeReloadResult = NodesStats | NodesReloadSecureSettingsNodeReloadError export interface NodesReloadSecureSettingsRequest extends RequestBase { node_id?: NodeIds @@ -12878,7 +13241,7 @@ export interface NodesReloadSecureSettingsRequest extends RequestBase { export interface NodesReloadSecureSettingsResponse extends NodesNodesResponseBase { cluster_name: Name - nodes: Record + nodes: Record } export interface NodesStatsRequest extends RequestBase { @@ -13209,7 +13572,7 @@ export interface SecurityIndicesPrivileges { field_security?: SecurityFieldSecurity | SecurityFieldSecurity[] names: Indices privileges: SecurityIndexPrivilege[] - query?: string | string[] | QueryDslQueryContainer + query?: string | string[] allow_restricted_indices?: boolean } @@ -13275,6 +13638,7 @@ export interface SecurityChangePasswordRequest extends RequestBase { username?: Username refresh?: Refresh password?: Password + password_hash?: string } export interface SecurityChangePasswordResponse { @@ -13481,20 +13845,6 @@ export interface SecurityGetPrivilegesRequest extends RequestBase { export interface SecurityGetPrivilegesResponse extends DictionaryResponseBase> { } -export interface SecurityGetRoleInlineRoleTemplate { - template: SecurityGetRoleInlineRoleTemplateSource - format?: SecurityGetRoleTemplateFormat -} - -export interface SecurityGetRoleInlineRoleTemplateSource { - source: string -} - -export interface SecurityGetRoleInvalidRoleTemplate { - template: string - format?: SecurityGetRoleTemplateFormat -} - export interface SecurityGetRoleRequest extends RequestBase { name?: Name } @@ -13512,15 +13862,9 @@ export interface SecurityGetRoleRole { role_templates?: SecurityGetRoleRoleTemplate[] } -export type SecurityGetRoleRoleTemplate = SecurityGetRoleInlineRoleTemplate | SecurityGetRoleStoredRoleTemplate | SecurityGetRoleInvalidRoleTemplate - -export interface SecurityGetRoleStoredRoleTemplate { - template: SecurityGetRoleStoredRoleTemplateId +export interface SecurityGetRoleRoleTemplate { format?: SecurityGetRoleTemplateFormat -} - -export interface SecurityGetRoleStoredRoleTemplateId { - id: string + template: Script } export type SecurityGetRoleTemplateFormat = 'string' | 'json' @@ -14294,7 +14638,7 @@ export interface SqlTranslateRequest extends RequestBase { export interface SqlTranslateResponse { size: long - _source: boolean | Fields | SearchSourceFilter + _source: SearchSourceConfig fields: Record[] sort: SearchSort } @@ -14314,6 +14658,8 @@ export interface SslCertificatesRequest extends RequestBase { export type SslCertificatesResponse = SslCertificatesCertificateInformation[] +export type TasksGroupBy = 'nodes' | 'parents' | 'none' + export interface TasksInfo { action: string cancellable: boolean @@ -14396,7 +14742,7 @@ export interface TasksGetResponse { export interface TasksListRequest extends RequestBase { actions?: string | string[] detailed?: boolean - group_by?: GroupBy + group_by?: TasksGroupBy nodes?: string[] parent_task_id?: Id timeout?: Time @@ -14406,7 +14752,7 @@ export interface TasksListRequest extends RequestBase { export interface TasksListResponse { node_failures?: ErrorCause[] nodes?: Record - tasks?: Record | TasksInfo[] + tasks?: Record } export interface TextStructureFindStructureFieldStat { @@ -14775,7 +15121,7 @@ export type WatcherConnectionScheme = 'http' | 'https' export type WatcherCronExpression = string export interface WatcherDailySchedule { - at: string[] | WatcherTimeOfDay + at: WatcherTimeOfDay[] } export type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' @@ -14833,6 +15179,11 @@ export interface WatcherExecutionThreadPool { queue_size: long } +export interface WatcherHourAndMinute { + hour: integer[] + minute: integer[] +} + export interface WatcherHourlySchedule { minute: integer[] } @@ -14990,8 +15341,8 @@ export interface WatcherScheduleContainer { } export interface WatcherScheduleTriggerEvent { - scheduled_time: DateString | string - triggered_time?: DateString | string + scheduled_time: DateString + triggered_time?: DateString } export interface WatcherScriptCondition { @@ -15073,10 +15424,7 @@ export interface WatcherThrottleState { timestamp: DateString } -export interface WatcherTimeOfDay { - hour: integer[] - minute: integer[] -} +export type WatcherTimeOfDay = string | WatcherHourAndMinute export interface WatcherTimeOfMonth { at: string[] @@ -15217,7 +15565,7 @@ export interface WatcherPutWatchRequest extends RequestBase { id: Id active?: boolean if_primary_term?: long - if_sequence_number?: long + if_seq_no?: SequenceNumber version?: VersionNumber actions?: Record condition?: WatcherConditionContainer @@ -15279,7 +15627,7 @@ export interface WatcherStatsWatchRecordStats extends WatcherStatsWatchRecordQue watch_record_id: Id } -export type WatcherStatsWatcherMetric = '_all' | 'queued_watches' | 'current_watches' | 'pending_watches' +export type WatcherStatsWatcherMetric = '_all' | 'all' | 'queued_watches' | 'current_watches' | 'pending_watches' export interface WatcherStatsWatcherNodeStats { current_watches?: WatcherStatsWatchRecordStats[] @@ -15397,11 +15745,6 @@ export interface XpackUsageBase { enabled: boolean } -export interface XpackUsageBaseUrlConfig { - url_name: string - url_value: string -} - export interface XpackUsageCcr extends XpackUsageBase { auto_follow_patterns_count: integer follower_indices_count: integer @@ -15514,13 +15857,15 @@ export interface XpackUsageIpFilter { transport: boolean } -export interface XpackUsageKibanaUrlConfig extends XpackUsageBaseUrlConfig { - time_range?: string +export interface XpackUsageJobsKeys { + _all?: XpackUsageAllJobs } +export type XpackUsageJobs = XpackUsageJobsKeys +& { [property: string]: MlJob | XpackUsageAllJobs } export interface XpackUsageMachineLearning extends XpackUsageBase { datafeeds: Record - jobs: Record | Partial> + jobs: XpackUsageJobs node_count: integer data_frame_analytics_jobs: XpackUsageMlDataFrameAnalyticsJobs inference: XpackUsageMlInference @@ -15728,8 +16073,6 @@ export interface XpackUsageSsl { transport: XpackUsageFeatureToggle } -export type XpackUsageUrlConfig = XpackUsageBaseUrlConfig | XpackUsageKibanaUrlConfig - export interface XpackUsageVector extends XpackUsageBase { dense_vector_dims_avg_count: integer dense_vector_fields_count: integer @@ -15779,7 +16122,6 @@ export interface SpecUtilsCommonQueryParameters { filter_path?: string | string[] human?: boolean pretty?: boolean - source_query_string?: string } export interface SpecUtilsCommonCatQueryParameters { diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 3e5780abb..be3b3a16d 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -62,7 +62,7 @@ export interface BulkRequest extends RequestBase { pipeline?: string refresh?: Refresh routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields timeout?: Time @@ -135,7 +135,7 @@ export interface CountRequest extends RequestBase { allow_no_indices?: boolean analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards ignore_throttled?: boolean @@ -198,7 +198,7 @@ export interface DeleteByQueryRequest extends RequestBase { analyzer?: string analyze_wildcard?: boolean conflicts?: Conflicts - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards from?: long @@ -218,7 +218,7 @@ export interface DeleteByQueryRequest extends RequestBase { size?: long slices?: long sort?: string[] - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stats?: string[] @@ -276,7 +276,7 @@ export interface ExistsRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -294,7 +294,7 @@ export interface ExistsSourceRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields version?: VersionNumber @@ -320,12 +320,12 @@ export interface ExplainRequest extends RequestBase { index: IndexName analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string lenient?: boolean preference?: string routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -375,22 +375,7 @@ export interface FieldCapsResponse { fields: Record> } -export interface GetRequest extends RequestBase { - id: Id - index: IndexName - preference?: string - realtime?: boolean - refresh?: boolean - routing?: Routing - _source?: boolean | Fields - _source_excludes?: Fields - _source_includes?: Fields - stored_fields?: Fields - version?: VersionNumber - version_type?: VersionType -} - -export interface GetResponse { +export interface GetGetResult { _index: IndexName fields?: Record found: boolean @@ -403,6 +388,23 @@ export interface GetResponse { _version?: VersionNumber } +export interface GetRequest extends RequestBase { + id: Id + index: IndexName + preference?: string + realtime?: boolean + refresh?: boolean + routing?: Routing + _source?: SearchSourceConfigParam + _source_excludes?: Fields + _source_includes?: Fields + stored_fields?: Fields + version?: VersionNumber + version_type?: VersionType +} + +export type GetResponse = GetGetResult + export interface GetScriptRequest extends RequestBase { id: Id master_timeout?: Time @@ -457,7 +459,7 @@ export interface GetSourceRequest { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields @@ -504,8 +506,8 @@ export interface KnnSearchRequest extends RequestBase { routing?: Routing /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { - _source?: boolean | Fields | SearchSourceFilter - docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[] + _source?: SearchSourceConfig + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] stored_fields?: Fields fields?: Fields knn: KnnSearchQuery @@ -530,27 +532,18 @@ export interface KnnSearchQuery { export type KnnSearchQueryVector = double[] -export interface MgetHit { - error?: ErrorCause - fields?: Record - found?: boolean +export interface MgetMultiGetError { + error: ErrorCause _id: Id _index: IndexName - _primary_term?: long - _routing?: Routing - _seq_no?: SequenceNumber - _source?: TDocument _type?: Type - _version?: VersionNumber } -export type MgetMultiGetId = string | integer - export interface MgetOperation { - _id: MgetMultiGetId + _id: Id _index?: IndexName routing?: Routing - _source?: boolean | Fields | SearchSourceFilter + _source?: SearchSourceConfig stored_fields?: Fields _type?: Type version?: VersionNumber @@ -563,33 +556,44 @@ export interface MgetRequest extends RequestBase { realtime?: boolean refresh?: boolean routing?: Routing - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stored_fields?: Fields /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { docs?: MgetOperation[] - ids?: MgetMultiGetId[] + ids?: Ids } } export interface MgetResponse { - docs: MgetHit[] + docs: MgetResponseItem[] } -export interface MsearchBody { +export type MgetResponseItem = GetGetResult | MgetMultiGetError + +export interface MsearchMultiSearchItem extends SearchResponse { + status: integer +} + +export interface MsearchMultiSearchResult { + took: long + responses: MsearchResponseItem[] +} + +export interface MsearchMultisearchBody { aggregations?: Record aggs?: Record query?: QueryDslQueryContainer from?: integer size?: integer pit?: SearchPointInTimeReference - track_total_hits?: boolean | integer - suggest?: SearchSuggestContainer | Record + track_total_hits?: SearchTrackHits + suggest?: SearchSuggester } -export interface MsearchHeader { +export interface MsearchMultisearchHeader { allow_no_indices?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean @@ -614,17 +618,14 @@ export interface MsearchRequest extends RequestBase { rest_total_hits_as_int?: boolean typed_keys?: boolean /** @deprecated The use of the 'body' key has been deprecated, use 'searches' instead. */ - body?: (MsearchHeader | MsearchBody)[] + body?: MsearchRequestItem[] } -export interface MsearchResponse { - took: long - responses: (MsearchSearchResult | ErrorResponseBase)[] -} +export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody -export interface MsearchSearchResult extends SearchResponse { - status: integer -} +export type MsearchResponse = MsearchMultiSearchResult + +export type MsearchResponseItem = MsearchMultiSearchItem | ErrorResponseBase export interface MsearchTemplateRequest extends RequestBase { index?: Indices @@ -634,18 +635,18 @@ export interface MsearchTemplateRequest extends RequestBase { rest_total_hits_as_int?: boolean typed_keys?: boolean /** @deprecated The use of the 'body' key has been deprecated, use 'search_templates' instead. */ - body?: MsearchTemplateTemplateItem[] + body?: MsearchTemplateRequestItem[] } -export interface MsearchTemplateResponse { - responses: (SearchResponse | ErrorResponseBase)[] - took: long -} +export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig -export interface MsearchTemplateTemplateItem { +export type MsearchTemplateResponse = MsearchMultiSearchResult + +export interface MsearchTemplateTemplateConfig { + explain?: boolean id?: Id - index?: Indices params?: Record + profile?: boolean source?: string } @@ -702,7 +703,7 @@ export interface MtermvectorsTermVectorsResult { export interface OpenPointInTimeRequest extends RequestBase { index: Indices - keep_alive?: Time + keep_alive: Time } export interface OpenPointInTimeResponse { @@ -721,7 +722,7 @@ export interface PutScriptRequest extends RequestBase { timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { - script?: StoredScript + script: StoredScript } } @@ -955,7 +956,7 @@ export interface ScriptsPainlessExecuteRequest extends RequestBase { body?: { context?: string context_setup?: ScriptsPainlessExecutePainlessContextSetup - script?: InlineScript + script?: InlineScript | string } } @@ -985,7 +986,7 @@ export interface SearchRequest extends RequestBase { analyze_wildcard?: boolean batched_reduce_size?: long ccs_minimize_roundtrips?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string docvalue_fields?: Fields expand_wildcards?: ExpandWildcards @@ -1009,12 +1010,12 @@ export interface SearchRequest extends RequestBase { suggest_text?: string terminate_after?: long timeout?: Time - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits track_scores?: boolean typed_keys?: boolean rest_total_hits_as_int?: boolean version?: boolean - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields seq_no_primary_term?: boolean @@ -1030,9 +1031,9 @@ export interface SearchRequest extends RequestBase { explain?: boolean from?: integer highlight?: SearchHighlight - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits indices_boost?: Record[] - docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[] + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] min_score?: double post_filter?: QueryDslQueryContainer profile?: boolean @@ -1043,9 +1044,9 @@ export interface SearchRequest extends RequestBase { size?: integer slice?: SlicedScroll sort?: SearchSort - _source?: boolean | Fields | SearchSourceFilter - fields?: (Field | DateField)[] - suggest?: SearchSuggestContainer | Record + _source?: SearchSourceConfig + fields?: (QueryDslFieldAndFormat | Field)[] + suggest?: SearchSuggester terminate_after?: long timeout?: string track_scores?: boolean @@ -1141,6 +1142,8 @@ export interface SearchAggregationProfileDelegateDebugFilter { export type SearchBoundaryScanner = 'chars' | 'sentence' | 'word' +export type SearchBuiltinHighlighterType = 'plain' | 'fvh' | 'unified' + export interface SearchCollector { name: string reason: string @@ -1148,6 +1151,14 @@ export interface SearchCollector { children?: SearchCollector[] } +export interface SearchCompletionContext { + boost?: double + context: SearchContext + neighbours?: GeoHashPrecision[] + precision?: GeoHashPrecision + prefix?: boolean +} + export interface SearchCompletionSuggestOption { collate_match?: boolean contexts?: Record @@ -1162,14 +1173,14 @@ export interface SearchCompletionSuggestOption { } export interface SearchCompletionSuggester extends SearchSuggesterBase { - contexts?: Record + contexts?: Record fuzzy?: SearchSuggestFuzziness prefix?: string regex?: string skip_duplicates?: boolean } -export type SearchContext = string | QueryDslGeoLocation +export type SearchContext = string | GeoLocation export interface SearchDirectGenerator { field: Field @@ -1185,11 +1196,6 @@ export interface SearchDirectGenerator { suggest_mode?: SuggestMode } -export interface SearchDocValueField { - field: Field - format?: string -} - export interface SearchFetchProfile { type: string description: string @@ -1213,12 +1219,6 @@ export interface SearchFetchProfileDebug { fast_path?: integer } -export interface SearchFieldAndFormat { - field: Field - format?: string - include_unmapped?: boolean -} - export interface SearchFieldCollapse { field: Field inner_hits?: SearchInnerHits | SearchInnerHits[] @@ -1231,16 +1231,30 @@ export interface SearchFieldSort { nested?: SearchNestedSortValue order?: SearchSortOrder unmapped_type?: MappingFieldType + numeric_type?: SearchFieldSortNumericType + format?: string +} + +export type SearchFieldSortNumericType = 'long' | 'double' | 'date' | 'date_nanos' + +export interface SearchFieldSuggester { + completion?: SearchCompletionSuggester + phrase?: SearchPhraseSuggester + prefix?: string + regex?: string + term?: SearchTermSuggester + text?: string } export interface SearchGeoDistanceSortKeys { mode?: SearchSortMode distance_type?: GeoDistanceType + ignore_unmapped?: boolean order?: SearchSortOrder unit?: DistanceUnit } export type SearchGeoDistanceSort = SearchGeoDistanceSortKeys -& { [property: string]: QueryDslGeoLocation | QueryDslGeoLocation[] | SearchSortMode | GeoDistanceType | SearchSortOrder | DistanceUnit } +& { [property: string]: GeoLocation | GeoLocation[] | SearchSortMode | GeoDistanceType | boolean | SearchSortOrder | DistanceUnit } export interface SearchHighlight { fields: Record @@ -1286,7 +1300,7 @@ export interface SearchHighlightField { pre_tags?: string[] require_field_match?: boolean tags_schema?: SearchHighlighterTagsSchema - type?: SearchHighlighterType | string + type?: SearchHighlighterType } export type SearchHighlighterEncoder = 'default' | 'html' @@ -1297,7 +1311,7 @@ export type SearchHighlighterOrder = 'score' export type SearchHighlighterTagsSchema = 'styled' -export type SearchHighlighterType = 'plain' | 'fvh' | 'unified' +export type SearchHighlighterType = SearchBuiltinHighlighterType | string export interface SearchHit { _index: IndexName @@ -1332,7 +1346,7 @@ export interface SearchInnerHits { size?: integer from?: integer collapse?: SearchFieldCollapse - docvalue_fields?: (SearchFieldAndFormat | Field)[] + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] explain?: boolean highlight?: SearchHighlight ignore_unmapped?: boolean @@ -1340,20 +1354,14 @@ export interface SearchInnerHits { seq_no_primary_term?: boolean fields?: Fields sort?: SearchSort - _source?: boolean | SearchSourceFilter + _source?: SearchSourceConfig stored_field?: Fields track_scores?: boolean version?: boolean } -export interface SearchInnerHitsMetadata { - total: SearchTotalHits | long - hits: SearchHit>[] - max_score?: double -} - export interface SearchInnerHitsResult { - hits: SearchInnerHitsMetadata + hits: SearchHitsMetadata } export interface SearchLaplaceSmoothingModel { @@ -1375,6 +1383,7 @@ export interface SearchNestedIdentity { export interface SearchNestedSortValue { filter?: QueryDslQueryContainer max_children?: integer + nested?: SearchNestedSortValue path: Field } @@ -1469,16 +1478,19 @@ export interface SearchRescoreQuery { export type SearchScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' export interface SearchScoreSort { - mode?: SearchSortMode order?: SearchSortOrder } export interface SearchScriptSort { order?: SearchSortOrder script: Script - type?: string + type?: SearchScriptSortType + mode?: SearchSortMode + nested?: SearchNestedSortValue } +export type SearchScriptSortType = 'string' | 'number' + export interface SearchSearchProfile { collector: SearchCollector[] query: SearchQueryProfile[] @@ -1500,27 +1512,31 @@ export interface SearchSmoothingModelContainer { export type SearchSort = SearchSortCombinations | SearchSortCombinations[] -export type SearchSortCombinations = Field | SearchSortContainer | SearchSortOrder +export type SearchSortCombinations = Field | SearchSortOptions -export interface SearchSortContainerKeys { +export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' + +export interface SearchSortOptionsKeys { _score?: SearchScoreSort _doc?: SearchScoreSort _geo_distance?: SearchGeoDistanceSort _script?: SearchScriptSort } -export type SearchSortContainer = SearchSortContainerKeys +export type SearchSortOptions = SearchSortOptionsKeys & { [property: string]: SearchFieldSort | SearchSortOrder | SearchScoreSort | SearchGeoDistanceSort | SearchScriptSort } -export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median' - -export type SearchSortOrder = 'asc' | 'desc' | '_doc' +export type SearchSortOrder = 'asc' | 'desc' export type SearchSortResults = (long | double | string | null)[] +export type SearchSourceConfig = boolean | SearchSourceFilter | Fields + +export type SearchSourceConfigParam = boolean | Fields + export interface SearchSourceFilter { excludes?: Fields - includes?: Fields exclude?: Fields + includes?: Fields include?: Fields } @@ -1537,23 +1553,6 @@ export interface SearchSuggest { text: string } -export interface SearchSuggestContainer { - completion?: SearchCompletionSuggester - phrase?: SearchPhraseSuggester - prefix?: string - regex?: string - term?: SearchTermSuggester - text?: string -} - -export interface SearchSuggestContextQuery { - boost?: double - context: SearchContext - neighbours?: Distance[] | integer[] - precision?: Distance | integer - prefix?: boolean -} - export interface SearchSuggestFuzziness { fuzziness: Fuzziness min_length: integer @@ -1566,6 +1565,12 @@ export type SearchSuggestOption = SearchCompletionSuggestOp export type SearchSuggestSort = 'score' | 'frequency' +export interface SearchSuggesterKeys { + text?: string +} +export type SearchSuggester = SearchSuggesterKeys +& { [property: string]: SearchFieldSuggester | string } + export interface SearchSuggesterBase { field: Field analyzer?: string @@ -1600,6 +1605,8 @@ export interface SearchTotalHits { export type SearchTotalHitsRelation = 'eq' | 'gte' +export type SearchTrackHits = boolean | integer + export interface SearchMvtRequest extends RequestBase { index: Indices field: Field @@ -1788,7 +1795,7 @@ export interface UpdateRequest routing?: Routing timeout?: Time wait_for_active_shards?: WaitForActiveShards - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ @@ -1798,7 +1805,7 @@ export interface UpdateRequest doc_as_upsert?: boolean script?: Script scripted_upsert?: boolean - _source?: boolean | SearchSourceFilter + _source?: SearchSourceConfig upsert?: TDocument } } @@ -1813,7 +1820,7 @@ export interface UpdateByQueryRequest extends RequestBase { analyzer?: string analyze_wildcard?: boolean conflicts?: Conflicts - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards from?: long @@ -1832,7 +1839,7 @@ export interface UpdateByQueryRequest extends RequestBase { size?: long slices?: long sort?: string[] - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields stats?: string[] @@ -1897,6 +1904,8 @@ export interface AcknowledgedResponseBase { export type AggregateName = string +export type BuiltinScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java' + export interface BulkIndexByScrollFailure { cause: ErrorCause id: Id @@ -1941,16 +1950,17 @@ export interface CompletionStats { export type Conflicts = 'abort' | 'proceed' +export interface CoordsGeoBounds { + top: double + bottom: double + left: double + right: double +} + export type DataStreamName = string export type DataStreamNames = DataStreamName | DataStreamName[] -export interface DateField { - field: Field - format?: string - include_unmapped?: boolean -} - export type DateFormat = string export type DateMath = string @@ -1959,8 +1969,6 @@ export type DateMathTime = string export type DateString = string -export type DefaultOperator = 'AND' | 'OR' - export interface DictionaryResponseBase { [key: string]: TValue } @@ -2007,9 +2015,9 @@ export interface ErrorResponseBase { status: integer } -export type ExpandWildcardOptions = 'all' | 'open' | 'closed' | 'hidden' | 'none' +export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none' -export type ExpandWildcards = ExpandWildcardOptions | ExpandWildcardOptions[] | string +export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] export type Field = string @@ -2023,6 +2031,8 @@ export interface FieldSizeUsage { size_in_bytes: long } +export type FieldValue = long | double | string | boolean + export interface FielddataStats { evictions?: long memory_size?: ByteSize @@ -2041,14 +2051,31 @@ export interface FlushStats { export type Fuzziness = string | integer +export type GeoBounds = CoordsGeoBounds | TopLeftBottomRightGeoBounds | TopRightBottomLeftGeoBounds | WktGeoBounds + export type GeoDistanceType = 'arc' | 'plane' -export type GeoHashPrecision = number +export type GeoHash = string + +export interface GeoHashLocation { + geohash: GeoHash +} + +export type GeoHashPrecision = number | string + +export interface GeoLine { + type: string + coordinates: double[][] +} + +export type GeoLocation = LatLonGeoLocation | GeoHashLocation | double[] | string export type GeoShape = any export type GeoShapeRelation = 'intersects' | 'disjoint' | 'within' | 'contains' +export type GeoTile = string + export type GeoTilePrecision = number export interface GetStats { @@ -2064,9 +2091,7 @@ export interface GetStats { total: long } -export type GroupBy = 'nodes' | 'parents' | 'none' - -export type Health = 'green' | 'yellow' | 'red' +export type HealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' export type Host = string @@ -2084,10 +2109,6 @@ export type IndexPattern = string export type IndexPatterns = IndexPattern[] -export interface IndexedScript extends ScriptBase { - id: Id -} - export interface IndexingStats { index_current: long delete_current: long @@ -2123,12 +2144,14 @@ export type InlineGet = InlineGetKeys & { [property: string]: any } export interface InlineScript extends ScriptBase { + lang?: ScriptLanguage + options?: Record source: string } export type Ip = string -export interface LatLon { +export interface LatLonGeoLocation { lat: double lon: double } @@ -2250,9 +2273,7 @@ export interface RecoveryStats { throttle_time_in_millis: long } -export type Refresh = boolean | RefreshOptions - -export type RefreshOptions = 'wait_for' +export type Refresh = boolean | 'true' | 'false' | 'wait_for' export interface RefreshStats { external_total: long @@ -2285,10 +2306,9 @@ export interface Retries { export type Routing = string -export type Script = InlineScript | IndexedScript | string +export type Script = InlineScript | string | StoredScriptId export interface ScriptBase { - lang?: ScriptLanguage | string params?: Record } @@ -2297,7 +2317,7 @@ export interface ScriptField { ignore_failure?: boolean } -export type ScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java' +export type ScriptLanguage = BuiltinScriptLanguage | string export interface ScriptTransform { lang: string @@ -2361,8 +2381,6 @@ export type SequenceNumber = long export type Service = string -export type ShapeRelation = 'intersects' | 'disjoint' | 'within' - export interface ShardFailure { index?: IndexName node?: string @@ -2383,8 +2401,6 @@ export interface ShardsOperationResponseBase { _shards: ShardStatistics } -export type Size = 'Raw' | 'k' | 'm' | 'g' | 't' | 'p' - export interface SlicedScroll { field?: Field id: integer @@ -2401,10 +2417,15 @@ export interface StoreStats { } export interface StoredScript { - lang?: ScriptLanguage | string + lang: ScriptLanguage + options?: Record source: string } +export interface StoredScriptId extends ScriptBase { + id: Id +} + export type SuggestMode = 'missing' | 'popular' | 'always' export type SuggestionName = string @@ -2423,6 +2444,16 @@ export type TimeZone = string export type Timestamp = string +export interface TopLeftBottomRightGeoBounds { + top_left: GeoLocation + bottom_right: GeoLocation +} + +export interface TopRightBottomLeftGeoBounds { + top_right: GeoLocation + bottom_left: GeoLocation +} + export interface Transform { } @@ -2464,8 +2495,6 @@ export type WaitForActiveShards = integer | WaitForActiveShardOptions export type WaitForEvents = 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid' -export type WaitForStatus = 'green' | 'yellow' | 'red' - export interface WarmerStats { current: long total: long @@ -2473,6 +2502,10 @@ export interface WarmerStats { total_time_in_millis: long } +export interface WktGeoBounds { + wkt: string +} + export interface WriteResponseBase { _id: Id _index: IndexName @@ -2501,11 +2534,19 @@ export type uint = number export type ulong = number +export interface AggregationsAdjacencyMatrixAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsAdjacencyMatrixAggregation extends AggregationsBucketAggregationBase { filters?: Record } -export type AggregationsAggregate = AggregationsSingleBucketAggregate | AggregationsAutoDateHistogramAggregate | AggregationsFiltersAggregate | AggregationsSignificantTermsAggregate | AggregationsTermsAggregate | AggregationsBucketAggregate | AggregationsCompositeBucketAggregate | AggregationsMultiBucketAggregate | AggregationsMatrixStatsAggregate | AggregationsKeyedValueAggregate | AggregationsMetricAggregate +export interface AggregationsAdjacencyMatrixBucketKeys extends AggregationsMultiBucketBase { +} +export type AggregationsAdjacencyMatrixBucket = AggregationsAdjacencyMatrixBucketKeys +& { [property: string]: AggregationsAggregate | long } + +export type AggregationsAggregate = AggregationsCardinalityAggregate | AggregationsHdrPercentilesAggregate | AggregationsHdrPercentileRanksAggregate | AggregationsTDigestPercentilesAggregate | AggregationsTDigestPercentileRanksAggregate | AggregationsPercentilesBucketAggregate | AggregationsMedianAbsoluteDeviationAggregate | AggregationsMinAggregate | AggregationsMaxAggregate | AggregationsSumAggregate | AggregationsAvgAggregate | AggregationsWeightedAvgAggregate | AggregationsValueCountAggregate | AggregationsSimpleValueAggregate | AggregationsDerivativeAggregate | AggregationsBucketMetricValueAggregate | AggregationsStatsAggregate | AggregationsStatsBucketAggregate | AggregationsExtendedStatsAggregate | AggregationsExtendedStatsBucketAggregate | AggregationsGeoBoundsAggregate | AggregationsGeoCentroidAggregate | AggregationsHistogramAggregate | AggregationsDateHistogramAggregate | AggregationsAutoDateHistogramAggregate | AggregationsVariableWidthHistogramAggregate | AggregationsStringTermsAggregate | AggregationsLongTermsAggregate | AggregationsDoubleTermsAggregate | AggregationsUnmappedTermsAggregate | AggregationsLongRareTermsAggregate | AggregationsStringRareTermsAggregate | AggregationsUnmappedRareTermsAggregate | AggregationsMultiTermsAggregate | AggregationsMissingAggregate | AggregationsNestedAggregate | AggregationsReverseNestedAggregate | AggregationsGlobalAggregate | AggregationsFilterAggregate | AggregationsSamplerAggregate | AggregationsGeoHashGridAggregate | AggregationsGeoTileGridAggregate | AggregationsRangeAggregate | AggregationsDateRangeAggregate | AggregationsGeoDistanceAggregate | AggregationsIpRangeAggregate | AggregationsFiltersAggregate | AggregationsAdjacencyMatrixAggregate | AggregationsSignificantLongTermsAggregate | AggregationsSignificantStringTermsAggregate | AggregationsUnmappedSignificantTermsAggregate | AggregationsCompositeAggregate | AggregationsScriptedMetricAggregate | AggregationsTopHitsAggregate | AggregationsInferenceAggregate | AggregationsStringStatsAggregate | AggregationsBoxPlotAggregate | AggregationsTopMetricsAggregate | AggregationsTTestAggregate | AggregationsRateAggregate | AggregationsCumulativeCardinalityAggregate | AggregationsMatrixStatsAggregate | AggregationsChildrenAggregate | AggregationsGeoLineAggregate export interface AggregationsAggregateBase { meta?: Record @@ -2517,10 +2558,10 @@ export interface AggregationsAggregation { } export interface AggregationsAggregationContainer { + aggregations?: Record aggs?: Record meta?: Record adjacency_matrix?: AggregationsAdjacencyMatrixAggregation - aggregations?: Record auto_date_histogram?: AggregationsAutoDateHistogramAggregation avg?: AggregationsAverageAggregation avg_bucket?: AggregationsAverageBucketAggregation @@ -2598,7 +2639,13 @@ export interface AggregationsAggregationRange { to?: double | string } -export interface AggregationsAutoDateHistogramAggregate extends AggregationsMultiBucketAggregate> { +export interface AggregationsArrayPercentilesItem { + key: string + value: double | null + value_as_string?: string +} + +export interface AggregationsAutoDateHistogramAggregate extends AggregationsMultiBucketAggregateBase { interval: DateMathTime } @@ -2620,32 +2667,35 @@ export interface AggregationsAverageAggregation extends AggregationsFormatMetric export interface AggregationsAverageBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsAvgAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsBoxPlotAggregate extends AggregationsAggregateBase { min: double max: double q1: double q2: double q3: double + lower: double + upper: double + min_as_string?: string + max_as_string?: string + q1_as_string?: string + q2_as_string?: string + q3_as_string?: string + lower_as_string?: string + upper_as_string?: string } export interface AggregationsBoxplotAggregation extends AggregationsMetricAggregationBase { compression?: double } -export type AggregationsBucket = AggregationsCompositeBucket | AggregationsDateHistogramBucket | AggregationsFiltersBucketItem | AggregationsIpRangeBucket | AggregationsRangeBucket | AggregationsRareTermsBucket | AggregationsSignificantTermsBucket | AggregationsKeyedBucket - -export interface AggregationsBucketAggregate extends AggregationsAggregateBase { - after_key: Record - bg_count: long - doc_count: long - doc_count_error_upper_bound: long - sum_other_doc_count: long - interval: DateMathTime - items: AggregationsBucket +export interface AggregationsBucketAggregationBase extends AggregationsAggregation { } -export interface AggregationsBucketAggregationBase extends AggregationsAggregation { - aggregations?: Record +export interface AggregationsBucketMetricValueAggregate extends AggregationsSingleMetricAggregateBase { + keys: string[] } export interface AggregationsBucketScriptAggregation extends AggregationsPipelineAggregationBase { @@ -2663,6 +2713,16 @@ export interface AggregationsBucketSortAggregation extends AggregationsAggregati sort?: SearchSort } +export type AggregationsBuckets = Record | TBucket[] + +export type AggregationsBucketsPath = string | string[] | Record + +export type AggregationsCalendarInterval = 'second' | '1s' | 'minute' | '1m' | 'hour' | '1h' | 'day' | '1d' | 'week' | '1w' | 'month' | '1M' | 'quarter' | '1q' | 'year' | '1Y' + +export interface AggregationsCardinalityAggregate extends AggregationsAggregateBase { + value: long +} + export interface AggregationsCardinalityAggregation extends AggregationsMetricAggregationBase { precision_threshold?: integer rehash?: boolean @@ -2673,6 +2733,14 @@ export interface AggregationsChiSquareHeuristic { include_negatives: boolean } +export interface AggregationsChildrenAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsChildrenAggregateBucketKeys extends AggregationsMultiBucketBase { +} +export type AggregationsChildrenAggregateBucket = AggregationsChildrenAggregateBucketKeys +& { [property: string]: AggregationsAggregate | long } + export interface AggregationsChildrenAggregation extends AggregationsBucketAggregationBase { type?: RelationName } @@ -2685,6 +2753,10 @@ export interface AggregationsClassificationInferenceOptions { top_classes_results_field?: string } +export interface AggregationsCompositeAggregate extends AggregationsMultiBucketAggregateBase { + after_key?: Record +} + export interface AggregationsCompositeAggregation extends AggregationsBucketAggregationBase { after?: Record size?: integer @@ -2698,13 +2770,15 @@ export interface AggregationsCompositeAggregationSource { geotile_grid?: AggregationsGeoTileGridAggregation } -export interface AggregationsCompositeBucketKeys { +export interface AggregationsCompositeBucketKeys extends AggregationsMultiBucketBase { + key: Record } export type AggregationsCompositeBucket = AggregationsCompositeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | Record | long } -export interface AggregationsCompositeBucketAggregate extends AggregationsMultiBucketAggregate> { - after_key: Record +export interface AggregationsCumulativeCardinalityAggregate extends AggregationsAggregateBase { + value: long + value_as_string?: string } export interface AggregationsCumulativeCardinalityAggregation extends AggregationsPipelineAggregationBase { @@ -2713,14 +2787,17 @@ export interface AggregationsCumulativeCardinalityAggregation extends Aggregatio export interface AggregationsCumulativeSumAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsDateHistogramAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsDateHistogramAggregation extends AggregationsBucketAggregationBase { - calendar_interval?: AggregationsDateInterval | Time - extended_bounds?: AggregationsExtendedBounds - hard_bounds?: AggregationsExtendedBounds + calendar_interval?: AggregationsCalendarInterval + extended_bounds?: AggregationsExtendedBounds + hard_bounds?: AggregationsExtendedBounds field?: Field - fixed_interval?: AggregationsDateInterval | Time + fixed_interval?: Time format?: string - interval?: AggregationsDateInterval | Time + interval?: Time min_doc_count?: integer missing?: DateString offset?: Time @@ -2731,12 +2808,15 @@ export interface AggregationsDateHistogramAggregation extends AggregationsBucket keyed?: boolean } -export interface AggregationsDateHistogramBucketKeys { +export interface AggregationsDateHistogramBucketKeys extends AggregationsMultiBucketBase { + key_as_string?: string + key: EpochMillis } export type AggregationsDateHistogramBucket = AggregationsDateHistogramBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | string | EpochMillis | long } -export type AggregationsDateInterval = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' +export interface AggregationsDateRangeAggregate extends AggregationsRangeAggregate { +} export interface AggregationsDateRangeAggregation extends AggregationsBucketAggregationBase { field?: Field @@ -2748,12 +2828,14 @@ export interface AggregationsDateRangeAggregation extends AggregationsBucketAggr } export interface AggregationsDateRangeExpression { - from?: DateMath | float - from_as_string?: string - to_as_string?: string + from?: AggregationsFieldDateMath key?: string - to?: DateMath | float - doc_count?: long + to?: AggregationsFieldDateMath +} + +export interface AggregationsDerivativeAggregate extends AggregationsSingleMetricAggregateBase { + normalized_value?: double + normalized_value_as_string?: string } export interface AggregationsDerivativeAggregation extends AggregationsPipelineAggregationBase { @@ -2767,49 +2849,74 @@ export interface AggregationsDiversifiedSamplerAggregation extends AggregationsB field?: Field } +export interface AggregationsDoubleTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsDoubleTermsBucketKeys extends AggregationsTermsBucketBase { + key: double + key_as_string?: string +} +export type AggregationsDoubleTermsBucket = AggregationsDoubleTermsBucketKeys +& { [property: string]: AggregationsAggregate | double | string | long } + export interface AggregationsEwmaModelSettings { alpha?: float } +export interface AggregationsEwmaMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'ewma' + settings: AggregationsEwmaModelSettings +} + export interface AggregationsExtendedBounds { max: T min: T } export interface AggregationsExtendedStatsAggregate extends AggregationsStatsAggregate { - std_deviation_bounds: AggregationsStandardDeviationBounds - sum_of_squares?: double - variance?: double - variance_population?: double - variance_sampling?: double - std_deviation?: double - std_deviation_population?: double - std_deviation_sampling?: double + sum_of_squares: double | null + variance: double | null + variance_population: double | null + variance_sampling: double | null + std_deviation: double | null + std_deviation_bounds?: AggregationsStandardDeviationBounds + sum_of_squares_as_string?: string + variance_as_string?: string + variance_population_as_string?: string + variance_sampling_as_string?: string + std_deviation_as_string?: string + std_deviation_bounds_as_string?: AggregationsStandardDeviationBoundsAsString } export interface AggregationsExtendedStatsAggregation extends AggregationsFormatMetricAggregationBase { sigma?: double } +export interface AggregationsExtendedStatsBucketAggregate extends AggregationsExtendedStatsAggregate { +} + export interface AggregationsExtendedStatsBucketAggregation extends AggregationsPipelineAggregationBase { sigma?: double } -export interface AggregationsFiltersAggregate extends AggregationsAggregateBase { - buckets: AggregationsFiltersBucketItem[] | Record +export type AggregationsFieldDateMath = DateMath | double + +export interface AggregationsFilterAggregate extends AggregationsSingleBucketAggregateBase { +} + +export interface AggregationsFiltersAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsFiltersAggregation extends AggregationsBucketAggregationBase { - filters?: Record | QueryDslQueryContainer[] + filters?: AggregationsBuckets other_bucket?: boolean other_bucket_key?: string keyed?: boolean } -export interface AggregationsFiltersBucketItemKeys { - doc_count: long +export interface AggregationsFiltersBucketKeys extends AggregationsMultiBucketBase { } -export type AggregationsFiltersBucketItem = AggregationsFiltersBucketItemKeys +export type AggregationsFiltersBucket = AggregationsFiltersBucketKeys & { [property: string]: AggregationsAggregate | long } export interface AggregationsFormatMetricAggregationBase extends AggregationsMetricAggregationBase { @@ -2822,13 +2929,8 @@ export interface AggregationsFormattableMetricAggregation extends AggregationsMe export type AggregationsGapPolicy = 'skip' | 'insert_zeros' -export interface AggregationsGeoBounds { - bottom_right: LatLon - top_left: LatLon -} - export interface AggregationsGeoBoundsAggregate extends AggregationsAggregateBase { - bounds: AggregationsGeoBounds + bounds: GeoBounds } export interface AggregationsGeoBoundsAggregation extends AggregationsMetricAggregationBase { @@ -2837,34 +2939,45 @@ export interface AggregationsGeoBoundsAggregation extends AggregationsMetricAggr export interface AggregationsGeoCentroidAggregate extends AggregationsAggregateBase { count: long - location: QueryDslGeoLocation + location?: GeoLocation } export interface AggregationsGeoCentroidAggregation extends AggregationsMetricAggregationBase { count?: long - location?: QueryDslGeoLocation + location?: GeoLocation +} + +export interface AggregationsGeoDistanceAggregate extends AggregationsRangeAggregate { } export interface AggregationsGeoDistanceAggregation extends AggregationsBucketAggregationBase { distance_type?: GeoDistanceType field?: Field - origin?: QueryDslGeoLocation | string + origin?: GeoLocation ranges?: AggregationsAggregationRange[] unit?: DistanceUnit } +export interface AggregationsGeoHashGridAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsGeoHashGridAggregation extends AggregationsBucketAggregationBase { - bounds?: QueryDslBoundingBox + bounds?: GeoBounds field?: Field precision?: GeoHashPrecision shard_size?: integer size?: integer } +export interface AggregationsGeoHashGridBucketKeys extends AggregationsMultiBucketBase { + key: GeoHash +} +export type AggregationsGeoHashGridBucket = AggregationsGeoHashGridBucketKeys +& { [property: string]: AggregationsAggregate | GeoHash | long } + export interface AggregationsGeoLineAggregate extends AggregationsAggregateBase { type: string - geometry: AggregationsLineStringGeoShape - properties: AggregationsGeoLineProperties + geometry: GeoLine } export interface AggregationsGeoLineAggregation { @@ -2879,21 +2992,28 @@ export interface AggregationsGeoLinePoint { field: Field } -export interface AggregationsGeoLineProperties { - complete: boolean - sort_values: double[] -} - export interface AggregationsGeoLineSort { field: Field } +export interface AggregationsGeoTileGridAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsGeoTileGridAggregation extends AggregationsBucketAggregationBase { field?: Field precision?: GeoTilePrecision shard_size?: integer size?: integer - bounds?: AggregationsGeoBounds + bounds?: GeoBounds +} + +export interface AggregationsGeoTileGridBucketKeys extends AggregationsMultiBucketBase { + key: GeoTile +} +export type AggregationsGeoTileGridBucket = AggregationsGeoTileGridBucketKeys +& { [property: string]: AggregationsAggregate | GeoTile | long } + +export interface AggregationsGlobalAggregate extends AggregationsSingleBucketAggregateBase { } export interface AggregationsGlobalAggregation extends AggregationsBucketAggregationBase { @@ -2907,13 +3027,13 @@ export interface AggregationsHdrMethod { number_of_significant_value_digits?: integer } -export interface AggregationsHdrPercentileItem { - key: double - value: double +export interface AggregationsHdrPercentileRanksAggregate extends AggregationsPercentilesAggregateBase { } -export interface AggregationsHdrPercentilesAggregate extends AggregationsAggregateBase { - values: AggregationsHdrPercentileItem[] +export interface AggregationsHdrPercentilesAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsHistogramAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsHistogramAggregation extends AggregationsBucketAggregationBase { @@ -2930,6 +3050,13 @@ export interface AggregationsHistogramAggregation extends AggregationsBucketAggr keyed?: boolean } +export interface AggregationsHistogramBucketKeys extends AggregationsMultiBucketBase { + key_as_string?: string + key: double +} +export type AggregationsHistogramBucket = AggregationsHistogramBucketKeys +& { [property: string]: AggregationsAggregate | string | double | long } + export interface AggregationsHistogramOrder { _count?: SearchSortOrder _key?: SearchSortOrder @@ -2940,6 +3067,11 @@ export interface AggregationsHoltLinearModelSettings { beta?: float } +export interface AggregationsHoltMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'holt' + settings: AggregationsHoltLinearModelSettings +} + export interface AggregationsHoltWintersModelSettings { alpha?: float beta?: float @@ -2949,18 +3081,52 @@ export interface AggregationsHoltWintersModelSettings { type?: AggregationsHoltWintersType } +export interface AggregationsHoltWintersMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'holt_winters' + settings: AggregationsHoltWintersModelSettings +} + export type AggregationsHoltWintersType = 'add' | 'mult' +export interface AggregationsInferenceAggregateKeys extends AggregationsAggregateBase { + value?: FieldValue + feature_importance?: AggregationsInferenceFeatureImportance[] + top_classes?: AggregationsInferenceTopClassEntry[] + warning?: string +} +export type AggregationsInferenceAggregate = AggregationsInferenceAggregateKeys +& { [property: string]: any } + export interface AggregationsInferenceAggregation extends AggregationsPipelineAggregationBase { model_id: Name inference_config?: AggregationsInferenceConfigContainer } +export interface AggregationsInferenceClassImportance { + class_name: string + importance: double +} + export interface AggregationsInferenceConfigContainer { regression?: AggregationsRegressionInferenceOptions classification?: AggregationsClassificationInferenceOptions } +export interface AggregationsInferenceFeatureImportance { + feature_name: string + importance?: double + classes?: AggregationsInferenceClassImportance[] +} + +export interface AggregationsInferenceTopClassEntry { + class_name: FieldValue + class_probability: double + class_score: double +} + +export interface AggregationsIpRangeAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsIpRangeAggregation extends AggregationsBucketAggregationBase { field?: Field ranges?: AggregationsIpRangeAggregationRange[] @@ -2972,67 +3138,92 @@ export interface AggregationsIpRangeAggregationRange { to?: string } -export interface AggregationsIpRangeBucketKeys { +export interface AggregationsIpRangeBucketKeys extends AggregationsMultiBucketBase { + from?: string + to?: string } export type AggregationsIpRangeBucket = AggregationsIpRangeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | string | long } -export interface AggregationsKeyedBucketKeys { - doc_count: long - key: TKey - key_as_string: string -} -export type AggregationsKeyedBucket = AggregationsKeyedBucketKeys -& { [property: string]: AggregationsAggregate | long | TKey | string } +export type AggregationsKeyedPercentiles = Record -export interface AggregationsKeyedValueAggregate extends AggregationsValueAggregate { - keys: string[] +export interface AggregationsLinearMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'linear' + settings: EmptyObject } -export interface AggregationsLineStringGeoShape { - coordinates: QueryDslGeoCoordinate[] +export interface AggregationsLongRareTermsAggregate extends AggregationsMultiBucketAggregateBase { } +export interface AggregationsLongRareTermsBucketKeys extends AggregationsMultiBucketBase { + key: long + key_as_string?: string +} +export type AggregationsLongRareTermsBucket = AggregationsLongRareTermsBucketKeys +& { [property: string]: AggregationsAggregate | long | string } + +export interface AggregationsLongTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsLongTermsBucketKeys extends AggregationsTermsBucketBase { + key: string + key_as_string?: string +} +export type AggregationsLongTermsBucket = AggregationsLongTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + export interface AggregationsMatrixAggregation extends AggregationsAggregation { fields?: Fields missing?: Record } export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateBase { - correlation: Record - covariance: Record - count: integer - kurtosis: double - mean: double - skewness: double - variance: double - name: string + doc_count: long + fields: AggregationsMatrixStatsFields[] } export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation { mode?: AggregationsMatrixStatsMode } +export interface AggregationsMatrixStatsFields { + name: Field + count: long + mean: double + variance: double + skewness: double + kurtosis: double + covariance: Record + correlation: Record +} + export type AggregationsMatrixStatsMode = 'avg' | 'min' | 'max' | 'sum' | 'median' +export interface AggregationsMaxAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMaxAggregation extends AggregationsFormatMetricAggregationBase { } export interface AggregationsMaxBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsMedianAbsoluteDeviationAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMedianAbsoluteDeviationAggregation extends AggregationsFormatMetricAggregationBase { compression?: double } -export type AggregationsMetricAggregate = AggregationsValueAggregate | AggregationsBoxPlotAggregate | AggregationsGeoBoundsAggregate | AggregationsGeoCentroidAggregate | AggregationsGeoLineAggregate | AggregationsPercentilesAggregate | AggregationsScriptedMetricAggregate | AggregationsStatsAggregate | AggregationsStringStatsAggregate | AggregationsTopHitsAggregate | AggregationsTopMetricsAggregate | AggregationsExtendedStatsAggregate | AggregationsTDigestPercentilesAggregate | AggregationsHdrPercentilesAggregate - export interface AggregationsMetricAggregationBase { field?: Field missing?: AggregationsMissing script?: Script } +export interface AggregationsMinAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsMinAggregation extends AggregationsFormatMetricAggregationBase { } @@ -3043,6 +3234,9 @@ export type AggregationsMinimumInterval = 'second' | 'minute' | 'hour' | 'day' | export type AggregationsMissing = string | integer | double | boolean +export interface AggregationsMissingAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsMissingAggregation extends AggregationsBucketAggregationBase { field?: Field missing?: AggregationsMissing @@ -3050,18 +3244,14 @@ export interface AggregationsMissingAggregation extends AggregationsBucketAggreg export type AggregationsMissingOrder = 'first' | 'last' | 'default' -export interface AggregationsMovingAverageAggregation extends AggregationsPipelineAggregationBase { +export type AggregationsMovingAverageAggregation = AggregationsLinearMovingAverageAggregation | AggregationsSimpleMovingAverageAggregation | AggregationsEwmaMovingAverageAggregation | AggregationsHoltMovingAverageAggregation | AggregationsHoltWintersMovingAverageAggregation + +export interface AggregationsMovingAverageAggregationBase extends AggregationsPipelineAggregationBase { minimize?: boolean - model?: AggregationsMovingAverageModel - settings: AggregationsMovingAverageSettings predict?: integer window?: integer } -export type AggregationsMovingAverageModel = 'linear' | 'simple' | 'ewma' | 'holt' | 'holt_winters' - -export type AggregationsMovingAverageSettings = AggregationsEwmaModelSettings | AggregationsHoltLinearModelSettings | AggregationsHoltWintersModelSettings - export interface AggregationsMovingFunctionAggregation extends AggregationsPipelineAggregationBase { script?: string shift?: integer @@ -3074,23 +3264,41 @@ export interface AggregationsMovingPercentilesAggregation extends AggregationsPi keyed?: boolean } -export interface AggregationsMultiBucketAggregate extends AggregationsAggregateBase { - buckets: TBucket[] +export interface AggregationsMultiBucketAggregateBase extends AggregationsAggregateBase { + buckets: AggregationsBuckets +} + +export interface AggregationsMultiBucketBase { + doc_count: long } export interface AggregationsMultiTermLookup { field: Field } +export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggregateBase { +} + export interface AggregationsMultiTermsAggregation extends AggregationsBucketAggregationBase { terms: AggregationsMultiTermLookup[] } +export interface AggregationsMultiTermsBucketKeys extends AggregationsMultiBucketBase { + key: (long | double | string)[] + key_as_string?: string + doc_count_error_upper_bound?: long +} +export type AggregationsMultiTermsBucket = AggregationsMultiTermsBucketKeys +& { [property: string]: AggregationsAggregate | (long | double | string)[] | string | long } + export interface AggregationsMutualInformationHeuristic { background_is_superset?: boolean include_negatives?: boolean } +export interface AggregationsNestedAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsNestedAggregation extends AggregationsBucketAggregationBase { path?: Field } @@ -3108,11 +3316,6 @@ export interface AggregationsParentAggregation extends AggregationsBucketAggrega export interface AggregationsPercentageScoreHeuristic { } -export interface AggregationsPercentileItem { - percentile: double - value: double -} - export interface AggregationsPercentileRanksAggregation extends AggregationsFormatMetricAggregationBase { keyed?: boolean values?: double[] @@ -3120,8 +3323,10 @@ export interface AggregationsPercentileRanksAggregation extends AggregationsForm tdigest?: AggregationsTDigest } -export interface AggregationsPercentilesAggregate extends AggregationsAggregateBase { - items: AggregationsPercentileItem[] +export type AggregationsPercentiles = AggregationsKeyedPercentiles | AggregationsArrayPercentilesItem[] + +export interface AggregationsPercentilesAggregateBase extends AggregationsAggregateBase { + values: AggregationsPercentiles } export interface AggregationsPercentilesAggregation extends AggregationsFormatMetricAggregationBase { @@ -3131,16 +3336,22 @@ export interface AggregationsPercentilesAggregation extends AggregationsFormatMe tdigest?: AggregationsTDigest } +export interface AggregationsPercentilesBucketAggregate extends AggregationsPercentilesAggregateBase { +} + export interface AggregationsPercentilesBucketAggregation extends AggregationsPipelineAggregationBase { percents?: double[] } export interface AggregationsPipelineAggregationBase extends AggregationsAggregation { - buckets_path?: string | string[] | Record + buckets_path?: AggregationsBucketsPath format?: string gap_policy?: AggregationsGapPolicy } +export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsRangeAggregation extends AggregationsBucketAggregationBase { field?: Field missing?: integer @@ -3149,28 +3360,32 @@ export interface AggregationsRangeAggregation extends AggregationsBucketAggregat keyed?: boolean } -export interface AggregationsRangeBucketKeys { +export interface AggregationsRangeBucketKeys extends AggregationsMultiBucketBase { + from?: double + to?: double + from_as_string?: string + to_as_string?: string } export type AggregationsRangeBucket = AggregationsRangeBucketKeys -& { [property: string]: AggregationsAggregate } +& { [property: string]: AggregationsAggregate | double | string | long } export interface AggregationsRareTermsAggregation extends AggregationsBucketAggregationBase { - exclude?: string | string[] + exclude?: AggregationsTermsExclude field?: Field - include?: string | string[] | AggregationsTermsInclude + include?: AggregationsTermsInclude max_doc_count?: long missing?: AggregationsMissing precision?: double value_type?: string } -export interface AggregationsRareTermsBucketKeys { +export interface AggregationsRateAggregate extends AggregationsAggregateBase { + value: double + value_as_string?: string } -export type AggregationsRareTermsBucket = AggregationsRareTermsBucketKeys -& { [property: string]: AggregationsAggregate } export interface AggregationsRateAggregation extends AggregationsFormatMetricAggregationBase { - unit?: AggregationsDateInterval + unit?: AggregationsCalendarInterval mode?: AggregationsRateMode } @@ -3181,10 +3396,16 @@ export interface AggregationsRegressionInferenceOptions { num_top_feature_importance_values?: integer } +export interface AggregationsReverseNestedAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsReverseNestedAggregation extends AggregationsBucketAggregationBase { path?: Field } +export interface AggregationsSamplerAggregate extends AggregationsSingleBucketAggregateBase { +} + export interface AggregationsSamplerAggregation extends AggregationsBucketAggregationBase { shard_size?: integer } @@ -3211,15 +3432,29 @@ export interface AggregationsSerialDifferencingAggregation extends AggregationsP lag?: integer } -export interface AggregationsSignificantTermsAggregate extends AggregationsMultiBucketAggregate { - bg_count: long - doc_count: long +export interface AggregationsSignificantLongTermsAggregate extends AggregationsMultiBucketAggregateBase { } +export interface AggregationsSignificantLongTermsBucketKeys extends AggregationsSignificantTermsBucketBase { + key: long + key_as_string?: string +} +export type AggregationsSignificantLongTermsBucket = AggregationsSignificantLongTermsBucketKeys +& { [property: string]: AggregationsAggregate | long | string | double } + +export interface AggregationsSignificantStringTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsSignificantStringTermsBucketKeys extends AggregationsSignificantTermsBucketBase { + key: string +} +export type AggregationsSignificantStringTermsBucket = AggregationsSignificantStringTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | double | long } + export interface AggregationsSignificantTermsAggregation extends AggregationsBucketAggregationBase { background_filter?: QueryDslQueryContainer chi_square?: AggregationsChiSquareHeuristic - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field gnd?: AggregationsGoogleNormalizedDistanceHeuristic @@ -3233,15 +3468,15 @@ export interface AggregationsSignificantTermsAggregation extends AggregationsBuc size?: integer } -export interface AggregationsSignificantTermsBucketKeys { +export interface AggregationsSignificantTermsBucketBase extends AggregationsMultiBucketBase { + score: double + bg_count: long } -export type AggregationsSignificantTermsBucket = AggregationsSignificantTermsBucketKeys -& { [property: string]: AggregationsAggregate } export interface AggregationsSignificantTextAggregation extends AggregationsBucketAggregationBase { background_filter?: QueryDslQueryContainer chi_square?: AggregationsChiSquareHeuristic - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field filter_duplicate_text?: boolean @@ -3257,48 +3492,99 @@ export interface AggregationsSignificantTextAggregation extends AggregationsBuck source_fields?: Fields } -export interface AggregationsSingleBucketAggregateKeys extends AggregationsAggregateBase { - doc_count: double +export interface AggregationsSimpleMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { + model: 'simple' + settings: EmptyObject +} + +export interface AggregationsSimpleValueAggregate extends AggregationsSingleMetricAggregateBase { +} + +export interface AggregationsSingleBucketAggregateBase extends AggregationsAggregateBase { + doc_count: long +} + +export interface AggregationsSingleMetricAggregateBase extends AggregationsAggregateBase { + value: double | null + value_as_string?: string } -export type AggregationsSingleBucketAggregate = AggregationsSingleBucketAggregateKeys -& { [property: string]: AggregationsAggregate | double | Record } export interface AggregationsStandardDeviationBounds { - lower?: double - upper?: double - lower_population?: double - upper_population?: double - lower_sampling?: double - upper_sampling?: double + upper: double | null + lower: double | null + upper_population: double | null + lower_population: double | null + upper_sampling: double | null + lower_sampling: double | null +} + +export interface AggregationsStandardDeviationBoundsAsString { + upper: string + lower: string + upper_population: string + lower_population: string + upper_sampling: string + lower_sampling: string } export interface AggregationsStatsAggregate extends AggregationsAggregateBase { - count: double + count: long + min: double | null + max: double | null + avg: double | null sum: double - avg?: double - max?: double - min?: double + min_as_string?: string + max_as_string?: string + avg_as_string?: string + sum_as_string?: string } export interface AggregationsStatsAggregation extends AggregationsFormatMetricAggregationBase { } +export interface AggregationsStatsBucketAggregate extends AggregationsStatsAggregate { +} + export interface AggregationsStatsBucketAggregation extends AggregationsPipelineAggregationBase { } +export interface AggregationsStringRareTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsStringRareTermsBucketKeys extends AggregationsMultiBucketBase { + key: string +} +export type AggregationsStringRareTermsBucket = AggregationsStringRareTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + export interface AggregationsStringStatsAggregate extends AggregationsAggregateBase { count: long - min_length: integer - max_length: integer - avg_length: double - entropy: double - distribution?: Record + min_length: integer | null + max_length: integer | null + avg_length: double | null + entropy: double | null + distribution?: string | null + min_length_as_string?: string + max_length_as_string?: string + avg_length_as_string?: string } export interface AggregationsStringStatsAggregation extends AggregationsMetricAggregationBase { show_distribution?: boolean } +export interface AggregationsStringTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsStringTermsBucketKeys extends AggregationsTermsBucketBase { + key: string +} +export type AggregationsStringTermsBucket = AggregationsStringTermsBucketKeys +& { [property: string]: AggregationsAggregate | string | long } + +export interface AggregationsSumAggregate extends AggregationsSingleMetricAggregateBase { +} + export interface AggregationsSumAggregation extends AggregationsFormatMetricAggregationBase { } @@ -3309,8 +3595,15 @@ export interface AggregationsTDigest { compression?: integer } -export interface AggregationsTDigestPercentilesAggregate extends AggregationsAggregateBase { - values: Record +export interface AggregationsTDigestPercentileRanksAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsTDigestPercentilesAggregate extends AggregationsPercentilesAggregateBase { +} + +export interface AggregationsTTestAggregate extends AggregationsAggregateBase { + value: double | null + value_as_string?: string } export interface AggregationsTTestAggregation extends AggregationsAggregation { @@ -3321,17 +3614,17 @@ export interface AggregationsTTestAggregation extends AggregationsAggregation { export type AggregationsTTestType = 'paired' | 'homoscedastic' | 'heteroscedastic' -export interface AggregationsTermsAggregate extends AggregationsMultiBucketAggregate { - doc_count_error_upper_bound: long +export interface AggregationsTermsAggregateBase extends AggregationsMultiBucketAggregateBase { + doc_count_error_upper_bound?: long sum_other_doc_count: long } export interface AggregationsTermsAggregation extends AggregationsBucketAggregationBase { collect_mode?: AggregationsTermsAggregationCollectMode - exclude?: string | string[] + exclude?: AggregationsTermsExclude execution_hint?: AggregationsTermsAggregationExecutionHint field?: Field - include?: string | string[] | AggregationsTermsInclude + include?: AggregationsTermsInclude min_doc_count?: integer missing?: AggregationsMissing missing_order?: AggregationsMissingOrder @@ -3348,9 +3641,17 @@ export type AggregationsTermsAggregationCollectMode = 'depth_first' | 'breadth_f export type AggregationsTermsAggregationExecutionHint = 'map' | 'global_ordinals' | 'global_ordinals_hash' | 'global_ordinals_low_cardinality' -export type AggregationsTermsAggregationOrder = SearchSortOrder | Record | Record[] +export type AggregationsTermsAggregationOrder = Record | Record[] -export interface AggregationsTermsInclude { +export interface AggregationsTermsBucketBase extends AggregationsMultiBucketBase { + doc_count_error?: long +} + +export type AggregationsTermsExclude = string | string[] + +export type AggregationsTermsInclude = string | string[] | AggregationsTermsPartition + +export interface AggregationsTermsPartition { num_partitions: long partition: long } @@ -3362,7 +3663,7 @@ export interface AggregationsTestPopulation { } export interface AggregationsTopHitsAggregate extends AggregationsAggregateBase { - hits: SearchHitsMetadata> + hits: SearchHitsMetadata } export interface AggregationsTopHitsAggregation extends AggregationsMetricAggregationBase { @@ -3373,7 +3674,7 @@ export interface AggregationsTopHitsAggregation extends AggregationsMetricAggreg script_fields?: Record size?: integer sort?: SearchSort - _source?: boolean | SearchSourceFilter | Fields + _source?: SearchSourceConfig stored_fields?: Fields track_scores?: boolean version?: boolean @@ -3381,12 +3682,11 @@ export interface AggregationsTopHitsAggregation extends AggregationsMetricAggreg } export interface AggregationsTopMetrics { - sort: (long | double | string)[] - metrics: Record + sort: (FieldValue | null)[] + metrics: Record } -export interface AggregationsTopMetricsAggregate extends AggregationsAggregateBase { - top: AggregationsTopMetrics[] +export interface AggregationsTopMetricsAggregate extends AggregationsMultiBucketAggregateBase { } export interface AggregationsTopMetricsAggregation extends AggregationsMetricAggregationBase { @@ -3395,13 +3695,26 @@ export interface AggregationsTopMetricsAggregation extends AggregationsMetricAgg sort?: SearchSort } +export interface AggregationsTopMetricsBucketKeys extends AggregationsMultiBucketBase { + top: AggregationsTopMetrics[] +} +export type AggregationsTopMetricsBucket = AggregationsTopMetricsBucketKeys +& { [property: string]: AggregationsAggregate | AggregationsTopMetrics[] | long } + export interface AggregationsTopMetricsValue { field: Field } -export interface AggregationsValueAggregate extends AggregationsAggregateBase { - value: double - value_as_string?: string +export interface AggregationsUnmappedRareTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsUnmappedSignificantTermsAggregate extends AggregationsMultiBucketAggregateBase { +} + +export interface AggregationsUnmappedTermsAggregate extends AggregationsTermsAggregateBase { +} + +export interface AggregationsValueCountAggregate extends AggregationsSingleMetricAggregateBase { } export interface AggregationsValueCountAggregation extends AggregationsFormattableMetricAggregation { @@ -3409,6 +3722,9 @@ export interface AggregationsValueCountAggregation extends AggregationsFormattab export type AggregationsValueType = 'string' | 'long' | 'double' | 'number' | 'date' | 'date_nanos' | 'ip' | 'numeric' | 'geo_point' | 'boolean' +export interface AggregationsVariableWidthHistogramAggregate extends AggregationsMultiBucketAggregateBase { +} + export interface AggregationsVariableWidthHistogramAggregation { field?: Field buckets?: integer @@ -3416,6 +3732,17 @@ export interface AggregationsVariableWidthHistogramAggregation { initial_buffer?: integer } +export interface AggregationsVariableWidthHistogramBucketKeys extends AggregationsMultiBucketBase { + min: double + key: double + max: double + min_as_string?: string + key_as_string?: string + max_as_string?: string +} +export type AggregationsVariableWidthHistogramBucket = AggregationsVariableWidthHistogramBucketKeys +& { [property: string]: AggregationsAggregate | double | string | long } + export interface AggregationsWeightedAverageAggregation extends AggregationsAggregation { format?: string value?: AggregationsWeightedAverageValue @@ -3429,6 +3756,9 @@ export interface AggregationsWeightedAverageValue { script?: Script } +export interface AggregationsWeightedAvgAggregate extends AggregationsSingleMetricAggregateBase { +} + export type AnalysisAnalyzer = AnalysisCustomAnalyzer | AnalysisFingerprintAnalyzer | AnalysisKeywordAnalyzer | AnalysisLanguageAnalyzer | AnalysisNoriAnalyzer | AnalysisPatternAnalyzer | AnalysisSimpleAnalyzer | AnalysisStandardAnalyzer | AnalysisStopAnalyzer | AnalysisWhitespaceAnalyzer | AnalysisIcuAnalyzer | AnalysisKuromojiAnalyzer | AnalysisSnowballAnalyzer | AnalysisDutchAnalyzer export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { @@ -3436,12 +3766,14 @@ export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase preserve_original: boolean } -export type AnalysisCharFilter = AnalysisHtmlStripCharFilter | AnalysisMappingCharFilter | AnalysisPatternReplaceCharFilter | AnalysisIcuNormalizationCharFilter | AnalysisKuromojiIterationMarkCharFilter +export type AnalysisCharFilter = string | AnalysisCharFilterDefinition export interface AnalysisCharFilterBase { version?: VersionString } +export type AnalysisCharFilterDefinition = AnalysisHtmlStripCharFilter | AnalysisMappingCharFilter | AnalysisPatternReplaceCharFilter | AnalysisIcuNormalizationCharFilter | AnalysisKuromojiIterationMarkCharFilter + export interface AnalysisCharGroupTokenizer extends AnalysisTokenizerBase { type: 'char_group' tokenize_on_chars: string[] @@ -3965,18 +4297,22 @@ export interface AnalysisSynonymTokenFilter extends AnalysisTokenFilterBase { export type AnalysisTokenChar = 'letter' | 'digit' | 'whitespace' | 'punctuation' | 'symbol' | 'custom' -export type AnalysisTokenFilter = AnalysisAsciiFoldingTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuTokenizer | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter +export type AnalysisTokenFilter = string | AnalysisTokenFilterDefinition export interface AnalysisTokenFilterBase { version?: VersionString } -export type AnalysisTokenizer = AnalysisCharGroupTokenizer | AnalysisEdgeNGramTokenizer | AnalysisKeywordTokenizer | AnalysisLetterTokenizer | AnalysisLowercaseTokenizer | AnalysisNGramTokenizer | AnalysisNoriTokenizer | AnalysisPathHierarchyTokenizer | AnalysisStandardTokenizer | AnalysisUaxEmailUrlTokenizer | AnalysisWhitespaceTokenizer | AnalysisKuromojiTokenizer | AnalysisPatternTokenizer | AnalysisIcuTokenizer +export type AnalysisTokenFilterDefinition = AnalysisAsciiFoldingTokenFilter | AnalysisCommonGramsTokenFilter | AnalysisConditionTokenFilter | AnalysisDelimitedPayloadTokenFilter | AnalysisEdgeNGramTokenFilter | AnalysisElisionTokenFilter | AnalysisFingerprintTokenFilter | AnalysisHunspellTokenFilter | AnalysisHyphenationDecompounderTokenFilter | AnalysisKeepTypesTokenFilter | AnalysisKeepWordsTokenFilter | AnalysisKeywordMarkerTokenFilter | AnalysisKStemTokenFilter | AnalysisLengthTokenFilter | AnalysisLimitTokenCountTokenFilter | AnalysisLowercaseTokenFilter | AnalysisMultiplexerTokenFilter | AnalysisNGramTokenFilter | AnalysisNoriPartOfSpeechTokenFilter | AnalysisPatternCaptureTokenFilter | AnalysisPatternReplaceTokenFilter | AnalysisPorterStemTokenFilter | AnalysisPredicateTokenFilter | AnalysisRemoveDuplicatesTokenFilter | AnalysisReverseTokenFilter | AnalysisShingleTokenFilter | AnalysisSnowballTokenFilter | AnalysisStemmerOverrideTokenFilter | AnalysisStemmerTokenFilter | AnalysisStopTokenFilter | AnalysisSynonymGraphTokenFilter | AnalysisSynonymTokenFilter | AnalysisTrimTokenFilter | AnalysisTruncateTokenFilter | AnalysisUniqueTokenFilter | AnalysisUppercaseTokenFilter | AnalysisWordDelimiterGraphTokenFilter | AnalysisWordDelimiterTokenFilter | AnalysisKuromojiStemmerTokenFilter | AnalysisKuromojiReadingFormTokenFilter | AnalysisKuromojiPartOfSpeechTokenFilter | AnalysisIcuTokenizer | AnalysisIcuCollationTokenFilter | AnalysisIcuFoldingTokenFilter | AnalysisIcuNormalizationTokenFilter | AnalysisIcuTransformTokenFilter | AnalysisPhoneticTokenFilter | AnalysisDictionaryDecompounderTokenFilter + +export type AnalysisTokenizer = string | AnalysisTokenizerDefinition export interface AnalysisTokenizerBase { version?: VersionString } +export type AnalysisTokenizerDefinition = AnalysisCharGroupTokenizer | AnalysisEdgeNGramTokenizer | AnalysisKeywordTokenizer | AnalysisLetterTokenizer | AnalysisLowercaseTokenizer | AnalysisNGramTokenizer | AnalysisNoriTokenizer | AnalysisPathHierarchyTokenizer | AnalysisStandardTokenizer | AnalysisUaxEmailUrlTokenizer | AnalysisWhitespaceTokenizer | AnalysisKuromojiTokenizer | AnalysisPatternTokenizer | AnalysisIcuTokenizer + export interface AnalysisTrimTokenFilter extends AnalysisTokenFilterBase { type: 'trim' } @@ -4161,7 +4497,7 @@ export interface MappingDoubleRangeProperty extends MappingRangePropertyBase { type: 'double_range' } -export type MappingDynamicMapping = 'strict' | 'runtime' | 'true' | 'false' +export type MappingDynamicMapping = boolean | 'strict' | 'runtime' | 'true' | 'false' export interface MappingDynamicTemplate { mapping?: MappingProperty @@ -4231,7 +4567,7 @@ export type MappingGeoOrientation = 'right' | 'RIGHT' | 'counterclockwise' | 'cc export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { ignore_malformed?: boolean ignore_z_value?: boolean - null_value?: QueryDslGeoLocation + null_value?: GeoLocation type: 'geo_point' } @@ -4357,7 +4693,7 @@ export interface MappingPropertyBase { name?: PropertyName properties?: Record ignore_above?: integer - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping fields?: Record } @@ -4449,7 +4785,7 @@ export interface MappingSuggestContext { precision?: integer | string } -export type MappingTermVectorOption = 'no' | 'yes' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' +export type MappingTermVectorOption = 'no' | 'yes' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' | 'with_positions_payloads' export interface MappingTextIndexPrefixes { max_chars: integer @@ -4488,7 +4824,7 @@ export interface MappingTokenCountProperty extends MappingDocValuesPropertyBase export interface MappingTypeMapping { all_field?: MappingAllField date_detection?: boolean - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping dynamic_date_formats?: string[] dynamic_templates?: Record | Record[] _field_names?: MappingFieldNamesField @@ -4531,18 +4867,6 @@ export interface QueryDslBoostingQuery extends QueryDslQueryBase { positive: QueryDslQueryContainer } -export interface QueryDslBoundingBox { - bottom_right?: QueryDslGeoLocation - top_left?: QueryDslGeoLocation - top_right?: QueryDslGeoLocation - bottom_left?: QueryDslGeoLocation - top?: double - left?: double - right?: double - bottom?: double - wkt?: string -} - export type QueryDslChildScoreMode = 'none' | 'avg' | 'sum' | 'max' | 'min' export type QueryDslCombinedFieldsOperator = 'or' | 'and' @@ -4620,6 +4944,12 @@ export interface QueryDslExistsQuery extends QueryDslQueryBase { field: Field } +export interface QueryDslFieldAndFormat { + field: Field + format?: string + include_unmapped?: boolean +} + export interface QueryDslFieldLookup { id: Id index?: IndexName @@ -4675,16 +5005,14 @@ export interface QueryDslGeoBoundingBoxQueryKeys extends QueryDslQueryBase { ignore_unmapped?: boolean } export type QueryDslGeoBoundingBoxQuery = QueryDslGeoBoundingBoxQueryKeys -& { [property: string]: QueryDslBoundingBox | QueryDslGeoExecution | QueryDslGeoValidationMethod | boolean | float | string } - -export type QueryDslGeoCoordinate = string | double[] | QueryDslThreeDimensionalPoint +& { [property: string]: GeoBounds | QueryDslGeoExecution | QueryDslGeoValidationMethod | boolean | float | string } export interface QueryDslGeoDecayFunctionKeys extends QueryDslDecayFunctionBase { } export type QueryDslGeoDecayFunction = QueryDslGeoDecayFunctionKeys -& { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } +& { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } -export interface QueryDslGeoDistanceFeatureQuery extends QueryDslDistanceFeatureQueryBase { +export interface QueryDslGeoDistanceFeatureQuery extends QueryDslDistanceFeatureQueryBase { } export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { @@ -4693,14 +5021,12 @@ export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { validation_method?: QueryDslGeoValidationMethod } export type QueryDslGeoDistanceQuery = QueryDslGeoDistanceQueryKeys -& { [property: string]: QueryDslGeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string } +& { [property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string } export type QueryDslGeoExecution = 'memory' | 'indexed' -export type QueryDslGeoLocation = string | double[] | QueryDslTwoDimensionalPoint - export interface QueryDslGeoPolygonPoints { - points: QueryDslGeoLocation[] + points: GeoLocation[] } export interface QueryDslGeoPolygonQueryKeys extends QueryDslQueryBase { @@ -4949,7 +5275,7 @@ export interface QueryDslNumericDecayFunctionKeys extends QueryDslDecayFunctionB export type QueryDslNumericDecayFunction = QueryDslNumericDecayFunctionKeys & { [property: string]: QueryDslDecayPlacement | QueryDslMultiValueMode | QueryDslQueryContainer | double } -export type QueryDslOperator = 'and' | 'or' +export type QueryDslOperator = 'and' | 'AND' | 'or' | 'OR' export interface QueryDslParentIdQuery extends QueryDslQueryBase { id?: Id @@ -5040,7 +5366,7 @@ export interface QueryDslQueryContainer { span_or?: QueryDslSpanOrQuery span_term?: Partial> span_within?: QueryDslSpanWithinQuery - term?: Partial> + term?: Partial> terms?: QueryDslTermsQuery terms_set?: Partial> wildcard?: Partial> @@ -5143,18 +5469,20 @@ export interface QueryDslScriptScoreQuery extends QueryDslQueryBase { } export interface QueryDslShapeFieldQuery { - ignore_unmapped?: boolean indexed_shape?: QueryDslFieldLookup - relation?: ShapeRelation + relation?: GeoShapeRelation shape?: GeoShape } export interface QueryDslShapeQueryKeys extends QueryDslQueryBase { + ignore_unmapped?: boolean } export type QueryDslShapeQuery = QueryDslShapeQueryKeys -& { [property: string]: QueryDslShapeFieldQuery | float | string } +& { [property: string]: QueryDslShapeFieldQuery | boolean | float | string } -export type QueryDslSimpleQueryStringFlags = 'NONE' | 'AND' | 'OR' | 'NOT' | 'PREFIX' | 'PHRASE' | 'PRECEDENCE' | 'ESCAPE' | 'WHITESPACE' | 'FUZZY' | 'NEAR' | 'SLOP' | 'ALL' +export type QueryDslSimpleQueryStringFlag = 'NONE' | 'AND' | 'OR' | 'NOT' | 'PREFIX' | 'PHRASE' | 'PRECEDENCE' | 'ESCAPE' | 'WHITESPACE' | 'FUZZY' | 'NEAR' | 'SLOP' | 'ALL' + +export type QueryDslSimpleQueryStringFlags = QueryDslSimpleQueryStringFlag | string export interface QueryDslSimpleQueryStringQuery extends QueryDslQueryBase { analyzer?: string @@ -5162,7 +5490,7 @@ export interface QueryDslSimpleQueryStringQuery extends QueryDslQueryBase { auto_generate_synonyms_phrase_query?: boolean default_operator?: QueryDslOperator fields?: Field[] - flags?: QueryDslSimpleQueryStringFlags | string + flags?: QueryDslSimpleQueryStringFlags fuzzy_max_expansions?: integer fuzzy_prefix_length?: integer fuzzy_transpositions?: boolean @@ -5234,7 +5562,7 @@ export interface QueryDslSpanWithinQuery extends QueryDslQueryBase { } export interface QueryDslTermQuery extends QueryDslQueryBase { - value: string | float | boolean + value: FieldValue case_insensitive?: boolean } @@ -5248,7 +5576,9 @@ export interface QueryDslTermsLookup { export interface QueryDslTermsQueryKeys extends QueryDslQueryBase { } export type QueryDslTermsQuery = QueryDslTermsQueryKeys -& { [property: string]: string[] | long[] | QueryDslTermsLookup | float | string } +& { [property: string]: QueryDslTermsQueryField | float | string } + +export type QueryDslTermsQueryField = FieldValue[] | QueryDslTermsLookup export interface QueryDslTermsSetQuery extends QueryDslQueryBase { minimum_should_match_field?: Field @@ -5258,17 +5588,6 @@ export interface QueryDslTermsSetQuery extends QueryDslQueryBase { export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix' -export interface QueryDslThreeDimensionalPoint { - lat: double - lon: double - z?: double -} - -export interface QueryDslTwoDimensionalPoint { - lat: double - lon: double -} - export interface QueryDslTypeQuery extends QueryDslQueryBase { value: string } @@ -5348,7 +5667,7 @@ export interface AsyncSearchSubmitRequest extends RequestBase { analyze_wildcard?: boolean batched_reduce_size?: long ccs_minimize_roundtrips?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string docvalue_fields?: Fields expand_wildcards?: ExpandWildcards @@ -5372,12 +5691,12 @@ export interface AsyncSearchSubmitRequest extends RequestBase { suggest_text?: string terminate_after?: long timeout?: Time - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits track_scores?: boolean typed_keys?: boolean rest_total_hits_as_int?: boolean version?: boolean - _source?: boolean | Fields + _source?: SearchSourceConfigParam _source_excludes?: Fields _source_includes?: Fields seq_no_primary_term?: boolean @@ -5393,9 +5712,9 @@ export interface AsyncSearchSubmitRequest extends RequestBase { explain?: boolean from?: integer highlight?: SearchHighlight - track_total_hits?: boolean | integer + track_total_hits?: SearchTrackHits indices_boost?: Record[] - docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[] + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] min_score?: double post_filter?: QueryDslQueryContainer profile?: boolean @@ -5406,9 +5725,9 @@ export interface AsyncSearchSubmitRequest extends RequestBase { size?: integer slice?: SlicedScroll sort?: SearchSort - _source?: boolean | Fields | SearchSourceFilter - fields?: (Field | DateField)[] - suggest?: SearchSuggestContainer | Record + _source?: SearchSourceConfig + fields?: (QueryDslFieldAndFormat | Field)[] + suggest?: SearchSuggester terminate_after?: long timeout?: string track_scores?: boolean @@ -5636,7 +5955,6 @@ export interface CatHealthHealthRecord { } export interface CatHealthRequest extends CatCatRequestBase { - include_timestamp?: boolean ts?: boolean } @@ -5945,7 +6263,7 @@ export interface CatIndicesRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes expand_wildcards?: ExpandWildcards - health?: Health + health?: HealthStatus include_unloaded_segments?: boolean pri?: boolean } @@ -7092,7 +7410,7 @@ export interface CatTemplatesTemplatesRecord { export interface CatThreadPoolRequest extends CatCatRequestBase { thread_pool_patterns?: Names - size?: Size | boolean + size?: CatThreadPoolThreadPoolSize } export type CatThreadPoolResponse = CatThreadPoolThreadPoolRecord[] @@ -7140,6 +7458,8 @@ export interface CatThreadPoolThreadPoolRecord { ka?: string } +export type CatThreadPoolThreadPoolSize = 'k' | 'm' | 'g' | 't' | 'p' + export interface CatTransformsRequest extends CatCatRequestBase { transform_id?: Id allow_no_match?: boolean @@ -7475,8 +7795,6 @@ export interface CcrUnfollowRequest extends RequestBase { export interface CcrUnfollowResponse extends AcknowledgedResponseBase { } -export type ClusterClusterStatus = 'green' | 'yellow' | 'red' - export interface ClusterComponentTemplate { name: Name component_template: ClusterComponentTemplateNode @@ -7671,7 +7989,7 @@ export interface ClusterHealthIndexHealthStats { number_of_shards: integer relocating_shards: integer shards?: Record - status: Health + status: HealthStatus unassigned_shards: integer } @@ -7687,7 +8005,7 @@ export interface ClusterHealthRequest extends RequestBase { wait_for_nodes?: string wait_for_no_initializing_shards?: boolean wait_for_no_relocating_shards?: boolean - wait_for_status?: WaitForStatus + wait_for_status?: HealthStatus } export interface ClusterHealthResponse { @@ -7703,7 +8021,7 @@ export interface ClusterHealthResponse { number_of_nodes: integer number_of_pending_tasks: integer relocating_shards: integer - status: Health + status: HealthStatus task_max_waiting_in_queue_millis: EpochMillis timed_out: boolean unassigned_shards: integer @@ -7714,7 +8032,7 @@ export interface ClusterHealthShardHealthStats { initializing_shards: integer primary_active: boolean relocating_shards: integer - status: Health + status: HealthStatus unassigned_shards: integer } @@ -8100,7 +8418,7 @@ export interface ClusterStatsResponse extends NodesNodesResponseBase { cluster_uuid: Uuid indices: ClusterStatsClusterIndices nodes: ClusterStatsClusterNodes - status: ClusterClusterStatus + status: HealthStatus timestamp: long } @@ -8321,8 +8639,8 @@ export interface EqlSearchRequest extends RequestBase { keep_alive?: Time keep_on_completion?: boolean wait_for_completion_timeout?: Time - size?: uint | float - fields?: (Field | EqlSearchSearchFieldFormatted)[] + size?: uint + fields?: QueryDslFieldAndFormat | Field result_position?: EqlSearchResultPosition } } @@ -8332,11 +8650,6 @@ export interface EqlSearchResponse extends EqlEqlSearchRespons export type EqlSearchResultPosition = 'tail' | 'head' -export interface EqlSearchSearchFieldFormatted { - field: Field - format?: string -} - export interface FeaturesFeature { name: string description: string @@ -8356,6 +8669,21 @@ export interface FeaturesResetFeaturesResponse { features: FeaturesFeature[] } +export type FleetCheckpoint = long + +export interface FleetGlobalCheckpointsRequest extends RequestBase { + index: IndexName | IndexAlias + wait_for_advance?: boolean + wait_for_index?: boolean + checkpoints?: FleetCheckpoint[] + timeout?: Time +} + +export interface FleetGlobalCheckpointsResponse { + global_checkpoints: FleetCheckpoint[] + timed_out: boolean +} + export interface GraphConnection { doc_count: long source: long @@ -8423,13 +8751,11 @@ export interface GraphExploreResponse { vertices: GraphVertex[] } -export interface IlmAction { -} +export type IlmActions = any export interface IlmPhase { - actions?: Record | string[] + actions?: IlmActions min_age?: Time - configurations?: Record> } export interface IlmPhases { @@ -8595,15 +8921,13 @@ export interface IndicesDataStream { hidden?: boolean } -export type IndicesDataStreamHealthStatus = 'green' | 'GREEN' | 'yellow' | 'YELLOW' | 'red' | 'RED' - export interface IndicesFielddataFrequencyFilter { max: double min: double min_segment_size: integer } -export type IndicesIndexCheckOnStartup = 'false' | 'checksum' | 'true' +export type IndicesIndexCheckOnStartup = boolean | 'false' | 'checksum' | 'true' export interface IndicesIndexRouting { allocation?: IndicesIndexRoutingAllocation @@ -8780,14 +9104,10 @@ export interface IndicesIndexSettingsLifecycle { export interface IndicesIndexState { aliases?: Record mappings?: MappingTypeMapping - settings?: IndicesIndexSettings | IndicesIndexStatePrefixedSettings + settings?: IndicesIndexSettings data_stream?: DataStreamName } -export interface IndicesIndexStatePrefixedSettings { - index: IndicesIndexSettings -} - export interface IndicesIndexVersioning { created: VersionString } @@ -8798,11 +9118,6 @@ export interface IndicesNumericFielddata { export type IndicesNumericFielddataFormat = 'array' | 'disabled' -export interface IndicesOverlappingIndexTemplate { - name: Name - index_patterns?: IndexName[] -} - export type IndicesSegmentSortMissing = '_last' | '_first' export type IndicesSegmentSortMode = 'min' | 'max' @@ -8895,13 +9210,13 @@ export interface IndicesAnalyzeRequest extends RequestBase { body?: { analyzer?: string attributes?: string[] - char_filter?: (string | AnalysisCharFilter)[] + char_filter?: AnalysisCharFilter[] explain?: boolean field?: Field - filter?: (string | AnalysisTokenFilter)[] + filter?: AnalysisTokenFilter[] normalizer?: string text?: IndicesAnalyzeTextToAnalyze - tokenizer?: string | AnalysisTokenizer + tokenizer?: AnalysisTokenizer } } @@ -9196,7 +9511,7 @@ export interface IndicesGetDataStreamIndicesGetDataStreamItem { template: Name hidden: boolean system?: boolean - status: IndicesDataStreamHealthStatus + status: HealthStatus ilm_policy?: Name _meta?: Metadata } @@ -9395,7 +9710,7 @@ export interface IndicesPutMappingRequest extends RequestBase { /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { date_detection?: boolean - dynamic?: boolean | MappingDynamicMapping + dynamic?: MappingDynamicMapping dynamic_date_formats?: string[] dynamic_templates?: Record | Record[] _field_names?: MappingFieldNamesField @@ -9612,6 +9927,8 @@ export interface IndicesResolveIndexResponse { data_streams: IndicesResolveIndexResolveIndexDataStreamsItem[] } +export type IndicesRolloverIndexRolloverMapping = MappingTypeMapping | Record + export interface IndicesRolloverRequest extends RequestBase { alias: IndexAlias new_index?: IndexName @@ -9624,7 +9941,7 @@ export interface IndicesRolloverRequest extends RequestBase { body?: { aliases?: Record conditions?: IndicesRolloverRolloverConditions - mappings?: Record | MappingTypeMapping + mappings?: IndicesRolloverIndexRolloverMapping settings?: Record } } @@ -9697,15 +10014,13 @@ export interface IndicesShardStoresRequest extends RequestBase { allow_no_indices?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean - status?: IndicesShardStoresShardStatus | IndicesShardStoresShardStatus[] + status?: IndicesShardStoresShardStoreStatus | IndicesShardStoresShardStoreStatus[] } export interface IndicesShardStoresResponse { indices: Record } -export type IndicesShardStoresShardStatus = 'green' | 'yellow' | 'red' | 'all' - export interface IndicesShardStoresShardStore { allocation: IndicesShardStoresShardStoreAllocation allocation_id: Id @@ -9724,6 +10039,8 @@ export interface IndicesShardStoresShardStoreException { type: string } +export type IndicesShardStoresShardStoreStatus = 'green' | 'yellow' | 'red' | 'all' + export interface IndicesShardStoresShardStoreWrapper { stores: IndicesShardStoresShardStore[] } @@ -9748,12 +10065,18 @@ export interface IndicesShrinkResponse extends AcknowledgedResponseBase { export interface IndicesSimulateIndexTemplateRequest extends RequestBase { name: Name + create?: boolean + master_timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { - index_patterns?: IndexName[] + allow_auto_create?: boolean + index_patterns?: Indices composed_of?: Name[] - overlapping?: IndicesOverlappingIndexTemplate[] - template?: IndicesTemplateMapping + template?: IndicesPutIndexTemplateIndexTemplateMapping + data_stream?: IndicesDataStream + priority?: integer + version?: VersionNumber + _meta?: Metadata } } @@ -10013,7 +10336,7 @@ export interface IndicesValidateQueryRequest extends RequestBase { all_shards?: boolean analyzer?: string analyze_wildcard?: boolean - default_operator?: DefaultOperator + default_operator?: QueryDslOperator df?: string expand_wildcards?: ExpandWildcards explain?: boolean @@ -10086,7 +10409,7 @@ export interface IngestCsvProcessor extends IngestProcessorBase { export interface IngestDateIndexNameProcessor extends IngestProcessorBase { date_formats: string[] - date_rounding: string | IngestDateRounding + date_rounding: string field: Field index_name_format: string index_name_prefix: string @@ -10102,8 +10425,6 @@ export interface IngestDateProcessor extends IngestProcessorBase { timezone?: string } -export type IngestDateRounding = 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y' - export interface IngestDissectProcessor extends IngestProcessorBase { append_separator: string field: Field @@ -10616,7 +10937,7 @@ export interface MigrationDeprecationsResponse { export interface MlAnalysisConfig { bucket_span: TimeSpan - categorization_analyzer?: MlCategorizationAnalyzer | string + categorization_analyzer?: MlCategorizationAnalyzer categorization_field_name?: Field categorization_filters?: string[] detectors: MlDetector[] @@ -10630,7 +10951,7 @@ export interface MlAnalysisConfig { export interface MlAnalysisConfigRead { bucket_span: TimeSpan - categorization_analyzer?: MlCategorizationAnalyzer | string + categorization_analyzer?: MlCategorizationAnalyzer categorization_field_name?: Field categorization_filters?: string[] detectors: MlDetector[] @@ -10696,17 +11017,16 @@ export interface MlAnomalyCause { export type MlAppliesTo = 'actual' | 'typical' | 'diff_from_typical' | 'time' export interface MlBucketInfluencer { + anomaly_score: double bucket_span: long - influencer_score: double influencer_field_name: Field - influencer_field_value: string - initial_influencer_score: double + initial_anomaly_score: double is_interim: boolean job_id: Id probability: double + raw_anomaly_score: double result_type: string timestamp: Time - foo?: string } export interface MlBucketSummary { @@ -10717,7 +11037,6 @@ export interface MlBucketSummary { initial_anomaly_score: double is_interim: boolean job_id: Id - partition_scores?: MlPartitionScore[] processing_time_ms: double result_type: string timestamp: Time @@ -10731,10 +11050,12 @@ export interface MlCalendarEvent { start_time: EpochMillis } -export interface MlCategorizationAnalyzer { - char_filter?: (string | AnalysisCharFilter)[] - filter?: (string | AnalysisTokenFilter)[] - tokenizer?: string | AnalysisTokenizer +export type MlCategorizationAnalyzer = string | MlCategorizationAnalyzerDefinition + +export interface MlCategorizationAnalyzerDefinition { + char_filter?: AnalysisCharFilter[] + filter?: AnalysisTokenFilter[] + tokenizer?: AnalysisTokenizer } export type MlCategorizationStatus = 'ok' | 'warn' @@ -10765,11 +11086,7 @@ export type MlChunkingMode = 'auto' | 'manual' | 'off' export type MlConditionOperator = 'gt' | 'gte' | 'lt' | 'lte' -export interface MlCustomSettings { - custom_urls?: XpackUsageUrlConfig[] - created_by?: string - job_tags?: Record -} +export type MlCustomSettings = any export interface MlDataCounts { bucket_count: long @@ -10885,9 +11202,7 @@ export interface MlDataframeAnalysis { training_percent?: Percentage } -export type MlDataframeAnalysisAnalyzedFields = string[] | MlDataframeAnalysisAnalyzedFieldsIncludeExclude - -export interface MlDataframeAnalysisAnalyzedFieldsIncludeExclude { +export interface MlDataframeAnalysisAnalyzedFields { includes: string[] excludes: string[] } @@ -10990,7 +11305,7 @@ export interface MlDataframeAnalyticsSource { index: Indices query?: QueryDslQueryContainer runtime_mappings?: MappingRuntimeFields - _source?: MlDataframeAnalysisAnalyzedFields + _source?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlDataframeAnalyticsStatsContainer { @@ -11039,7 +11354,7 @@ export interface MlDataframeAnalyticsSummary { description?: string model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] allow_lazy_start?: boolean create_time?: long version?: VersionString @@ -11186,6 +11501,20 @@ export interface MlInfluence { influencer_field_values: string[] } +export interface MlInfluencer { + bucket_span: long + influencer_score: double + influencer_field_name: Field + influencer_field_value: string + initial_influencer_score: double + is_interim: boolean + job_id: Id + probability: double + result_type: string + timestamp: Time + foo?: string +} + export interface MlJob { allow_lazy_open: boolean analysis_config: MlAnalysisConfig @@ -11294,10 +11623,10 @@ export interface MlModelSizeStats { job_id: Id log_time: Time memory_status: MlMemoryStatus - model_bytes: long - model_bytes_exceeded: long - model_bytes_memory_limit: long - peak_model_bytes: long + model_bytes: ByteSize + model_bytes_exceeded?: ByteSize + model_bytes_memory_limit?: ByteSize + peak_model_bytes?: ByteSize assignment_memory_basis?: string result_type: string total_by_field_count: long @@ -11354,14 +11683,6 @@ export interface MlPage { size?: integer } -export interface MlPartitionScore { - initial_record_score: double - partition_field_name: Field - partition_field_value: string - probability: double - record_score: double -} - export interface MlPerPartitionCategorization { enabled?: boolean stop_on_warn?: boolean @@ -11399,6 +11720,7 @@ export interface MlTotalFeatureImportanceStatistics { export interface MlTrainedModelConfig { model_id: Id + model_type: MlTrainedModelType tags: string[] version?: VersionString compressed_definition?: string @@ -11440,6 +11762,8 @@ export interface MlTrainedModelStats { ingest?: Record } +export type MlTrainedModelType = 'tree_ensemble' | 'lang_ident' | 'pytorch' + export interface MlValidationLoss { fold_values: string[] loss_type: string @@ -11450,6 +11774,12 @@ export interface MlCloseJobRequest extends RequestBase { allow_no_match?: boolean force?: boolean timeout?: Time + /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ + body?: { + allow_no_match?: boolean + force?: boolean + timeout?: Time + } } export interface MlCloseJobResponse { @@ -11676,11 +12006,11 @@ export interface MlExplainDataFrameAnalyticsRequest extends RequestBase { body?: { source?: MlDataframeAnalyticsSource dest?: MlDataframeAnalyticsDestination - analysis: MlDataframeAnalysisContainer + analysis?: MlDataframeAnalysisContainer description?: string model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] allow_lazy_start?: boolean } } @@ -11692,12 +12022,17 @@ export interface MlExplainDataFrameAnalyticsResponse { export interface MlFlushJobRequest extends RequestBase { job_id: Id + advance_time?: DateString + calc_interim?: boolean + end?: DateString skip_time?: string + start?: DateString /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { advance_time?: DateString calc_interim?: boolean end?: DateString + skip_time?: string start?: DateString } } @@ -11709,6 +12044,9 @@ export interface MlFlushJobResponse { export interface MlForecastRequest extends RequestBase { job_id: Id + duration?: Time + expires_in?: Time + max_model_memory?: string /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { duration?: Time @@ -11724,22 +12062,25 @@ export interface MlForecastResponse extends AcknowledgedResponseBase { export interface MlGetBucketsRequest extends RequestBase { job_id: Id timestamp?: Timestamp + anomaly_score?: double + desc?: boolean + end?: DateString + exclude_interim?: boolean + expand?: boolean from?: integer size?: integer - exclude_interim?: boolean sort?: Field - desc?: boolean start?: DateString - end?: DateString /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { anomaly_score?: double desc?: boolean + end?: DateString exclude_interim?: boolean expand?: boolean + page?: MlPage sort?: Field start?: DateString - end?: DateString } } @@ -11750,11 +12091,11 @@ export interface MlGetBucketsResponse { export interface MlGetCalendarEventsRequest extends RequestBase { calendar_id: Id - job_id?: Id end?: DateString from?: integer - start?: string + job_id?: Id size?: integer + start?: string } export interface MlGetCalendarEventsResponse { @@ -11876,7 +12217,7 @@ export interface MlGetInfluencersRequest extends RequestBase { export interface MlGetInfluencersResponse { count: long - influencers: MlBucketInfluencer[] + influencers: MlInfluencer[] } export interface MlGetJobStatsRequest extends RequestBase { @@ -11911,8 +12252,11 @@ export interface MlGetModelSnapshotsRequest extends RequestBase { start?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { - start?: Time + desc?: boolean end?: Time + page?: MlPage + sort?: Field + start?: Time } } @@ -11930,6 +12274,16 @@ export interface MlGetOverallBucketsRequest extends RequestBase { overall_score?: double | string start?: Time top_n?: integer + /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ + body?: { + allow_no_match?: boolean + bucket_span?: Time + end?: Time + exclude_interim?: boolean + overall_score?: double | string + start?: Time + top_n?: integer + } } export interface MlGetOverallBucketsResponse { @@ -11939,20 +12293,23 @@ export interface MlGetOverallBucketsResponse { export interface MlGetRecordsRequest extends RequestBase { job_id: Id + desc?: boolean + end?: DateString exclude_interim?: boolean from?: integer + record_score?: double size?: integer + sort?: Field start?: DateString - end?: DateString /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { desc?: boolean + end?: DateString exclude_interim?: boolean page?: MlPage record_score?: double sort?: Field start?: DateString - end?: DateString } } @@ -12029,6 +12386,7 @@ export interface MlInfoResponse { export interface MlOpenJobRequest extends RequestBase { job_id: Id + timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { timeout?: Time @@ -12082,7 +12440,7 @@ export interface MlPreviewDataFrameAnalyticsDataframePreviewConfig { analysis: MlDataframeAnalysisContainer model_memory_limit?: string max_num_threads?: integer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlPreviewDataFrameAnalyticsRequest extends RequestBase { @@ -12114,6 +12472,7 @@ export interface MlPutCalendarRequest extends RequestBase { calendar_id: Id /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { + job_ids?: Id[] description?: string } } @@ -12141,7 +12500,7 @@ export interface MlPutDataFrameAnalyticsRequest extends RequestBase { body?: { allow_lazy_start?: boolean analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] description?: string dest: MlDataframeAnalyticsDestination max_num_threads?: integer @@ -12161,7 +12520,7 @@ export interface MlPutDataFrameAnalyticsResponse { allow_lazy_start: boolean max_num_threads: integer analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] } export interface MlPutDatafeedRequest extends RequestBase { @@ -12317,6 +12676,7 @@ export interface MlPutTrainedModelRequest extends RequestBase { inference_config: AggregationsInferenceConfigContainer input: MlPutTrainedModelInput metadata?: any + model_type?: MlTrainedModelType tags?: string[] } } @@ -12379,6 +12739,7 @@ export interface MlResetJobResponse extends AcknowledgedResponseBase { export interface MlRevertModelSnapshotRequest extends RequestBase { job_id: Id snapshot_id: Id + delete_intervening_results?: boolean /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { delete_intervening_results?: boolean @@ -12408,7 +12769,9 @@ export interface MlStartDataFrameAnalyticsResponse extends AcknowledgedResponseB export interface MlStartDatafeedRequest extends RequestBase { datafeed_id: Id + end?: Time start?: Time + timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { end?: Time @@ -12437,8 +12800,10 @@ export interface MlStopDatafeedRequest extends RequestBase { datafeed_id: Id allow_no_match?: boolean force?: boolean + timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { + allow_no_match?: boolean force?: boolean timeout?: Time } @@ -12470,7 +12835,48 @@ export interface MlUpdateDataFrameAnalyticsResponse { allow_lazy_start: boolean max_num_threads: integer analysis: MlDataframeAnalysisContainer - analyzed_fields?: MlDataframeAnalysisAnalyzedFields + analyzed_fields?: MlDataframeAnalysisAnalyzedFields | string[] +} + +export interface MlUpdateDatafeedRequest extends RequestBase { + datafeed_id: Id + allow_no_indices?: boolean + expand_wildcards?: ExpandWildcards + ignore_throttled?: boolean + ignore_unavailable?: boolean + /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ + body?: { + aggregations?: Record + chunking_config?: MlChunkingConfig + delayed_data_check_config?: MlDelayedDataCheckConfig + frequency?: Time + indices?: string[] + indexes?: string[] + indices_options?: MlDatafeedIndicesOptions + max_empty_searches?: integer + query?: QueryDslQueryContainer + query_delay?: Time + runtime_mappings?: MappingRuntimeFields + script_fields?: Record + scroll_size?: integer + } +} + +export interface MlUpdateDatafeedResponse { + aggregations: Record + chunking_config: MlChunkingConfig + delayed_data_check_config?: MlDelayedDataCheckConfig + datafeed_id: Id + frequency: Time + indices: string[] + job_id: Id + indices_options?: MlDatafeedIndicesOptions + max_empty_searches: integer + query: QueryDslQueryContainer + query_delay: Time + runtime_mappings?: MappingRuntimeFields + script_fields?: Record + scroll_size: integer } export interface MlUpdateFilterRequest extends RequestBase { @@ -12821,9 +13227,10 @@ export interface NodesHotThreadsRequest extends RequestBase { ignore_idle_threads?: boolean interval?: Time snapshots?: long + master_timeout?: Time threads?: long - thread_type?: ThreadType timeout?: Time + type?: ThreadType } export interface NodesHotThreadsResponse { @@ -12998,7 +13405,7 @@ export interface NodesInfoNodeInfoSettingsClusterElection { } export interface NodesInfoNodeInfoSettingsHttp { - type: string | NodesInfoNodeInfoSettingsHttpType + type: NodesInfoNodeInfoSettingsHttpType | string 'type.default'?: string compression?: boolean | string port?: integer | string @@ -13056,7 +13463,7 @@ export interface NodesInfoNodeInfoSettingsNode { } export interface NodesInfoNodeInfoSettingsTransport { - type: string | NodesInfoNodeInfoSettingsTransportType + type: NodesInfoNodeInfoSettingsTransportType | string 'type.default'?: string features?: NodesInfoNodeInfoSettingsTransportFeatures } @@ -13177,16 +13584,12 @@ export interface NodesInfoResponse extends NodesNodesResponseBase { nodes: Record } -export interface NodesReloadSecureSettingsNodeReloadException { +export interface NodesReloadSecureSettingsNodeReloadError { name: Name - reload_exception?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy + reload_exception?: ErrorCause } -export interface NodesReloadSecureSettingsNodeReloadExceptionCausedBy { - type: string - reason: string - caused_by?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy -} +export type NodesReloadSecureSettingsNodeReloadResult = NodesStats | NodesReloadSecureSettingsNodeReloadError export interface NodesReloadSecureSettingsRequest extends RequestBase { node_id?: NodeIds @@ -13199,7 +13602,7 @@ export interface NodesReloadSecureSettingsRequest extends RequestBase { export interface NodesReloadSecureSettingsResponse extends NodesNodesResponseBase { cluster_name: Name - nodes: Record + nodes: Record } export interface NodesStatsRequest extends RequestBase { @@ -13540,7 +13943,7 @@ export interface SecurityIndicesPrivileges { field_security?: SecurityFieldSecurity | SecurityFieldSecurity[] names: Indices privileges: SecurityIndexPrivilege[] - query?: string | string[] | QueryDslQueryContainer + query?: string | string[] allow_restricted_indices?: boolean } @@ -13608,6 +14011,7 @@ export interface SecurityChangePasswordRequest extends RequestBase { /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { password?: Password + password_hash?: string } } @@ -13818,20 +14222,6 @@ export interface SecurityGetPrivilegesRequest extends RequestBase { export interface SecurityGetPrivilegesResponse extends DictionaryResponseBase> { } -export interface SecurityGetRoleInlineRoleTemplate { - template: SecurityGetRoleInlineRoleTemplateSource - format?: SecurityGetRoleTemplateFormat -} - -export interface SecurityGetRoleInlineRoleTemplateSource { - source: string -} - -export interface SecurityGetRoleInvalidRoleTemplate { - template: string - format?: SecurityGetRoleTemplateFormat -} - export interface SecurityGetRoleRequest extends RequestBase { name?: Name } @@ -13849,15 +14239,9 @@ export interface SecurityGetRoleRole { role_templates?: SecurityGetRoleRoleTemplate[] } -export type SecurityGetRoleRoleTemplate = SecurityGetRoleInlineRoleTemplate | SecurityGetRoleStoredRoleTemplate | SecurityGetRoleInvalidRoleTemplate - -export interface SecurityGetRoleStoredRoleTemplate { - template: SecurityGetRoleStoredRoleTemplateId +export interface SecurityGetRoleRoleTemplate { format?: SecurityGetRoleTemplateFormat -} - -export interface SecurityGetRoleStoredRoleTemplateId { - id: string + template: Script } export type SecurityGetRoleTemplateFormat = 'string' | 'json' @@ -14681,7 +15065,7 @@ export interface SqlTranslateRequest extends RequestBase { export interface SqlTranslateResponse { size: long - _source: boolean | Fields | SearchSourceFilter + _source: SearchSourceConfig fields: Record[] sort: SearchSort } @@ -14701,6 +15085,8 @@ export interface SslCertificatesRequest extends RequestBase { export type SslCertificatesResponse = SslCertificatesCertificateInformation[] +export type TasksGroupBy = 'nodes' | 'parents' | 'none' + export interface TasksInfo { action: string cancellable: boolean @@ -14783,7 +15169,7 @@ export interface TasksGetResponse { export interface TasksListRequest extends RequestBase { actions?: string | string[] detailed?: boolean - group_by?: GroupBy + group_by?: TasksGroupBy nodes?: string[] parent_task_id?: Id timeout?: Time @@ -14793,7 +15179,7 @@ export interface TasksListRequest extends RequestBase { export interface TasksListResponse { node_failures?: ErrorCause[] nodes?: Record - tasks?: Record | TasksInfo[] + tasks?: Record } export interface TextStructureFindStructureFieldStat { @@ -15172,7 +15558,7 @@ export type WatcherConnectionScheme = 'http' | 'https' export type WatcherCronExpression = string export interface WatcherDailySchedule { - at: string[] | WatcherTimeOfDay + at: WatcherTimeOfDay[] } export type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' @@ -15230,6 +15616,11 @@ export interface WatcherExecutionThreadPool { queue_size: long } +export interface WatcherHourAndMinute { + hour: integer[] + minute: integer[] +} + export interface WatcherHourlySchedule { minute: integer[] } @@ -15387,8 +15778,8 @@ export interface WatcherScheduleContainer { } export interface WatcherScheduleTriggerEvent { - scheduled_time: DateString | string - triggered_time?: DateString | string + scheduled_time: DateString + triggered_time?: DateString } export interface WatcherScriptCondition { @@ -15470,10 +15861,7 @@ export interface WatcherThrottleState { timestamp: DateString } -export interface WatcherTimeOfDay { - hour: integer[] - minute: integer[] -} +export type WatcherTimeOfDay = string | WatcherHourAndMinute export interface WatcherTimeOfMonth { at: string[] @@ -15617,7 +16005,7 @@ export interface WatcherPutWatchRequest extends RequestBase { id: Id active?: boolean if_primary_term?: long - if_sequence_number?: long + if_seq_no?: SequenceNumber version?: VersionNumber /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { @@ -15685,7 +16073,7 @@ export interface WatcherStatsWatchRecordStats extends WatcherStatsWatchRecordQue watch_record_id: Id } -export type WatcherStatsWatcherMetric = '_all' | 'queued_watches' | 'current_watches' | 'pending_watches' +export type WatcherStatsWatcherMetric = '_all' | 'all' | 'queued_watches' | 'current_watches' | 'pending_watches' export interface WatcherStatsWatcherNodeStats { current_watches?: WatcherStatsWatchRecordStats[] @@ -15803,11 +16191,6 @@ export interface XpackUsageBase { enabled: boolean } -export interface XpackUsageBaseUrlConfig { - url_name: string - url_value: string -} - export interface XpackUsageCcr extends XpackUsageBase { auto_follow_patterns_count: integer follower_indices_count: integer @@ -15920,13 +16303,15 @@ export interface XpackUsageIpFilter { transport: boolean } -export interface XpackUsageKibanaUrlConfig extends XpackUsageBaseUrlConfig { - time_range?: string +export interface XpackUsageJobsKeys { + _all?: XpackUsageAllJobs } +export type XpackUsageJobs = XpackUsageJobsKeys +& { [property: string]: MlJob | XpackUsageAllJobs } export interface XpackUsageMachineLearning extends XpackUsageBase { datafeeds: Record - jobs: Record | Partial> + jobs: XpackUsageJobs node_count: integer data_frame_analytics_jobs: XpackUsageMlDataFrameAnalyticsJobs inference: XpackUsageMlInference @@ -16134,8 +16519,6 @@ export interface XpackUsageSsl { transport: XpackUsageFeatureToggle } -export type XpackUsageUrlConfig = XpackUsageBaseUrlConfig | XpackUsageKibanaUrlConfig - export interface XpackUsageVector extends XpackUsageBase { dense_vector_dims_avg_count: integer dense_vector_fields_count: integer @@ -16185,7 +16568,6 @@ export interface SpecUtilsCommonQueryParameters { filter_path?: string | string[] human?: boolean pretty?: boolean - source_query_string?: string } export interface SpecUtilsCommonCatQueryParameters {