@opensearch-project/opensearch 3.0.0-beta.9 → 3.0.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.
Files changed (82) hide show
  1. package/api/OpenSearchApi.d.ts +34 -0
  2. package/api/_core/search.d.ts +1 -1
  3. package/api/_core/updateByQueryRethrottle.d.ts +1 -0
  4. package/api/_types/_common.analysis.d.ts +1 -1
  5. package/api/_types/_common.d.ts +15 -5
  6. package/api/_types/_global.d.ts +2 -1
  7. package/api/_types/cluster.stats.d.ts +0 -18
  8. package/api/_types/indices._common.d.ts +1 -13
  9. package/api/_types/indices.analyze.d.ts +2 -1
  10. package/api/_types/indices.shard_stores.d.ts +2 -2
  11. package/api/_types/indices.stats.d.ts +3 -1
  12. package/api/_types/ml._common.d.ts +209 -8
  13. package/api/_types/nodes._common.d.ts +0 -631
  14. package/api/_types/nodes.info.d.ts +16 -23
  15. package/api/_types/nodes.reload_secure_settings.d.ts +8 -4
  16. package/api/_types/nodes.stats.d.ts +634 -4
  17. package/api/_types/nodes.usage.d.ts +1 -7
  18. package/api/cat/aliases.js +1 -1
  19. package/api/cat/allPitSegments.js +6 -6
  20. package/api/cat/clusterManager.js +1 -1
  21. package/api/cat/count.js +5 -5
  22. package/api/cat/fielddata.js +6 -6
  23. package/api/cat/health.js +5 -5
  24. package/api/cat/indices.js +14 -14
  25. package/api/cat/master.js +7 -7
  26. package/api/cat/nodeattrs.js +7 -7
  27. package/api/cat/nodes.js +11 -11
  28. package/api/cat/pendingTasks.js +9 -9
  29. package/api/cat/pitSegments.js +6 -6
  30. package/api/cat/plugins.js +8 -8
  31. package/api/cat/recovery.js +8 -8
  32. package/api/cat/repositories.js +8 -8
  33. package/api/cat/segmentReplication.js +18 -17
  34. package/api/cat/segments.js +8 -8
  35. package/api/cat/shards.js +10 -10
  36. package/api/cat/snapshots.js +9 -9
  37. package/api/cat/tasks.js +8 -8
  38. package/api/cat/templates.js +8 -8
  39. package/api/cat/threadPool.js +8 -8
  40. package/api/cluster/getComponentTemplate.d.ts +1 -0
  41. package/api/cluster/getComponentTemplate.js +1 -0
  42. package/api/cluster/reroute.d.ts +1 -2
  43. package/api/cluster/state.d.ts +1 -1
  44. package/api/cluster/stats.d.ts +9 -1
  45. package/api/index.d.ts +16 -0
  46. package/api/indices/addBlock.d.ts +1 -2
  47. package/api/indices/clone.d.ts +2 -3
  48. package/api/indices/close.d.ts +1 -2
  49. package/api/indices/putTemplate.d.ts +1 -1
  50. package/api/indices/rollover.d.ts +2 -3
  51. package/api/indices/shardStores.d.ts +1 -1
  52. package/api/indices/shrink.d.ts +2 -3
  53. package/api/indices/split.d.ts +1 -2
  54. package/api/indices/stats.d.ts +1 -1
  55. package/api/indices/upgrade.d.ts +3 -2
  56. package/api/indices/upgrade.js +0 -1
  57. package/api/ml/_api.js +20 -0
  58. package/api/ml/createConnector.d.ts +1 -1
  59. package/api/ml/getConnector.d.ts +30 -0
  60. package/api/ml/getConnector.js +49 -0
  61. package/api/ml/predict.d.ts +40 -0
  62. package/api/ml/predict.js +53 -0
  63. package/api/ml/searchConnectors.d.ts +36 -0
  64. package/api/ml/searchConnectors.js +47 -0
  65. package/api/ml/searchModelGroup.d.ts +36 -0
  66. package/api/ml/searchModelGroup.js +47 -0
  67. package/api/ml/searchModels.d.ts +3 -2
  68. package/api/ml/train.d.ts +37 -0
  69. package/api/ml/train.js +50 -0
  70. package/api/ml/trainPredict.d.ts +38 -0
  71. package/api/ml/trainPredict.js +50 -0
  72. package/api/ml/updateConnector.d.ts +45 -0
  73. package/api/ml/updateConnector.js +50 -0
  74. package/api/ml/updateModelGroup.d.ts +40 -0
  75. package/api/ml/updateModelGroup.js +50 -0
  76. package/api/nodes/info.d.ts +5 -1
  77. package/api/nodes/reloadSecureSettings.d.ts +5 -1
  78. package/api/nodes/stats.d.ts +5 -1
  79. package/api/nodes/usage.d.ts +5 -1
  80. package/api/tasks/cancel.d.ts +1 -1
  81. package/api/tasks/list.d.ts +1 -1
  82. package/package.json +1 -1
