|
| 1 | +/* |
| 2 | + * Licensed to Elasticsearch B.V. under one or more contributor |
| 3 | + * license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright |
| 5 | + * ownership. Elasticsearch B.V. licenses this file to you under |
| 6 | + * the Apache License, Version 2.0 (the "License"); you may |
| 7 | + * not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +import { Dictionary } from '@spec_utils/Dictionary' |
| 21 | +import { Metadata } from '@_types/common' |
| 22 | +import { QueryContainer } from '@_types/query_dsl/abstractions' |
| 23 | +import { |
| 24 | + CompositeAggregation, |
| 25 | + DateRangeAggregation, |
| 26 | + FiltersAggregation, |
| 27 | + MissingAggregation, |
| 28 | + RangeAggregation, |
| 29 | + TermsAggregation |
| 30 | +} from '@_types/aggregations/bucket' |
| 31 | +import { |
| 32 | + CardinalityAggregation, |
| 33 | + ValueCountAggregation |
| 34 | +} from '@_types/aggregations/metric' |
| 35 | +import { |
| 36 | + CardinalityAggregate, |
| 37 | + ValueCountAggregate, |
| 38 | + StringTermsAggregate, |
| 39 | + LongTermsAggregate, |
| 40 | + DoubleTermsAggregate, |
| 41 | + UnmappedTermsAggregate, |
| 42 | + MultiTermsAggregate, |
| 43 | + MissingAggregate, |
| 44 | + FilterAggregate, |
| 45 | + RangeAggregate, |
| 46 | + DateRangeAggregate, |
| 47 | + FiltersAggregate, |
| 48 | + CompositeAggregate |
| 49 | +} from '@_types/aggregations/Aggregate' |
| 50 | + |
| 51 | +/** |
| 52 | + * @variants container |
| 53 | + * @non_exhaustive |
| 54 | + */ |
| 55 | +export class APIKeyAggregationContainer { |
| 56 | + /** |
| 57 | + * Sub-aggregations for this aggregation. |
| 58 | + * Only applies to bucket aggregations. |
| 59 | + * @variant container_property |
| 60 | + * @aliases aggs |
| 61 | + */ |
| 62 | + aggregations?: Dictionary<string, APIKeyAggregationContainer> |
| 63 | + /** |
| 64 | + * @variant container_property |
| 65 | + */ |
| 66 | + meta?: Metadata |
| 67 | + /** |
| 68 | + * A single-value metrics aggregation that calculates an approximate count of distinct values. |
| 69 | + * @doc_id search-aggregations-metrics-cardinality-aggregation |
| 70 | + */ |
| 71 | + cardinality?: CardinalityAggregation |
| 72 | + /** |
| 73 | + * A multi-bucket aggregation that creates composite buckets from different sources. |
| 74 | + * Unlike the other multi-bucket aggregations, you can use the `composite` aggregation to paginate *all* buckets from a multi-level aggregation efficiently. |
| 75 | + */ |
| 76 | + composite?: CompositeAggregation |
| 77 | + /** |
| 78 | + * A multi-bucket value source based aggregation that enables the user to define a set of date ranges - each representing a bucket. |
| 79 | + * @doc_id search-aggregations-bucket-daterange-aggregation |
| 80 | + */ |
| 81 | + date_range?: DateRangeAggregation |
| 82 | + /** |
| 83 | + * A single bucket aggregation that narrows the set of documents to those that match a query. |
| 84 | + * @doc_id search-aggregations-bucket-filter-aggregation |
| 85 | + */ |
| 86 | + filter?: QueryContainer |
| 87 | + /** |
| 88 | + * A multi-bucket aggregation where each bucket contains the documents that match a query. |
| 89 | + * @doc_id search-aggregations-bucket-filters-aggregation |
| 90 | + */ |
| 91 | + filters?: FiltersAggregation |
| 92 | + missing?: MissingAggregation |
| 93 | + /** |
| 94 | + * A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket. |
| 95 | + * @doc_id search-aggregations-bucket-range-aggregation |
| 96 | + */ |
| 97 | + range?: RangeAggregation |
| 98 | + /** |
| 99 | + * A multi-bucket value source based aggregation where buckets are dynamically built - one per unique value. |
| 100 | + * @doc_id search-aggregations-bucket-terms-aggregation |
| 101 | + */ |
| 102 | + terms?: TermsAggregation |
| 103 | + /** |
| 104 | + * A single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents. |
| 105 | + * @doc_id search-aggregations-metrics-valuecount-aggregation |
| 106 | + */ |
| 107 | + value_count?: ValueCountAggregation |
| 108 | +} |
| 109 | + |
| 110 | +/** |
| 111 | + * @variants external |
| 112 | + * @non_exhaustive |
| 113 | + */ |
| 114 | +export type APIKeyAggregate = |
| 115 | + | CardinalityAggregate |
| 116 | + | ValueCountAggregate |
| 117 | + | StringTermsAggregate |
| 118 | + | LongTermsAggregate |
| 119 | + | DoubleTermsAggregate |
| 120 | + | UnmappedTermsAggregate |
| 121 | + | MultiTermsAggregate |
| 122 | + | MissingAggregate |
| 123 | + | FilterAggregate |
| 124 | + | FiltersAggregate |
| 125 | + | RangeAggregate |
| 126 | + | DateRangeAggregate |
| 127 | + | CompositeAggregate |
0 commit comments