@opensearch-project/opensearch 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/api/OpenSearchApi.d.ts +78 -0
  2. package/api/OpenSearchApi.js +4 -0
  3. package/api/_core/bulk.d.ts +1 -1
  4. package/api/_core/exists.d.ts +4 -2
  5. package/api/_core/existsSource.d.ts +4 -2
  6. package/api/_core/explain.d.ts +1 -1
  7. package/api/_core/ping.d.ts +4 -2
  8. package/api/_core/search.d.ts +1 -0
  9. package/api/_core/search.js +1 -0
  10. package/api/_core/searchShards.d.ts +5 -0
  11. package/api/_core/searchShards.js +1 -0
  12. package/api/_types/_common.aggregations.d.ts +111 -266
  13. package/api/_types/_common.analysis.d.ts +2 -2
  14. package/api/_types/_common.d.ts +13 -7
  15. package/api/_types/_common.mapping.d.ts +1 -1
  16. package/api/_types/_common.query_dsl.d.ts +10 -6
  17. package/api/_types/_core.bulk.d.ts +16 -8
  18. package/api/_types/_core.explain.d.ts +1 -7
  19. package/api/_types/_core.search.d.ts +23 -7
  20. package/api/_types/cluster._common.d.ts +2 -0
  21. package/api/_types/cluster.stats.d.ts +3 -3
  22. package/api/_types/geospatial._common.d.ts +147 -0
  23. package/api/_types/index.d.ts +4 -0
  24. package/api/_types/indices._common.d.ts +6 -3
  25. package/api/_types/ltr._common.d.ts +54 -0
  26. package/api/_types/ml._common.d.ts +9 -0
  27. package/api/_types/neural._common.d.ts +94 -0
  28. package/api/_types/nodes._common.d.ts +1 -1
  29. package/api/_types/nodes.stats.d.ts +1 -0
  30. package/api/_types/search_pipeline._common.d.ts +19 -1
  31. package/api/_types/security._common.d.ts +6 -6
  32. package/api/cluster/existsComponentTemplate.d.ts +4 -2
  33. package/api/cluster/existsComponentTemplate.js +1 -1
  34. package/api/cluster/health.d.ts +2 -1
  35. package/api/flowFramework/create.js +6 -6
  36. package/api/flowFramework/delete.js +3 -3
  37. package/api/flowFramework/deprovision.js +3 -3
  38. package/api/flowFramework/get.js +2 -2
  39. package/api/flowFramework/getStatus.js +3 -3
  40. package/api/flowFramework/getSteps.js +2 -2
  41. package/api/flowFramework/provision.js +2 -2
  42. package/api/flowFramework/update.js +7 -7
  43. package/api/geospatial/_api.js +46 -0
  44. package/api/geospatial/deleteIp2GeoDatasource.d.ts +30 -0
  45. package/api/geospatial/deleteIp2GeoDatasource.js +49 -0
  46. package/api/geospatial/geojsonUploadPost.d.ts +30 -0
  47. package/api/geospatial/geojsonUploadPost.js +49 -0
  48. package/api/geospatial/geojsonUploadPut.d.ts +30 -0
  49. package/api/geospatial/geojsonUploadPut.js +49 -0
  50. package/api/geospatial/getIp2GeoDatasource.d.ts +31 -0
  51. package/api/geospatial/getIp2GeoDatasource.js +48 -0
  52. package/api/geospatial/getUploadStats.d.ts +28 -0
  53. package/api/geospatial/getUploadStats.js +45 -0
  54. package/api/geospatial/putIp2GeoDatasource.d.ts +32 -0
  55. package/api/geospatial/putIp2GeoDatasource.js +53 -0
  56. package/api/geospatial/putIp2GeoDatasourceSettings.d.ts +32 -0
  57. package/api/geospatial/putIp2GeoDatasourceSettings.js +50 -0
  58. package/api/index.d.ts +36 -4
  59. package/api/indices/exists.d.ts +4 -2
  60. package/api/indices/existsAlias.d.ts +4 -2
  61. package/api/indices/existsIndexTemplate.d.ts +4 -2
  62. package/api/indices/existsTemplate.d.ts +4 -2
  63. package/api/indices/putSettings.js +1 -1
  64. package/api/indices/simulateTemplate.js +1 -1
  65. package/api/ism/addPolicy.js +1 -1
  66. package/api/ism/changePolicy.js +1 -1
  67. package/api/ism/existsPolicy.d.ts +4 -2
  68. package/api/ism/existsPolicy.js +1 -1
  69. package/api/ism/explainPolicy.js +2 -2
  70. package/api/ism/getPolicies.js +1 -1
  71. package/api/ism/getPolicy.js +1 -1
  72. package/api/ism/putPolicies.js +1 -1
  73. package/api/ism/refreshSearchAnalyzers.js +2 -2
  74. package/api/ism/removePolicy.js +1 -1
  75. package/api/ism/retryIndex.js +2 -2
  76. package/api/ltr/_api.js +24 -0
  77. package/api/ltr/cacheStats.d.ts +28 -0
  78. package/api/ltr/cacheStats.js +45 -0
  79. package/api/ltr/clearCache.d.ts +30 -0
  80. package/api/ltr/clearCache.js +48 -0
  81. package/api/ltr/createDefaultStore.d.ts +28 -0
  82. package/api/ltr/createDefaultStore.js +45 -0
  83. package/api/ltr/createStore.d.ts +30 -0
  84. package/api/ltr/createStore.js +49 -0
  85. package/api/ltr/deleteDefaultStore.d.ts +28 -0
  86. package/api/ltr/deleteDefaultStore.js +45 -0
  87. package/api/ltr/deleteStore.d.ts +30 -0
  88. package/api/ltr/deleteStore.js +49 -0
  89. package/api/ltr/getStore.d.ts +30 -0
  90. package/api/ltr/getStore.js +49 -0
  91. package/api/ltr/listStores.d.ts +28 -0
  92. package/api/ltr/listStores.js +45 -0
  93. package/api/ml/getTool.d.ts +1 -1
  94. package/api/neural/_api.js +26 -0
  95. package/api/neural/stats.d.ts +33 -0
  96. package/api/neural/stats.js +52 -0
  97. package/api/nodes/hotThreads.js +6 -6
  98. package/api/nodes/info.js +3 -3
  99. package/api/nodes/reloadSecureSettings.js +1 -1
  100. package/api/nodes/stats.js +9 -9
  101. package/api/observability/createObject.js +1 -1
  102. package/api/observability/deleteObject.js +1 -1
  103. package/api/observability/deleteObjects.js +2 -2
  104. package/api/observability/getObject.js +1 -1
  105. package/api/observability/updateObject.js +2 -2
  106. package/api/ppl/explain.js +4 -4
  107. package/api/ppl/getStats.js +3 -3
  108. package/api/ppl/postStats.js +4 -4
  109. package/api/ppl/query.js +4 -4
  110. package/api/query/datasourceDelete.js +2 -2
  111. package/api/query/datasourceRetrieve.js +2 -2
  112. package/api/query/datasourcesCreate.js +2 -2
  113. package/api/query/datasourcesList.js +1 -1
  114. package/api/query/datasourcesUpdate.js +2 -2
  115. package/api/rollups/delete.js +2 -2
  116. package/api/rollups/explain.js +2 -2
  117. package/api/rollups/get.js +2 -2
  118. package/api/rollups/put.js +5 -5
  119. package/api/rollups/start.js +2 -2
  120. package/api/rollups/stop.js +2 -2
  121. package/api/sql/close.js +4 -4
  122. package/api/sql/explain.js +4 -4
  123. package/api/sql/getStats.js +3 -3
  124. package/api/sql/postStats.js +4 -4
  125. package/api/sql/query.js +4 -4
  126. package/api/sql/settings.js +3 -3
  127. package/lib/Connection.js +2 -0
  128. package/lib/aws/shared.js +3 -2
  129. package/package.json +2 -2