@@ -20,21 +20,21 @@ const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
22
  * Returns cluster-wide thread pool statistics per node.
23
- By default the active, queue and rejected statistics are returned for all thread pools.
23
+ By default the active, queued, and rejected statistics are returned for all thread pools.
24
24
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ - cat.thread_pool}
25
25
  *
26
26
  * @memberOf API-Cat
27
27
  *
28
28
  * @param {object} [params]
29
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
30
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
31
- * @param {array} [params.h] - Comma-separated list of column names to display.
29
+ * @param {string} [params.cluster_manager_timeout] - A timeout for connection to the cluster manager node.
30
+ * @param {string} [params.format] - A short version of the `Accept` header, such as `json` or `yaml`.
31
+ * @param {array} [params.h] - A comma-separated list of column names to display.
32
32
  * @param {boolean} [params.help=false] - Return help information.
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 - Operation timeout for connection to cluster-manager node.
35
- * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by.
33
+ * @param {boolean} [params.local=false] - Returns local information but does not retrieve the state from the cluster manager node.
34
+ * @param {string} [params.master_timeout] DEPRECATED - The amount of time allowed to establish a connection to the cluster manager node.
35
+ * @param {array} [params.s] - A comma-separated list of column names or column aliases to sort by.
36
36
  * @param {number} [params.size] - The multiplier in which to display values.
37
- * @param {boolean} [params.v=false] - Verbose mode. Display column headers.
37
+ * @param {boolean} [params.v=false] - Enables verbose mode, which displays column headers.
38
38
  * @param {string} [params.thread_pool_patterns] - A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions.
39
39
  *
40
40
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -21,6 +21,7 @@ import * as Global from '../_types/_global'
21
21
 
