Skip to content

Commit 28b7877

Browse files
committed
fix violations
1 parent c8a175b commit 28b7877

File tree

67 files changed

+100
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+100
-104
lines changed

specification/_global/bulk/BulkRequest.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,5 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
246246
// This declaration captures action_and_meta_data (OperationContainer) and the two kinds of sources
247247
// that can follow: an update action for update operations and anything for index or create operations.
248248
// /!\ must be kept in sync with BulkMonitoringRequest
249-
body: Array<
250-
OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument
251-
>
249+
body: (OperationContainer | UpdateAction<TDocument, TPartialDocument> | TDocument)[]
252250
}

specification/_global/msearch/MultiSearchRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@ export interface Request extends RequestBase {
154154
typed_keys?: boolean
155155
}
156156
/** @codegen_name searches */
157-
body: Array<RequestItem>
157+
body: RequestItem[]
158158
}

specification/_global/msearch/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class MultisearchHeader {
5454

5555
export class MultiSearchResult<TDocument> {
5656
took: long
57-
responses: Array<ResponseItem<TDocument>>
57+
responses: ResponseItem<TDocument[]>
5858
}
5959

6060
/** @codegen_names result, failure */

specification/_global/msearch_template/MultiSearchTemplateRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,5 @@ export interface Request extends RequestBase {
124124
*
125125
* @codegen_name search_templates
126126
*/
127-
body: Array<RequestItem>
127+
body: RequestItem[]
128128
}

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export interface Request extends RequestBase {
450450
* A boost value between `0` and `1.0` decreases the score.
451451
* @ext_doc_id relevance-scores
452452
*/
453-
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
453+
indices_boost?: SingleKeyDictionary<IndexName, double[]>
454454
/**
455455
* An array of wildcard (`*`) field patterns.
456456
* The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
@@ -539,7 +539,7 @@ export interface Request extends RequestBase {
539539
* An array of wildcard (`*`) field patterns.
540540
* The request returns values for field names matching these patterns in the `hits.fields` property of the response.
541541
*/
542-
fields?: Array<FieldAndFormat>
542+
fields?: FieldAndFormat[]
543543
/**
544544
* Defines a suggester that provides similar looking terms based on a provided text.
545545
*/

specification/_global/search/_types/SearchRequestBody.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class SearchRequestBody {
8585
* A boost value between `0` and `1.0` decreases the score.
8686
* @ext_doc_id relevance-scores
8787
*/
88-
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
88+
indices_boost?: SingleKeyDictionary<IndexName, double[]>
8989
/**
9090
* An array of wildcard (`*`) field patterns.
9191
* The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
@@ -174,7 +174,7 @@ export class SearchRequestBody {
174174
* An array of wildcard (`*`) field patterns.
175175
* The request returns values for field names matching these patterns in the `hits.fields` property of the response.
176176
*/
177-
fields?: Array<FieldAndFormat>
177+
fields?: FieldAndFormat[]
178178
/**
179179
* Defines a suggester that provides similar looking terms based on a provided text.
180180
*/

specification/_types/Geo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class GeoLine {
5858
/** Always `"LineString"` */
5959
type: string
6060
/** Array of `[lon, lat]` coordinates */
61-
coordinates: Array<Array<double>>
61+
coordinates: double[][]
6262
}
6363

6464
export enum GeoShapeRelation {

specification/_types/aggregations/Aggregate.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class PercentilesAggregateBase extends AggregateBase {
155155
}
156156

157157
/** @codegen_names keyed, array */
158-
type Percentiles = KeyedPercentiles | Array<ArrayPercentilesItem>
158+
type Percentiles = KeyedPercentiles | ArrayPercentilesItem[]
159159

160160
// In keyed form, percentiles are represented as an object with 1 or 2 properties for each key:
161161
// <key_name>: double | null - always present (null means there were no values for this percentile)
@@ -368,7 +368,7 @@ export class GeoCentroidAggregate extends AggregateBase {
368368
// Note: not all aggregations support keys in their configuration, meaning they will never return the dictionary
369369
// variant. However we use this union for all aggregates to future-proof the spec if some key-less aggregations finally
370370
// add support for keys.
371-
export type Buckets<TBucket> = Dictionary<string, TBucket> | Array<TBucket>
371+
export type Buckets<TBucket> = Dictionary<string, TBucket> | TBucket[]
372372

373373
export class MultiBucketAggregateBase<TBucket> extends AggregateBase {
374374
buckets: Buckets<TBucket>
@@ -577,7 +577,7 @@ export class UnmappedRareTermsAggregate extends MultiBucketAggregateBase<Void> {
577577
export class MultiTermsAggregate extends TermsAggregateBase<MultiTermsBucket> {}
578578

579579
export class MultiTermsBucket extends MultiBucketBase {
580-
key: Array<FieldValue>
580+
key: FieldValue[]
581581
key_as_string?: string
582582
doc_count_error_upper_bound?: long
583583
}
@@ -904,7 +904,7 @@ export class TopMetricsAggregate extends AggregateBase {
904904

905905
export class TopMetrics {
906906
// Always contains a single element since `top_metrics` only accepts a single sort field
907-
sort: Array<FieldValue | null>
907+
sort: FieldValue | null[]
908908
metrics: Dictionary<string, FieldValue | null>
909909
}
910910

specification/_types/aggregations/bucket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class CompositeAggregation extends BucketAggregationBase {
145145
* The value sources used to build composite buckets.
146146
* Keys are returned in the order of the `sources` definition.
147147
*/
148-
sources?: Array<SingleKeyDictionary<string, CompositeAggregationSource>>
148+
sources?: SingleKeyDictionary<string, CompositeAggregationSource[]>
149149
}
150150

151151
/**

specification/async_search/submit/AsyncSearchSubmitRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export interface Request extends RequestBase {
217217
/**
218218
* Boosts the _score of documents from specified indices.
219219
*/
220-
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
220+
indices_boost?: SingleKeyDictionary<IndexName, double[]>
221221
/**
222222
* Array of wildcard (*) patterns. The request returns doc values for field
223223
* names matching these patterns in the hits.fields property of the response.
@@ -265,7 +265,7 @@ export interface Request extends RequestBase {
265265
* Array of wildcard (*) patterns. The request returns values for field names
266266
* matching these patterns in the hits.fields property of the response.
267267
*/
268-
fields?: Array<FieldAndFormat>
268+
fields?: FieldAndFormat[]
269269
suggest?: Suggester
270270
/**
271271
* Maximum number of documents to collect for each shard. If a query reaches this

0 commit comments

Comments
 (0)