Skip to content

Commit 70ff605

Browse files
Auto-generated API code (#3073)
1 parent 39579f8 commit 70ff605

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
@@ -10644,6 +10644,7 @@ client.ml.stopTrainedModelDeployment({ model_id })
1064410644

1064510645
#### Request (object) [_request_ml.stop_trained_model_deployment]
1064610646
- **`model_id` (string)**: The unique identifier of the trained model.
10647+
- **`id` (Optional, string)**: If provided, must be the same identifier as in the path.
1064710648
- **`allow_no_match` (Optional, boolean)**: Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
1064810649
contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
1064910650
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.
@@ -15244,9 +15245,11 @@ index will not be deleted
1524415245
- **`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.
1524515246

1524615247
## client.transform.getNodeStats [_transform.get_node_stats]
15247-
Retrieves transform usage information for transform nodes
15248+
Get node stats.
1524815249

15249-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html)
15250+
Get per-node information about transform usage.
15251+
15252+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats)
1525015253

1525115254
```ts
1525215255
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.1/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
@@ -19464,18 +19464,13 @@ export interface IndicesDataStreamLifecycle {
1946419464
* Any time after this duration the document could be deleted.
1946519465
* When empty, every document in this data stream will be stored indefinitely. */
1946619466
data_retention?: Duration
19467-
/** The downsampling configuration to execute for the managed backing index after rollover. */
19468-
downsampling?: IndicesDataStreamLifecycleDownsampling
19467+
/** The list of downsampling rounds to execute as part of this downsampling configuration */
19468+
downsampling?: IndicesDownsamplingRound[]
1946919469
/** If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
1947019470
* that's disabled (enabled: `false`) will have no effect on the data stream. */
1947119471
enabled?: boolean
1947219472
}
1947319473

19474-
export interface IndicesDataStreamLifecycleDownsampling {
19475-
/** The list of downsampling rounds to execute as part of this downsampling configuration */
19476-
rounds: IndicesDownsamplingRound[]
19477-
}
19478-
1947919474
export interface IndicesDataStreamLifecycleRolloverConditions {
1948019475
min_age?: Duration
1948119476
max_age?: string
@@ -30524,6 +30519,8 @@ export interface MlStopDatafeedResponse {
3052430519
export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
3052530520
/** The unique identifier of the trained model. */
3052630521
model_id: Id
30522+
/** If provided, must be the same identifier as in the path. */
30523+
id?: Id
3052730524
/** Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
3052830525
* contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
3052930526
* 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.
@@ -30533,9 +30530,9 @@ export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
3053330530
* restart the model deployment. */
3053430531
force?: boolean
3053530532
/** All values in `body` will be added to the request body. */
30536-
body?: string | { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
30533+
body?: string | { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
3053730534
/** All values in `querystring` will be added to the request querystring. */
30538-
querystring?: { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
30535+
querystring?: { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
3053930536
}
3054030537

3054130538
export interface MlStopTrainedModelDeploymentResponse {
@@ -37939,6 +37936,30 @@ export interface TransformDeleteTransformRequest extends RequestBase {
3793937936

3794037937
export type TransformDeleteTransformResponse = AcknowledgedResponseBase
3794137938

37939+
export interface TransformGetNodeStatsRequest extends RequestBase {
37940+
/** All values in `body` will be added to the request body. */
37941+
body?: string | { [key: string]: any }
37942+
/** All values in `querystring` will be added to the request querystring. */
37943+
querystring?: { [key: string]: any }
37944+
}
37945+
37946+
export type TransformGetNodeStatsResponse = TransformGetNodeStatsTransformNodeFullStats
37947+
37948+
export interface TransformGetNodeStatsTransformNodeFullStatsKeys {
37949+
total: TransformGetNodeStatsTransformNodeStats
37950+
}
37951+
export type TransformGetNodeStatsTransformNodeFullStats = TransformGetNodeStatsTransformNodeFullStatsKeys
37952+
& { [property: string]: TransformGetNodeStatsTransformNodeStats }
37953+
37954+
export interface TransformGetNodeStatsTransformNodeStats {
37955+
scheduler: TransformGetNodeStatsTransformSchedulerStats
37956+
}
37957+
37958+
export interface TransformGetNodeStatsTransformSchedulerStats {
37959+
registered_transform_count: integer
37960+
peek_transform?: string
37961+
}
37962+
3794237963
export interface TransformGetTransformRequest extends RequestBase {
3794337964
/** Identifier for the transform. It can be a transform identifier or a
3794437965
* wildcard expression. You can get information for all transforms by using

0 commit comments

Comments
 (0)