22
22
  export interface Cluster_GetComponentTemplate_Request extends Global.Params {
23
23
  cluster_manager_timeout?: Common.Duration;
24
+ flat_settings?: boolean;
24
25
  local?: boolean;
25
26
  master_timeout?: Common.Duration;
26
27
  name?: Common.Name;
@@ -26,6 +26,7 @@ const { normalizeArguments, parsePathParam } = require('../utils');
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 {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
29
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.
30
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.
31
32
  * @param {string} [params.name] - Name of the component template to retrieve. Wildcard (`*`) expressions are supported.
@@ -38,8 +38,7 @@ export interface Cluster_Reroute_Response extends ApiResponse {
38
38
  body: Cluster_Reroute_ResponseBody;
39
39
  }
40
40
 
41
- export type Cluster_Reroute_ResponseBody = {
42
- acknowledged: boolean;
41
+ export interface Cluster_Reroute_ResponseBody extends Common.AcknowledgedResponseBase {
43
42
  explanations?: Cluster_Reroute.RerouteExplanation[];
44
43
  state?: Record<string, any>;
45
44
  }
@@ -37,5 +37,5 @@ export interface Cluster_State_Response extends ApiResponse {
37
37
  body: Cluster_State_ResponseBody;
38
38
  }
39
39
 
40
- export type Cluster_State_ResponseBody = Record<string, any>
40
+ export type Cluster_State_ResponseBody = any
41
41
 
@@ -18,6 +18,7 @@ import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Cluster_Stats from '../_types/cluster.stats'
19
19
  import * as Common from '../_types/_common'
20
20
  import * as Global from '../_types/_global'
21
+ import * as Nodes_Common from '../_types/nodes._common'
21
22
 
22
23
  export interface Cluster_Stats_Request extends Global.Params {
23
24
  flat_settings?: boolean;
@@ -31,5 +32,12 @@ export interface Cluster_Stats_Response extends ApiResponse {
31
32
  body: Cluster_Stats_ResponseBody;
32
33
  }
33
34
 
34
- export type Cluster_Stats_ResponseBody = Cluster_Stats.StatsResponseBase
35
+ export interface Cluster_Stats_ResponseBody extends Nodes_Common.NodesResponseBase {
36
+ cluster_name: Common.Name;
37
+ cluster_uuid: Common.Uuid;
38
+ indices?: Cluster_Stats.ClusterIndices;
39
+ nodes?: Cluster_Stats.ClusterNodes;
40
+ status: Common.HealthStatus;
41
+ timestamp: Common.EpochTimeUnitMillis;
42
+ }
35
43
 
package/api/index.d.ts CHANGED
@@ -275,13 +275,21 @@ 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_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody } from './ml/predict';
279
+ import { Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody } from './ml/trainPredict';
280
+ import { Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody } from './ml/train';
278
281
  import { Ml_RegisterAgents_Request, Ml_RegisterAgents_RequestBody, Ml_RegisterAgents_Response, Ml_RegisterAgents_ResponseBody } from './ml/registerAgents';
279
282
  import { Ml_DeleteAgent_Request, Ml_DeleteAgent_Response, Ml_DeleteAgent_ResponseBody } from './ml/deleteAgent';
280
283
  import { Ml_CreateConnector_Request, Ml_CreateConnector_RequestBody, Ml_CreateConnector_Response, Ml_CreateConnector_ResponseBody } from './ml/createConnector';
284
+ import { Ml_SearchConnectors_Request, Ml_SearchConnectors_RequestBody, Ml_SearchConnectors_Response, Ml_SearchConnectors_ResponseBody } from './ml/searchConnectors';
281
285
  import { Ml_DeleteConnector_Request, Ml_DeleteConnector_Response, Ml_DeleteConnector_ResponseBody } from './ml/deleteConnector';
286
+ import { Ml_GetConnector_Request, Ml_GetConnector_Response, Ml_GetConnector_ResponseBody } from './ml/getConnector';
287
+ import { Ml_UpdateConnector_Request, Ml_UpdateConnector_RequestBody, Ml_UpdateConnector_Response, Ml_UpdateConnector_ResponseBody } from './ml/updateConnector';
282
288
  import { Ml_RegisterModelGroup_Request, Ml_RegisterModelGroup_RequestBody, Ml_RegisterModelGroup_Response, Ml_RegisterModelGroup_ResponseBody } from './ml/registerModelGroup';
289
+ import { Ml_SearchModelGroup_Request, Ml_SearchModelGroup_RequestBody, Ml_SearchModelGroup_Response, Ml_SearchModelGroup_ResponseBody } from './ml/searchModelGroup';
283
290
  import { Ml_DeleteModelGroup_Request, Ml_DeleteModelGroup_Response, Ml_DeleteModelGroup_ResponseBody } from './ml/deleteModelGroup';
284
291
  import { Ml_GetModelGroup_Request, Ml_GetModelGroup_Response, Ml_GetModelGroup_ResponseBody } from './ml/getModelGroup';
292
+ import { Ml_UpdateModelGroup_Request, Ml_UpdateModelGroup_RequestBody, Ml_UpdateModelGroup_Response, Ml_UpdateModelGroup_ResponseBody } from './ml/updateModelGroup';
285
293
  import { Ml_RegisterModel_Request, Ml_RegisterModel_RequestBody, Ml_RegisterModel_Response, Ml_RegisterModel_ResponseBody } from './ml/registerModel';
286
294
  import { Ml_SearchModels_Request, Ml_SearchModels_RequestBody, Ml_SearchModels_Response, Ml_SearchModels_ResponseBody } from './ml/searchModels';
287
295
  import { Ml_DeleteModel_Request, Ml_DeleteModel_Response, Ml_DeleteModel_ResponseBody } from './ml/deleteModel';
@@ -638,13 +646,21 @@ export {
638
646
  Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody,
639
647
  Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody,
640
648
  Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody,
649
+ Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody,
650
+ Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody,
651
+ Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody,
641
652
  Ml_RegisterAgents_Request, Ml_RegisterAgents_RequestBody, Ml_RegisterAgents_Response, Ml_RegisterAgents_ResponseBody,
642
653
  Ml_DeleteAgent_Request, Ml_DeleteAgent_Response, Ml_DeleteAgent_ResponseBody,
643
654
  Ml_CreateConnector_Request, Ml_CreateConnector_RequestBody, Ml_CreateConnector_Response, Ml_CreateConnector_ResponseBody,
655
+ Ml_SearchConnectors_Request, Ml_SearchConnectors_RequestBody, Ml_SearchConnectors_Response, Ml_SearchConnectors_ResponseBody,
644
656
  Ml_DeleteConnector_Request, Ml_DeleteConnector_Response, Ml_DeleteConnector_ResponseBody,
657
+ Ml_GetConnector_Request, Ml_GetConnector_Response, Ml_GetConnector_ResponseBody,
658
+ Ml_UpdateConnector_Request, Ml_UpdateConnector_RequestBody, Ml_UpdateConnector_Response, Ml_UpdateConnector_ResponseBody,
645
659
  Ml_RegisterModelGroup_Request, Ml_RegisterModelGroup_RequestBody, Ml_RegisterModelGroup_Response, Ml_RegisterModelGroup_ResponseBody,
660
+ Ml_SearchModelGroup_Request, Ml_SearchModelGroup_RequestBody, Ml_SearchModelGroup_Response, Ml_SearchModelGroup_ResponseBody,
646
661
  Ml_DeleteModelGroup_Request, Ml_DeleteModelGroup_Response, Ml_DeleteModelGroup_ResponseBody,
647
662
  Ml_GetModelGroup_Request, Ml_GetModelGroup_Response, Ml_GetModelGroup_ResponseBody,
663
+ Ml_UpdateModelGroup_Request, Ml_UpdateModelGroup_RequestBody, Ml_UpdateModelGroup_Response, Ml_UpdateModelGroup_ResponseBody,
648
664
  Ml_RegisterModel_Request, Ml_RegisterModel_RequestBody, Ml_RegisterModel_Response, Ml_RegisterModel_ResponseBody,
649
665
  Ml_SearchModels_Request, Ml_SearchModels_RequestBody, Ml_SearchModels_Response, Ml_SearchModels_ResponseBody,
650
666
  Ml_DeleteModel_Request, Ml_DeleteModel_Response, Ml_DeleteModel_ResponseBody,
@@ -34,8 +34,7 @@ export interface Indices_AddBlock_Response extends ApiResponse {
34
34
  body: Indices_AddBlock_ResponseBody;
35
35
  }
36
36
 
37
- export type Indices_AddBlock_ResponseBody = {
38
- acknowledged: boolean;
37
+ export interface Indices_AddBlock_ResponseBody extends Common.AcknowledgedResponseBase {
39
38
  indices: Indices_AddBlock.IndicesBlockStatus[];
40
39
  shards_acknowledged: boolean;
41
40
  }
@@ -33,15 +33,14 @@ export interface Indices_Clone_Request extends Global.Params {
33
33
 
34
34
  export type Indices_Clone_RequestBody = {
35
35
  aliases?: Record<string, Indices_Common.Alias>;
36
- settings?: Record<string, Record<string, any>>;
36
+ settings?: Record<string, any>;
37
37
  }
38
38
 
39
39
  export interface Indices_Clone_Response extends ApiResponse {
40
40
  body: Indices_Clone_ResponseBody;
41
41
  }
42
42
 
43
- export type Indices_Clone_ResponseBody = {
44
- acknowledged: boolean;
43
+ export interface Indices_Clone_ResponseBody extends Common.AcknowledgedResponseBase {
45
44
  index: Common.IndexName;
46
45
  shards_acknowledged: boolean;
47
46
  }
@@ -34,8 +34,7 @@ export interface Indices_Close_Response extends ApiResponse {
34
34
  body: Indices_Close_ResponseBody;
35
35
  }
36
36
 
37
- export type Indices_Close_ResponseBody = {
38
- acknowledged: boolean;
37
+ export interface Indices_Close_ResponseBody extends Common.AcknowledgedResponseBase {
39
38
  indices: Record<string, Indices_Close.CloseIndexResult>;
40
39
  shards_acknowledged: boolean;
41
40
  }
@@ -31,7 +31,7 @@ export interface Indices_PutTemplate_Request extends Global.Params {
31
31
 
32
32
  export type Indices_PutTemplate_RequestBody = {
33
33
  aliases?: Record<string, Indices_Common.Alias>;
34
- index_patterns?: string | string[];
34
+ index_patterns?: Common.StringOrStringArray;
35
35
  mappings?: Common_Mapping.TypeMapping;
36
36
  order?: number;
37
37
  settings?: Record<string, any>;
@@ -36,15 +36,14 @@ export type Indices_Rollover_RequestBody = {
36
36
  aliases?: Record<string, Indices_Common.Alias>;
37
37
  conditions?: Indices_Rollover.RolloverConditions;
38
38
  mappings?: Common_Mapping.TypeMapping;
39
- settings?: Record<string, Record<string, any>>;
39
+ settings?: Record<string, any>;
40
40
  }
41
41
 
42
42
  export interface Indices_Rollover_Response extends ApiResponse {
43
43
  body: Indices_Rollover_ResponseBody;
44
44
  }
45
45
 
46
- export type Indices_Rollover_ResponseBody = {
47
- acknowledged: boolean;
46
+ export interface Indices_Rollover_ResponseBody extends Common.AcknowledgedResponseBase {
48
47
  conditions: Record<string, boolean>;
49
48
  dry_run: boolean;
50
49
  new_index: string;
@@ -24,7 +24,7 @@ export interface Indices_ShardStores_Request extends Global.Params {
24
24
  expand_wildcards?: Common.ExpandWildcards;
25
25
  ignore_unavailable?: boolean;
26
26
  index?: Common.Indices;
27
- status?: Indices_ShardStores.Status | Indices_ShardStores.Status[];
27
+ status?: Indices_ShardStores.ShardStoreStatus | Indices_ShardStores.ShardStoreStatus[];
28
28
  }
29
29
 
30
30
  export interface Indices_ShardStores_Response extends ApiResponse {
@@ -34,15 +34,14 @@ export interface Indices_Shrink_Request extends Global.Params {
34
34
 
35
35
  export type Indices_Shrink_RequestBody = {
36
36
  aliases?: Record<string, Indices_Common.Alias>;
37
- settings?: Record<string, Record<string, any>>;
37
+ settings?: Record<string, any>;
38
38
  }
39
39
 
40
40
  export interface Indices_Shrink_Response extends ApiResponse {
41
41
  body: Indices_Shrink_ResponseBody;
42
42
  }
43
43
 
44
- export type Indices_Shrink_ResponseBody = {
45
- acknowledged: boolean;
44
+ export interface Indices_Shrink_ResponseBody extends Common.AcknowledgedResponseBase {
46
45
  index: Common.IndexName;
47
46
  shards_acknowledged: boolean;
48
47
  }
@@ -42,8 +42,7 @@ export interface Indices_Split_Response extends ApiResponse {
42
42
  body: Indices_Split_ResponseBody;
43
43
  }
44
44
 
45
- export type Indices_Split_ResponseBody = {
46
- acknowledged: boolean;
45
+ export interface Indices_Split_ResponseBody extends Common.AcknowledgedResponseBase {
47
46
  index: Common.IndexName;
48
47
  shards_acknowledged: boolean;
49
48
  }
@@ -25,7 +25,7 @@ export interface Indices_Stats_Request extends Global.Params {
25
25
  fielddata_fields?: Common.Fields;
26
26
  fields?: Common.Fields;
27
27
  forbid_closed_indices?: boolean;
28
- groups?: string | string[];
28
+ groups?: Common.StringOrStringArray;
29
29
  include_segment_file_sizes?: boolean;
30
30
  include_unloaded_segments?: boolean;
31
31
  index?: Common.Indices;
@@ -21,7 +21,6 @@ import * as Indices_Common from '../_types/indices._common'
21
21
 
22
22
  export interface Indices_Upgrade_Request extends Global.Params {
23
23
  allow_no_indices?: boolean;
24
- body?: Indices_Common.UpgradeRequest;
25
24
  expand_wildcards?: Common.ExpandWildcards;
26
25
  ignore_unavailable?: boolean;
27
26
  index?: string[];
@@ -33,5 +32,7 @@ export interface Indices_Upgrade_Response extends ApiResponse {
33
32
  body: Indices_Upgrade_ResponseBody;
34
33
  }
35
34
 
36
- export type Indices_Upgrade_ResponseBody = Indices_Common.IndexPostUpgradeStatus
35
+ export interface Indices_Upgrade_ResponseBody extends Common.ShardsOperationResponseBase {
36
+ upgraded_indices?: Record<string, Indices_Common.UpgradeVersionStatus>;
37
+ }
37
38
 
@@ -31,7 +31,6 @@ const { normalizeArguments, parsePathParam } = require('../utils');
31
31
  * @param {boolean} [params.only_ancient_segments] - If `true`, only ancient (an older Lucene major release) segments will be upgraded.
32
32
  * @param {boolean} [params.wait_for_completion=false] - Should this request wait until the operation has completed before returning.
33
33
  * @param {array} [params.index] - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
34
- * @param {object} [params.body]
35
34
  *
36
35
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
37
36
  * @param {function} [callback] - Callback that handles errors and response
package/api/ml/_api.js CHANGED
@@ -26,13 +26,21 @@ function MlApi(bindObj) {
26
26
  this.deleteModelGroup = require('./deleteModelGroup').bind(bindObj);
27
27
  this.deleteTask = require('./deleteTask').bind(bindObj);
28
28
  this.deployModel = require('./deployModel').bind(bindObj);
29
+ this.getConnector = require('./getConnector').bind(bindObj);
29
30
  this.getModelGroup = require('./getModelGroup').bind(bindObj);
30
31
  this.getTask = require('./getTask').bind(bindObj);
32
+ this.predict = require('./predict').bind(bindObj);
31
33
  this.registerAgents = require('./registerAgents').bind(bindObj);
32
34
  this.registerModel = require('./registerModel').bind(bindObj);
33
35
  this.registerModelGroup = require('./registerModelGroup').bind(bindObj);
36
+ this.searchConnectors = require('./searchConnectors').bind(bindObj);
37
+ this.searchModelGroup = require('./searchModelGroup').bind(bindObj);
34
38
  this.searchModels = require('./searchModels').bind(bindObj);
39
+ this.train = require('./train').bind(bindObj);
40
+ this.trainPredict = require('./trainPredict').bind(bindObj);
35
41
  this.undeployModel = require('./undeployModel').bind(bindObj);
42
+ this.updateConnector = require('./updateConnector').bind(bindObj);
43
+ this.updateModelGroup = require('./updateModelGroup').bind(bindObj);
36
44
 
37
45
  // Deprecated: Use createConnector instead.
38
46
  this.create_connector = require('./createConnector').bind(bindObj);
@@ -48,6 +56,8 @@ function MlApi(bindObj) {
48
56
  this.delete_task = require('./deleteTask').bind(bindObj);
49
57
  // Deprecated: Use deployModel instead.
50
58
  this.deploy_model = require('./deployModel').bind(bindObj);
59
+ // Deprecated: Use getConnector instead.
60
+ this.get_connector = require('./getConnector').bind(bindObj);
51
61
  // Deprecated: Use getModelGroup instead.
52
62
  this.get_model_group = require('./getModelGroup').bind(bindObj);
53
63
  // Deprecated: Use getTask instead.
@@ -58,10 +68,20 @@ function MlApi(bindObj) {
58
68
  this.register_model = require('./registerModel').bind(bindObj);
59
69
  // Deprecated: Use registerModelGroup instead.
60
70
  this.register_model_group = require('./registerModelGroup').bind(bindObj);
71
+ // Deprecated: Use searchConnectors instead.
72
+ this.search_connectors = require('./searchConnectors').bind(bindObj);
73
+ // Deprecated: Use searchModelGroup instead.
74
+ this.search_model_group = require('./searchModelGroup').bind(bindObj);
61
75
  // Deprecated: Use searchModels instead.
62
76
  this.search_models = require('./searchModels').bind(bindObj);
77
+ // Deprecated: Use trainPredict instead.
78
+ this.train_predict = require('./trainPredict').bind(bindObj);
63
79
  // Deprecated: Use undeployModel instead.
64
80
  this.undeploy_model = require('./undeployModel').bind(bindObj);
81
+ // Deprecated: Use updateConnector instead.
82
+ this.update_connector = require('./updateConnector').bind(bindObj);
83
+ // Deprecated: Use updateModelGroup instead.
84
+ this.update_model_group = require('./updateModelGroup').bind(bindObj);
65
85
  }
66
86
 
67
87
  module.exports = MlApi;
@@ -29,7 +29,7 @@ export type Ml_CreateConnector_RequestBody = {
29
29
  description: string;
30
30
  name: string;
31
31
  parameters: Ml_Common.Parameters;
32
- protocol: string;
32
+ protocol: 'aws_sigv4' | 'http';
33
33
  version: number;
34
34
  }
35
35
 
@@ -0,0 +1,30 @@
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_GetConnector_Request extends Global.Params {
22
+ connector_id: string;
23
+ }
24
+
25
+ export interface Ml_GetConnector_Response extends ApiResponse {
26
+ body: Ml_GetConnector_ResponseBody;
27
+ }
28
+
29
+ export type Ml_GetConnector_ResponseBody = Ml_Common.GetConnectorResponse
30
+
@@ -0,0 +1,49 @@
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
+ * Retrieves a standalone connector.
23
+ * <br/> See Also: {@link undefined - ml.get_connector}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.connector_id
29
+ *
30
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
+ * @param {function} [callback] - Callback that handles errors and response
32
+ *
33
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
34
+ */
35
+ function getConnectorFunc(params, options, callback) {
36
+ [params, options, callback] = normalizeArguments(params, options, callback);
37
+ if (params.connector_id == null) return handleMissingParam('connector_id', this, callback);
38
+
39
+ let { body, connector_id, ...querystring } = params;
40
+ connector_id = parsePathParam(connector_id);
41
+
42
+ const path = '/_plugins/_ml/connectors/' + connector_id;
43
+ const method = 'GET';
44
+ body = body || '';
45
+
46
+ return this.transport.request({ method, path, querystring, body }, options, callback);
47
+ }
48
+
49
+ module.exports = getConnectorFunc;
@@ -0,0 +1,40 @@
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_Predict_Request extends Global.Params {
22
+ algorithm_name: string;
23
+ body?: Ml_Predict_RequestBody;
24
+ model_id: string;
25
+ }
26
+
27
+ export type Ml_Predict_RequestBody = {
28
+ input_index?: string[];
29
+ input_query?: Ml_Common.InputQuery;
30
+ return_number?: boolean;
31
+ target_response?: string[];
32
+ text_docs?: string[];
33
+ }
34
+
35
+ export interface Ml_Predict_Response extends ApiResponse {
36
+ body: Ml_Predict_ResponseBody;
37
+ }
38
+
39
+ export type Ml_Predict_ResponseBody = Ml_Common.PredictResponse
40
+
@@ -0,0 +1,53 @@
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
+ * Predicts new data with trained model.
23
+ * <br/> See Also: {@link undefined - ml.predict}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.algorithm_name
29
+ * @param {string} params.model_id
30
+ * @param {object} [params.body]
31
+ *
32
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
+ * @param {function} [callback] - Callback that handles errors and response
34
+ *
35
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
36
+ */
37
+ function predictFunc(params, options, callback) {
38
+ [params, options, callback] = normalizeArguments(params, options, callback);
39
+ if (params.algorithm_name == null) return handleMissingParam('algorithm_name', this, callback);
40
+ if (params.model_id == null) return handleMissingParam('model_id', this, callback);
41
+
42
+ let { body, algorithm_name, model_id, ...querystring } = params;
43
+ algorithm_name = parsePathParam(algorithm_name);
44
+ model_id = parsePathParam(model_id);
45
+
46
+ const path = '/_plugins/_ml/_predict/' + algorithm_name + '/' + model_id;
47
+ const method = 'POST';
48
+ body = body || '';
49
+
50
+ return this.transport.request({ method, path, querystring, body }, options, callback);
51
+ }
52
+
53
+ module.exports = predictFunc;
@@ -0,0 +1,36 @@
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_SearchConnectors_Request extends Global.Params {
22
+ body?: Ml_SearchConnectors_RequestBody;
23
+ }
24
+
25
+ export type Ml_SearchConnectors_RequestBody = {
26
+ query?: Ml_Common.Query;
27
+ size?: number;
28
+ sort?: string[];
29
+ }
30
+
31
+ export interface Ml_SearchConnectors_Response extends ApiResponse {
32
+ body: Ml_SearchConnectors_ResponseBody;
33
+ }
34
+
35
+ export type Ml_SearchConnectors_ResponseBody = Ml_Common.SearchConnectorsResponse
36
+
@@ -0,0 +1,47 @@
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 } = require('../utils');
20
+
21
+ /**
22
+ * Searches for standalone connectors.
23
+ * <br/> See Also: {@link undefined - ml.search_connectors}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} [params]
28
+ * @param {object} [params.body]
29
+ *
30
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
+ * @param {function} [callback] - Callback that handles errors and response
32
+ *
33
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
34
+ */
35
+ function searchConnectorsFunc(params, options, callback) {
36
+ [params, options, callback] = normalizeArguments(params, options, callback);
37
+
38
+ let { body, ...querystring } = params;
39
+
40
+ const path = '/_plugins/_ml/connectors/_search';
41
+ const method = body ? 'POST' : 'GET';
42
+ body = body || '';
43
+
44
+ return this.transport.request({ method, path, querystring, body }, options, callback);
45
+ }
46
+
47
+ module.exports = searchConnectorsFunc;
@@ -0,0 +1,36 @@
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_SearchModelGroup_Request extends Global.Params {
22
+ body?: Ml_SearchModelGroup_RequestBody;
23
+ }
24
+
25
+ export type Ml_SearchModelGroup_RequestBody = {
26
+ query?: Ml_Common.Query;
27
+ size?: number;
28
+ sort?: Ml_Common.Sort[];
29
+ }
30
+
31
+ export interface Ml_SearchModelGroup_Response extends ApiResponse {
32
+ body: Ml_SearchModelGroup_ResponseBody;
33
+ }
34
+
35
+ export type Ml_SearchModelGroup_ResponseBody = Ml_Common.SearchModelGroupsResponse
36
+