@@ -28,7 +28,7 @@ export type AdjacencyMatrixBucket = MultiBucketBase & {
28
28
  key: string;
29
29
  }
30
30
 
31
- export type Aggregate = CardinalityAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | PercentilesBucketAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MaxAggregate | SumAggregate | AvgAggregate | WeightedAvgAggregate | ValueCountAggregate | SimpleValueAggregate | DerivativeAggregate | BucketMetricValueAggregate | StatsAggregate | StatsBucketAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | GeoBoundsAggregate | GeoCentroidAggregate | HistogramAggregate | DateHistogramAggregate | AutoDateHistogramAggregate | VariableWidthHistogramAggregate | StringTermsAggregate | LongTermsAggregate | DoubleTermsAggregate | UnmappedTermsAggregate | LongRareTermsAggregate | StringRareTermsAggregate | UnmappedRareTermsAggregate | MultiTermsAggregate | MissingAggregate | NestedAggregate | ReverseNestedAggregate | GlobalAggregate | FilterAggregate | ChildrenAggregate | ParentAggregate | SamplerAggregate | UnmappedSamplerAggregate | GeoHashGridAggregate | GeoTileGridAggregate | RangeAggregate | DateRangeAggregate | GeoDistanceAggregate | IpRangeAggregate | FiltersAggregate | AdjacencyMatrixAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | UnmappedSignificantTermsAggregate | CompositeAggregate | ScriptedMetricAggregate | TopHitsAggregate | InferenceAggregate | StringStatsAggregate | BoxPlotAggregate | TopMetricsAggregate | TTestAggregate | RateAggregate | CumulativeCardinalityAggregate | MatrixStatsAggregate | GeoLineAggregate
31
+ export type Aggregate = AdjacencyMatrixAggregate | AutoDateHistogramAggregate | AvgAggregate | BoxPlotAggregate | BucketMetricValueAggregate | CardinalityAggregate | ChildrenAggregate | CompositeAggregate | DateHistogramAggregate | DateRangeAggregate | DerivativeAggregate | DoubleTermsAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | FilterAggregate | FiltersAggregate | GeoBoundsAggregate | GeoCentroidAggregate | GeoDistanceAggregate | GeoHashGridAggregate | GeoTileGridAggregate | GlobalAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | HistogramAggregate | IpRangeAggregate | LongRareTermsAggregate | LongTermsAggregate | MatrixStatsAggregate | MaxAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MissingAggregate | MultiTermsAggregate | NestedAggregate | ParentAggregate | PercentilesBucketAggregate | RangeAggregate | RateAggregate | ReverseNestedAggregate | SamplerAggregate | ScriptedMetricAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | CumulativeCardinalityAggregate | SimpleValueAggregate | StatsAggregate | StatsBucketAggregate | StringRareTermsAggregate | StringTermsAggregate | SumAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | TTestAggregate | TopHitsAggregate | UnmappedRareTermsAggregate | UnmappedSignificantTermsAggregate | UnmappedTermsAggregate | ValueCountAggregate | VariableWidthHistogramAggregate | WeightedAvgAggregate
32
32
 
