Skip to content

Commit 7b0056c

Browse files
Auto-generated API code (#3074)
1 parent 6766057 commit 7b0056c

File tree

4 files changed

+114
-36
lines changed

4 files changed

+114
-36
lines changed

docs/reference/api-reference.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10758,6 +10758,7 @@ client.ml.stopTrainedModelDeployment({ model_id })
1075810758

1075910759
#### Request (object) [_request_ml.stop_trained_model_deployment]
1076010760
- **`model_id` (string)**: The unique identifier of the trained model.
10761+
- **`id` (Optional, string)**: If provided, must be the same identifier as in the path.
1076110762
- **`allow_no_match` (Optional, boolean)**: Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
1076210763
contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
1076310764
there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
@@ -15304,9 +15305,11 @@ index will not be deleted
1530415305
- **`timeout` (Optional, string \| -1 \| 0)**: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
1530515306

1530615307
## client.transform.getNodeStats [_transform.get_node_stats]
15307-
Retrieves transform usage information for transform nodes
15308+
Get node stats.
1530815309

15309-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html)
15310+
Get per-node information about transform usage.
15311+
15312+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats)
1531015313

1531115314
```ts
1531215315
client.transform.getNodeStats()

src/api/api/ml.ts

Lines changed: 72 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -766,10 +766,11 @@ export default class Ml {
766766
]
767767
},
768768
'ml.start_data_frame_analytics': {
769-
path: [
770-
'id'
769+
path: [],
770+
body: [
771+
'id',
772+
'timeout'
771773
],
772-
body: [],
773774
query: [
774775
'timeout'
775776
]
@@ -808,10 +809,13 @@ export default class Ml {
808809
]
809810
},
810811
'ml.stop_data_frame_analytics': {
811-
path: [
812-
'id'
812+
path: [],
813+
body: [
814+
'id',
815+
'allow_no_match',
816+
'force',
817+
'timeout'
813818
],
814-
body: [],
815819
query: [
816820
'allow_no_match',
817821
'force',
@@ -837,7 +841,11 @@ export default class Ml {
837841
path: [
838842
'model_id'
839843
],
840-
body: [],
844+
body: [
845+
'id',
846+
'allow_no_match',
847+
'force'
848+
],
841849
query: [
842850
'allow_no_match',
843851
'force'
@@ -4519,7 +4527,9 @@ export default class Ml {
45194527
async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.MlStartDataFrameAnalyticsResponse>
45204528
async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<any> {
45214529
const {
4522-
path: acceptedPath
4530+
path: acceptedPath,
4531+
body: acceptedBody,
4532+
query: acceptedQuery
45234533
} = this[kAcceptedParams]['ml.start_data_frame_analytics']
45244534

45254535
const userQuery = params?.querystring
@@ -4536,11 +4546,21 @@ export default class Ml {
45364546
}
45374547

45384548
for (const key in params) {
4539-
if (acceptedPath.includes(key)) {
4549+
if (acceptedBody.includes(key)) {
4550+
body = body ?? {}
4551+
// @ts-expect-error
4552+
body[key] = params[key]
4553+
} else if (acceptedPath.includes(key)) {
45404554
continue
45414555
} else if (key !== 'body' && key !== 'querystring') {
4542-
// @ts-expect-error
4543-
querystring[key] = params[key]
4556+
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
4557+
// @ts-expect-error
4558+
querystring[key] = params[key]
4559+
} else {
4560+
body = body ?? {}
4561+
// @ts-expect-error
4562+
body[key] = params[key]
4563+
}
45444564
}
45454565
}
45464566

@@ -4553,6 +4573,8 @@ export default class Ml {
45534573
},
45544574
acceptedParams: [
45554575
'id',
4576+
'id',
4577+
'timeout',
45564578
'timeout'
45574579
]
45584580
}
@@ -4703,7 +4725,9 @@ export default class Ml {
47034725
async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.MlStopDataFrameAnalyticsResponse>
47044726
async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<any> {
47054727
const {
4706-
path: acceptedPath
4728+
path: acceptedPath,
4729+
body: acceptedBody,
4730+
query: acceptedQuery
47074731
} = this[kAcceptedParams]['ml.stop_data_frame_analytics']
47084732

47094733
const userQuery = params?.querystring
@@ -4720,11 +4744,21 @@ export default class Ml {
47204744
}
47214745

47224746
for (const key in params) {
4723-
if (acceptedPath.includes(key)) {
4747+
if (acceptedBody.includes(key)) {
4748+
body = body ?? {}
4749+
// @ts-expect-error
4750+
body[key] = params[key]
4751+
} else if (acceptedPath.includes(key)) {
47244752
continue
47254753
} else if (key !== 'body' && key !== 'querystring') {
4726-
// @ts-expect-error
4727-
querystring[key] = params[key]
4754+
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
4755+
// @ts-expect-error
4756+
querystring[key] = params[key]
4757+
} else {
4758+
body = body ?? {}
4759+
// @ts-expect-error
4760+
body[key] = params[key]
4761+
}
47284762
}
47294763
}
47304764

@@ -4736,9 +4770,13 @@ export default class Ml {
47364770
id: params.id
47374771
},
47384772
acceptedParams: [
4773+
'id',
47394774
'id',
47404775
'allow_no_match',
47414776
'force',
4777+
'timeout',
4778+
'allow_no_match',
4779+
'force',
47424780
'timeout'
47434781
]
47444782
}
@@ -4820,7 +4858,9 @@ export default class Ml {
48204858
async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<T.MlStopTrainedModelDeploymentResponse>
48214859
async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<any> {
48224860
const {
4823-
path: acceptedPath
4861+
path: acceptedPath,
4862+
body: acceptedBody,
4863+
query: acceptedQuery
48244864
} = this[kAcceptedParams]['ml.stop_trained_model_deployment']
48254865

48264866
const userQuery = params?.querystring
@@ -4837,11 +4877,21 @@ export default class Ml {
48374877
}
48384878

48394879
for (const key in params) {
4840-
if (acceptedPath.includes(key)) {
4880+
if (acceptedBody.includes(key)) {
4881+
body = body ?? {}
4882+
// @ts-expect-error
4883+
body[key] = params[key]
4884+
} else if (acceptedPath.includes(key)) {
48414885
continue
48424886
} else if (key !== 'body' && key !== 'querystring') {
4843-
// @ts-expect-error
4844-
querystring[key] = params[key]
4887+
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
4888+
// @ts-expect-error
4889+
querystring[key] = params[key]
4890+
} else {
4891+
body = body ?? {}
4892+
// @ts-expect-error
4893+
body[key] = params[key]
4894+
}
48454895
}
48464896
}
48474897

@@ -4854,6 +4904,9 @@ export default class Ml {
48544904
},
48554905
acceptedParams: [
48564906
'model_id',
4907+
'id',
4908+
'allow_no_match',
4909+
'force',
48574910
'allow_no_match',
48584911
'force'
48594912
]

src/api/api/transform.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ export default class Transform {
248248
}
249249

250250
/**
251-
* Retrieves transform usage information for transform nodes
252-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.2/get-transform-node-stats.html | Elasticsearch API documentation}
251+
* Get node stats. Get per-node information about transform usage.
252+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats | Elasticsearch API documentation}
253253
*/
254-
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
255-
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
256-
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
257-
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
254+
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformGetNodeStatsResponse>
255+
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformGetNodeStatsResponse, unknown>>
256+
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptions): Promise<T.TransformGetNodeStatsResponse>
257+
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptions): Promise<any> {
258258
const {
259259
path: acceptedPath
260260
} = this[kAcceptedParams]['transform.get_node_stats']
@@ -277,6 +277,7 @@ export default class Transform {
277277
if (acceptedPath.includes(key)) {
278278
continue
279279
} else if (key !== 'body' && key !== 'querystring') {
280+
// @ts-expect-error
280281
querystring[key] = params[key]
281282
}
282283
}

src/api/types.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19666,18 +19666,13 @@ export interface IndicesDataStreamLifecycle {
1966619666
* Any time after this duration the document could be deleted.
1966719667
* When empty, every document in this data stream will be stored indefinitely. */
1966819668
data_retention?: Duration
19669-
/** The downsampling configuration to execute for the managed backing index after rollover. */
19670-
downsampling?: IndicesDataStreamLifecycleDownsampling
19669+
/** The list of downsampling rounds to execute as part of this downsampling configuration */
19670+
downsampling?: IndicesDownsamplingRound[]
1967119671
/** If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
1967219672
* that's disabled (enabled: `false`) will have no effect on the data stream. */
1967319673
enabled?: boolean
1967419674
}
1967519675

19676-
export interface IndicesDataStreamLifecycleDownsampling {
19677-
/** The list of downsampling rounds to execute as part of this downsampling configuration */
19678-
rounds: IndicesDownsamplingRound[]
19679-
}
19680-
1968119676
export interface IndicesDataStreamLifecycleRolloverConditions {
1968219677
min_age?: Duration
1968319678
max_age?: string
@@ -31127,6 +31122,8 @@ export interface MlStopDatafeedResponse {
3112731122
export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
3112831123
/** The unique identifier of the trained model. */
3112931124
model_id: Id
31125+
/** If provided, must be the same identifier as in the path. */
31126+
id?: Id
3113031127
/** Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
3113131128
* contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
3113231129
* there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
@@ -31136,9 +31133,9 @@ export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
3113631133
* restart the model deployment. */
3113731134
force?: boolean
3113831135
/** All values in `body` will be added to the request body. */
31139-
body?: string | { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
31136+
body?: string | { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
3114031137
/** All values in `querystring` will be added to the request querystring. */
31141-
querystring?: { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
31138+
querystring?: { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
3114231139
}
3114331140

3114431141
export interface MlStopTrainedModelDeploymentResponse {
@@ -38615,6 +38612,30 @@ export interface TransformDeleteTransformRequest extends RequestBase {
3861538612

3861638613
export type TransformDeleteTransformResponse = AcknowledgedResponseBase
3861738614

38615+
export interface TransformGetNodeStatsRequest extends RequestBase {
38616+
/** All values in `body` will be added to the request body. */
38617+
body?: string | { [key: string]: any }
38618+
/** All values in `querystring` will be added to the request querystring. */
38619+
querystring?: { [key: string]: any }
38620+
}
38621+
38622+
export type TransformGetNodeStatsResponse = TransformGetNodeStatsTransformNodeFullStats
38623+
38624+
export interface TransformGetNodeStatsTransformNodeFullStatsKeys {
38625+
total: TransformGetNodeStatsTransformNodeStats
38626+
}
38627+
export type TransformGetNodeStatsTransformNodeFullStats = TransformGetNodeStatsTransformNodeFullStatsKeys
38628+
& { [property: string]: TransformGetNodeStatsTransformNodeStats }
38629+
38630+
export interface TransformGetNodeStatsTransformNodeStats {
38631+
scheduler: TransformGetNodeStatsTransformSchedulerStats
38632+
}
38633+
38634+
export interface TransformGetNodeStatsTransformSchedulerStats {
38635+
registered_transform_count: integer
38636+
peek_transform?: string
38637+
}
38638+
3861838639
export interface TransformGetTransformRequest extends RequestBase {
3861938640
/** Identifier for the transform. It can be a transform identifier or a
3862038641
* wildcard expression. You can get information for all transforms by using

0 commit comments

Comments
 (0)