Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions specification/_spec_utils/behaviors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,28 @@ export interface CommonCatQueryParameters {
* @server_default false
*/
v?: boolean
/**
* Sets the units for columns that contain a byte-size value.
* Note that byte-size value units work in terms of powers of 1024. For instance `1kb` means 1024 bytes, not 1000 bytes.
* If omitted, byte-size values are rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the numeric value of the column is as small as possible whilst still being at least `1.0`.
* If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit.
* Values that are not an exact multiple of the chosen unit are rounded down.
*/
bytes?: Bytes
/**
* Sets the units for columns that contain a size value which is not a byte-size value.
* If omitted, size values are rendered with a suffix such as `k`, `m`, or `g`, chosen such that the numeric value of the column is as small as possible whilst still being at least `1.0`.
* If given, size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit.
* Values that are not an exact multiple of the chosen unit are rounded down.
*/
size?: '' | 'k' | 'm' | 'g' | 't' | 'p'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with this one - it doesn't seem to be defined anywhere yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a new UnitSize enum in _types/common.ts next to Bytes.

/**
* Sets the units for columns that contain a time duration.
* If omitted, time duration values are rendered with a suffix such as `ms`, `s`, `m` or `h`, chosen such that the numeric value of the column is as small as possible whilst still being at least `1.0`.
* If given, time duration values are rendered as an integer with no suffix.
* Values that are not an exact multiple of the chosen unit are rounded down.
*/
time?: TimeUnit
}

