Skip to content

Commit d33afe4

Browse files
authoredMay 10, 2021
Reorg ILM (#456)
1 parent d5d355d commit d33afe4

22 files changed

+50
-97
lines changed
 

‎output/schema/schema.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -81000,7 +81000,7 @@
8100081000
{
8100181001
"kind": "interface",
8100281002
"name": {
81003-
"name": "LifecycleAction",
81003+
"name": "Action",
8100481004
"namespace": "ilm._types"
8100581005
},
8100681006
"properties": []
@@ -81030,7 +81030,7 @@
8103081030
"value": {
8103181031
"kind": "instance_of",
8103281032
"type": {
81033-
"name": "LifecycleAction",
81033+
"name": "Action",
8103481034
"namespace": "ilm._types"
8103581035
}
8103681036
}
@@ -81139,8 +81139,8 @@
8113981139
"type": {
8114081140
"kind": "instance_of",
8114181141
"type": {
81142-
"name": "string",
81143-
"namespace": "internal"
81142+
"name": "Name",
81143+
"namespace": "_types"
8114481144
}
8114581145
}
8114681146
}
@@ -81597,7 +81597,7 @@
8159781597
{
8159881598
"kind": "interface",
8159981599
"name": {
81600-
"name": "LifecyclePolicy",
81600+
"name": "Lifecycle",
8160181601
"namespace": "ilm.get_lifecycle"
8160281602
},
8160381603
"properties": [
@@ -81697,7 +81697,7 @@
8169781697
{
8169881698
"kind": "instance_of",
8169981699
"type": {
81700-
"name": "LifecyclePolicy",
81700+
"name": "Lifecycle",
8170181701
"namespace": "ilm.get_lifecycle"
8170281702
}
8170381703
}
@@ -81992,8 +81992,8 @@
8199281992
"value": {
8199381993
"kind": "instance_of",
8199481994
"type": {
81995-
"name": "string",
81996-
"namespace": "internal"
81995+
"name": "IndexName",
81996+
"namespace": "_types"
8199781997
}
8199881998
}
8199981999
}

‎output/typescript/types.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -7923,11 +7923,11 @@ export interface GraphExploreResponse {
79237923
vertices: GraphVertex[]
79247924
}
79257925

7926-
export interface IlmLifecycleAction {
7926+
export interface IlmAction {
79277927
}
79287928

79297929
export interface IlmPhase {
7930-
actions: Record<string, IlmLifecycleAction> | string[]
7930+
actions: Record<string, IlmAction> | string[]
79317931
min_age?: Time
79327932
}
79337933

@@ -7940,7 +7940,7 @@ export interface IlmPhases {
79407940

79417941
export interface IlmPolicy {
79427942
phases: IlmPhases
7943-
name?: string
7943+
name?: Name
79447944
}
79457945

79467946
export interface IlmDeleteLifecycleRequest extends RequestBase {
@@ -7995,7 +7995,7 @@ export interface IlmExplainLifecycleResponse {
79957995
indices: Record<IndexName, IlmExplainLifecycleLifecycleExplain> | IlmExplainLifecycleLifecycleExplainProject
79967996
}
79977997

7998-
export interface IlmGetLifecycleLifecyclePolicy {
7998+
export interface IlmGetLifecycleLifecycle {
79997999
modified_date: DateString
80008000
policy: IlmPolicy
80018001
version: VersionNumber
@@ -8006,7 +8006,7 @@ export interface IlmGetLifecycleRequest extends RequestBase {
80068006
policy_id?: Id
80078007
}
80088008

8009-
export interface IlmGetLifecycleResponse extends DictionaryResponseBase<string, IlmGetLifecycleLifecyclePolicy> {
8009+
export interface IlmGetLifecycleResponse extends DictionaryResponseBase<string, IlmGetLifecycleLifecycle> {
80108010
}
80118011

80128012
export interface IlmGetStatusRequest extends RequestBase {
@@ -8049,7 +8049,7 @@ export interface IlmRemovePolicyRequest extends RequestBase {
80498049
}
80508050

80518051
export interface IlmRemovePolicyResponse {
8052-
failed_indexes: string[]
8052+
failed_indexes: IndexName[]
80538053
has_failures: boolean
80548054
}
80558055

‎specification/cluster/_types/ClusterStateIndexLifecycle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { LifecycleOperationMode } from '@_types/Lifecycle'
21-
import { Phases } from '@ilm/_types/Phases'
21+
import { Phases } from '@ilm/_types/Phase'
2222
import { Dictionary } from '@spec_utils/Dictionary'
2323
import { HttpHeaders, IndexName, VersionNumber } from '@_types/common'
2424
import { long } from '@_types/Numeric'

‎specification/ilm/_types/LifecycleAction.ts

-20
This file was deleted.

‎specification/ilm/_types/Phase.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919

2020
import { Dictionary } from '@spec_utils/Dictionary'
2121
import { Time } from '@_types/Time'
22-
import { LifecycleAction } from './LifecycleAction'
2322

2423
export class Phase {
25-
actions: Dictionary<string, LifecycleAction> | string[]
24+
actions: Dictionary<string, Action> | string[]
2625
min_age?: Time
2726
}
27+
28+
export class Phases {
29+
cold?: Phase
30+
delete?: Phase
31+
hot?: Phase
32+
warm?: Phase
33+
}
34+
35+
export class Action {}

‎specification/ilm/_types/Phases.ts

-27
This file was deleted.

‎specification/ilm/_types/Policy.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
* under the License.
1818
*/
1919

20-
import { Phases } from './Phases'
20+
import { Name } from '@_types/common'
21+
import { Phases } from './Phase'
2122

2223
export class Policy {
2324
phases: Phases
24-
name?: string
25+
name?: Name
2526
}

‎specification/ilm/delete_lifecycle/DeleteLifecycleRequest.ts

-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ export interface Request extends RequestBase {
3030
policy?: Name
3131
policy_id: Id
3232
}
33-
query_parameters?: {}
34-
body?: {}
3533
}

‎specification/ilm/explain_lifecycle/ExplainLifecycleRequest.ts

-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ export interface Request extends RequestBase {
3333
only_errors?: boolean
3434
only_managed?: boolean
3535
}
36-
body?: {}
3736
}

‎specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@
1919

2020
import { Dictionary } from '@spec_utils/Dictionary'
2121
import { IndexName } from '@_types/common'
22-
import { LifecycleExplain } from './LifecycleExplain'
22+
import { LifecycleExplain, LifecycleExplainProject } from './types'
2323

2424
export class Response {
2525
body: {
2626
indices: Dictionary<IndexName, LifecycleExplain> | LifecycleExplainProject
2727
}
2828
}
29-
30-
export class LifecycleExplainProject {
31-
project: LifecycleExplainProjectSummary
32-
}
33-
34-
export class LifecycleExplainProjectSummary {
35-
index: IndexName
36-
managed: boolean
37-
}

‎specification/ilm/explain_lifecycle/LifecycleExplain.ts ‎specification/ilm/explain_lifecycle/types.ts

+9
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,12 @@ export class LifecycleExplainPhaseExecution {
4747
version: VersionNumber
4848
modified_date_in_millis: EpochMillis
4949
}
50+
51+
export class LifecycleExplainProject {
52+
project: LifecycleExplainProjectSummary
53+
}
54+
55+
export class LifecycleExplainProjectSummary {
56+
index: IndexName
57+
managed: boolean
58+
}

‎specification/ilm/get_lifecycle/GetLifecycleRequest.ts

-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ export interface Request extends RequestBase {
3030
policy?: Name
3131
policy_id?: Id
3232
}
33-
query_parameters?: {}
34-
body?: {}
3533
}

‎specification/ilm/get_lifecycle/GetLifecycleResponse.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
*/
1919

2020
import { DictionaryResponseBase } from '@_types/Base'
21-
import { LifecyclePolicy } from './LifecyclePolicy'
21+
import { Lifecycle } from './types'
2222

23-
export class Response extends DictionaryResponseBase<string, LifecyclePolicy> {}
23+
export class Response extends DictionaryResponseBase<string, Lifecycle> {}

‎specification/ilm/get_lifecycle/LifecyclePolicy.ts ‎specification/ilm/get_lifecycle/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Policy } from '@ilm/_types/Policy'
2121
import { VersionNumber } from '@_types/common'
2222
import { DateString } from '@_types/Time'
2323

24-
export class LifecyclePolicy {
24+
export class Lifecycle {
2525
modified_date: DateString
2626
policy: Policy
2727
version: VersionNumber

‎specification/ilm/get_status/GetIlmStatusRequest.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,4 @@ import { RequestBase } from '@_types/Base'
2424
* @since 6.6.0
2525
* @stability TODO
2626
*/
27-
export interface Request extends RequestBase {
28-
query_parameters?: {}
29-
body?: {}
30-
}
27+
export interface Request extends RequestBase {}

‎specification/ilm/move_to_step/MoveToStepRequest.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { RequestBase } from '@_types/Base'
2121
import { IndexName } from '@_types/common'
22-
import { StepKey } from './StepKey'
22+
import { StepKey } from './types'
2323

2424
/**
2525
* @rest_spec_name ilm.move_to_step
@@ -30,7 +30,6 @@ export interface Request extends RequestBase {
3030
path_parts?: {
3131
index: IndexName
3232
}
33-
query_parameters?: {}
3433
body?: {
3534
current_step?: StepKey
3635
next_step?: StepKey

‎specification/ilm/put_lifecycle/PutLifecycleRequest.ts

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export interface Request extends RequestBase {
3131
policy?: Name
3232
policy_id?: Id
3333
}
34-
query_parameters?: {}
3534
body?: {
3635
policy?: Policy
3736
}

‎specification/ilm/remove_policy/RemovePolicyRequest.ts

-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ export interface Request extends RequestBase {
2929
path_parts?: {
3030
index: IndexName
3131
}
32-
query_parameters?: {}
33-
body?: {}
3432
}

‎specification/ilm/remove_policy/RemovePolicyResponse.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
* under the License.
1818
*/
1919

20+
import { IndexName } from '@_types/common'
21+
2022
export class Response {
21-
body: { failed_indexes: string[]; has_failures: boolean }
23+
body: {
24+
failed_indexes: IndexName[]
25+
has_failures: boolean
26+
}
2227
}

‎specification/ilm/retry/RetryIlmRequest.ts

-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ export interface Request extends RequestBase {
2929
path_parts?: {
3030
index: IndexName
3131
}
32-
query_parameters?: {}
33-
body?: {}
3432
}

‎specification/xpack/usage/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { Phases } from '@ilm/_types/Phases'
20+
import { Phases } from '@ilm/_types/Phase'
2121
import { Statistics } from '@slm/_types/SnapshotLifecycle'
2222
import { Dictionary } from '@spec_utils/Dictionary'
2323
import { ByteSize, EmptyObject, Field, Name } from '@_types/common'

0 commit comments

Comments
 (0)