@opensearch-project/opensearch 3.0.0-beta.9 → 3.1.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 (135) hide show
  1. package/api/OpenSearchApi.d.ts +126 -3
  2. package/api/_core/search.d.ts +2 -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 +19 -14
  6. package/api/_types/_global.d.ts +2 -1
  7. package/api/_types/{cat._common.d.ts → cat.segment_replication.d.ts} +1 -18
  8. package/api/_types/cat.snapshots.d.ts +1 -1
  9. package/api/_types/cluster.stats.d.ts +0 -18
  10. package/api/_types/index.d.ts +233 -0
  11. package/api/_types/indices._common.d.ts +1 -13
  12. package/api/_types/indices.analyze.d.ts +2 -1
  13. package/api/_types/indices.shard_stores.d.ts +2 -2
  14. package/api/_types/indices.stats.d.ts +3 -1
  15. package/api/_types/ingest._common.d.ts +3 -40
  16. package/api/_types/ml._common.d.ts +367 -11
  17. package/api/_types/nodes._common.d.ts +0 -631
  18. package/api/_types/nodes.info.d.ts +30 -25
  19. package/api/_types/nodes.reload_secure_settings.d.ts +8 -4
  20. package/api/_types/nodes.stats.d.ts +634 -4
  21. package/api/_types/nodes.usage.d.ts +1 -7
  22. package/api/cat/aliases.js +1 -1
  23. package/api/cat/allPitSegments.d.ts +2 -2
  24. package/api/cat/allPitSegments.js +6 -6
  25. package/api/cat/clusterManager.js +1 -1
  26. package/api/cat/count.js +5 -5
  27. package/api/cat/fielddata.js +6 -6
  28. package/api/cat/health.js +5 -5
  29. package/api/cat/indices.js +14 -14
  30. package/api/cat/master.js +7 -7
  31. package/api/cat/nodeattrs.js +7 -7
  32. package/api/cat/nodes.d.ts +1 -1
  33. package/api/cat/nodes.js +11 -11
  34. package/api/cat/pendingTasks.js +9 -9
  35. package/api/cat/pitSegments.d.ts +2 -2
  36. package/api/cat/pitSegments.js +6 -6
  37. package/api/cat/plugins.js +8 -8
  38. package/api/cat/recovery.js +8 -8
  39. package/api/cat/repositories.js +8 -8
  40. package/api/cat/segmentReplication.d.ts +2 -2
  41. package/api/cat/segmentReplication.js +18 -17
  42. package/api/cat/segments.js +8 -8
  43. package/api/cat/shards.js +10 -10
  44. package/api/cat/snapshots.js +9 -9
  45. package/api/cat/tasks.js +8 -8
  46. package/api/cat/templates.js +8 -8
  47. package/api/cat/threadPool.js +8 -8
  48. package/api/cluster/getComponentTemplate.d.ts +1 -0
  49. package/api/cluster/getComponentTemplate.js +1 -0
  50. package/api/cluster/reroute.d.ts +1 -2
  51. package/api/cluster/state.d.ts +1 -1
  52. package/api/cluster/stats.d.ts +9 -1
  53. package/api/index.d.ts +58 -2
  54. package/api/indices/addBlock.d.ts +1 -2
  55. package/api/indices/clone.d.ts +2 -3
  56. package/api/indices/close.d.ts +1 -2
  57. package/api/indices/putTemplate.d.ts +1 -1
  58. package/api/indices/rollover.d.ts +2 -3
  59. package/api/indices/shardStores.d.ts +1 -1
  60. package/api/indices/shrink.d.ts +2 -3
  61. package/api/indices/split.d.ts +1 -2
  62. package/api/indices/stats.d.ts +1 -1
  63. package/api/indices/upgrade.d.ts +3 -2
  64. package/api/indices/upgrade.js +0 -1
  65. package/api/ml/_api.js +80 -0
  66. package/api/ml/chunkModel.d.ts +37 -0
  67. package/api/ml/chunkModel.js +53 -0
  68. package/api/ml/createConnector.d.ts +1 -1
  69. package/api/ml/createMemory.d.ts +36 -0
  70. package/api/ml/createMemory.js +47 -0
  71. package/api/ml/createMessage.d.ts +42 -0
  72. package/api/ml/createMessage.js +50 -0
  73. package/api/ml/createModelMeta.d.ts +46 -0
  74. package/api/ml/createModelMeta.js +47 -0
  75. package/api/ml/deleteMemory.d.ts +31 -0
  76. package/api/ml/deleteMemory.js +49 -0
  77. package/api/ml/getConnector.d.ts +30 -0
  78. package/api/ml/getConnector.js +49 -0
  79. package/api/ml/getMemory.d.ts +36 -0
  80. package/api/ml/getMemory.js +49 -0
  81. package/api/ml/getMessage.d.ts +31 -0
  82. package/api/ml/getMessage.js +55 -0
  83. package/api/ml/getMessageTraces.d.ts +30 -0
  84. package/api/ml/getMessageTraces.js +49 -0
  85. package/api/ml/getModel.d.ts +30 -0
  86. package/api/ml/getModel.js +49 -0
  87. package/api/ml/loadModel.d.ts +33 -0
  88. package/api/ml/loadModel.js +49 -0
  89. package/api/ml/predict.d.ts +40 -0
  90. package/api/ml/predict.js +53 -0
  91. package/api/ml/predictModel.d.ts +36 -0
  92. package/api/ml/predictModel.js +50 -0
  93. package/api/ml/registerModel.d.ts +4 -3
  94. package/api/ml/registerModelMeta.d.ts +46 -0
  95. package/api/ml/registerModelMeta.js +47 -0
  96. package/api/ml/searchConnectors.d.ts +36 -0
  97. package/api/ml/searchConnectors.js +47 -0
  98. package/api/ml/searchMemory.d.ts +36 -0
  99. package/api/ml/searchMemory.js +47 -0
  100. package/api/ml/searchMessage.d.ts +37 -0
  101. package/api/ml/searchMessage.js +50 -0
  102. package/api/ml/searchModelGroup.d.ts +36 -0
  103. package/api/ml/searchModelGroup.js +47 -0
  104. package/api/ml/searchModels.d.ts +3 -2
  105. package/api/ml/searchModels.js +1 -1
  106. package/api/ml/train.d.ts +37 -0
  107. package/api/ml/train.js +50 -0
  108. package/api/ml/trainPredict.d.ts +38 -0
  109. package/api/ml/trainPredict.js +50 -0
  110. package/api/ml/undeployModel.d.ts +8 -1
  111. package/api/ml/undeployModel.js +5 -5
  112. package/api/ml/unloadModel.d.ts +37 -0
  113. package/api/ml/unloadModel.js +49 -0
  114. package/api/ml/updateConnector.d.ts +45 -0
  115. package/api/ml/updateConnector.js +50 -0
  116. package/api/ml/updateMemory.d.ts +35 -0
  117. package/api/ml/updateMemory.js +50 -0
  118. package/api/ml/updateMessage.d.ts +40 -0
  119. package/api/ml/updateMessage.js +50 -0
  120. package/api/ml/updateModel.d.ts +43 -0
  121. package/api/ml/updateModel.js +50 -0
  122. package/api/ml/updateModelGroup.d.ts +40 -0
  123. package/api/ml/updateModelGroup.js +50 -0
  124. package/api/ml/uploadChunk.d.ts +37 -0
  125. package/api/ml/uploadChunk.js +53 -0
  126. package/api/ml/uploadModel.d.ts +41 -0
  127. package/api/ml/uploadModel.js +47 -0
  128. package/api/nodes/info.d.ts +5 -1
  129. package/api/nodes/reloadSecureSettings.d.ts +5 -1
  130. package/api/nodes/stats.d.ts +5 -1
  131. package/api/nodes/usage.d.ts +5 -1
  132. package/api/tasks/cancel.d.ts +1 -1
  133. package/api/tasks/list.d.ts +1 -1
  134. package/index.d.ts +2 -0
  135. package/package.json +1 -1
