From bc1ac278102f6086198cf2be89f3deb503b500df Mon Sep 17 00:00:00 2001 From: Szymon Bialkowski Date: Fri, 8 Aug 2025 13:55:51 +0100 Subject: [PATCH 1/3] Add created_date and modified_date to entities --- output/openapi/elasticsearch-openapi.json | 56 ++- .../elasticsearch-serverless-openapi.json | 56 ++- output/schema/schema.json | 346 ++++++++++++++++-- output/typescript/types.ts | 16 +- specification/_types/Time.ts | 5 +- .../cluster/_types/ComponentTemplate.ts | 25 ++ .../GetComponentTemplateResponseExample1.yaml | 15 + specification/indices/_types/IndexTemplate.ts | 25 ++ .../GetIndexTemplateResponseExample1.yaml | 17 + specification/ingest/_types/Pipeline.ts | 25 ++ .../GetPipelineResponseExample1.yaml | 8 +- 11 files changed, 561 insertions(+), 33 deletions(-) create mode 100644 specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml create mode 100644 specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 80d0bc2cf3..a76c02dbf5 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -56183,13 +56183,17 @@ "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.DateString" }, { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } ] }, + "_types.DateString": { + "description": "Date and time in ISO 8601 format", + "type": "string" + }, "async_search.status.StatusResponseBase": { "allOf": [ { @@ -76183,6 +76187,18 @@ }, "deprecated": { "type": "boolean" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -86387,6 +86403,18 @@ }, "ignore_missing_component_templates": { "$ref": "#/components/schemas/_types.Names" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -91330,6 +91358,18 @@ }, "_meta": { "$ref": "#/components/schemas/_types.Metadata" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } } }, @@ -112128,6 +112168,12 @@ "required": [ "component_templates" ] + }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } } } } @@ -112829,6 +112875,12 @@ "required": [ "index_templates" ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } } } } @@ -113357,7 +113409,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 4fc2e73457..d2342573e9 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -32815,13 +32815,17 @@ "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/_types.DateString" }, { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } ] }, + "_types.DateString": { + "description": "Date and time in ISO 8601 format", + "type": "string" + }, "async_search.status.StatusResponseBase": { "allOf": [ { @@ -43499,6 +43503,18 @@ }, "deprecated": { "type": "boolean" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -55257,6 +55273,18 @@ }, "ignore_missing_component_templates": { "$ref": "#/components/schemas/_types.Names" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -58440,6 +58468,18 @@ }, "_meta": { "$ref": "#/components/schemas/_types.Metadata" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateString" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } } }, @@ -68264,6 +68304,12 @@ "required": [ "component_templates" ] + }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } } } } @@ -68630,6 +68676,12 @@ "required": [ "index_templates" ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } } } } @@ -68885,7 +68937,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index d01863d2ff..95cb9220f3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -51093,7 +51093,7 @@ "name": "DateFormat", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L49-L50", + "specLocation": "_types/Time.ts#L52-L53", "type": { "kind": "instance_of", "type": { @@ -51108,7 +51108,23 @@ "name": "DateMath", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L42-L42", + "specLocation": "_types/Time.ts#L45-L45", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "kind": "type_alias", + "description": "Date and time in ISO 8601 format", + "name": { + "name": "DateString", + "namespace": "_types" + }, + "specLocation": "_types/Time.ts#L29-L30", "type": { "kind": "instance_of", "type": { @@ -51131,8 +51147,8 @@ { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "DateString", + "namespace": "_types" } }, { @@ -51282,7 +51298,7 @@ "name": "Duration", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L52-L58", + "specLocation": "_types/Time.ts#L55-L61", "type": { "kind": "union_of", "items": [ @@ -51311,7 +51327,7 @@ "name": "DurationLarge", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L60-L65", + "specLocation": "_types/Time.ts#L63-L68", "type": { "kind": "instance_of", "type": { @@ -51332,7 +51348,7 @@ "name": "DurationValue", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L67-L67", + "specLocation": "_types/Time.ts#L70-L70", "type": { "kind": "instance_of", "type": { @@ -51536,7 +51552,7 @@ "name": "EpochTime", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L40-L40", + "specLocation": "_types/Time.ts#L43-L43", "type": { "kind": "instance_of", "type": { @@ -58439,7 +58455,7 @@ "name": "TimeOfDay", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L44-L45", + "specLocation": "_types/Time.ts#L47-L48", "type": { "kind": "instance_of", "type": { @@ -58484,7 +58500,7 @@ "name": "TimeUnit", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L69-L77" + "specLocation": "_types/Time.ts#L72-L80" }, { "kind": "type_alias", @@ -58492,7 +58508,7 @@ "name": "TimeZone", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L47-L47", + "specLocation": "_types/Time.ts#L50-L50", "type": { "kind": "instance_of", "type": { @@ -58772,7 +58788,7 @@ "name": "UnitFloatMillis", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L37-L38", + "specLocation": "_types/Time.ts#L40-L41", "type": { "kind": "instance_of", "type": { @@ -58788,7 +58804,7 @@ "name": "UnitMillis", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L33-L34", + "specLocation": "_types/Time.ts#L36-L37", "type": { "kind": "instance_of", "type": { @@ -58804,7 +58820,7 @@ "name": "UnitNanos", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L35-L36", + "specLocation": "_types/Time.ts#L38-L39", "type": { "kind": "instance_of", "type": { @@ -58820,7 +58836,7 @@ "name": "UnitSeconds", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L29-L30", + "specLocation": "_types/Time.ts#L32-L33", "type": { "kind": "instance_of", "type": { @@ -120195,7 +120211,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L28-L31" + "specLocation": "cluster/_types/ComponentTemplate.ts#L29-L32" }, { "kind": "interface", @@ -120249,9 +120265,99 @@ "namespace": "_builtins" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L33-L42" + "specLocation": "cluster/_types/ComponentTemplate.ts#L34-L67" }, { "kind": "interface", @@ -120392,7 +120498,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L44-L61" + "specLocation": "cluster/_types/ComponentTemplate.ts#L69-L86" }, { "kind": "interface", @@ -122217,6 +122323,12 @@ } ] }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "cluster.get_component_template" @@ -147652,9 +147764,99 @@ "namespace": "_types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L29-L82" + "specLocation": "indices/_types/IndexTemplate.ts#L30-L107" }, { "kind": "interface", @@ -147690,7 +147892,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L84-L95" + "specLocation": "indices/_types/IndexTemplate.ts#L109-L120" }, { "kind": "interface", @@ -147799,7 +148001,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L97-L124" + "specLocation": "indices/_types/IndexTemplate.ts#L122-L149" }, { "kind": "interface", @@ -156863,6 +157065,12 @@ } ] }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "indices.get_index_template" @@ -181792,9 +182000,99 @@ "namespace": "_types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "ingest/_types/Pipeline.ts#L23-L51" + "specLocation": "ingest/_types/Pipeline.ts#L24-L76" }, { "kind": "interface", @@ -181843,7 +182141,7 @@ } } ], - "specLocation": "ingest/_types/Pipeline.ts#L67-L81" + "specLocation": "ingest/_types/Pipeline.ts#L92-L106" }, { "kind": "interface", @@ -184897,7 +185195,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" } }, "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 33cdb98b8d..6f3e5b6b1b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2263,7 +2263,9 @@ export type DateFormat = string export type DateMath = string -export type DateTime = string | EpochTime +export type DateString = string + +export type DateTime = DateString | EpochTime export type Distance = string @@ -9346,6 +9348,10 @@ export interface ClusterComponentTemplateNode { version?: VersionNumber _meta?: Metadata deprecated?: boolean + created_date?: DateString + created_date_millis?: EpochTime + modified_date?: DateString + modified_date_millis?: EpochTime } export interface ClusterComponentTemplateSummary { @@ -11911,6 +11917,10 @@ export interface IndicesIndexTemplate { data_stream?: IndicesIndexTemplateDataStreamConfiguration deprecated?: boolean ignore_missing_component_templates?: Names + created_date?: DateString + created_date_millis?: EpochTime + modified_date?: DateString + modified_date_millis?: EpochTime } export interface IndicesIndexTemplateDataStreamConfiguration { @@ -15098,6 +15108,10 @@ export interface IngestPipeline { version?: VersionNumber deprecated?: boolean _meta?: Metadata + created_date?: DateString + created_date_millis?: EpochTime + modified_date?: DateString + modified_date_millis?: EpochTime } export interface IngestPipelineConfig { diff --git a/specification/_types/Time.ts b/specification/_types/Time.ts index a957c95163..d9ac4be756 100644 --- a/specification/_types/Time.ts +++ b/specification/_types/Time.ts @@ -24,7 +24,10 @@ import { double, long } from './Numeric' * number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string * representation. */ -export type DateTime = string | EpochTime +export type DateTime = DateString | EpochTime + +/** Date and time in ISO 8601 format */ +export type DateString = string /** Time unit for seconds */ export type UnitSeconds = long diff --git a/specification/cluster/_types/ComponentTemplate.ts b/specification/cluster/_types/ComponentTemplate.ts index 2c9c497157..bf9afdf6a2 100644 --- a/specification/cluster/_types/ComponentTemplate.ts +++ b/specification/cluster/_types/ComponentTemplate.ts @@ -19,6 +19,7 @@ import { IndexName, Metadata, Name, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' +import { DateString, EpochTime, UnitMillis } from '@_types/Time' import { AliasDefinition } from '@indices/_types/AliasDefinition' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' @@ -39,6 +40,30 @@ export class ComponentTemplateNode { * @server_default false */ deprecated?: boolean + /** + * Date and time when the component template was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateString + /** + * Date and time when the component template was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the component template was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateString + /** + * Date and time when the component template was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } export class ComponentTemplateSummary { diff --git a/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml new file mode 100644 index 0000000000..435409d2cb --- /dev/null +++ b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml @@ -0,0 +1,15 @@ +# summary: +description: A successful response for retrieving information about a component template. +# type: response +# response_code: 200 +value: + "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n\ + \ \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n\ + \ \"description\" : \"my custom component template\"\n },\n \"template\" : {\n\ + \ \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n\ + \ }\n },\n \"mappings\" : {\n \"properties\" : {\n\ + \ \"@timestamp\" : {\n \"type\" : \"date\"\n },\n\ + \ \"message\" : {\n \"type\" : \"text\"\n }\n\ + \ }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 11bc360164..f28676cd06 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -20,6 +20,7 @@ import { IndexName, Metadata, Name, Names, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' import { long } from '@_types/Numeric' +import { DateString, EpochTime, UnitMillis } from '@_types/Time' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' import { Dictionary } from '@spec_utils/Dictionary' @@ -79,6 +80,30 @@ export class IndexTemplate { * @availability serverless */ ignore_missing_component_templates?: Names + /** + * Date and time when the index template was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateString + /** + * Date and time when the index template was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateString + /** + * Date and time when the index template was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } export class IndexTemplateDataStreamConfiguration { diff --git a/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml new file mode 100644 index 0000000000..17f7e8961a --- /dev/null +++ b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml @@ -0,0 +1,17 @@ +# summary: +description: A successful response for retrieving information about an index template. +# type: response +# response_code: 200 +value: + "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n\ + \ \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n\ + \ \"template\" : {\n \"settings\" : {\n \"index\" : {\n\ + \ \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n\ + \ }\n },\n \"mappings\" : {\n \"properties\" : {\n\ + \ \"@timestamp\" : {\n \"type\" : \"date\"\n },\n\ + \ \"message\" : {\n \"type\" : \"text\"\n }\n\ + \ }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n\ + \ \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n\ + \ \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" diff --git a/specification/ingest/_types/Pipeline.ts b/specification/ingest/_types/Pipeline.ts index f82aee8472..89170c2e20 100644 --- a/specification/ingest/_types/Pipeline.ts +++ b/specification/ingest/_types/Pipeline.ts @@ -18,6 +18,7 @@ */ import { Metadata, VersionNumber } from '@_types/common' +import { DateString, EpochTime, UnitMillis } from '@_types/Time' import { ProcessorContainer } from './Processors' export class Pipeline { @@ -48,6 +49,30 @@ export class Pipeline { * Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. */ _meta?: Metadata + /** + * Date and time when the pipeline was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateString + /** + * Date and time when the pipeline was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the pipeline was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateString + /** + * Date and time when the pipeline was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } // Unused .. but let's keep it for now diff --git a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml index 2cbf23f0df..ac88712958 100644 --- a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml +++ b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml @@ -4,6 +4,8 @@ description: A successful response for retrieving information about an ingest pi # response_code: 200 value: "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n\ - \ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n\ - \ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n \ - \ }\n ]\n }\n}" + \ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \ + \ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n\ + \ ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\"\ + \ : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\"\ + \ : 1704110400000\n }\n}" From 085b207f164a88979ae3c5f162d1e0254b9673c7 Mon Sep 17 00:00:00 2001 From: Szymon Bialkowski Date: Fri, 8 Aug 2025 14:19:05 +0100 Subject: [PATCH 2/3] i'm not too sure that was a clever move --- .../200_response/GetComponentTemplateResponseExample1.yaml | 6 +++--- .../200_response/GetIndexTemplateResponseExample1.yaml | 6 +++--- .../examples/200_response/GetPipelineResponseExample1.yaml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml index 435409d2cb..0b7d54be28 100644 --- a/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml +++ b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml @@ -10,6 +10,6 @@ value: \ }\n },\n \"mappings\" : {\n \"properties\" : {\n\ \ \"@timestamp\" : {\n \"type\" : \"date\"\n },\n\ \ \"message\" : {\n \"type\" : \"text\"\n }\n\ - \ }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n\ - \ \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n\ - \ \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + \ }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" diff --git a/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml index 17f7e8961a..172b384179 100644 --- a/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml +++ b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml @@ -12,6 +12,6 @@ value: \ \"message\" : {\n \"type\" : \"text\"\n }\n\ \ }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n\ \ \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n\ - \ \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n\ - \ \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n\ - \ \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + \ \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" diff --git a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml index ac88712958..bbdefadf87 100644 --- a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml +++ b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml @@ -6,6 +6,6 @@ value: "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n\ \ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \ \ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n\ - \ ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\"\ - \ : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\"\ - \ : 1704110400000\n }\n}" + \ ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\"\ + \ : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\"\ + \ : 1735732800000\n }\n}" From 0593210b591fdae69b3af7e1c27af1d42d7b2979 Mon Sep 17 00:00:00 2001 From: Szymon Bialkowski Date: Tue, 12 Aug 2025 14:42:42 +0200 Subject: [PATCH 3/3] move to DateTime --- output/openapi/elasticsearch-openapi.json | 24 +++---- .../elasticsearch-serverless-openapi.json | 24 +++---- output/schema/schema.json | 64 +++++++------------ output/typescript/types.ts | 16 ++--- specification/_types/Time.ts | 5 +- .../cluster/_types/ComponentTemplate.ts | 6 +- specification/indices/_types/IndexTemplate.ts | 6 +- specification/ingest/_types/Pipeline.ts | 6 +- 8 files changed, 61 insertions(+), 90 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index a76c02dbf5..347ff1d340 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -56183,17 +56183,13 @@ "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", "oneOf": [ { - "$ref": "#/components/schemas/_types.DateString" + "type": "string" }, { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } ] }, - "_types.DateString": { - "description": "Date and time in ISO 8601 format", - "type": "string" - }, "async_search.status.StatusResponseBase": { "allOf": [ { @@ -76189,13 +76185,13 @@ "type": "boolean" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -86405,13 +86401,13 @@ "$ref": "#/components/schemas/_types.Names" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -91360,13 +91356,13 @@ "$ref": "#/components/schemas/_types.Metadata" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -112172,7 +112168,7 @@ "examples": { "GetComponentTemplateResponseExample1": { "description": "A successful response for retrieving information about a component template.", - "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } @@ -112879,7 +112875,7 @@ "examples": { "GetIndexTemplateResponseExample1": { "description": "A successful response for retrieving information about an index template.", - "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } @@ -113409,7 +113405,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index d2342573e9..eef8b0b4ff 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -32815,17 +32815,13 @@ "description": "A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a\nnumber of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string\nrepresentation.", "oneOf": [ { - "$ref": "#/components/schemas/_types.DateString" + "type": "string" }, { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } ] }, - "_types.DateString": { - "description": "Date and time in ISO 8601 format", - "type": "string" - }, "async_search.status.StatusResponseBase": { "allOf": [ { @@ -43505,13 +43501,13 @@ "type": "boolean" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -55275,13 +55271,13 @@ "$ref": "#/components/schemas/_types.Names" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -58470,13 +58466,13 @@ "$ref": "#/components/schemas/_types.Metadata" }, "created_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "created_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" }, "modified_date": { - "$ref": "#/components/schemas/_types.DateString" + "$ref": "#/components/schemas/_types.DateTime" }, "modified_date_millis": { "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" @@ -68308,7 +68304,7 @@ "examples": { "GetComponentTemplateResponseExample1": { "description": "A successful response for retrieving information about a component template.", - "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } @@ -68680,7 +68676,7 @@ "examples": { "GetIndexTemplateResponseExample1": { "description": "A successful response for retrieving information about an index template.", - "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } } } @@ -68937,7 +68933,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 95cb9220f3..bd1f30fc42 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -51093,7 +51093,7 @@ "name": "DateFormat", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L52-L53", + "specLocation": "_types/Time.ts#L49-L50", "type": { "kind": "instance_of", "type": { @@ -51108,23 +51108,7 @@ "name": "DateMath", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L45-L45", - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "kind": "type_alias", - "description": "Date and time in ISO 8601 format", - "name": { - "name": "DateString", - "namespace": "_types" - }, - "specLocation": "_types/Time.ts#L29-L30", + "specLocation": "_types/Time.ts#L42-L42", "type": { "kind": "instance_of", "type": { @@ -51147,8 +51131,8 @@ { "kind": "instance_of", "type": { - "name": "DateString", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } }, { @@ -51298,7 +51282,7 @@ "name": "Duration", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L55-L61", + "specLocation": "_types/Time.ts#L52-L58", "type": { "kind": "union_of", "items": [ @@ -51327,7 +51311,7 @@ "name": "DurationLarge", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L63-L68", + "specLocation": "_types/Time.ts#L60-L65", "type": { "kind": "instance_of", "type": { @@ -51348,7 +51332,7 @@ "name": "DurationValue", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L70-L70", + "specLocation": "_types/Time.ts#L67-L67", "type": { "kind": "instance_of", "type": { @@ -51552,7 +51536,7 @@ "name": "EpochTime", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L43-L43", + "specLocation": "_types/Time.ts#L40-L40", "type": { "kind": "instance_of", "type": { @@ -58455,7 +58439,7 @@ "name": "TimeOfDay", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L47-L48", + "specLocation": "_types/Time.ts#L44-L45", "type": { "kind": "instance_of", "type": { @@ -58500,7 +58484,7 @@ "name": "TimeUnit", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L72-L80" + "specLocation": "_types/Time.ts#L69-L77" }, { "kind": "type_alias", @@ -58508,7 +58492,7 @@ "name": "TimeZone", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L50-L50", + "specLocation": "_types/Time.ts#L47-L47", "type": { "kind": "instance_of", "type": { @@ -58788,7 +58772,7 @@ "name": "UnitFloatMillis", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L40-L41", + "specLocation": "_types/Time.ts#L37-L38", "type": { "kind": "instance_of", "type": { @@ -58804,7 +58788,7 @@ "name": "UnitMillis", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L36-L37", + "specLocation": "_types/Time.ts#L33-L34", "type": { "kind": "instance_of", "type": { @@ -58820,7 +58804,7 @@ "name": "UnitNanos", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L38-L39", + "specLocation": "_types/Time.ts#L35-L36", "type": { "kind": "instance_of", "type": { @@ -58836,7 +58820,7 @@ "name": "UnitSeconds", "namespace": "_types" }, - "specLocation": "_types/Time.ts#L32-L33", + "specLocation": "_types/Time.ts#L29-L30", "type": { "kind": "instance_of", "type": { @@ -120279,7 +120263,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -120324,7 +120308,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -122326,7 +122310,7 @@ "examples": { "GetComponentTemplateResponseExample1": { "description": "A successful response for retrieving information about a component template.", - "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } }, "name": { @@ -147778,7 +147762,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -147823,7 +147807,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -157068,7 +157052,7 @@ "examples": { "GetIndexTemplateResponseExample1": { "description": "A successful response for retrieving information about an index template.", - "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n }\n ]\n}" + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" } }, "name": { @@ -182014,7 +181998,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -182059,7 +182043,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "DateTime", "namespace": "_types" } } @@ -185195,7 +185179,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2025-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1735732800000,\n \"modified_date\" : \"2024-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1704110400000\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } }, "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 6f3e5b6b1b..e22acca77a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2263,9 +2263,7 @@ export type DateFormat = string export type DateMath = string -export type DateString = string - -export type DateTime = DateString | EpochTime +export type DateTime = string | EpochTime export type Distance = string @@ -9348,9 +9346,9 @@ export interface ClusterComponentTemplateNode { version?: VersionNumber _meta?: Metadata deprecated?: boolean - created_date?: DateString + created_date?: DateTime created_date_millis?: EpochTime - modified_date?: DateString + modified_date?: DateTime modified_date_millis?: EpochTime } @@ -11917,9 +11915,9 @@ export interface IndicesIndexTemplate { data_stream?: IndicesIndexTemplateDataStreamConfiguration deprecated?: boolean ignore_missing_component_templates?: Names - created_date?: DateString + created_date?: DateTime created_date_millis?: EpochTime - modified_date?: DateString + modified_date?: DateTime modified_date_millis?: EpochTime } @@ -15108,9 +15106,9 @@ export interface IngestPipeline { version?: VersionNumber deprecated?: boolean _meta?: Metadata - created_date?: DateString + created_date?: DateTime created_date_millis?: EpochTime - modified_date?: DateString + modified_date?: DateTime modified_date_millis?: EpochTime } diff --git a/specification/_types/Time.ts b/specification/_types/Time.ts index d9ac4be756..a957c95163 100644 --- a/specification/_types/Time.ts +++ b/specification/_types/Time.ts @@ -24,10 +24,7 @@ import { double, long } from './Numeric' * number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string * representation. */ -export type DateTime = DateString | EpochTime - -/** Date and time in ISO 8601 format */ -export type DateString = string +export type DateTime = string | EpochTime /** Time unit for seconds */ export type UnitSeconds = long diff --git a/specification/cluster/_types/ComponentTemplate.ts b/specification/cluster/_types/ComponentTemplate.ts index bf9afdf6a2..932a561ed2 100644 --- a/specification/cluster/_types/ComponentTemplate.ts +++ b/specification/cluster/_types/ComponentTemplate.ts @@ -19,7 +19,7 @@ import { IndexName, Metadata, Name, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' -import { DateString, EpochTime, UnitMillis } from '@_types/Time' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { AliasDefinition } from '@indices/_types/AliasDefinition' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' @@ -45,7 +45,7 @@ export class ComponentTemplateNode { * @availability stack since=9.2.0 * @availability serverless */ - created_date?: DateString + created_date?: DateTime /** * Date and time when the component template was created, in milliseconds since the epoch. * @availability stack since=9.2.0 @@ -57,7 +57,7 @@ export class ComponentTemplateNode { * @availability stack since=9.2.0 * @availability serverless */ - modified_date?: DateString + modified_date?: DateTime /** * Date and time when the component template was last modified, in milliseconds since the epoch. * @availability stack since=9.2.0 diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index f28676cd06..b25a8a661c 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -20,7 +20,7 @@ import { IndexName, Metadata, Name, Names, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' import { long } from '@_types/Numeric' -import { DateString, EpochTime, UnitMillis } from '@_types/Time' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' import { Dictionary } from '@spec_utils/Dictionary' @@ -85,7 +85,7 @@ export class IndexTemplate { * @availability stack since=9.2.0 * @availability serverless */ - created_date?: DateString + created_date?: DateTime /** * Date and time when the index template was created, in milliseconds since the epoch. * @availability stack since=9.2.0 @@ -97,7 +97,7 @@ export class IndexTemplate { * @availability stack since=9.2.0 * @availability serverless */ - modified_date?: DateString + modified_date?: DateTime /** * Date and time when the index template was last modified, in milliseconds since the epoch. * @availability stack since=9.2.0 diff --git a/specification/ingest/_types/Pipeline.ts b/specification/ingest/_types/Pipeline.ts index 89170c2e20..8b84a389c9 100644 --- a/specification/ingest/_types/Pipeline.ts +++ b/specification/ingest/_types/Pipeline.ts @@ -18,7 +18,7 @@ */ import { Metadata, VersionNumber } from '@_types/common' -import { DateString, EpochTime, UnitMillis } from '@_types/Time' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { ProcessorContainer } from './Processors' export class Pipeline { @@ -54,7 +54,7 @@ export class Pipeline { * @availability stack since=9.2.0 * @availability serverless */ - created_date?: DateString + created_date?: DateTime /** * Date and time when the pipeline was created, in milliseconds since the epoch. * @availability stack since=9.2.0 @@ -66,7 +66,7 @@ export class Pipeline { * @availability stack since=9.2.0 * @availability serverless */ - modified_date?: DateString + modified_date?: DateTime /** * Date and time when the pipeline was last modified, in milliseconds since the epoch. * @availability stack since=9.2.0