diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 332a118365..4c6ffed9d7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70610,14 +70610,7 @@ "$ref": "#/components/schemas/ilm._types:Actions" }, "min_age": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:Duration" - }, - { - "type": "number" - } - ] + "$ref": "#/components/schemas/_types:Duration" } } }, @@ -93213,7 +93206,7 @@ "type": "number" }, "phases": { - "$ref": "#/components/schemas/ilm._types:Phases" + "$ref": "#/components/schemas/xpack.usage:Phases" } }, "required": [ @@ -93221,6 +93214,44 @@ "phases" ] }, + "xpack.usage:Phases": { + "type": "object", + "properties": { + "cold": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "delete": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "frozen": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "hot": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "warm": { + "$ref": "#/components/schemas/xpack.usage:Phase" + } + } + }, + "xpack.usage:Phase": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "min_age": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + } + }, + "required": [ + "actions", + "min_age" + ] + }, "xpack.usage:MachineLearning": { "allOf": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 7200dff750..453581425e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -124599,7 +124599,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L42-L96" + "specLocation": "ilm/_types/Phase.ts#L39-L93" }, { "kind": "interface", @@ -124697,7 +124697,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L136-L142" + "specLocation": "ilm/_types/Phase.ts#L133-L139" }, { "kind": "interface", @@ -124718,7 +124718,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L152-L154" + "specLocation": "ilm/_types/Phase.ts#L149-L151" }, { "kind": "interface", @@ -124750,7 +124750,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L115-L118" + "specLocation": "ilm/_types/Phase.ts#L112-L115" }, { "kind": "interface", @@ -124782,7 +124782,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L126-L129" + "specLocation": "ilm/_types/Phase.ts#L123-L126" }, { "kind": "interface", @@ -124803,7 +124803,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L144-L146" + "specLocation": "ilm/_types/Phase.ts#L141-L143" }, { "kind": "interface", @@ -124824,31 +124824,18 @@ } }, { - "esQuirk": "output as a millis number in XPack usage stats, which cannot roundtrip with a Duration as it requires a unit.", "name": "min_age", "required": false, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - ] + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } } } ], - "specLocation": "ilm/_types/Phase.ts#L26-L32" + "specLocation": "ilm/_types/Phase.ts#L26-L29" }, { "kind": "interface", @@ -124913,7 +124900,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L34-L40" + "specLocation": "ilm/_types/Phase.ts#L31-L37" }, { "kind": "interface", @@ -125066,7 +125053,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L102-L113" + "specLocation": "ilm/_types/Phase.ts#L99-L110" }, { "kind": "interface", @@ -125098,7 +125085,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L131-L134" + "specLocation": "ilm/_types/Phase.ts#L128-L131" }, { "kind": "interface", @@ -125119,7 +125106,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L98-L100" + "specLocation": "ilm/_types/Phase.ts#L95-L97" }, { "kind": "interface", @@ -125162,7 +125149,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L120-L124" + "specLocation": "ilm/_types/Phase.ts#L117-L121" }, { "kind": "interface", @@ -125183,7 +125170,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L148-L150" + "specLocation": "ilm/_types/Phase.ts#L145-L147" }, { "kind": "request", @@ -227813,7 +227800,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L328-L330" + "specLocation": "xpack/usage/types.ts#L340-L342" }, { "kind": "interface", @@ -227922,7 +227909,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L59-L69" + "specLocation": "xpack/usage/types.ts#L58-L68" }, { "kind": "interface", @@ -227949,7 +227936,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L46-L48" + "specLocation": "xpack/usage/types.ts#L45-L47" }, { "kind": "interface", @@ -227979,7 +227966,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L71-L73" + "specLocation": "xpack/usage/types.ts#L70-L72" }, { "kind": "interface", @@ -228011,7 +227998,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L28-L31" + "specLocation": "xpack/usage/types.ts#L27-L30" }, { "kind": "interface", @@ -228049,7 +228036,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L332-L335" + "specLocation": "xpack/usage/types.ts#L344-L347" }, { "kind": "interface", @@ -228081,7 +228068,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L33-L36" + "specLocation": "xpack/usage/types.ts#L32-L35" }, { "kind": "interface", @@ -228119,7 +228106,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L79-L82" + "specLocation": "xpack/usage/types.ts#L78-L81" }, { "kind": "interface", @@ -228239,7 +228226,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L84-L95" + "specLocation": "xpack/usage/types.ts#L83-L94" }, { "kind": "interface", @@ -228316,7 +228303,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L337-L347" + "specLocation": "xpack/usage/types.ts#L349-L359" }, { "kind": "interface", @@ -228337,7 +228324,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L75-L77" + "specLocation": "xpack/usage/types.ts#L74-L76" }, { "kind": "interface", @@ -228386,7 +228373,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L349-L352" + "specLocation": "xpack/usage/types.ts#L361-L364" }, { "kind": "interface", @@ -228473,7 +228460,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L97-L105" + "specLocation": "xpack/usage/types.ts#L96-L104" }, { "kind": "interface", @@ -228538,7 +228525,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L107-L113" + "specLocation": "xpack/usage/types.ts#L106-L112" }, { "kind": "interface", @@ -228603,7 +228590,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L115-L121" + "specLocation": "xpack/usage/types.ts#L114-L120" }, { "kind": "interface", @@ -228635,7 +228622,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L123-L126" + "specLocation": "xpack/usage/types.ts#L122-L125" }, { "kind": "interface", @@ -228711,7 +228698,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L128-L135" + "specLocation": "xpack/usage/types.ts#L127-L134" }, { "kind": "interface", @@ -228732,7 +228719,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L38-L40" + "specLocation": "xpack/usage/types.ts#L37-L39" }, { "kind": "interface", @@ -228759,7 +228746,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L354-L356" + "specLocation": "xpack/usage/types.ts#L366-L368" }, { "kind": "interface", @@ -228786,7 +228773,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L358-L360" + "specLocation": "xpack/usage/types.ts#L370-L372" }, { "kind": "interface", @@ -228813,7 +228800,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L151-L153" + "specLocation": "xpack/usage/types.ts#L150-L152" }, { "kind": "interface", @@ -228848,7 +228835,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L160-L163" + "specLocation": "xpack/usage/types.ts#L172-L175" }, { "kind": "interface", @@ -228875,12 +228862,12 @@ "kind": "instance_of", "type": { "name": "Phases", - "namespace": "ilm._types" + "namespace": "xpack.usage" } } } ], - "specLocation": "xpack/usage/types.ts#L155-L158" + "specLocation": "xpack/usage/types.ts#L167-L170" }, { "kind": "interface", @@ -228901,7 +228888,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L42-L44" + "specLocation": "xpack/usage/types.ts#L41-L43" }, { "kind": "interface", @@ -228933,7 +228920,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L165-L168" + "specLocation": "xpack/usage/types.ts#L177-L180" }, { "kind": "interface", @@ -229009,7 +228996,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L362-L368" + "specLocation": "xpack/usage/types.ts#L374-L380" }, { "kind": "interface", @@ -229103,7 +229090,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L370-L377" + "specLocation": "xpack/usage/types.ts#L382-L389" }, { "kind": "interface", @@ -229124,7 +229111,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L253-L255" + "specLocation": "xpack/usage/types.ts#L265-L267" }, { "kind": "interface", @@ -229178,7 +229165,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L175-L180" + "specLocation": "xpack/usage/types.ts#L187-L192" }, { "kind": "interface", @@ -229221,7 +229208,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L182-L186" + "specLocation": "xpack/usage/types.ts#L194-L198" }, { "kind": "interface", @@ -229242,7 +229229,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L192-L194" + "specLocation": "xpack/usage/types.ts#L204-L206" }, { "kind": "interface", @@ -229263,7 +229250,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L188-L190" + "specLocation": "xpack/usage/types.ts#L200-L202" }, { "kind": "interface", @@ -229323,7 +229310,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L196-L204" + "specLocation": "xpack/usage/types.ts#L208-L216" }, { "kind": "interface", @@ -229377,7 +229364,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L225-L230" + "specLocation": "xpack/usage/types.ts#L237-L242" }, { "kind": "interface", @@ -229398,7 +229385,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L232-L234" + "specLocation": "xpack/usage/types.ts#L244-L246" }, { "kind": "interface", @@ -229452,7 +229439,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L206-L211" + "specLocation": "xpack/usage/types.ts#L218-L223" }, { "kind": "interface", @@ -229495,7 +229482,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L236-L240" + "specLocation": "xpack/usage/types.ts#L248-L252" }, { "kind": "interface", @@ -229566,7 +229553,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L213-L223" + "specLocation": "xpack/usage/types.ts#L225-L235" }, { "kind": "interface", @@ -229664,7 +229651,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L242-L251" + "specLocation": "xpack/usage/types.ts#L254-L263" }, { "kind": "interface", @@ -229696,7 +229683,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L170-L173" + "specLocation": "xpack/usage/types.ts#L182-L185" }, { "kind": "interface", @@ -229745,7 +229732,116 @@ } } ], - "specLocation": "xpack/usage/types.ts#L379-L382" + "specLocation": "xpack/usage/types.ts#L391-L394" + }, + { + "kind": "interface", + "name": { + "name": "Phase", + "namespace": "xpack.usage" + }, + "properties": [ + { + "name": "actions", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "min_age", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + } + ], + "specLocation": "xpack/usage/types.ts#L154-L157" + }, + { + "kind": "interface", + "name": { + "name": "Phases", + "namespace": "xpack.usage" + }, + "properties": [ + { + "name": "cold", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "delete", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "frozen", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "hot", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "warm", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + } + ], + "specLocation": "xpack/usage/types.ts#L159-L165" }, { "kind": "interface", @@ -229799,7 +229895,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L257-L262" + "specLocation": "xpack/usage/types.ts#L269-L274" }, { "kind": "interface", @@ -229927,7 +230023,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L415-L424" + "specLocation": "xpack/usage/types.ts#L427-L436" }, { "kind": "interface", @@ -229948,7 +230044,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L264-L266" + "specLocation": "xpack/usage/types.ts#L276-L278" }, { "kind": "request", @@ -230355,7 +230451,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L268-L271" + "specLocation": "xpack/usage/types.ts#L280-L283" }, { "kind": "interface", @@ -230385,7 +230481,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L273-L275" + "specLocation": "xpack/usage/types.ts#L285-L287" }, { "kind": "interface", @@ -230552,7 +230648,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L277-L292" + "specLocation": "xpack/usage/types.ts#L289-L304" }, { "kind": "interface", @@ -230601,7 +230697,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L426-L430" + "specLocation": "xpack/usage/types.ts#L438-L442" }, { "kind": "interface", @@ -230771,7 +230867,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L432-L445" + "specLocation": "xpack/usage/types.ts#L444-L457" }, { "kind": "interface", @@ -230814,7 +230910,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L294-L298" + "specLocation": "xpack/usage/types.ts#L306-L310" }, { "kind": "interface", @@ -230835,7 +230931,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L306-L308" + "specLocation": "xpack/usage/types.ts#L318-L320" }, { "kind": "interface", @@ -230878,7 +230974,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L310-L314" + "specLocation": "xpack/usage/types.ts#L322-L326" }, { "kind": "interface", @@ -230921,7 +231017,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L316-L320" + "specLocation": "xpack/usage/types.ts#L328-L332" }, { "kind": "interface", @@ -230964,7 +231060,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L300-L304" + "specLocation": "xpack/usage/types.ts#L312-L316" }, { "kind": "interface", @@ -231002,7 +231098,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L447-L450" + "specLocation": "xpack/usage/types.ts#L459-L462" }, { "kind": "interface", @@ -231062,7 +231158,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L384-L387" + "specLocation": "xpack/usage/types.ts#L396-L399" }, { "kind": "interface", @@ -231094,7 +231190,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L389-L392" + "specLocation": "xpack/usage/types.ts#L401-L404" }, { "kind": "interface", @@ -231143,7 +231239,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L452-L456" + "specLocation": "xpack/usage/types.ts#L464-L468" }, { "kind": "interface", @@ -231192,7 +231288,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L458-L462" + "specLocation": "xpack/usage/types.ts#L470-L474" }, { "kind": "interface", @@ -231233,7 +231329,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L410-L413" + "specLocation": "xpack/usage/types.ts#L422-L425" }, { "kind": "interface", @@ -231265,7 +231361,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L394-L396" + "specLocation": "xpack/usage/types.ts#L406-L408" }, { "kind": "interface", @@ -231352,7 +231448,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L398-L403" + "specLocation": "xpack/usage/types.ts#L410-L415" }, { "kind": "interface", @@ -231384,7 +231480,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L405-L408" + "specLocation": "xpack/usage/types.ts#L417-L420" }, { "kind": "interface", @@ -231422,7 +231518,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L464-L467" + "specLocation": "xpack/usage/types.ts#L476-L479" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3232230107..30c8375e77 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10844,7 +10844,7 @@ export interface IlmMigrateAction { export interface IlmPhase { actions?: IlmActions - min_age?: Duration | long + min_age?: Duration } export interface IlmPhases { @@ -21746,7 +21746,7 @@ export interface XpackUsageIlm { export interface XpackUsageIlmPolicyStatistics { indices_managed: integer - phases: IlmPhases + phases: XpackUsagePhases } export interface XpackUsageInvocations { @@ -21858,6 +21858,19 @@ export interface XpackUsageMonitoring extends XpackUsageBase { enabled_exporters: Record } +export interface XpackUsagePhase { + actions: string[] + min_age: DurationValue +} + +export interface XpackUsagePhases { + cold?: XpackUsagePhase + delete?: XpackUsagePhase + frozen?: XpackUsagePhase + hot?: XpackUsagePhase + warm?: XpackUsagePhase +} + export interface XpackUsageQuery { count?: integer failed?: integer diff --git a/specification/ilm/_types/Phase.ts b/specification/ilm/_types/Phase.ts index 397a64d24d..2b8a36e016 100644 --- a/specification/ilm/_types/Phase.ts +++ b/specification/ilm/_types/Phase.ts @@ -25,10 +25,7 @@ import { Duration, DurationLarge } from '@_types/Time' export class Phase { actions?: Actions - /** - * @es_quirk output as a millis number in XPack usage stats, which cannot roundtrip with a Duration as it requires a unit. - */ - min_age?: Duration | long + min_age?: Duration } export class Phases { diff --git a/specification/xpack/usage/types.ts b/specification/xpack/usage/types.ts index 2e95bf7993..b7c1589268 100644 --- a/specification/xpack/usage/types.ts +++ b/specification/xpack/usage/types.ts @@ -17,7 +17,6 @@ * under the License. */ -import { Phases } from '@ilm/_types/Phase' import { JobStatistics } from '@ml/_types/Job' import { Statistics } from '@slm/_types/SnapshotLifecycle' import { Dictionary } from '@spec_utils/Dictionary' @@ -152,6 +151,19 @@ export class HealthStatistics extends Base { invocations: Invocations } +export class Phase { + actions: string[] + min_age: DurationValue +} + +export class Phases { + cold?: Phase + delete?: Phase + frozen?: Phase + hot?: Phase + warm?: Phase +} + export class IlmPolicyStatistics { indices_managed: integer phases: Phases