@@ -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
+ * Update a memory.
23
+ * <br/> See Also: {@link undefined - ml.update_memory}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.memory_id
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 updateMemoryFunc(params, options, callback) {
37
+ [params, options, callback] = normalizeArguments(params, options, callback);
38
+ if (params.memory_id == null) return handleMissingParam('memory_id', this, callback);
39
+
40
+ let { body, memory_id, ...querystring } = params;
41
+ memory_id = parsePathParam(memory_id);
42
+
43
+ const path = '/_plugins/_ml/memory/' + memory_id;
44
+ const method = 'PUT';
45
+ body = body || '';
46
+
47
+ return this.transport.request({ method, path, querystring, body }, options, callback);
48
+ }
49
+
50
+ module.exports = updateMemoryFunc;
@@ -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 Common from '../_types/_common'
19
+ import * as Global from '../_types/_global'
20
+ import * as Ml_Common from '../_types/ml._common'
21
+
22
+ export interface Ml_UpdateMessage_Request extends Global.Params {
23
+ body?: Ml_UpdateMessage_RequestBody;
24
+ message_id: string;
25
+ }
26
+
27
+ export type Ml_UpdateMessage_RequestBody = {
28
+ additional_info?: Ml_Common.AdditionalInfo;
29
+ input?: string;
30
+ origin?: string;
31
+ prompt_template?: string;
32
+ response?: string;
33
+ }
34
+
35
+ export interface Ml_UpdateMessage_Response extends ApiResponse {
36
+ body: Ml_UpdateMessage_ResponseBody;
37
+ }
38
+
39
+ export type Ml_UpdateMessage_ResponseBody = Common.WriteResponseBase
40
+
@@ -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
+ * Update a message.
23
+ * <br/> See Also: {@link undefined - ml.update_message}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.message_id
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 updateMessageFunc(params, options, callback) {
37
+ [params, options, callback] = normalizeArguments(params, options, callback);
38
+ if (params.message_id == null) return handleMissingParam('message_id', this, callback);
39
+
40
+ let { body, message_id, ...querystring } = params;
41
+ message_id = parsePathParam(message_id);
42
+
43
+ const path = '/_plugins/_ml/memory/message/' + message_id;
44
+ const method = 'PUT';
45
+ body = body || '';
46
+
47
+ return this.transport.request({ method, path, querystring, body }, options, callback);
48
+ }
49
+
50
+ module.exports = updateMessageFunc;
@@ -0,0 +1,43 @@
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_UpdateModel_Request extends Global.Params {
22
+ body?: Ml_UpdateModel_RequestBody;
23
+ model_id: string;
24
+ }
25
+
26
+ export type Ml_UpdateModel_RequestBody = {
27
+ connector?: Record<string, any>;
28
+ connector_id?: string;
29
+ description?: string;
30
+ guardrails?: Ml_Common.Guardrails;
31
+ interface?: Record<string, any>;
32
+ is_enabled?: boolean;
33
+ model_config?: Ml_Common.ModelConfig;
34
+ name?: string;
35
+ rate_limiter?: Ml_Common.RateLimiter;
36
+ }
37
+
38
+ export interface Ml_UpdateModel_Response extends ApiResponse {
39
+ body: Ml_UpdateModel_ResponseBody;
40
+ }
41
+
42
+ export type Ml_UpdateModel_ResponseBody = Ml_Common.UpdateModelResponse
43
+
@@ -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
+ * Updates a model.
23
+ * <br/> See Also: {@link undefined - ml.update_model}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.model_id
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 updateModelFunc(params, options, callback) {
37
+ [params, options, callback] = normalizeArguments(params, options, callback);
38
+ if (params.model_id == null) return handleMissingParam('model_id', this, callback);
39
+
40
+ let { body, model_id, ...querystring } = params;
41
+ model_id = parsePathParam(model_id);
42
+
43
+ const path = '/_plugins/_ml/models/' + model_id;
44
+ const method = 'PUT';
45
+ body = body || '';
46
+
47
+ return this.transport.request({ method, path, querystring, body }, options, callback);
48
+ }
49
+
50
+ module.exports = updateModelFunc;
@@ -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_UpdateModelGroup_Request extends Global.Params {
22
+ body?: Ml_UpdateModelGroup_RequestBody;
23
+ model_group_id: string;
24
+ }
25
+
26
+ export type Ml_UpdateModelGroup_RequestBody = {
27
+ add_all_backend_roles?: boolean;
28
+ add_backend_roles?: string[];
29
+ backend_roles?: string[];
30
+ description?: string;
31
+ model_access_name?: string;
32
+ name?: string;
33
+ }
34
+
35
+ export interface Ml_UpdateModelGroup_Response extends ApiResponse {
36
+ body: Ml_UpdateModelGroup_ResponseBody;
37
+ }
38
+
39
+ export type Ml_UpdateModelGroup_ResponseBody = Ml_Common.UpdateModelGroupResponse
40
+
@@ -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
+ * Updates a model group.
23
+ * <br/> See Also: {@link undefined - ml.update_model_group}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.model_group_id
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 updateModelGroupFunc(params, options, callback) {
37
+ [params, options, callback] = normalizeArguments(params, options, callback);
38
+ if (params.model_group_id == null) return handleMissingParam('model_group_id', this, callback);
39
+
40
+ let { body, model_group_id, ...querystring } = params;
41
+ model_group_id = parsePathParam(model_group_id);
42
+
43
+ const path = '/_plugins/_ml/model_groups/' + model_group_id;
44
+ const method = 'PUT';
45
+ body = body || '';
46
+
47
+ return this.transport.request({ method, path, querystring, body }, options, callback);
48
+ }
49
+
50
+ module.exports = updateModelGroupFunc;
@@ -0,0 +1,37 @@
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
+
20
+ export interface Ml_UploadChunk_Request extends Global.Params {
21
+ body?: Ml_UploadChunk_RequestBody;
22
+ chunk_number: number;
23
+ model_id: string;
24
+ }
25
+
26
+ export type Ml_UploadChunk_RequestBody = {
27
+ chunk: string;
28
+ }
29
+
30
+ export interface Ml_UploadChunk_Response extends ApiResponse {
31
+ body: Ml_UploadChunk_ResponseBody;
32
+ }
33
+
34
+ export type Ml_UploadChunk_ResponseBody = {
35
+ status: string;
36
+ }
37
+
@@ -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
+ * Uploads model chunk.
23
+ * <br/> See Also: {@link undefined - ml.upload_chunk}
24
+ *
25
+ * @memberOf API-Ml
26
+ *
27
+ * @param {object} params
28
+ * @param {number} params.chunk_number
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 uploadChunkFunc(params, options, callback) {
38
+ [params, options, callback] = normalizeArguments(params, options, callback);
39
+ if (params.chunk_number == null) return handleMissingParam('chunk_number', this, callback);
40
+ if (params.model_id == null) return handleMissingParam('model_id', this, callback);
41
+
42
+ let { body, chunk_number, model_id, ...querystring } = params;
43
+ chunk_number = parsePathParam(chunk_number);
44
+ model_id = parsePathParam(model_id);
45
+
46
+ const path = '/_plugins/_ml/models/' + model_id + '/upload_chunk/' + chunk_number;
47
+ const method = 'POST';
48
+ body = body || '';
49
+
50
+ return this.transport.request({ method, path, querystring, body }, options, callback);
51
+ }
52
+
53
+ module.exports = uploadChunkFunc;
@@ -0,0 +1,41 @@
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 Common from '../_types/_common'
19
+ import * as Global from '../_types/_global'
20
+
21
+ export interface Ml_UploadModel_Request extends Global.Params {
22
+ body?: Ml_UploadModel_RequestBody;
23
+ }
24
+
25
+ export type Ml_UploadModel_RequestBody = {
26
+ description?: string;
27
+ model_format?: Common.ModelFormat;
28
+ model_group_id?: Common.Id;
29
+ name: string;
30
+ version: Common.VersionString;
31
+ }
32
+
33
+ export interface Ml_UploadModel_Response extends ApiResponse {
34
+ body: Ml_UploadModel_ResponseBody;
35
+ }
36
+
37
+ export type Ml_UploadModel_ResponseBody = {
38
+ status: string;
39
+ task_id: string;
40
+ }
41
+
@@ -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
+ * Registers a model.
23
+ * <br/> See Also: {@link undefined - ml.upload_model}
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 uploadModelFunc(params, options, callback) {
36
+ [params, options, callback] = normalizeArguments(params, options, callback);
37
+
38
+ let { body, ...querystring } = params;
39
+
40
+ const path = '/_plugins/_ml/models/_upload';
41
+ const method = 'POST';
42
+ body = body || '';
43
+
44
+ return this.transport.request({ method, path, querystring, body }, options, callback);
45
+ }
46
+
47
+ module.exports = uploadModelFunc;
@@ -17,6 +17,7 @@
17
17
  import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Common from '../_types/_common'