/**
Expand Down
2 changes: 0 additions & 2 deletions specification/cat/allocation/CatAllocationRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export interface Request extends CatRequestBase {
node_id?: NodeIds
}
query_parameters: {
/** The unit used to display byte values. */
bytes?: Bytes
/**
* A comma-separated list of columns names to display. It supports simple wildcards.
*/
Expand Down
2 changes: 0 additions & 2 deletions specification/cat/fielddata/CatFielddataRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ export interface Request extends CatRequestBase {
fields?: Fields
}
query_parameters: {
/** The unit used to display byte values. */
bytes?: Bytes
/** Comma-separated list of fields used to limit returned information. */
fields?: Fields
/**
Expand Down
4 changes: 0 additions & 4 deletions specification/cat/health/CatHealthRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export interface Request extends CatRequestBase {
}
]
query_parameters: {
/**
* The unit used to display time values.
*/
time?: TimeUnit
/**
* If true, returns `HH:MM:SS` and Unix epoch timestamps.
* @server_default true
Expand Down
4 changes: 0 additions & 4 deletions specification/cat/indices/CatIndicesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export interface Request extends CatRequestBase {
index?: Indices
}
query_parameters: {
/** The unit used to display byte values. */
bytes?: Bytes
/**
* The type of index that wildcard patterns can match.
*/
Expand All @@ -88,8 +86,6 @@ export interface Request extends CatRequestBase {
* @server_default false
*/
pri?: boolean
/** The unit used to display time values. */
time?: TimeUnit
/**
* Period to wait for a connection to the master node.
* @server_default 30s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export interface Request extends CatRequestBase {
}
query_parameters: {
allow_no_match?: boolean
bytes?: Bytes
/**
* Comma-separated list of column names to display.
* @server_default create_time,id,state,type
Expand All @@ -62,9 +61,5 @@ export interface Request extends CatRequestBase {
* response.
*/
s?: CatDfaColumns
/**
* Unit used to display time values.
*/
time?: TimeUnit
}
}
4 changes: 0 additions & 4 deletions specification/cat/ml_datafeeds/CatDatafeedsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,5 @@ export interface Request extends CatRequestBase {
h?: CatDatafeedColumns
/** Comma-separated list of column names or column aliases used to sort the response. */
s?: CatDatafeedColumns
/**
* The unit used to display time values.
*/
time?: TimeUnit
}
}
8 changes: 0 additions & 8 deletions specification/cat/ml_jobs/CatJobsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,12 @@ export interface Request extends CatRequestBase {
* @server_default true
*/
allow_no_match?: boolean
/**
* The unit used to display byte values.
*/
bytes?: Bytes
/**
* Comma-separated list of column names to display.
* @server_default buckets.count,data.processed_records,forecasts.total,id,model.bytes,model.memory_status,state
*/
h?: CatAnomalyDetectorColumns
/** Comma-separated list of column names or column aliases used to sort the response. */
s?: CatAnomalyDetectorColumns
/**
* The unit used to display time values.
*/
time?: TimeUnit
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export interface Request extends CatRequestBase {
* @server_default true
*/
allow_no_match?: boolean
/** The unit used to display byte values. */
bytes?: Bytes
/** A comma-separated list of column names to display. */
h?: CatTrainedModelsColumns
/** A comma-separated list of column names or aliases used to sort the response. */
Expand All @@ -72,9 +70,5 @@ export interface Request extends CatRequestBase {
from?: integer
/** The maximum number of transforms to display. */
size?: integer
/**
* Unit used to display time values.
*/
time?: TimeUnit
}
}
8 changes: 0 additions & 8 deletions specification/cat/nodes/CatNodesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ export interface Request extends CatRequestBase {
}
]
query_parameters: {
/**
* The unit used to display byte values.
*/
bytes?: Bytes
/**
* If `true`, return the full node ID. If `false`, return the shortened node ID.
* @server_default false
Expand Down Expand Up @@ -71,9 +67,5 @@ export interface Request extends CatRequestBase {
* @server_default 30s
*/
master_timeout?: Duration
/**
* The unit used to display time values.
*/
time?: TimeUnit
}
}
4 changes: 0 additions & 4 deletions specification/cat/pending_tasks/CatPendingTasksRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,5 @@ export interface Request extends CatRequestBase {
* @server_default 30s
*/
master_timeout?: Duration
/**
* Unit used to display time values.
*/
time?: TimeUnit
}
}
8 changes: 0 additions & 8 deletions specification/cat/recovery/CatRecoveryRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ export interface Request extends CatRequestBase {
* @server_default false
*/
active_only?: boolean
/**
* The unit used to display byte values.
*/
bytes?: Bytes
/**
* If `true`, the response includes detailed information about shard recoveries.
* @server_default false
Expand All @@ -84,9 +80,5 @@ export interface Request extends CatRequestBase {
* or `:desc` as a suffix to the column name.
*/
s?: Names
/**
* The unit used to display time values.
*/
time?: TimeUnit
}
}
4 changes: 0 additions & 4 deletions specification/cat/segments/CatSegmentsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ export interface Request extends CatRequestBase {
index?: Indices
}
query_parameters: {
/**
* The unit used to display byte values.
*/
bytes?: Bytes
/**
* A comma-separated list of columns names to display.
* It supports simple wildcards.
Expand Down
8 changes: 0 additions & 8 deletions specification/cat/shards/CatShardsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ export interface Request extends CatRequestBase {
index?: Indices
}
query_parameters: {
/**
* The unit used to display byte values.
*/
bytes?: Bytes
/**
* List of columns to appear in the response. Supports simple wildcards.
*/
Expand All @@ -73,9 +69,5 @@ export interface Request extends CatRequestBase {
* @server_default 30s
*/
master_timeout?: Duration
/**
* The unit used to display time values.
*/
time?: TimeUnit
}
}
4 changes: 0 additions & 4 deletions specification/cat/snapshots/CatSnapshotsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,5 @@ export interface Request extends CatRequestBase {
* @server_default 30s
*/
master_timeout?: Duration
/**
* Unit used to display time values.
*/
time?: TimeUnit
}
}
4 changes: 0 additions & 4 deletions specification/cat/tasks/CatTasksRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export interface Request extends CatRequestBase {
* or `:desc` as a suffix to the column name.
*/
s?: Names
/**
* Unit used to display time values.
*/
time?: TimeUnit
/**
* Period to wait for a response.
* If no response is received before the timeout expires, the request fails and returns an error.
Expand Down
4 changes: 0 additions & 4 deletions specification/cat/thread_pool/CatThreadPoolRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ export interface Request extends CatRequestBase {
* or `:desc` as a suffix to the column name.
*/
s?: Names
/**
* The unit used to display time values.
*/
time?: TimeUnit
/**
* If `true`, the request computes the list of selected nodes from the
* local cluster state. If `false` the list of selected nodes are computed
Expand Down
4 changes: 0 additions & 4 deletions specification/cat/transforms/CatTransformsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ export interface Request extends CatRequestBase {
/** Comma-separated list of column names or column aliases used to sort the response.
*/
s?: CatTransformColumns
/**
* The unit used to display time values.
*/
time?: TimeUnit
/**
* The maximum number of transforms to obtain.
* @server_default 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export interface Request extends RequestBase {
* Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: TimeUnit
master_timeout?: Duration
/**
* Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
timeout?: TimeUnit
timeout?: Duration
}
}
2 changes: 1 addition & 1 deletion specification/shutdown/get_node/ShutdownGetNodeRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ export interface Request extends RequestBase {
* Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: TimeUnit
master_timeout?: Duration
}
}
4 changes: 2 additions & 2 deletions specification/shutdown/put_node/ShutdownPutNodeRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ export interface Request extends RequestBase {
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: TimeUnit
master_timeout?: Duration
/**
* The period to wait for a response.
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
timeout?: TimeUnit
timeout?: Duration
}
body: {
/**
Expand Down
Loading