@opensearch-project/opensearch 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -693,6 +693,10 @@ export default class OpenSearchAPI {
693
693
  };
694
694
 
695
695
  ml: {
696
+ executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_ExecuteAlgorithm_Response>;
697
+ executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
698
+ executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
699
+
696
700
  predict (params: API.Ml_Predict_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_Predict_Response>;
697
701
  predict (params: API.Ml_Predict_Request, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
698
702
  predict (params: API.Ml_Predict_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
@@ -271,6 +271,7 @@ export type GetStats = {
271
271
  missing_time?: Duration;
272
272
  missing_time_in_millis: DurationValueUnitMillis;
273
273
  missing_total: number;
274
+ time?: Duration;
274
275
  time_in_millis: DurationValueUnitMillis;
275
276
  total: number;
276
277
  }
@@ -825,7 +826,7 @@ export type TaskFailure = {
825
826
  task_id: number;
826
827
  }
827
828
 
828
- export type TaskId = string | number
829
+ export type TaskId = string
829
830
 
830
831
  export type TermFrequencyNormalization = 'h1' | 'h2' | 'h3' | 'no' | 'z'
831
832
 
@@ -61,11 +61,14 @@ export type ConstantScoreQuery = QueryBase & {
61
61
  filter: QueryContainer;
62
62
  }
63
63
 
64
- export type DateDecayFunction = DecayFunctionBase & Record<string, any>
65
-
66
- export type DateDistanceFeatureQuery = DistanceFeatureQueryBaseDateMathDuration & Record<string, any>
64
+ export type DateDecayPlacement = {
65
+ decay?: number;
66
+ offset?: Common.Duration;
67
+ origin?: Common.DateTime;
68
+ scale?: Common.Duration;
69
+ }
67
70
 
68
- export type DateRangeQuery = RangeQueryBase & {
71
+ export type DateRangeQueryParameters = {
69
72
  format?: Common.DateFormat;
70
73
  from?: Common.DateMath | undefined;
71
74
  gt?: Common.DateMath;
@@ -76,30 +79,20 @@ export type DateRangeQuery = RangeQueryBase & {
76
79
  to?: Common.DateMath | undefined;
77
80
  }
78
81
 
79
- export type DecayFunction = DateDecayFunction | NumericDecayFunction | GeoDecayFunction
82
+ export type DecayFunction = DecayFunctionBase & Record<string, DecayPlacement>
80
83
 
81
84
  export type DecayFunctionBase = {
82
85
  multi_value_mode?: MultiValueMode;
83
86
  }
84
87
 
88
+ export type DecayPlacement = DateDecayPlacement | GeoDecayPlacement | NumericDecayPlacement
89
+
85
90
  export type DisMaxQuery = QueryBase & {
86
91
  queries: QueryContainer[];
87
92
  tie_breaker?: number;
88
93
  }
89
94
 
90
- export type DistanceFeatureQuery = GeoDistanceFeatureQuery | DateDistanceFeatureQuery
91
-
92
- export type DistanceFeatureQueryBaseDateMathDuration = QueryBase & {
93
- field: Common.Field;
94
- origin: Common.DateMath;
95
- pivot: Common.Duration;
96
- }
97
-
98
- export type DistanceFeatureQueryBaseGeoLocationDistance = QueryBase & {
99
- field: Common.Field;
100
- origin: Common.GeoLocation;
101
- pivot: Common.Distance;
102
- }
95
+ export type DistanceFeatureQuery = QueryBase & Record<string, any>
103
96
 
104
97
  export type ExistsQuery = QueryBase & {
105
98
  field: Common.Field;
@@ -111,6 +104,13 @@ export type FieldAndFormat = Common.Field | {
111
104
  include_unmapped?: boolean;
112
105
  }
113
106
 
107
+ export type FieldLookup = {
108
+ id: Common.Id;
109
+ index?: Common.IndexName;
110
+ path?: Common.Field;
111
+ routing?: Common.Routing;
112
+ }
113
+
114
114
  export type FieldValueFactorModifier = 'ln' | 'ln1p' | 'ln2p' | 'log' | 'log1p' | 'log2p' | 'none' | 'reciprocal' | 'sqrt' | 'square'
115
115
 
116
116
  export type FieldValueFactorScoreFunction = {
@@ -160,9 +160,12 @@ export type GeoBoundingBoxQuery = QueryBase & {
160
160
  [key: string]: any | Common.GeoBounds;
161
161
  }
162
162
 
163
- export type GeoDecayFunction = DecayFunctionBase & Record<string, any>
164
-
165
- export type GeoDistanceFeatureQuery = DistanceFeatureQueryBaseGeoLocationDistance & Record<string, any>
163
+ export type GeoDecayPlacement = {
164
+ decay?: number;
165
+ offset?: Common.Distance;
166
+ origin?: Common.GeoLocation;
167
+ scale?: Common.Distance;
168
+ }
166
169
 
167
170
  export type GeoDistanceQuery = QueryBase & {
168
171
  distance: Common.Distance;
@@ -174,9 +177,14 @@ export type GeoDistanceQuery = QueryBase & {
174
177
 
175
178
  export type GeoExecution = 'indexed' | 'memory'
176
179
 
180
+ export type GeoPolygonPoints = {
181
+ points: Common.GeoLocation[];
182
+ }
183
+
177
184
  export type GeoPolygonQuery = QueryBase & {
178
185
  ignore_unmapped?: IgnoreUnmapped;
179
186
  validation_method?: GeoValidationMethod;
187
+ [key: string]: any | GeoPolygonPoints;
180
188
  }
181
189
 
182
190
  export type GeoShape = {
@@ -184,14 +192,15 @@ export type GeoShape = {
184
192
  type?: string;
185
193
  }
186
194
 
187
- export type GeoShapeField = {
188
- relation?: Common.GeoShapeRelation;
189
- shape: GeoShape;
190
- }
191
-
192
195
  export type GeoShapeQuery = QueryBase & {
193
196
  ignore_unmapped?: IgnoreUnmapped;
194
- [key: string]: any | GeoShapeField;
197
+ [key: string]: any | GeoShapeQueryField;
198
+ }
199
+
200
+ export type GeoShapeQueryField = {
201
+ indexed_shape?: FieldLookup;
202
+ relation?: Common.GeoShapeRelation;
203
+ shape: GeoShape;
195
204
  }
196
205
 
197
206
  export type GeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict'
@@ -297,15 +306,18 @@ export type IntervalsWildcard = {
297
306
  }
298
307
 
299
308
  export type KnnQuery = QueryBase & {
300
- filter?: QueryContainer | QueryContainer[];
309
+ expand_nested_docs?: boolean;
310
+ filter?: QueryContainer;
301
311
  k?: number;
302
312
  max_distance?: number;
303
- method_parameters?: Record<string, number>;
313
+ method_parameters?: Record<string, any>;
304
314
  min_score?: number;
305
- rescore?: Record<string, number>;
315
+ rescore?: KnnQueryRescore;
306
316
  vector: QueryVector;
307
317
  }
308
318
 
319
+ export type KnnQueryRescore = boolean | RescoreContext
320
+
309
321
  export type Like = string | LikeDocument
310
322
 
311
323
  export type LikeDocument = {
@@ -429,16 +441,21 @@ export type NeuralQuery = QueryBase & {
429
441
  query_text?: string;
430
442
  }
431
443
 
432
- export type NumberRangeQuery = RangeQueryBase & {
433
- from?: undefined | number | string;
444
+ export type NumberRangeQueryParameters = {
445
+ from?: number | string | undefined;
434
446
  gt?: number;
435
447
  gte?: number;
436
448
  lt?: number;
437
449
  lte?: number;
438
- to?: undefined | number | string;
450
+ to?: number | string | undefined;
439
451
  }
440
452
 
441
- export type NumericDecayFunction = DecayFunctionBase & Record<string, any>
453
+ export type NumericDecayPlacement = {
454
+ decay?: number;
455
+ offset?: number;
456
+ origin?: number;
457
+ scale?: number;
458
+ }
442
459
 
443
460
  export type Operator = 'and' | 'AND' | 'or' | 'OR'
444
461
 
@@ -573,7 +590,7 @@ export type RandomScoreFunction = {
573
590
  seed?: number | string;
574
591
  }
575
592
 
576
- export type RangeQuery = DateRangeQuery | NumberRangeQuery
593
+ export type RangeQuery = RangeQueryBase & Record<string, any>
577
594
 
578
595
  export type RangeQueryBase = QueryBase & {
579
596
  relation?: RangeRelation;
@@ -614,6 +631,10 @@ export type RegexpQuery = string | (QueryBase & {
614
631
  value: string;
615
632
  })
616
633
 
634
+ export type RescoreContext = {
635
+ oversample_factor?: number;
636
+ }
637
+
617
638
  export type ScriptQuery = QueryBase & {
618
639
  script: Common.Script;
619
640
  }
@@ -757,12 +778,16 @@ export type XyShape = {
757
778
  type?: string;
758
779
  }
759
780
 
760
- export type XyShapeField = {
781
+ export type XyShapeQuery = QueryBase & {
782
+ ignore_unmapped?: boolean;
783
+ [key: string]: any | XyShapeQueryField;
784
+ }
785
+
786
+ export type XyShapeQueryField = {
787
+ indexed_shape?: FieldLookup;
761
788
  relation?: Common.GeoShapeRelation;
762
789
  shape: XyShape;
763
790
  }
764
791
 
765
- export type XyShapeQuery = QueryBase & Record<string, XyShapeField>
766
-
767
- export type ZeroTermsQuery = 'all' | 'none'
792
+ export type ZeroTermsQuery = 'all' | 'ALL' | 'none' | 'NONE'
768
793
 
@@ -31,6 +31,7 @@ export type AdditionalInfo = Record<string, any>
31
31
 
32
32
  export type Aggregation = {
33
33
  field?: string;
34
+ max?: Aggregation;
34
35
  sum?: Aggregation;
35
36
  [key: string]: any;
36
37
  }
@@ -41,6 +42,7 @@ export type Algorithm = {
41
42
 
42
43
  export type AlgorithmOperations = {
43
44
  deploy?: ModelStats;
45
+ execute?: ModelStats;
44
46
  predict?: ModelStats;
45
47
  register?: ModelStats;
46
48
  train?: ModelStats;
@@ -57,6 +59,13 @@ export type BoolQuery = {
57
59
  should?: Filter[];
58
60
  }
59
61
 
62
+ export type Buckets = {
63
+ end_time?: number;
64
+ entities?: Entity[];
65
+ overall_aggregate_value?: number;
66
+ start_time?: number;
67
+ }
68
+
60
69
  export type ByteBuffer = {
61
70
  array?: string;
62
71
  order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN';
@@ -84,6 +93,26 @@ export type Credential = {
84
93
  [key: string]: any;
85
94
  }
86
95
 
96
+ export type Entity = {
97
+ base_value?: number;
98
+ contribution_value?: number;
99
+ key?: string[];
100
+ new_value?: number;
101
+ }
102
+
103
+ export type ExecuteAlgorithmResponse = ExecuteLocalSampleCalculatorResponse | {
104
+ results?: ExecuteAnomalyLocalizationResponse[];
105
+ }
106
+
107
+ export type ExecuteAnomalyLocalizationResponse = {
108
+ name?: string;
109
+ result?: Result;
110
+ }
111
+
112
+ export type ExecuteLocalSampleCalculatorResponse = {
113
+ result?: number;
114
+ }
115
+
87
116
  export type Exists = {
88
117
  field?: Common.Field;
89
118
  }
@@ -258,6 +287,7 @@ export type ModelGroupRegistration = {
258
287
 
259
288
  export type ModelProfile = {
260
289
  deploy?: ModelStats;
290
+ execute?: ModelStats;
261
291
  memory_size_estimation_cpu?: number;
262
292
  memory_size_estimation_gpu?: number;
263
293
  model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
@@ -396,6 +426,10 @@ export type RateLimiter = {
396
426
  unit: 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS';
397
427
  }
398
428
 
429
+ export type Result = {
430
+ buckets?: Buckets[];
431
+ }
432
+
399
433
  export type Rows = {
400
434
  values?: Values[];
401
435
  }
@@ -26,9 +26,9 @@ const { normalizeArguments } = require('../utils');
26
26
  *
27
27
  * @param {object} [params]
28
28
  * @param {string} [params.index] - The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names.
29
- * @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically.
30
- * @param {boolean} [params.keep_on_completion] - Whether you want to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
31
- * @param {string} [params.wait_for_completion_timeout] - The amount of time that you plan to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
29
+ * @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query exceeds this amount of time, the process cancels this query automatically.
30
+ * @param {boolean} [params.keep_on_completion] - Whether to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
31
+ * @param {string} [params.wait_for_completion_timeout] - The amount of time to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
32
32
  * @param {object} [params.body] - The search definition using the Query DSL.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Monitors any asynchronous searches that are `running`, `completed`, `persisted`.
22
+ * Monitors any asynchronous searches that are `running`, `completed`, or `persisted`.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats - asynchronous_search.stats}
24
24
  *
25
25
  * @memberOf API-Asynchronous-Search
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Provides explanations for shard allocations in the cluster.
22
+ * Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ - cluster.allocation_explain}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.include_disk_info=false] - If `true`, returns information about disk usage and shard sizes.
29
- * @param {boolean} [params.include_yes_decisions=false] - If `true`, returns YES decisions in explanation.
30
- * @param {object} [params.body] - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
28
+ * @param {boolean} [params.include_disk_info=false] - When `true`, returns information about disk usage and shard sizes.
29
+ * @param {boolean} [params.include_yes_decisions=false] - When `true`, returns any `YES` decisions in the allocation explanation.
30
+ * @param {object} [params.body] - The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -26,9 +26,9 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
26
26
  *
27
27
  * @param {object} params
28
28
  * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
30
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
31
- * @param {string} params.name - Name of the component template to delete. Wildcard (*) expressions are supported.
29
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
30
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
31
+ * @param {string} params.name - The name of the component template to delete. Supports wildcard (*) expressions.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Delete any existing decommission.
22
+ * Recommissions a decommissioned zone.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.delete_decommission_awareness}
24
24
  *
25
25
  * @memberOf API-Cluster
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Clears cluster voting config exclusions.
22
+ * Clears any cluster voting configuration exclusions.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.delete_voting_config_exclusions}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. Defaults to true, meaning that all excluded nodes must be removed from the cluster before this API takes any action. If set to `false` then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
28
+ * @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. When `true`, all excluded nodes are removed from the cluster before this API takes any action. When `false`, the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,10 +25,10 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.
30
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
31
- * @param {string} params.name - Name of the component template to check existence of. Wildcard (*) expressions are supported.
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
+ * @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false, information is retrieved from the cluster manager node.
30
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
31
+ * @param {string} params.name - The name of the component template. Wildcard (*) expressions are supported.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,11 +25,11 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
29
  * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
30
- * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node.
31
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
32
- * @param {string} [params.name] - Name of the component template to retrieve. Wildcard (`*`) expressions are supported.
30
+ * @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.
31
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
+ * @param {string} [params.name] - The name of the component template to retrieve. Wildcard (`*`) expressions are supported.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Get details and status of decommissioned attribute.
22
+ * Retrieves the decommission status for all zones.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-getting-zone-decommission-status - cluster.get_decommission_awareness}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.awareness_attribute_name - Awareness attribute name.
28
+ * @param {string} params.awareness_attribute_name - The name of the awareness attribute.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,11 +25,11 @@ const { normalizeArguments } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
30
- * @param {boolean} [params.include_defaults=false] - If `true`, returns default cluster settings from the local node.
31
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
32
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
+ * @param {boolean} [params.flat_settings=false] - When `true`, returns cluster settings in a flat format.
30
+ * @param {boolean} [params.include_defaults=false] - When `true`, returns default cluster settings from the local node.
31
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.attribute - Awareness attribute name.
28
+ * @param {string} params.attribute - The name of the awareness attribute.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,20 +25,20 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.awareness_attribute] - The awareness attribute for which the health is required.
29
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
30
- * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
31
- * @param {string} [params.level] - Can be one of cluster, indexes or shards. Controls the details level of the health information returned.
32
- * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.
33
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
34
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
35
- * @param {string} [params.wait_for_active_shards] - A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.
36
- * @param {string} [params.wait_for_events] - Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.
37
- * @param {boolean} [params.wait_for_no_initializing_shards] - A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards.
38
- * @param {boolean} [params.wait_for_no_relocating_shards] - A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards.
39
- * @param {string} [params.wait_for_nodes] - The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation.
40
- * @param {string} [params.wait_for_status] - One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status.
41
- * @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`.
28
+ * @param {string} [params.awareness_attribute] - The name of the awareness attribute for which to return the cluster health status (for example, `zone`). Applicable only if `level` is set to `awareness_attributes`.
29
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
30
+ * @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
31
+ * @param {string} [params.level]
32
+ * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
33
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
34
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
35
+ * @param {string} [params.wait_for_active_shards] - Waits until the specified number of shards is active before returning a response. Use `all` for all shards.
36
+ * @param {string} [params.wait_for_events] - Waits until all currently queued events with the given priority are processed.
37
+ * @param {boolean} [params.wait_for_no_initializing_shards=false] - Whether to wait until there are no initializing shards in the cluster.
38
+ * @param {boolean} [params.wait_for_no_relocating_shards] - Whether to wait until there are no relocating shards in the cluster.
39
+ * @param {string} [params.wait_for_nodes] - Waits until the specified number of nodes (`N`) is available. Accepts `>=N`, `<=N`, `>N`, and `<N`. You can also use `ge(N)`, `le(N)`, `gt(N)`, and `lt(N)` notation.
40
+ * @param {string} [params.wait_for_status] - Waits until the cluster health reaches the specified status or better.
41
+ * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
42
42
  *
43
43
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
44
44
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,16 +19,16 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns a list of any cluster-level changes (e.g. create index, update mapping,
23
- allocate or fail shard) which have not yet been executed.
22
+ * Returns a list of pending cluster-level tasks, such as index creation, mapping updates,
23
+ or new allocations.
24
24
  * <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.pending_tasks}
25
25
  *
26
26
  * @memberOf API-Cluster
27
27
  *
28
28
  * @param {object} [params]
29
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
30
- * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node.
31
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
29
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
30
+ * @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.
31
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Updates the cluster voting config exclusions by node ids or node names.
22
+ * Updates the cluster voting configuration by excluding certain node IDs or names.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.post_voting_config_exclusions}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.node_ids] - A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_names`.
29
- * @param {string} [params.node_names] - A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_ids`.
30
- * @param {string} [params.timeout] - When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error.
28
+ * @param {string} [params.node_ids] - A comma-separated list of node IDs to exclude from the voting configuration. When using this setting, you cannot also specify `node_names`.
29
+ * @param {string} [params.node_names] - A comma-separated list of node names to exclude from the voting configuration. When using this setting, you cannot also specify `node_ids`.
30
+ * @param {string} [params.timeout] - When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning a response. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,12 +25,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {boolean} [params.create=false] - If `true`, this request cannot replace or update existing component templates.
30
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
31
- * @param {string} [params.timeout] - Operation timeout.
32
- * @param {string} params.name - Name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch Agent uses these templates to configure backing indexes for its data streams. If you use OpenSearch Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you don't use OpenSearch Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.
33
- * @param {object} params.body - The template definition
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
+ * @param {boolean} [params.create=false] - When `true`, this request cannot replace or update existing component templates.
30
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
31
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
+ * @param {string} params.name - The name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch uses these templates to configure backing indexes for its data streams. If you want to overwrite one of these templates, set the replacement template `version` to a higher value than the current version. If you want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the Cluster Update Settings API.
33
+ * @param {object} params.body - The template definition.
34
34
  *
35
35
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
36
36
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Decommissions an awareness attribute.
22
+ * Decommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.put_decommission_awareness}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.awareness_attribute_name - Awareness attribute name.
29
- * @param {string} params.awareness_attribute_value - Awareness attribute value.
28
+ * @param {string} params.awareness_attribute_name - The name of the awareness attribute.
29
+ * @param {string} params.awareness_attribute_value - The value of the awareness attribute.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,11 +25,11 @@ const { normalizeArguments, handleMissingParam } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {boolean} [params.flat_settings=false] - Return settings in flat format.
30
- * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
31
- * @param {string} [params.timeout] - Explicit operation timeout
32
- * @param {object} params.body - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
+ * @param {boolean} [params.flat_settings=false] - Returns settings in a flat format.
30
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
31
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
+ * @param {object} params.body - The cluster settings to update.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.attribute - Awareness attribute name.
28
+ * @param {string} params.attribute - The name of the awareness attribute.
29
29
  * @param {string} [params.body]
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -25,13 +25,13 @@ const { normalizeArguments } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
29
- * @param {boolean} [params.dry_run] - If `true`, then the request simulates the operation only and returns the resulting state.
30
- * @param {boolean} [params.explain] - If `true`, then the response contains an explanation of why the commands can or cannot be executed.
31
- * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
28
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
29
+ * @param {boolean} [params.dry_run] - When `true`, the request simulates the operation and returns the resulting state.
30
+ * @param {boolean} [params.explain] - When `true`, the response contains an explanation of why certain commands can or cannot be executed.
31
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
32
32
  * @param {string} [params.metric] - Limits the information returned to the specified metrics.
33
- * @param {boolean} [params.retry_failed] - If `true`, then retries allocation of shards that are blocked due to too many subsequent allocation failures.
34
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
33
+ * @param {boolean} [params.retry_failed] - When `true`, retries shard allocation if it was blocked because of too many subsequent failures.
34
+ * @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
35
35
  * @param {object} [params.body] - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
36
36
  *
37
37
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,23 +19,23 @@
19
19
  const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns a comprehensive information about the state of the cluster.
22
+ * Returns comprehensive information about the state of the cluster.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.state}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified)
29
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
30
- * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
31
- * @param {boolean} [params.flat_settings=false] - Return settings in flat format.
32
- * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indexes should be ignored when unavailable (missing or closed)
33
- * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node.
34
- * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to cluster manager.
28
+ * @param {boolean} [params.allow_no_indices] - Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the `_all` string or when no indexes have been specified.
29
+ * @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
30
+ * @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
31
+ * @param {boolean} [params.flat_settings=false] - Returns settings in a flat format.
32
+ * @param {boolean} [params.ignore_unavailable] - Whether the specified concrete indexes should be ignored when unavailable (missing or closed).
33
+ * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
34
+ * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
35
35
  * @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version.
36
36
  * @param {string} [params.wait_for_timeout] - The maximum time to wait for `wait_for_metadata_version` before timing out.
37
- * @param {array} [params.metric] - Limit the information returned to the specified metrics
38
- * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes
37
+ * @param {array} [params.metric] - Limits the information returned to only the specified metrics.
38
+ * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
39
39
  *
40
40
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
41
41
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,17 +19,17 @@
19
19
  const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns high-level overview of cluster statistics.
22
+ * Returns a high-level overview of cluster statistics.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ - cluster.stats}
24
24
  *
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
29
- * @param {string} [params.timeout] - Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout.
30
- * @param {array} [params.index_metric] - Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified.
28
+ * @param {boolean} [params.flat_settings=false] - When `true`, returns settings in a flat format.
29
+ * @param {string} [params.timeout] - The amount of time to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout.
30
+ * @param {array} [params.index_metric] - A comma-separated list of index metric groups, for example, `docs,store`.
31
31
  * @param {array} [params.metric] - Limit the information returned to the specified metrics.
32
- * @param {string} [params.node_id] - Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.
32
+ * @param {string} [params.node_id] - A comma-separated list of node IDs used to filter results. Supports [node filters](https://opensearch.org/docs/latest/api-reference/nodes-apis/index/#node-filters).
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
package/api/index.d.ts CHANGED
@@ -275,6 +275,7 @@ import { Knn_TrainModel_Request, Knn_TrainModel_Response, Knn_TrainModel_Respons
275
275
  import { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody } from './knn/deleteModel';
276
276
  import { Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody } from './knn/getModel';
277
277
  import { Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody } from './knn/warmup';
278
+ import { Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody } from './ml/executeAlgorithm';
278
279
  import { Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody } from './ml/predict';
279
280
  import { Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody } from './ml/trainPredict';
280
281
  import { Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody } from './ml/train';
@@ -682,6 +683,7 @@ export {
682
683
  Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody,
683
684
  Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody,
684
685
  Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody,
686
+ Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody,
685
687
  Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody,
686
688
  Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody,
687
689
  Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody,
@@ -19,6 +19,7 @@ import * as Common from '../_types/_common'
19
19
  import * as Global from '../_types/_global'
20
20
  import * as Indices_Common from '../_types/indices._common'
21
21
  import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template'
22
+ import * as Indices_SimulateTemplate from '../_types/indices.simulate_template'
22
23
 
23
24
  export interface Indices_SimulateIndexTemplate_Request extends Global.Params {
24
25
  body?: Indices_SimulateIndexTemplate_RequestBody;
@@ -42,5 +43,8 @@ export interface Indices_SimulateIndexTemplate_Response extends ApiResponse {
42
43
  body: Indices_SimulateIndexTemplate_ResponseBody;
43
44
  }
44
45
 
45
- export type Indices_SimulateIndexTemplate_ResponseBody = Record<string, any>
46
+ export type Indices_SimulateIndexTemplate_ResponseBody = {
47
+ overlapping?: Indices_SimulateTemplate.Overlapping[];
48
+ template?: Indices_SimulateTemplate.Template;
49
+ }
46
50
 
package/api/ml/_api.js CHANGED
@@ -34,6 +34,7 @@ function MlApi(bindObj) {
34
34
  this.deleteTask = require('./deleteTask').bind(bindObj);
35
35
  this.deployModel = require('./deployModel').bind(bindObj);
36
36
  this.executeAgent = require('./executeAgent').bind(bindObj);
37
+ this.executeAlgorithm = require('./executeAlgorithm').bind(bindObj);
37
38
  this.getAgent = require('./getAgent').bind(bindObj);
38
39
  this.getAllMemories = require('./getAllMemories').bind(bindObj);
39
40
  this.getAllMessages = require('./getAllMessages').bind(bindObj);
@@ -108,6 +109,8 @@ function MlApi(bindObj) {
108
109
  this.deploy_model = require('./deployModel').bind(bindObj);
109
110
  // Deprecated: Use executeAgent instead.
110
111
  this.execute_agent = require('./executeAgent').bind(bindObj);
112
+ // Deprecated: Use executeAlgorithm instead.
113
+ this.execute_algorithm = require('./executeAlgorithm').bind(bindObj);
111
114
  // Deprecated: Use getAgent instead.
112
115
  this.get_agent = require('./getAgent').bind(bindObj);
113
116
  // Deprecated: Use getAllMemories instead.
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright OpenSearch Contributors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * The OpenSearch Contributors require contributions made to
6
+ * this file be licensed under the Apache-2.0 license or a
7
+ * compatible open source license.
8
+ *
9
+ */
10
+
11
+ /*
12
+ * This file was generated from the OpenSearch API Spec. Do NOT edit it
13
+ * manually. If you want to make changes, either update the spec or
14
+ * modify the API generator.
15
+ */
16
+
17
+ import { ApiResponse } from '../../lib/Transport'
18
+ import * as Global from '../_types/_global'
19
+ import * as Ml_Common from '../_types/ml._common'
20
+
21
+ export interface Ml_ExecuteAlgorithm_Request extends Global.Params {
22
+ algorithm_name: 'anomaly_localization' | 'local_sample_calculator';
23
+ body?: Ml_ExecuteAlgorithm_RequestBody;
24
+ }
25
+
26
+ export type Ml_ExecuteAlgorithm_RequestBody = {
27
+ aggregations?: Ml_Common.Aggregation[];
28
+ attribute_field_names?: string[];
29
+ end_time?: number;
30
+ index_name?: string;
31
+ input_data?: number[];
32
+ metrics?: number[][];
33
+ min_time_interval?: number;
34
+ num_outputs?: number;
35
+ operation?: 'max' | 'min' | 'sum';
36
+ start_time?: number;
37
+ time_field_name?: string;
38
+ }
39
+
40
+ export interface Ml_ExecuteAlgorithm_Response extends ApiResponse {
41
+ body: Ml_ExecuteAlgorithm_ResponseBody;
42
+ }
43
+
44
+ export type Ml_ExecuteAlgorithm_ResponseBody = Ml_Common.ExecuteAlgorithmResponse
45
+
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Copyright OpenSearch Contributors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * The OpenSearch Contributors require contributions made to
6
+ * this file be licensed under the Apache-2.0 license or a
7
+ * compatible open source license.
8
+ *
9
+ */
10
+
11
+ /*
12
+ * This file was generated from the OpenSearch API Spec. Do NOT edit it
13
+ * manually. If you want to make changes, either update the spec or
14
+ * modify the API generator.
15
+ */
16
+
17
+ 'use strict';
18
+
19
+ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
+
21
+ /**
22
+ * Execute an algorithm.
23
+ * <br/> See Also: {@link undefined - ml.execute_algorithm}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.algorithm_name
29
+ * @param {object} [params.body]
30
+ *
31
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
+ * @param {function} [callback] - Callback that handles errors and response
33
+ *
34
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
35
+ */
36
+ function executeAlgorithmFunc(params, options, callback) {
37
+ [params, options, callback] = normalizeArguments(params, options, callback);
38
+ if (params.algorithm_name == null) return handleMissingParam('algorithm_name', this, callback);
39
+
40
+ let { body, algorithm_name, ...querystring } = params;
41
+ algorithm_name = parsePathParam(algorithm_name);
42
+
43
+ const path = '/_plugins/_ml/_execute/' + algorithm_name;
44
+ const method = 'POST';
45
+ body = body || '';
46
+
47
+ return this.transport.request({ method, path, querystring, body }, options, callback);
48
+ }
49
+
50
+ module.exports = executeAlgorithmFunc;
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "LICENSE.txt"
37
37
  ],
38
38
  "homepage": "https://www.opensearch.org/",
39
- "version": "3.2.0",
39
+ "version": "3.3.0",
40
40
  "versionCanary": "7.10.0-canary.6",
41
41
  "keywords": [
42
42
  "opensearch",