@@ -295,7 +295,7 @@ export class DateRangeAggregation extends BucketAggregationBase {
295
295
/**
296
296
* Array of date ranges.
297
297
*/
298
- ranges ?: DateAggregationRange [ ]
298
+ ranges ?: DateRangeExpression [ ]
299
299
/**
300
300
* Time zone used to convert dates from another time zone to UTC.
301
301
*/
@@ -306,6 +306,33 @@ export class DateRangeAggregation extends BucketAggregationBase {
306
306
keyed ?: boolean
307
307
}
308
308
309
+ /**
310
+ * A date range limit, represented either as a DateMath expression or a number expressed
311
+ * according to the target field's precision.
312
+ *
313
+ * @codegen_names expr, value
314
+ */
315
+ // ES: DateRangeAggregationBuilder.innerBuild()
316
+ export type FieldDateMath = DateMath | double
317
+
318
+ export class DateRangeExpression {
319
+ /**
320
+ * Start of the range (inclusive).
321
+ */
322
+ from ?: FieldDateMath
323
+ /**
324
+ * Custom key to return the range with.
325
+ */
326
+ key ?: string
327
+ /**
328
+ * End of the range (exclusive).
329
+ */
330
+ to ?: FieldDateMath
331
+ }
332
+
333
+ /**
334
+ * @ext_doc_id search-aggregations-bucket-diversified-sampler-aggregation
335
+ */
309
336
export class DiversifiedSamplerAggregation extends BucketAggregationBase {
310
337
/**
311
338
* The type of value used for de-duplication.
@@ -661,48 +688,24 @@ export class RangeAggregation extends BucketAggregationBase {
661
688
format ?: string
662
689
}
663
690
664
- /**
665
- * @codegen_names untyped, date, number, term
666
- * @variants untagged untyped=_types.aggregations.UntypedAggregationRange
667
- */
668
- export type AggregationRange =
669
- | UntypedAggregationRange
670
- | DateAggregationRange
671
- | NumberAggregationRange
672
- | TermAggregationRange
673
-
674
- export class AggregationRangeBase < T > {
691
+ export class AggregationRange {
675
692
/**
676
693
* Start of the range (inclusive).
677
694
*/
678
- from ?: T
695
+ from ?: double | null
679
696
/**
680
697
* Custom key to return the range with.
681
698
*/
682
699
key ?: string
683
700
/**
684
701
* End of the range (exclusive).
685
702
*/
686
- to ?: T
703
+ to ?: double | null
687
704
}
688
705
689
- export class NumberAggregationRange extends AggregationRangeBase < double > { }
690
-
691
- export class TermAggregationRange extends AggregationRangeBase < string > { }
692
-
693
- export class UntypedAggregationRange extends AggregationRangeBase < UserDefinedValue > { }
694
-
695
- export class DateAggregationRange extends AggregationRangeBase < FieldDateMath > { }
696
-
697
706
/**
698
- * A date range limit, represented either as a DateMath expression or a number expressed
699
- * according to the target field's precision.
700
- *
701
- * @codegen_names expr, value
707
+ * @ext_doc_id search-aggregations-bucket-rare-terms-aggregation
702
708
*/
703
- // ES: DateRangeAggregationBuilder.innerBuild()
704
- export type FieldDateMath = DateMath | double
705
-
706
709
export class RareTermsAggregation extends BucketAggregationBase {
707
710
/**
708
711
* Terms that should be excluded from the aggregation.
0 commit comments