Skip to content

Commit

Permalink
types.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Mar 14, 2024
1 parent 3ad8436 commit d90a044
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
5 changes: 2 additions & 3 deletions specification/security/query_api_keys/QueryApiKeysRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { APIKeyAggregationContainer } from 'APIKeyAggregationContainer'
import { APIKeyAggregationContainer } from './types'
import { RequestBase } from '@_types/Base'
import { integer } from '@_types/Numeric'
import { QueryContainer } from '@_types/query_dsl/abstractions'
import { Sort, SortResults } from '@_types/sort'
import { Sort, SortResults } from '@_types/sort'

/**
* Retrieves information for API keys in a paginated manner. You can optionally filter the results with a query.
Expand All @@ -35,7 +34,7 @@ import { Sort, SortResults } from '@_types/sort'
export interface Request extends RequestBase {
query_parameters: {
/**
* Return the snapshot of the owner user's role descriptors associated with the API key.
* Return the snapshot of the owner user's role descriptors associated with the API key.
* An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
* @availability stack since=8.5.0
* @availability serverless
Expand Down
36 changes: 1 addition & 35 deletions specification/security/query_api_keys/QueryApiKeysResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,7 @@ import { ApiKey } from '@security/_types/ApiKey'
import { integer } from '@_types/Numeric'
import { Dictionary } from '@spec_utils/Dictionary'
import { AggregateName } from '@_types/common'
import {
CardinalityAggregate,
ValueCountAggregate,
StringTermsAggregate,
LongTermsAggregate,
DoubleTermsAggregate,
UnmappedTermsAggregate,
MultiTermsAggregate,
MissingAggregate,
FilterAggregate,
RangeAggregate,
DateRangeAggregate,
FiltersAggregate,
CompositeAggregate,
} from '@_types/aggregations/Aggregate'
import { APIKeyAggregate } from './types'

export class Response {
body: {
Expand All @@ -57,23 +43,3 @@ export class Response {
aggregations?: Dictionary<AggregateName, APIKeyAggregate>
}
}

/**
* @variants external
* @non_exhaustive
*/
export type APIKeyAggregate =
| CardinalityAggregate
| ValueCountAggregate
| StringTermsAggregate
| LongTermsAggregate
| DoubleTermsAggregate
| UnmappedTermsAggregate
| MultiTermsAggregate
| MissingAggregate
| FilterAggregate
| FiltersAggregate
| RangeAggregate
| DateRangeAggregate
| CompositeAggregate

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ import {
CardinalityAggregation,
ValueCountAggregation,
} from '@_types/aggregations/metric'
import {
CardinalityAggregate,
ValueCountAggregate,
StringTermsAggregate,
LongTermsAggregate,
DoubleTermsAggregate,
UnmappedTermsAggregate,
MultiTermsAggregate,
MissingAggregate,
FilterAggregate,
RangeAggregate,
DateRangeAggregate,
FiltersAggregate,
CompositeAggregate,
} from '@_types/aggregations/Aggregate'

/**
* @variants container
Expand Down Expand Up @@ -91,3 +106,22 @@ export class APIKeyAggregationContainer {
*/
value_count?: ValueCountAggregation
}

/**
* @variants external
* @non_exhaustive
*/
export type APIKeyAggregate =
| CardinalityAggregate
| ValueCountAggregate
| StringTermsAggregate
| LongTermsAggregate
| DoubleTermsAggregate
| UnmappedTermsAggregate
| MultiTermsAggregate
| MissingAggregate
| FilterAggregate
| FiltersAggregate
| RangeAggregate
| DateRangeAggregate
| CompositeAggregate

0 comments on commit d90a044

Please sign in to comment.