33
33
  export type AggregateBase = {
34
34
  meta?: Common.Metadata;
@@ -95,8 +95,6 @@ export type AggregationContainer = {
95
95
  geo_distance: GeoDistanceAggregation;
96
96
  } | {
97
97
  geohash_grid: GeoHashGridAggregation;
98
- } | {
99
- geo_line: GeoLineAggregation;
100
98
  } | {
101
99
  geotile_grid: GeoTileGridAggregation;
102
100
  } | {
@@ -105,10 +103,6 @@ export type AggregationContainer = {
105
103
  histogram: HistogramAggregation;
106
104
  } | {
107
105
  ip_range: IpRangeAggregation;
108
- } | {
109
- inference: InferenceAggregation;
110
- } | {
111
- line: GeoLineAggregation;
112
106
  } | {
113
107
  matrix_stats: MatrixStatsAggregation;
114
108
  } | {
@@ -165,8 +159,6 @@ export type AggregationContainer = {
165
159
  stats: StatsAggregation;
166
160
  } | {
167
161
  stats_bucket: StatsBucketAggregation;
168
- } | {
169
- string_stats: StringStatsAggregation;
170
162
  } | {
171
163
  sum: SumAggregation;
172
164
  } | {
@@ -177,8 +169,6 @@ export type AggregationContainer = {
177
169
  top_hits: TopHitsAggregation;
178
170
  } | {
179
171
  t_test: TTestAggregation;
180
- } | {
181
- top_metrics: TopMetricsAggregation;
182
172
  } | {
183
173
  value_count: ValueCountAggregation;
184
174
  } | {
@@ -188,14 +178,14 @@ export type AggregationContainer = {
188
178
  })
189
179
 
190
180
  export type AggregationRange = {
191
- from?: undefined | number | string;
181
+ from?: number | string | undefined;
192
182
  key?: string;
193
- to?: undefined | number | string;
183
+ to?: number | string | undefined;
194
184
  }
195
185
 
196
186
  export type ArrayPercentilesItem = {
197
187
  key: string;
198
- value: undefined | number | string;
188
+ value: number | undefined;
199
189
  value_as_string?: string;
200
190
  }
201
191
 
@@ -252,38 +242,16 @@ export type BucketPathAggregation = Aggregation & {
252
242
  buckets_path?: BucketsPath;
253
243
  }
254
244
 
255
- export type BucketsAdjacencyMatrixBucket = Record<string, AdjacencyMatrixBucket> | AdjacencyMatrixBucket[]
256
-
257
- export type BucketsCompositeBucket = Record<string, CompositeBucket> | CompositeBucket[]
245
+ export type Buckets = Record<string, TBucket> | TBucket[]
258
246
 
259
247
  export type BucketScriptAggregation = PipelineAggregationBase & {
260
248
  script?: Common.Script;
261
249
  }
262
250
 
263
- export type BucketsDateHistogramBucket = Record<string, DateHistogramBucket> | DateHistogramBucket[]
264
-
265
- export type BucketsDoubleTermsBucket = Record<string, DoubleTermsBucket> | DoubleTermsBucket[]
266
-
267
251
  export type BucketSelectorAggregation = PipelineAggregationBase & {
268
252
  script?: Common.Script;
269
253
  }
270
254
 
271
- export type BucketsFiltersBucket = Record<string, FiltersBucket> | FiltersBucket[]
272
-
273
- export type BucketsGeoHashGridBucket = Record<string, GeoHashGridBucket> | GeoHashGridBucket[]
274
-
275
- export type BucketsGeoTileGridBucket = Record<string, GeoTileGridBucket> | GeoTileGridBucket[]
276
-
277
- export type BucketsHistogramBucket = Record<string, HistogramBucket> | HistogramBucket[]
278
-
279
- export type BucketsIpRangeBucket = Record<string, IpRangeBucket> | IpRangeBucket[]
280
-
281
- export type BucketsLongRareTermsBucket = Record<string, LongRareTermsBucket> | LongRareTermsBucket[]
282
-
283
- export type BucketsLongTermsBucket = Record<string, LongTermsBucket> | LongTermsBucket[]
284
-
285
- export type BucketsMultiTermsBucket = Record<string, MultiTermsBucket> | MultiTermsBucket[]
286
-
287
255
  export type BucketSortAggregation = Aggregation & {
288
256
  from?: number;
289
257
  gap_policy?: GapPolicy;
@@ -293,21 +261,7 @@ export type BucketSortAggregation = Aggregation & {
293
261
 
294
262
  export type BucketsPath = string | string[] | Record<string, string>
295
263
 
296
- export type BucketsQueryContainer = Record<string, Common_QueryDsl.QueryContainer> | Common_QueryDsl.QueryContainer[]
297
-
298
- export type BucketsRangeBucket = Record<string, RangeBucket> | RangeBucket[]
299
-
300
- export type BucketsSignificantLongTermsBucket = Record<string, SignificantLongTermsBucket> | SignificantLongTermsBucket[]
301
-
302
- export type BucketsSignificantStringTermsBucket = Record<string, SignificantStringTermsBucket> | SignificantStringTermsBucket[]
303
-
304
- export type BucketsStringRareTermsBucket = Record<string, StringRareTermsBucket> | StringRareTermsBucket[]
305
-
306
- export type BucketsStringTermsBucket = Record<string, StringTermsBucket> | StringTermsBucket[]
307
-
308
- export type BucketsVariableWidthHistogramBucket = Record<string, VariableWidthHistogramBucket> | VariableWidthHistogramBucket[]
309
-
310
- export type BucketsVoid = Record<string, Common.Void> | Common.Void[]
264
+ export type BucketsQueryContainer = Buckets & (Record<string, Common_QueryDsl.QueryContainer> | Common_QueryDsl.QueryContainer[])
311
265
 
312
266
  export type CalendarInterval = 'second' | '1s' | 'minute' | '1m' | 'hour' | '1h' | 'day' | '1d' | 'week' | '1w' | 'month' | '1M' | 'quarter' | '1q' | 'year' | '1Y'
313
267
 
@@ -334,14 +288,6 @@ export type ChiSquareHeuristic = {
334
288
  include_negatives: boolean;
335
289
  }
336
290
 
337
- export type ClassificationInferenceOptions = {
338
- num_top_classes?: number;
339
- num_top_feature_importance_values?: number;
340
- prediction_field_type?: string;
341
- results_field?: string;
342
- top_classes_results_field?: string;
343
- }
344
-
345
291
  export type CompositeAggregate = MultiBucketAggregateBaseCompositeBucket & {
346
292
  after_key?: CompositeAggregateKey;
347
293
  }
@@ -427,7 +373,7 @@ export type DateHistogramBucket = MultiBucketBase & {
427
373
  key_as_string?: string;
428
374
  }
429
375
 
430
- export type DateRangeAggregate = RangeAggregate & Record<string, any>
376
+ export type DateRangeAggregate = RangeAggregateBase & Record<string, any>
431
377
 
432
378
  export type DateRangeAggregation = BucketAggregationBase & {
433
379
  field?: Common.Field;
@@ -475,30 +421,37 @@ export type EwmaMovingAverageAggregation = MovingAverageAggregationBase & {
475
421
  settings: EwmaModelSettings;
476
422
  }
477
423
 
478
- export type ExtendedBoundsdouble = {
479
- max: number;
480
- min: number;
424
+ export type ExtendedBounds = {
425
+ max: T;
426
+ min: T;
481
427
  }
482
428
 
483
- export type ExtendedBoundsFieldDateMath = {
484
- max: FieldDateMath;
485
- min: FieldDateMath;
429
+ export type ExtendedBoundsDouble = ExtendedBounds & {
430
+ max?: number;
431
+ min?: number;
486
432
  }
487
433
 
488
- export type ExtendedStatsAggregate = StatsAggregate & {
489
- std_deviation: undefined | number | string;
434
+ export type ExtendedBoundsFieldDateMath = ExtendedBounds & {
435
+ max?: FieldDateMath;
436
+ min?: FieldDateMath;
437
+ }
438
+
439
+ export type ExtendedStatsAggregate = ExtendedStatsAggregateBase & Record<string, any>
440
+
441
+ export type ExtendedStatsAggregateBase = StatsAggregateBase & {
442
+ std_deviation: number | undefined;
490
443
  std_deviation_as_string?: string;
491
444
  std_deviation_bounds?: StandardDeviationBounds;
492
445
  std_deviation_bounds_as_string?: StandardDeviationBoundsAsString;
493
- std_deviation_population: undefined | number | string;
494
- std_deviation_sampling: undefined | number | string;
495
- sum_of_squares: undefined | number | string;
446
+ std_deviation_population: number | undefined;
447
+ std_deviation_sampling: number | undefined;
448
+ sum_of_squares: number | undefined;
496
449
  sum_of_squares_as_string?: string;
497
- variance: undefined | number | string;
450
+ variance: number | undefined;
498
451
  variance_as_string?: string;
499
- variance_population: undefined | number | string;
452
+ variance_population: number | undefined;
500
453
  variance_population_as_string?: string;
501
- variance_sampling: undefined | number | string;
454
+ variance_sampling: number | undefined;
502
455
  variance_sampling_as_string?: string;
503
456
  }
504
457
 
@@ -506,7 +459,7 @@ export type ExtendedStatsAggregation = FormatMetricAggregationBase & {
506
459
  sigma?: number;
507
460
  }
508
461
 
509
- export type ExtendedStatsBucketAggregate = ExtendedStatsAggregate & Record<string, any>
462
+ export type ExtendedStatsBucketAggregate = ExtendedStatsAggregateBase & Record<string, any>
510
463
 
511
464
  export type ExtendedStatsBucketAggregation = PipelineAggregationBase & {
512
465
  sigma?: number;
@@ -555,7 +508,7 @@ export type GeoCentroidAggregation = MetricAggregationBase & {
555
508
  location?: Common.GeoLocation;
556
509
  }
557
510
 
558
- export type GeoDistanceAggregate = RangeAggregate & Record<string, any>
511
+ export type GeoDistanceAggregate = RangeAggregateBase & Record<string, any>
559
512
 
560
513
  export type GeoDistanceAggregation = BucketAggregationBase & {
561
514
  distance_type?: Common.GeoDistanceType;
@@ -579,28 +532,6 @@ export type GeoHashGridBucket = MultiBucketBase & {
579
532
  key: Common.GeoHash;
580
533
  }
581
534
 
582
- export type GeoLineAggregate = AggregateBase & {
583
- geometry: Common.GeoLine;
584
- properties: Record<string, any>;
585
- type: string;
586
- }
587
-
588
- export type GeoLineAggregation = {
589
- include_sort?: boolean;
590
- point: GeoLinePoint;
591
- size?: number;
592
- sort: GeoLineSort;
593
- sort_order?: Common.SortOrder;
594
- }
595
-
596
- export type GeoLinePoint = {
597
- field: Common.Field;
598
- }
599
-
600
- export type GeoLineSort = {
601
- field: Common.Field;
602
- }
603
-
604
535
  export type GeoTileGridAggregate = MultiBucketAggregateBaseGeoTileGridBucket & Record<string, any>
605
536
 
606
537
  export type GeoTileGridAggregation = BucketAggregationBase & {
@@ -634,10 +565,10 @@ export type HdrPercentilesAggregate = PercentilesAggregateBase & Record<string,
634
565
  export type HistogramAggregate = MultiBucketAggregateBaseHistogramBucket & Record<string, any>
635
566
 
636
567
  export type HistogramAggregation = BucketAggregationBase & {
637
- extended_bounds?: ExtendedBoundsdouble;
568
+ extended_bounds?: ExtendedBoundsDouble;
638
569
  field?: Common.Field;
639
570
  format?: string;
640
- hard_bounds?: ExtendedBoundsdouble;
571
+ hard_bounds?: ExtendedBoundsDouble;
641
572
  interval?: number;
642
573
  keyed?: boolean;
643
574
  min_doc_count?: number;
@@ -683,40 +614,6 @@ export type HoltWintersMovingAverageAggregation = MovingAverageAggregationBase &
683
614
 
684
615
  export type HoltWintersType = 'add' | 'mult'
685
616
 
686
- export type InferenceAggregate = AggregateBase & {
687
- feature_importance?: InferenceFeatureImportance[];
688
- top_classes?: InferenceTopClassEntry[];
689
- value?: Common.FieldValue;
690
- warning?: string;
691
- }
692
-
693
- export type InferenceAggregation = PipelineAggregationBase & {
694
- inference_config?: InferenceConfigContainer;
695
- model_id: Common.Name;
696
- }
697
-
698
- export type InferenceClassImportance = {
699
- class_name: string;
700
- importance: number;
701
- }
702
-
703
- export type InferenceConfigContainer = {
704
- classification?: ClassificationInferenceOptions;
705
- regression?: RegressionInferenceOptions;
706
- }
707
-
708
- export type InferenceFeatureImportance = {
709
- classes?: InferenceClassImportance[];
710
- feature_name: string;
711
- importance?: number;
712
- }
713
-
714
- export type InferenceTopClassEntry = {
715
- class_name: Common.FieldValue;
716
- class_probability: number;
717
- class_score: number;
718
- }
719
-
720
617
  export type IpRangeAggregate = MultiBucketAggregateBaseIpRangeBucket & Record<string, any>
721
618
 
722
619
  export type IpRangeAggregation = BucketAggregationBase & {
@@ -736,7 +633,7 @@ export type IpRangeBucket = MultiBucketBase & {
736
633
  to?: string;
737
634
  }
738
635
 
739
- export type KeyedPercentiles = Record<string, undefined | number | string>
636
+ export type KeyedPercentiles = Record<string, number | string | undefined>
740
637
 
741
638
  export type LinearMovingAverageAggregation = MovingAverageAggregationBase & {
742
639
  model: 'linear';
@@ -753,10 +650,12 @@ export type LongRareTermsBucket = MultiBucketBase & {
753
650
  export type LongTermsAggregate = TermsAggregateBaseLongTermsBucket & Record<string, any>
754
651
 
755
652
  export type LongTermsBucket = TermsBucketBase & {
756
- key: number;
653
+ key: LongTermsBucketKey;
757
654
  key_as_string?: string;
758
655
  }
759
656
 
657
+ export type LongTermsBucketKey = number | string
658
+
760
659
  export type MatrixAggregation = Aggregation & {
761
660
  fields?: Common.Fields;
762
661
  missing?: Record<string, number>;
@@ -837,80 +736,60 @@ export type MovingPercentilesAggregation = PipelineAggregationBase & {
837
736
  window?: number;
838
737
  }
839
738
 
840
- export type MultiBucketAggregateBaseAdjacencyMatrixBucket = AggregateBase & {
841
- buckets: BucketsAdjacencyMatrixBucket;
842
- }
843
-
844
- export type MultiBucketAggregateBaseCompositeBucket = AggregateBase & {
845
- buckets: BucketsCompositeBucket;
846
- }
847
-
848
- export type MultiBucketAggregateBaseDateHistogramBucket = AggregateBase & {
849
- buckets: BucketsDateHistogramBucket;
850
- }
851
-
852
- export type MultiBucketAggregateBaseDoubleTermsBucket = AggregateBase & {
853
- buckets: BucketsDoubleTermsBucket;
739
+ export type MultiBucketAggregateBase = AggregateBase & {
740
+ buckets: Buckets & (Record<string, TBucket> | TBucket[]);
854
741
  }
855
742
 
856
- export type MultiBucketAggregateBaseFiltersBucket = AggregateBase & {
857
- buckets: BucketsFiltersBucket;
743
+ export type MultiBucketAggregateBaseAdjacencyMatrixBucket = MultiBucketAggregateBase & {
744
+ buckets: Buckets & (Record<string, AdjacencyMatrixBucket> | AdjacencyMatrixBucket[]);
858
745
  }
859
746
 
860
- export type MultiBucketAggregateBaseGeoHashGridBucket = AggregateBase & {
861
- buckets: BucketsGeoHashGridBucket;
747
+ export type MultiBucketAggregateBaseCompositeBucket = MultiBucketAggregateBase & {
748
+ buckets: Buckets & (Record<string, CompositeBucket> | CompositeBucket[]);
862
749
  }
863
750
 
864
- export type MultiBucketAggregateBaseGeoTileGridBucket = AggregateBase & {
865
- buckets: BucketsGeoTileGridBucket;
751
+ export type MultiBucketAggregateBaseDateHistogramBucket = MultiBucketAggregateBase & {
752
+ buckets: Buckets & (Record<string, DateHistogramBucket> | DateHistogramBucket[]);
866
753
  }
867
754
 
868
- export type MultiBucketAggregateBaseHistogramBucket = AggregateBase & {
869
- buckets: BucketsHistogramBucket;
755
+ export type MultiBucketAggregateBaseFiltersBucket = MultiBucketAggregateBase & {
756
+ buckets: Buckets & (Record<string, FiltersBucket> | FiltersBucket[]);
870
757
  }
871
758
 
872
- export type MultiBucketAggregateBaseIpRangeBucket = AggregateBase & {
873
- buckets: BucketsIpRangeBucket;
759
+ export type MultiBucketAggregateBaseGeoHashGridBucket = MultiBucketAggregateBase & {
760
+ buckets: Buckets & (Record<string, GeoHashGridBucket> | GeoHashGridBucket[]);
874
761
  }
875
762
 
876
- export type MultiBucketAggregateBaseLongRareTermsBucket = AggregateBase & {
877
- buckets: BucketsLongRareTermsBucket;
763
+ export type MultiBucketAggregateBaseGeoTileGridBucket = MultiBucketAggregateBase & {
764
+ buckets: Buckets & (Record<string, GeoTileGridBucket> | GeoTileGridBucket[]);
878
765
  }
879
766
 
880
- export type MultiBucketAggregateBaseLongTermsBucket = AggregateBase & {
881
- buckets: BucketsLongTermsBucket;
767
+ export type MultiBucketAggregateBaseHistogramBucket = MultiBucketAggregateBase & {
768
+ buckets: Buckets & (Record<string, HistogramBucket> | HistogramBucket[]);
882
769
  }
883
770
 
884
- export type MultiBucketAggregateBaseMultiTermsBucket = AggregateBase & {
885
- buckets: BucketsMultiTermsBucket;
771
+ export type MultiBucketAggregateBaseIpRangeBucket = MultiBucketAggregateBase & {
772
+ buckets: Buckets & (Record<string, IpRangeBucket> | IpRangeBucket[]);
886
773
  }
887
774
 
888
- export type MultiBucketAggregateBaseRangeBucket = AggregateBase & {
889
- buckets: BucketsRangeBucket;
775
+ export type MultiBucketAggregateBaseLongRareTermsBucket = MultiBucketAggregateBase & {
776
+ buckets?: Buckets & (Record<string, LongRareTermsBucket> | LongRareTermsBucket[]);
890
777
  }
891
778
 
892
- export type MultiBucketAggregateBaseSignificantLongTermsBucket = AggregateBase & {
893
- buckets: BucketsSignificantLongTermsBucket;
779
+ export type MultiBucketAggregateBaseRangeBucket = MultiBucketAggregateBase & {
780
+ buckets: Buckets & (Record<string, RangeBucket> | RangeBucket[]);
894
781
  }
895
782
 
896
- export type MultiBucketAggregateBaseSignificantStringTermsBucket = AggregateBase & {
897
- buckets: BucketsSignificantStringTermsBucket;
783
+ export type MultiBucketAggregateBaseStringRareTermsBucket = MultiBucketAggregateBase & {
784
+ buckets?: Buckets & (Record<string, StringRareTermsBucket> | StringRareTermsBucket[]);
898
785
  }
899
786
 
900
- export type MultiBucketAggregateBaseStringRareTermsBucket = AggregateBase & {
901
- buckets: BucketsStringRareTermsBucket;
787
+ export type MultiBucketAggregateBaseVariableWidthHistogramBucket = MultiBucketAggregateBase & {
788
+ buckets: Buckets & (Record<string, VariableWidthHistogramBucket> | VariableWidthHistogramBucket[]);
902
789
  }
903
790
 
904
- export type MultiBucketAggregateBaseStringTermsBucket = AggregateBase & {
905
- buckets: BucketsStringTermsBucket;
906
- }
907
-
908
- export type MultiBucketAggregateBaseVariableWidthHistogramBucket = AggregateBase & {
909
- buckets: BucketsVariableWidthHistogramBucket;
910
- }
911
-
912
- export type MultiBucketAggregateBaseVoid = AggregateBase & {
913
- buckets: BucketsVoid;
791
+ export type MultiBucketAggregateBaseVoid = MultiBucketAggregateBase & {
792
+ buckets?: Buckets & (Record<string, Common.Void> | Common.Void[]);
914
793
  }
915
794
 
916
795
  export type MultiBucketBase = {
@@ -946,9 +825,7 @@ export type MutualInformationHeuristic = {
946
825
  include_negatives?: boolean;
947
826
  }
948
827
 
949
- export type NestedAggregate = AggregateBase & {
950
- doc_count?: number;
951
- }
828
+ export type NestedAggregate = SingleBucketAggregateBase & Record<string, any>
952
829
 
953
830
  export type NestedAggregation = BucketAggregationBase & {
954
831
  path?: Common.Field;
@@ -999,7 +876,9 @@ export type PipelineAggregationBase = BucketPathAggregation & {
999
876
  gap_policy?: GapPolicy;
1000
877
  }
1001
878
 
1002
- export type RangeAggregate = MultiBucketAggregateBaseRangeBucket & Record<string, any>
879
+ export type RangeAggregate = RangeAggregateBase & Record<string, any>
880
+
881
+ export type RangeAggregateBase = MultiBucketAggregateBaseRangeBucket & Record<string, any>
1003
882
 
1004
883
  export type RangeAggregation = BucketAggregationBase & {
1005
884
  field?: Common.Field;
@@ -1040,11 +919,6 @@ export type RateAggregation = FormatMetricAggregationBase & {
1040
919
 
1041
920
  export type RateMode = 'sum' | 'value_count'
1042
921
 
1043
- export type RegressionInferenceOptions = {
1044
- num_top_feature_importance_values?: number;
1045
- results_field?: Common.Field;
1046
- }
1047
-
1048
922
  export type ReverseNestedAggregate = SingleBucketAggregateBase & Record<string, any>
1049
923
 
1050
924
  export type ReverseNestedAggregation = BucketAggregationBase & {
@@ -1064,7 +938,7 @@ export type ScriptedHeuristic = {
1064
938
  }
1065
939
 
1066
940
  export type ScriptedMetricAggregate = AggregateBase & {
1067
- value: Record<string, any>;
941
+ value: any;
1068
942
  }
1069
943
 
1070
944
  export type ScriptedMetricAggregation = MetricAggregationBase & {
@@ -1092,19 +966,21 @@ export type SignificantStringTermsBucket = SignificantTermsBucketBase & {
1092
966
  key: string;
1093
967
  }
1094
968
 
1095
- export type SignificantTermsAggregateBaseSignificantLongTermsBucket = MultiBucketAggregateBaseSignificantLongTermsBucket & {
969
+ export type SignificantTermsAggregateBase = MultiBucketAggregateBase & {
1096
970
  bg_count?: number;
1097
971
  doc_count?: number;
1098
972
  }
1099
973
 
1100
- export type SignificantTermsAggregateBaseSignificantStringTermsBucket = MultiBucketAggregateBaseSignificantStringTermsBucket & {
1101
- bg_count?: number;
1102
- doc_count?: number;
974
+ export type SignificantTermsAggregateBaseSignificantLongTermsBucket = SignificantTermsAggregateBase & {
975
+ buckets?: Buckets & (Record<string, SignificantLongTermsBucket> | SignificantLongTermsBucket[]);
1103
976
  }
1104
977
 
1105
- export type SignificantTermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & {
1106
- bg_count?: number;
1107
- doc_count?: number;
978
+ export type SignificantTermsAggregateBaseSignificantStringTermsBucket = SignificantTermsAggregateBase & {
979
+ buckets?: Buckets & (Record<string, SignificantStringTermsBucket> | SignificantStringTermsBucket[]);
980
+ }
981
+
982
+ export type SignificantTermsAggregateBaseVoid = SignificantTermsAggregateBase & {
983
+ buckets?: Buckets & (Record<string, Common.Void> | Common.Void[]);
1108
984
  }
1109
985
 
1110
986
  export type SignificantTermsAggregation = BucketAggregationBase & {
@@ -1163,17 +1039,17 @@ export type SingleBucketAggregateBase = AggregateBase & {
1163
1039
  }
1164
1040
 
1165
1041
  export type SingleMetricAggregateBase = AggregateBase & {
1166
- value: undefined | number | string;
1042
+ value: number | undefined;
1167
1043
  value_as_string?: string;
1168
1044
  }
1169
1045
 
1170
1046
  export type StandardDeviationBounds = {
1171
- lower: undefined | number | string;
1172
- lower_population: undefined | number | string;
1173
- lower_sampling: undefined | number | string;
1174
- upper: undefined | number | string;
1175
- upper_population: undefined | number | string;
1176
- upper_sampling: undefined | number | string;
1047
+ lower: number | undefined;
1048
+ lower_population: number | undefined;
1049
+ lower_sampling: number | undefined;
1050
+ upper: number | undefined;
1051
+ upper_population: number | undefined;
1052
+ upper_sampling: number | undefined;
1177
1053
  }
1178
1054
 
1179
1055
  export type StandardDeviationBoundsAsString = {
@@ -1185,13 +1061,15 @@ export type StandardDeviationBoundsAsString = {
1185
1061
  upper_sampling: string;
1186
1062
  }
1187
1063
 
1188
- export type StatsAggregate = AggregateBase & {
1189
- avg: undefined | number | string;
1064
+ export type StatsAggregate = StatsAggregateBase & Record<string, any>
1065
+
1066
+ export type StatsAggregateBase = AggregateBase & {
1067
+ avg: number | undefined;
1190
1068
  avg_as_string?: string;
1191
1069
  count: number;
1192
- max: undefined | number | string;
1070
+ max: number | undefined;
1193
1071
  max_as_string?: string;
1194
- min: undefined | number | string;
1072
+ min: number | undefined;
1195
1073
  min_as_string?: string;
1196
1074
  sum: number;
1197
1075
  sum_as_string?: string;
@@ -1199,7 +1077,7 @@ export type StatsAggregate = AggregateBase & {
1199
1077
 
1200
1078
  export type StatsAggregation = FormatMetricAggregationBase & Record<string, any>
1201
1079
 
1202
- export type StatsBucketAggregate = StatsAggregate & Record<string, any>
1080
+ export type StatsBucketAggregate = StatsAggregateBase & Record<string, any>
1203
1081
 
1204
1082
  export type StatsBucketAggregation = PipelineAggregationBase & Record<string, any>
1205
1083
 
@@ -1209,26 +1087,10 @@ export type StringRareTermsBucket = MultiBucketBase & {
1209
1087
  key: string;
1210
1088
  }
1211
1089
 
1212
- export type StringStatsAggregate = AggregateBase & {
1213
- avg_length: undefined | number | string;
1214
- avg_length_as_string?: string;
1215
- count: number;
1216
- distribution?: undefined | Record<string, number> | string;
1217
- entropy: undefined | number | string;
1218
- max_length: undefined | number | string;
1219
- max_length_as_string?: string;
1220
- min_length: undefined | number | string;
1221
- min_length_as_string?: string;
1222
- }
1223
-
1224
- export type StringStatsAggregation = MetricAggregationBase & {
1225
- show_distribution?: boolean;
1226
- }
1227
-
1228
1090
  export type StringTermsAggregate = TermsAggregateBaseStringTermsBucket & Record<string, any>
1229
1091
 
1230
1092
  export type StringTermsBucket = TermsBucketBase & {
1231
- key: Common.FieldValue;
1093
+ key: string;
1232
1094
  }
1233
1095
 
1234
1096
  export type SumAggregate = SingleMetricAggregateBase & Record<string, any>
@@ -1237,6 +1099,10 @@ export type SumAggregation = FormatMetricAggregationBase & Record<string, any>
1237
1099
 
1238
1100
  export type SumBucketAggregation = PipelineAggregationBase & Record<string, any>
1239
1101
 
1102
+ export type T = Record<string, any>
1103
+
1104
+ export type TBucket = Record<string, any>
1105
+
1240
1106
  export type TDigest = {
1241
1107
  compression?: number;
1242
1108
  }
@@ -1245,29 +1111,29 @@ export type TDigestPercentileRanksAggregate = PercentilesAggregateBase & Record<
1245
1111
 
1246
1112
  export type TDigestPercentilesAggregate = PercentilesAggregateBase & Record<string, any>
1247
1113
 
1248
- export type TermsAggregateBaseDoubleTermsBucket = MultiBucketAggregateBaseDoubleTermsBucket & {
1114
+ export type TermsAggregateBase = MultiBucketAggregateBase & {
1249
1115
  doc_count_error_upper_bound?: number;
1250
1116
  sum_other_doc_count?: number;
1251
1117
  }
1252
1118
 
1253
- export type TermsAggregateBaseLongTermsBucket = MultiBucketAggregateBaseLongTermsBucket & {
1254
- doc_count_error_upper_bound?: number;
1255
- sum_other_doc_count?: number;
1119
+ export type TermsAggregateBaseDoubleTermsBucket = TermsAggregateBase & {
1120
+ buckets?: Buckets & (Record<string, DoubleTermsBucket> | DoubleTermsBucket[]);
1256
1121
  }
1257
1122
 
1258
- export type TermsAggregateBaseMultiTermsBucket = MultiBucketAggregateBaseMultiTermsBucket & {
1259
- doc_count_error_upper_bound?: number;
1260
- sum_other_doc_count?: number;
1123
+ export type TermsAggregateBaseLongTermsBucket = TermsAggregateBase & {
1124
+ buckets?: Buckets & (Record<string, LongTermsBucket> | LongTermsBucket[]);
1261
1125
  }
1262
1126
 
1263
- export type TermsAggregateBaseStringTermsBucket = MultiBucketAggregateBaseStringTermsBucket & {
1264
- doc_count_error_upper_bound?: number;
1265
- sum_other_doc_count?: number;
1127
+ export type TermsAggregateBaseMultiTermsBucket = TermsAggregateBase & {
1128
+ buckets?: Buckets & (Record<string, MultiTermsBucket> | MultiTermsBucket[]);
1266
1129
  }
1267
1130
 
1268
- export type TermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & {
1269
- doc_count_error_upper_bound?: number;
1270
- sum_other_doc_count?: number;
1131
+ export type TermsAggregateBaseStringTermsBucket = TermsAggregateBase & {
1132
+ buckets?: Buckets & (Record<string, StringTermsBucket> | StringTermsBucket[]);
1133
+ }
1134
+
1135
+ export type TermsAggregateBaseVoid = TermsAggregateBase & {
1136
+ buckets?: Buckets & (Record<string, Common.Void> | Common.Void[]);
1271
1137
  }
1272
1138
 
1273
1139
  export type TermsAggregation = BucketAggregationBase & {
@@ -1331,27 +1197,8 @@ export type TopHitsAggregation = MetricAggregationBase & {
1331
1197
  version?: boolean;
1332
1198
  }
1333
1199
 
1334
- export type TopMetrics = {
1335
- metrics: Record<string, Common.FieldValue>;
1336
- sort: Common.FieldValue[];
1337
- }
1338
-
1339
- export type TopMetricsAggregate = AggregateBase & {
1340
- top: TopMetrics[];
1341
- }
1342
-
1343
- export type TopMetricsAggregation = MetricAggregationBase & {
1344
- metrics?: TopMetricsValue | TopMetricsValue[];
1345
- size?: number;
1346
- sort?: Common.Sort;
1347
- }
1348
-
1349
- export type TopMetricsValue = {
1350
- field: Common.Field;
1351
- }
1352
-
1353
1200
  export type TTestAggregate = AggregateBase & {
1354
- value: undefined | number | string;
1201
+ value: number | undefined;
1355
1202
  value_as_string?: string;
1356
1203
  }
1357
1204
 
@@ -1365,8 +1212,6 @@ export type TTestType = 'heteroscedastic' | 'homoscedastic' | 'paired'
1365
1212
 
1366
1213
  export type UnmappedRareTermsAggregate = MultiBucketAggregateBaseVoid & Record<string, any>
1367
1214
 
1368
- export type UnmappedSamplerAggregate = SingleBucketAggregateBase & Record<string, any>
1369
-
1370
1215
  export type UnmappedSignificantTermsAggregate = SignificantTermsAggregateBaseVoid & Record<string, any>
1371
1216
 
1372
1217
  export type UnmappedTermsAggregate = TermsAggregateBaseVoid & Record<string, any>