diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 3a46d6060d..8d7d1e7eec 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -62384,6 +62384,73 @@ } } }, + "cat._types.CatRecoveryColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "time", + "t", + "ti", + "primaryOrReplica", + "type", + "stage", + "st", + "source_host", + "shost", + "source_node", + "snode", + "target_host", + "thost", + "target_node", + "tnode", + "repository", + "tnode", + "snapshot", + "snap", + "files", + "f", + "files_recovered", + "fr", + "files_percent", + "fp", + "files_total", + "tf", + "bytes", + "b", + "bytes_recovered", + "br", + "bytes_percent", + "bp", + "bytes_total", + "tb", + "translog_ops", + "to", + "translog_ops_recovered", + "tor", + "translog_ops_percent", + "top", + "start_time", + "start", + "start_time_millis", + "start_millis", + "stop_time", + "stop", + "stop_time_millis", + "stop_millis" + ] + }, + { + "type": "string" + } + ] + }, "cat.recovery.RecoveryRecord": { "type": "object", "properties": { @@ -62497,6 +62564,40 @@ } } }, + "cat._types.CatSegmentsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "index", + "i", + "idx", + "shard", + "s", + "sh", + "prirep", + "p", + "pr", + "primaryOrReplica", + "ip", + "segment", + "generation", + "docs.count", + "docs.deleted", + "size", + "size.memory", + "committed", + "searchable", + "version", + "compound", + "id" + ] + }, + { + "type": "string" + } + ] + }, "cat.segments.SegmentsRecord": { "type": "object", "properties": { @@ -62911,6 +63012,62 @@ } } }, + "cat._types.CatSnapshotsColumns": { + "oneOf": [ + { + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumn" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/cat._types.CatNodeColumn" + } + } + ] + }, + "cat._types.CatSnapshotsColumn": { + "anyOf": [ + { + "type": "string", + "enum": [ + "id", + "snapshot", + "repository", + "re", + "repo", + "status", + "s", + "start_epoch", + "ste", + "startEpoch", + "start_time", + "sti", + "startTime", + "end_epoch", + "ete", + "endEpoch", + "end_time", + "eti", + "endTime", + "duration", + "dur", + "indices", + "i", + "successful_shards", + "ss", + "failed_shards", + "fs", + "total_shards", + "ts", + "reason", + "r" + ] + }, + { + "type": "string" + } + ] + }, "cat.snapshots.SnapshotsRecord": { "type": "object", "properties": { @@ -110053,17 +110210,17 @@ "cat.recovery-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatRecoveryColumn" }, "style": "form" }, "cat.recovery-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -110073,7 +110230,7 @@ "cat.recovery-time": { "in": "query", "name": "time", - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.TimeUnit" @@ -110104,17 +110261,17 @@ "cat.segments-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatSegmentsColumn" }, "style": "form" }, "cat.segments-s": { "in": "query", "name": "s", - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.Names" @@ -110226,10 +110383,10 @@ "cat.snapshots-h": { "in": "query", "name": "h", - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types.Names" + "$ref": "#/components/schemas/cat._types.CatSnapshotsColumns" }, "style": "form" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 70781edaf9..962961f00e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -99462,7 +99462,7 @@ "name": "CatDatafeedColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1015-L1015", + "specLocation": "cat/_types/CatBase.ts#L1284-L1284", "type": { "kind": "union_of", "items": [ @@ -99620,7 +99620,7 @@ "name": "CatDfaColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1014-L1014", + "specLocation": "cat/_types/CatBase.ts#L1283-L1283", "type": { "kind": "union_of", "items": [ @@ -100358,7 +100358,7 @@ "name": "CatNodeColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1016-L1016", + "specLocation": "cat/_types/CatBase.ts#L1285-L1285", "type": { "kind": "union_of", "items": [ @@ -100382,6 +100382,200 @@ ] } }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "i", + "idx" + ], + "description": "The name of the index.", + "name": "index" + }, + { + "aliases": [ + "s", + "sh" + ], + "description": "The name of the shard.", + "name": "shard" + }, + { + "aliases": [ + "t", + "ti", + "primaryOrReplica" + ], + "description": "The recovery time elasped.", + "name": "time" + }, + { + "description": "The type of recovery, from a peer or a snapshot.", + "name": "type" + }, + { + "aliases": [ + "st" + ], + "description": "The stage of the recovery. Returned values are: `INIT`, `INDEX`: recovery of lucene files, either reusing local ones are copying new ones, `VERIFY_INDEX`: potentially running check index, `TRANSLOG`: starting up the engine, replaying the translog, `FINALIZE`: performing final task after all translog ops have been done, `DONE`", + "name": "stage" + }, + { + "aliases": [ + "shost" + ], + "description": "The host address the index is moving from.", + "name": "source_host" + }, + { + "aliases": [ + "snode" + ], + "description": "The node name the index is moving from.", + "name": "source_node" + }, + { + "aliases": [ + "thost" + ], + "description": "The host address the index is moving to.", + "name": "target_host" + }, + { + "aliases": [ + "tnode" + ], + "description": "The node name the index is moving to.", + "name": "target_node" + }, + { + "aliases": [ + "tnode" + ], + "description": "The name of the repository being used. if not relevant 'n/a'.", + "name": "repository" + }, + { + "aliases": [ + "snap" + ], + "description": "The name of the snapshot being used. if not relevant 'n/a'.", + "name": "snapshot" + }, + { + "aliases": [ + "f" + ], + "description": "The total number of files to recover.", + "name": "files" + }, + { + "aliases": [ + "fr" + ], + "description": "The number of files currently recovered.", + "name": "files_recovered" + }, + { + "aliases": [ + "fp" + ], + "description": "The percentage of files currently recovered.", + "name": "files_percent" + }, + { + "aliases": [ + "tf" + ], + "description": "The total number of files.", + "name": "files_total" + }, + { + "aliases": [ + "b" + ], + "description": "The total number of bytes to recover.", + "name": "bytes" + }, + { + "aliases": [ + "br" + ], + "description": "Total number of bytes currently recovered.", + "name": "bytes_recovered" + }, + { + "aliases": [ + "bp" + ], + "description": "The percentage of bytes currently recovered.", + "name": "bytes_percent" + }, + { + "aliases": [ + "tb" + ], + "description": "The total number of bytes.", + "name": "bytes_total" + }, + { + "aliases": [ + "to" + ], + "description": "The total number of translog ops to recover.", + "name": "translog_ops" + }, + { + "aliases": [ + "tor" + ], + "description": "The total number of translog ops currently recovered.", + "name": "translog_ops_recovered" + }, + { + "aliases": [ + "top" + ], + "description": "The percentage of translog ops currently recovered.", + "name": "translog_ops_percent" + }, + { + "aliases": [ + "start" + ], + "description": "The start time of the recovery operation.", + "name": "start_time" + }, + { + "aliases": [ + "start_millis" + ], + "description": "The start time of the recovery operation in eopch milliseconds.", + "name": "start_time_millis" + }, + { + "aliases": [ + "stop" + ], + "description": "The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z'", + "name": "stop_time" + }, + { + "aliases": [ + "stop_millis" + ], + "description": "The end time of the recovery operation in eopch milliseconds. If ongoing '0'", + "name": "stop_time_millis" + } + ], + "name": { + "name": "CatRecoveryColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1014-L1145" + }, { "kind": "interface", "attachedBehaviors": [ @@ -100409,6 +100603,227 @@ "properties": [], "specLocation": "cat/_types/CatBase.ts#L28-L30" }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "i", + "idx" + ], + "description": "The name of the index.", + "name": "index" + }, + { + "aliases": [ + "s", + "sh" + ], + "description": "The name of the shard.", + "name": "shard" + }, + { + "aliases": [ + "p", + "pr", + "primaryOrReplica" + ], + "description": "The shard type. Returned values are 'primary' or 'replica'.", + "name": "prirep" + }, + { + "description": "IP address of the segment’s shard, such as '127.0.1.1'.", + "name": "ip" + }, + { + "description": "The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard.", + "name": "segment" + }, + { + "description": "Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name.", + "name": "generation" + }, + { + "description": "The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.", + "name": "docs.count" + }, + { + "description": "The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.", + "name": "docs.deleted" + }, + { + "description": "The disk space used by the segment, such as '50kb'.", + "name": "size" + }, + { + "description": "The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number.", + "name": "size.memory" + }, + { + "description": "If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.", + "name": "committed" + }, + { + "description": "If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable.", + "name": "searchable" + }, + { + "description": "The version of Lucene used to write the segment.", + "name": "version" + }, + { + "description": "If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.", + "name": "compound" + }, + { + "description": "The ID of the node, such as 'k0zy'.", + "name": "id" + } + ], + "name": { + "name": "CatSegmentsColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1147-L1212" + }, + { + "kind": "enum", + "isOpen": true, + "members": [ + { + "aliases": [ + "snapshot" + ], + "description": "The ID of the snapshot, such as 'snap1'.", + "name": "id" + }, + { + "aliases": [ + "re", + "repo" + ], + "description": "The name of the repository, such as 'repo1'.", + "name": "repository" + }, + { + "aliases": [ + "s" + ], + "description": "State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success.", + "name": "status" + }, + { + "aliases": [ + "ste", + "startEpoch" + ], + "description": "The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started.", + "name": "start_epoch" + }, + { + "aliases": [ + "sti", + "startTime" + ], + "description": "'HH:MM:SS' time at which the snapshot process started.", + "name": "start_time" + }, + { + "aliases": [ + "ete", + "endEpoch" + ], + "description": "The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended.", + "name": "end_epoch" + }, + { + "aliases": [ + "eti", + "endTime" + ], + "description": "'HH:MM:SS' time at which the snapshot process ended.", + "name": "end_time" + }, + { + "aliases": [ + "dur" + ], + "description": "The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units).", + "name": "duration" + }, + { + "aliases": [ + "i" + ], + "description": "The number of indices in the snapshot.", + "name": "indices" + }, + { + "aliases": [ + "ss" + ], + "description": "The number of successful shards in the snapshot.", + "name": "successful_shards" + }, + { + "aliases": [ + "fs" + ], + "description": "The number of failed shards in the snapshot.", + "name": "failed_shards" + }, + { + "aliases": [ + "ts" + ], + "description": "The total number of shards in the snapshot.", + "name": "total_shards" + }, + { + "aliases": [ + "r" + ], + "description": "The reason for any snapshot failures.", + "name": "reason" + } + ], + "name": { + "name": "CatSnapshotsColumn", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1214-L1281" + }, + { + "kind": "type_alias", + "name": { + "name": "CatSnapshotsColumns", + "namespace": "cat._types" + }, + "specLocation": "cat/_types/CatBase.ts#L1288-L1288", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CatSnapshotsColumn", + "namespace": "cat._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CatNodeColumn", + "namespace": "cat._types" + } + } + } + ] + } + }, { "kind": "enum", "members": [ @@ -100522,7 +100937,7 @@ "name": "CatTrainedModelsColumn", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1018-L1092" + "specLocation": "cat/_types/CatBase.ts#L1290-L1364" }, { "kind": "type_alias", @@ -100530,7 +100945,7 @@ "name": "CatTrainedModelsColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1093-L1095", + "specLocation": "cat/_types/CatBase.ts#L1365-L1367", "type": { "kind": "union_of", "items": [ @@ -100796,7 +101211,7 @@ "name": "CatTransformColumn", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1097-L1301" + "specLocation": "cat/_types/CatBase.ts#L1369-L1573" }, { "kind": "type_alias", @@ -100804,7 +101219,7 @@ "name": "CatTransformColumns", "namespace": "cat._types" }, - "specLocation": "cat/_types/CatBase.ts#L1302-L1302", + "specLocation": "cat/_types/CatBase.ts#L1574-L1574", "type": { "kind": "union_of", "items": [ @@ -110507,19 +110922,20 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatRecoveryColumn", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -110531,7 +110947,7 @@ } }, { - "description": "Unit used to display time values.", + "description": "The unit used to display time values.", "name": "time", "required": false, "type": { @@ -110543,7 +110959,7 @@ } } ], - "specLocation": "cat/recovery/CatRecoveryRequest.ts#L24-L90" + "specLocation": "cat/recovery/CatRecoveryRequest.ts#L24-L92" }, { "kind": "response", @@ -110837,19 +111253,20 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatSegmentsColumn", + "namespace": "cat._types" } } }, { - "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", + "description": "A comma-separated list of column names or aliases that determines the sort order.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", "required": false, "type": { @@ -110887,7 +111304,7 @@ } } ], - "specLocation": "cat/segments/CatSegmentsRequest.ts#L24-L85" + "specLocation": "cat/segments/CatSegmentsRequest.ts#L24-L87" }, { "kind": "response", @@ -112697,14 +113114,15 @@ } }, { - "description": "List of columns to appear in the response. Supports simple wildcards.", + "description": "A comma-separated list of columns names to display.\nIt supports simple wildcards.", "name": "h", "required": false, + "serverDefault": "ip,hp,rp,r,m,n,cpu,l", "type": { "kind": "instance_of", "type": { - "name": "Names", - "namespace": "_types" + "name": "CatSnapshotsColumns", + "namespace": "cat._types" } } }, @@ -112746,7 +113164,7 @@ } } ], - "specLocation": "cat/snapshots/CatSnapshotsRequest.ts#L24-L82" + "specLocation": "cat/snapshots/CatSnapshotsRequest.ts#L24-L84" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b8dc407502..070518d225 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -7161,9 +7161,17 @@ export type CatCatNodeColumn = 'build' | 'b' | 'completion.size' | 'cs' | 'compl export type CatCatNodeColumns = CatCatNodeColumn | CatCatNodeColumn[] +export type CatCatRecoveryColumn = 'index' | 'i' | 'idx' | 'shard' | 's' | 'sh' | 'time' | 't' | 'ti' | 'primaryOrReplica' | 'type' | 'stage' | 'st' | 'source_host' | 'shost' | 'source_node' | 'snode' | 'target_host' | 'thost' | 'target_node' | 'tnode' | 'repository' | 'tnode' | 'snapshot' | 'snap' | 'files' | 'f' | 'files_recovered' | 'fr' | 'files_percent' | 'fp' | 'files_total' | 'tf' | 'bytes' | 'b' | 'bytes_recovered' | 'br' | 'bytes_percent' | 'bp' | 'bytes_total' | 'tb' | 'translog_ops' | 'to' | 'translog_ops_recovered' | 'tor' | 'translog_ops_percent' | 'top' | 'start_time' | 'start' | 'start_time_millis' | 'start_millis' | 'stop_time' | 'stop' | 'stop_time_millis' | 'stop_millis'| string + export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters { } +export type CatCatSegmentsColumn = 'index' | 'i' | 'idx' | 'shard' | 's' | 'sh' | 'prirep' | 'p' | 'pr' | 'primaryOrReplica' | 'ip' | 'segment' | 'generation' | 'docs.count' | 'docs.deleted' | 'size' | 'size.memory' | 'committed' | 'searchable' | 'version' | 'compound' | 'id'| string + +export type CatCatSnapshotsColumn = 'id' | 'snapshot' | 'repository' | 're' | 'repo' | 'status' | 's' | 'start_epoch' | 'ste' | 'startEpoch' | 'start_time' | 'sti' | 'startTime' | 'end_epoch' | 'ete' | 'endEpoch' | 'end_time' | 'eti' | 'endTime' | 'duration' | 'dur' | 'indices' | 'i' | 'successful_shards' | 'ss' | 'failed_shards' | 'fs' | 'total_shards' | 'ts' | 'reason' | 'r'| string + +export type CatCatSnapshotsColumns = CatCatSnapshotsColumn | CatCatNodeColumn[] + export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'dfid' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v' export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[] @@ -8466,7 +8474,7 @@ export interface CatRecoveryRequest extends CatCatRequestBase { active_only?: boolean bytes?: Bytes detailed?: boolean - h?: Names + h?: CatCatRecoveryColumn s?: Names time?: TimeUnit } @@ -8492,7 +8500,7 @@ export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[] export interface CatSegmentsRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes - h?: Names + h?: CatCatSegmentsColumn s?: Names local?: boolean master_timeout?: Duration @@ -8771,7 +8779,7 @@ export interface CatShardsShardsRecord { export interface CatSnapshotsRequest extends CatCatRequestBase { repository?: Names ignore_unavailable?: boolean - h?: Names + h?: CatCatSnapshotsColumns s?: Names master_timeout?: Duration time?: TimeUnit diff --git a/specification/cat/_types/CatBase.ts b/specification/cat/_types/CatBase.ts index f27441f593..2f9fabd813 100644 --- a/specification/cat/_types/CatBase.ts +++ b/specification/cat/_types/CatBase.ts @@ -1011,9 +1011,281 @@ export enum CatNodeColumn { version } +/** @non_exhaustive */ +export enum CatRecoveryColumn { + /** + * The name of the index. + * @aliases i, idx + */ + index, + /** + * The name of the shard. + * @aliases s, sh + */ + shard, + /** + * The recovery time elasped. + * @aliases t, ti, primaryOrReplica + */ + time, + /** + * The type of recovery, from a peer or a snapshot. + */ + type, + /** + * The stage of the recovery. Returned values are: `INIT`, `INDEX`: recovery of lucene files, either reusing local ones are copying new ones, `VERIFY_INDEX`: potentially running check index, `TRANSLOG`: starting up the engine, replaying the translog, `FINALIZE`: performing final task after all translog ops have been done, `DONE` + * @aliases st + */ + stage, + /** + * The host address the index is moving from. + * @aliases shost + */ + 'source_host', + /** + * The node name the index is moving from. + * @aliases snode + */ + 'source_node', + /** + * The host address the index is moving to. + * @aliases thost + */ + 'target_host', + /** + * The node name the index is moving to. + * @aliases tnode + */ + 'target_node', + /** + * The name of the repository being used. if not relevant 'n/a'. + * @aliases tnode + */ + 'repository', + /** + * The name of the snapshot being used. if not relevant 'n/a'. + * @aliases snap + */ + snapshot, + /** + * The total number of files to recover. + * @aliases f + */ + files, + /** + * The number of files currently recovered. + * @aliases fr + */ + 'files_recovered', + /** + * The percentage of files currently recovered. + * @aliases fp + */ + 'files_percent', + /** + * The total number of files. + * @aliases tf + */ + 'files_total', + /** + * The total number of bytes to recover. + * @aliases b + */ + bytes, + /** + * Total number of bytes currently recovered. + * @aliases br + */ + 'bytes_recovered', + /** + * The percentage of bytes currently recovered. + * @aliases bp + */ + 'bytes_percent', + /** + * The total number of bytes. + * @aliases tb + */ + 'bytes_total', + /** + * The total number of translog ops to recover. + * @aliases to + */ + 'translog_ops', + /** + * The total number of translog ops currently recovered. + * @aliases tor + */ + 'translog_ops_recovered', + /** + * The percentage of translog ops currently recovered. + * @aliases top + */ + 'translog_ops_percent', + /** + * The start time of the recovery operation. + * @aliases start + */ + 'start_time', + /** + * The start time of the recovery operation in eopch milliseconds. + * @aliases start_millis + */ + 'start_time_millis', + /** + * The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z' + * @aliases stop + */ + 'stop_time', + /** + * The end time of the recovery operation in eopch milliseconds. If ongoing '0' + * @aliases stop_millis + */ + 'stop_time_millis' +} + +/** @non_exhaustive */ +export enum CatSegmentsColumn { + /** + * The name of the index. + * @aliases i, idx + */ + index, + /** + * The name of the shard. + * @aliases s, sh + */ + shard, + /** + * The shard type. Returned values are 'primary' or 'replica'. + * @aliases p, pr, primaryOrReplica + */ + prirep, + /** + * IP address of the segment’s shard, such as '127.0.1.1'. + */ + ip, + /** + * The name of the segment, such as '_0'. The segment name is derived from the segment generation and used internally to create file names in the directory of the shard. + */ + segment, + /** + * Generation number, such as '0'. Elasticsearch increments this generation number for each segment written. Elasticsearch then uses this number to derive the segment name. + */ + generation, + /** + * The number of documents as reported by Lucene. This excludes deleted documents and counts any [nested documents](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/nested) separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment. + */ + 'docs.count', + /** + * The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the [automatic merge process](https://www.elastic.co/docs/reference/elasticsearch/index-settings/merge) if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard. + */ + 'docs.deleted', + /** + * The disk space used by the segment, such as '50kb'. + */ + size, + /** + * The bytes of segment data stored in memory for efficient search, such as '1264'. A value of '-1' indicates Elasticsearch was unable to compute this number. + */ + 'size.memory', + /** + * If 'true', the segments is synced to disk. Segments that are synced can survive a hard reboot. If 'false', the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start. + */ + committed, + /** + * If 'true', the segment is searchable. If 'false', the segment has most likely been written to disk but needs a [refresh](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh) to be searchable. + */ + searchable, + /** + * The version of Lucene used to write the segment. + */ + version, + /** + * If 'true', the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors. + */ + compound, + /** + * The ID of the node, such as 'k0zy'. + */ + id +} + +/** @non_exhaustive */ +export enum CatSnapshotsColumn { + /** + * The ID of the snapshot, such as 'snap1'. + * @aliases snapshot + */ + id, + /** + * The name of the repository, such as 'repo1'. + * @aliases re, repo + */ + repository, + /** + * State of the snapshot process. Returned values are: 'FAILED': The snapshot process failed. 'INCOMPATIBLE': The snapshot process is incompatible with the current cluster version. 'IN_PROGRESS': The snapshot process started but has not completed. 'PARTIAL': The snapshot process completed with a partial success. 'SUCCESS': The snapshot process completed with a full success. + * @aliases s + */ + status, + /** + * The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process started. + * @aliases ste, startEpoch + */ + 'start_epoch', + /** + * 'HH:MM:SS' time at which the snapshot process started. + * @aliases sti, startTime + */ + 'start_time', + /** + * The [unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the snapshot process ended. + * @aliases ete, endEpoch + */ + 'end_epoch', + /** + * 'HH:MM:SS' time at which the snapshot process ended. + * @aliases eti, endTime + */ + 'end_time', + /** + * The time it took the snapshot process to complete in [time units](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units). + * @aliases dur + */ + duration, + /** + * The number of indices in the snapshot. + * @aliases i + */ + indices, + /** + * The number of successful shards in the snapshot. + * @aliases ss + */ + 'successful_shards', + /** + * The number of failed shards in the snapshot. + * @aliases fs + */ + 'failed_shards', + /** + * The total number of shards in the snapshot. + * @aliases ts + */ + 'total_shards', + /** + * The reason for any snapshot failures. + * @aliases r + */ + reason +} + export type CatDfaColumns = CatDfaColumn | CatDfaColumn[] export type CatDatafeedColumns = CatDatafeedColumn | CatDatafeedColumn[] export type CatNodeColumns = CatNodeColumn | CatNodeColumn[] +export type CatRecoveryColumns = CatRecoveryColumn | CatRecoveryColumn[] +export type CatSegmentsColumns = CatSegmentsColumn | CatSegmentsColumn[] +export type CatSnapshotsColumns = CatSnapshotsColumn | CatNodeColumn[] export enum CatTrainedModelsColumn { /** diff --git a/specification/cat/recovery/CatRecoveryRequest.ts b/specification/cat/recovery/CatRecoveryRequest.ts index 368bfdb969..6ee0ebb8c5 100644 --- a/specification/cat/recovery/CatRecoveryRequest.ts +++ b/specification/cat/recovery/CatRecoveryRequest.ts @@ -19,7 +19,7 @@ import { Bytes, Indices, Names } from '@_types/common' import { TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRecoveryColumns, CatRequestBase } from '@cat/_types/CatBase' /** * Get shard recovery information. @@ -73,17 +73,19 @@ export interface Request extends CatRequestBase { */ index?: Indices /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatRecoveryColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ s?: Names /** - * Unit used to display time values. + * The unit used to display time values. */ time?: TimeUnit } diff --git a/specification/cat/segments/CatSegmentsRequest.ts b/specification/cat/segments/CatSegmentsRequest.ts index 1a2987901c..9bdb64e5c0 100644 --- a/specification/cat/segments/CatSegmentsRequest.ts +++ b/specification/cat/segments/CatSegmentsRequest.ts @@ -19,7 +19,7 @@ import { Bytes, Indices, Names } from '@_types/common' import { Duration } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatSegmentsColumns } from '@cat/_types/CatBase' /** * Get segment information. @@ -59,11 +59,13 @@ export interface Request extends CatRequestBase { */ bytes?: Bytes /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatSegmentsColumns /** - * List of columns that determine how the table should be sorted. + * A comma-separated list of column names or aliases that determines the sort order. * Sorting defaults to ascending and can be changed by setting `:asc` * or `:desc` as a suffix to the column name. */ diff --git a/specification/cat/snapshots/CatSnapshotsRequest.ts b/specification/cat/snapshots/CatSnapshotsRequest.ts index e077b39ecc..7d0461353e 100644 --- a/specification/cat/snapshots/CatSnapshotsRequest.ts +++ b/specification/cat/snapshots/CatSnapshotsRequest.ts @@ -19,7 +19,7 @@ import { Names } from '@_types/common' import { Duration, TimeUnit } from '@_types/Time' -import { CatRequestBase } from '@cat/_types/CatBase' +import { CatRequestBase, CatSnapshotsColumns } from '@cat/_types/CatBase' /** * Get snapshot information. @@ -60,9 +60,11 @@ export interface Request extends CatRequestBase { */ ignore_unavailable?: boolean /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. + * It supports simple wildcards. + * @server_default ip,hp,rp,r,m,n,cpu,l */ - h?: Names + h?: CatSnapshotsColumns /** * List of columns that determine how the table should be sorted. * Sorting defaults to ascending and can be changed by setting `:asc`