@@ -43,19 +43,19 @@ export default class Ml {
4343 this . transport = transport
4444 }
4545
46- async clearTrainedModelDeploymentCache ( this : That , params ? : T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
47- async clearTrainedModelDeploymentCache ( this : That , params ? : T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
48- async clearTrainedModelDeploymentCache ( this : That , params ? : T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
49- async clearTrainedModelDeploymentCache ( this : That , params ? : T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < any > {
46+ async clearTrainedModelDeploymentCache ( this : That , params : T . MlClearTrainedModelDeploymentCacheRequest | TB . MlClearTrainedModelDeploymentCacheRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . MlClearTrainedModelDeploymentCacheResponse >
47+ async clearTrainedModelDeploymentCache ( this : That , params : T . MlClearTrainedModelDeploymentCacheRequest | TB . MlClearTrainedModelDeploymentCacheRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . MlClearTrainedModelDeploymentCacheResponse , unknown > >
48+ async clearTrainedModelDeploymentCache ( this : That , params : T . MlClearTrainedModelDeploymentCacheRequest | TB . MlClearTrainedModelDeploymentCacheRequest , options ?: TransportRequestOptions ) : Promise < T . MlClearTrainedModelDeploymentCacheResponse >
49+ async clearTrainedModelDeploymentCache ( this : That , params : T . MlClearTrainedModelDeploymentCacheRequest | TB . MlClearTrainedModelDeploymentCacheRequest , options ?: TransportRequestOptions ) : Promise < any > {
5050 const acceptedPath : string [ ] = [ 'model_id' ]
5151 const querystring : Record < string , any > = { }
5252 const body = undefined
5353
54- params = params ?? { }
5554 for ( const key in params ) {
5655 if ( acceptedPath . includes ( key ) ) {
5756 continue
5857 } else if ( key !== 'body' ) {
58+ // @ts -expect-error
5959 querystring [ key ] = params [ key ]
6060 }
6161 }
@@ -2006,7 +2006,7 @@ export default class Ml {
20062006 async updateDatafeed ( this : That , params : T . MlUpdateDatafeedRequest | TB . MlUpdateDatafeedRequest , options ?: TransportRequestOptions ) : Promise < T . MlUpdateDatafeedResponse >
20072007 async updateDatafeed ( this : That , params : T . MlUpdateDatafeedRequest | TB . MlUpdateDatafeedRequest , options ?: TransportRequestOptions ) : Promise < any > {
20082008 const acceptedPath : string [ ] = [ 'datafeed_id' ]
2009- const acceptedBody : string [ ] = [ 'aggregations' , 'chunking_config' , 'delayed_data_check_config' , 'frequency' , 'indices' , 'indexes' , 'indices_options' , 'max_empty_searches' , 'query' , 'query_delay' , 'runtime_mappings' , 'script_fields' , 'scroll_size' ]
2009+ const acceptedBody : string [ ] = [ 'aggregations' , 'chunking_config' , 'delayed_data_check_config' , 'frequency' , 'indices' , 'indexes' , 'indices_options' , 'job_id' , ' max_empty_searches', 'query' , 'query_delay' , 'runtime_mappings' , 'script_fields' , 'scroll_size' ]
20102010 const querystring : Record < string , any > = { }
20112011 // @ts -expect-error
20122012 const userBody : any = params ?. body
@@ -2074,7 +2074,7 @@ export default class Ml {
20742074 async updateJob ( this : That , params : T . MlUpdateJobRequest | TB . MlUpdateJobRequest , options ?: TransportRequestOptions ) : Promise < T . MlUpdateJobResponse >
20752075 async updateJob ( this : That , params : T . MlUpdateJobRequest | TB . MlUpdateJobRequest , options ?: TransportRequestOptions ) : Promise < any > {
20762076 const acceptedPath : string [ ] = [ 'job_id' ]
2077- const acceptedBody : string [ ] = [ 'allow_lazy_open' , 'analysis_limits' , 'background_persist_interval' , 'custom_settings' , 'categorization_filters' , 'description' , 'model_plot_config' , 'daily_model_snapshot_retention_after_days' , 'model_snapshot_retention_days' , 'renormalization_window_days' , 'results_retention_days' , 'groups' , 'detectors' , 'per_partition_categorization' ]
2077+ const acceptedBody : string [ ] = [ 'allow_lazy_open' , 'analysis_limits' , 'background_persist_interval' , 'custom_settings' , 'categorization_filters' , 'description' , 'model_plot_config' , 'model_prune_window' , ' daily_model_snapshot_retention_after_days', 'model_snapshot_retention_days' , 'renormalization_window_days' , 'results_retention_days' , 'groups' , 'detectors' , 'per_partition_categorization' ]
20782078 const querystring : Record < string , any > = { }
20792079 // @ts -expect-error
20802080 const userBody : any = params ?. body
@@ -2137,6 +2137,28 @@ export default class Ml {
21372137 return await this . transport . request ( { path, method, querystring, body } , options )
21382138 }
21392139
2140+ async updateTrainedModelDeployment ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
2141+ async updateTrainedModelDeployment ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
2142+ async updateTrainedModelDeployment ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
2143+ async updateTrainedModelDeployment ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < any > {
2144+ const acceptedPath : string [ ] = [ 'model_id' ]
2145+ const querystring : Record < string , any > = { }
2146+ const body = undefined
2147+
2148+ params = params ?? { }
2149+ for ( const key in params ) {
2150+ if ( acceptedPath . includes ( key ) ) {
2151+ continue
2152+ } else if ( key !== 'body' ) {
2153+ querystring [ key ] = params [ key ]
2154+ }
2155+ }
2156+
2157+ const method = 'POST'
2158+ const path = `/_ml/trained_models/${ encodeURIComponent ( params . model_id . toString ( ) ) } /deployment/_update`
2159+ return await this . transport . request ( { path, method, querystring, body } , options )
2160+ }
2161+
21402162 async upgradeJobSnapshot ( this : That , params : T . MlUpgradeJobSnapshotRequest | TB . MlUpgradeJobSnapshotRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . MlUpgradeJobSnapshotResponse >
21412163 async upgradeJobSnapshot ( this : That , params : T . MlUpgradeJobSnapshotRequest | TB . MlUpgradeJobSnapshotRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . MlUpgradeJobSnapshotResponse , unknown > >
21422164 async upgradeJobSnapshot ( this : That , params : T . MlUpgradeJobSnapshotRequest | TB . MlUpgradeJobSnapshotRequest , options ?: TransportRequestOptions ) : Promise < T . MlUpgradeJobSnapshotResponse >
0 commit comments