19
19
  import * as Global from '../_types/_global'
20
+ import * as Nodes_Common from '../_types/nodes._common'
20
21
  import * as Nodes_Info from '../_types/nodes.info'
21
22
 
22
23
  export interface Nodes_Info_Request extends Global.Params {
@@ -30,5 +31,8 @@ export interface Nodes_Info_Response extends ApiResponse {
30
31
  body: Nodes_Info_ResponseBody;
31
32
  }
32
33
 
33
- export type Nodes_Info_ResponseBody = Nodes_Info.ResponseBase
34
+ export interface Nodes_Info_ResponseBody extends Nodes_Common.NodesResponseBase {
35
+ cluster_name: Common.Name;
36
+ nodes: Record<string, Nodes_Info.NodeInfo>;
37
+ }
34
38
 
@@ -17,6 +17,7 @@
17
17
  import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Common from '../_types/_common'
19
19
  import * as Global from '../_types/_global'
20
+ import * as Nodes_Common from '../_types/nodes._common'
20
21
  import * as Nodes_ReloadSecureSettings from '../_types/nodes.reload_secure_settings'
21
22
 
22
23
  export interface Nodes_ReloadSecureSettings_Request extends Global.Params {
@@ -33,5 +34,8 @@ export interface Nodes_ReloadSecureSettings_Response extends ApiResponse {
33
34
  body: Nodes_ReloadSecureSettings_ResponseBody;
34
35
  }
35
36
 
36
- export type Nodes_ReloadSecureSettings_ResponseBody = Nodes_ReloadSecureSettings.ResponseBase
37
+ export interface Nodes_ReloadSecureSettings_ResponseBody extends Nodes_Common.NodesResponseBase {
38
+ cluster_name: Common.Name;
39
+ nodes: Record<string, Nodes_ReloadSecureSettings.NodeReloadResult>;
40
+ }
37
41
 
@@ -17,6 +17,7 @@
17
17
  import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Common from '../_types/_common'
19
19
  import * as Global from '../_types/_global'
20
+ import * as Nodes_Common from '../_types/nodes._common'
20
21
  import * as Nodes_Stats from '../_types/nodes.stats'
21
22
 
22
23
  export interface Nodes_Stats_Request extends Global.Params {
@@ -37,5 +38,8 @@ export interface Nodes_Stats_Response extends ApiResponse {
37
38
  body: Nodes_Stats_ResponseBody;
38
39
  }
39
40
 
40
- export type Nodes_Stats_ResponseBody = Nodes_Stats.ResponseBase
41
+ export interface Nodes_Stats_ResponseBody extends Nodes_Common.NodesResponseBase {
42
+ cluster_name?: Common.Name;
43
+ nodes: Record<string, Nodes_Stats.Stats>;
44
+ }
41
45
 
@@ -17,6 +17,7 @@
17
17
  import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Common from '../_types/_common'
19
19
  import * as Global from '../_types/_global'
20
+ import * as Nodes_Common from '../_types/nodes._common'
20
21
  import * as Nodes_Usage from '../_types/nodes.usage'
21
22
 
22
23
  export interface Nodes_Usage_Request extends Global.Params {
@@ -29,5 +30,8 @@ export interface Nodes_Usage_Response extends ApiResponse {
29
30
  body: Nodes_Usage_ResponseBody;
30
31
  }
31
32
 
32
- export type Nodes_Usage_ResponseBody = Nodes_Usage.ResponseBase
33
+ export interface Nodes_Usage_ResponseBody extends Nodes_Common.NodesResponseBase {
34
+ cluster_name: Common.Name;
35
+ nodes: Record<string, Nodes_Usage.NodeUsage>;
36
+ }
33
37
 
@@ -20,7 +20,7 @@ import * as Global from '../_types/_global'
20
20
  import * as Tasks_Common from '../_types/tasks._common'
21
21
 
22
22
  export interface Tasks_Cancel_Request extends Global.Params {
23
- actions?: string | string[];
23
+ actions?: Common.StringOrStringArray;
24
24
  nodes?: string[];
25
25
  parent_task_id?: string;
26
26
  task_id?: Common.TaskId;
@@ -20,7 +20,7 @@ import * as Global from '../_types/_global'
20
20
  import * as Tasks_Common from '../_types/tasks._common'
21
21
 
22
22
  export interface Tasks_List_Request extends Global.Params {
23
- actions?: string | string[];
23
+ actions?: Common.StringOrStringArray;
24
24
  detailed?: boolean;
25
25
  group_by?: Tasks_Common.GroupBy;
26
26
  nodes?: string[];
package/index.d.ts CHANGED
@@ -43,6 +43,7 @@ import {
43
43
  import Serializer from './lib/Serializer';
44
44
  import * as errors from './lib/errors';
45
45
  import * as API from './api';
46
+ import * as Types from './api/_types';
46
47
  import { Client, ClientOptions, NodeOptions, ClientExtendsCallbackOptions } from './lib/Client';
47
48
 
48
49
  declare const events: {
@@ -56,6 +57,7 @@ declare const events: {
56
57
 
57
58
  export {
58
59
  API,
60
+ Types,
59
61
  Client,
60
62
  Transport,
61
63
  ConnectionPool,
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "LICENSE.txt"
37
37
  ],
38
38
  "homepage": "https://www.opensearch.org/",
39
- "version": "3.0.0-beta.9",
39
+ "version": "3.1.0",
40
40
  "versionCanary": "7.10.0-canary.6",
41
41
  "keywords": [
42
42
  "opensearch",