@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.
- package/api/OpenSearchApi.d.ts +126 -3
- package/api/_core/search.d.ts +2 -1
- package/api/_core/updateByQueryRethrottle.d.ts +1 -0
- package/api/_types/_common.analysis.d.ts +1 -1
- package/api/_types/_common.d.ts +19 -14
- package/api/_types/_global.d.ts +2 -1
- package/api/_types/{cat._common.d.ts → cat.segment_replication.d.ts} +1 -18
- package/api/_types/cat.snapshots.d.ts +1 -1
- package/api/_types/cluster.stats.d.ts +0 -18
- package/api/_types/index.d.ts +233 -0
- package/api/_types/indices._common.d.ts +1 -13
- package/api/_types/indices.analyze.d.ts +2 -1
- package/api/_types/indices.shard_stores.d.ts +2 -2
- package/api/_types/indices.stats.d.ts +3 -1
- package/api/_types/ingest._common.d.ts +3 -40
- package/api/_types/ml._common.d.ts +367 -11
- package/api/_types/nodes._common.d.ts +0 -631
- package/api/_types/nodes.info.d.ts +30 -25
- package/api/_types/nodes.reload_secure_settings.d.ts +8 -4
- package/api/_types/nodes.stats.d.ts +634 -4
- package/api/_types/nodes.usage.d.ts +1 -7
- package/api/cat/aliases.js +1 -1
- package/api/cat/allPitSegments.d.ts +2 -2
- package/api/cat/allPitSegments.js +6 -6
- package/api/cat/clusterManager.js +1 -1
- package/api/cat/count.js +5 -5
- package/api/cat/fielddata.js +6 -6
- package/api/cat/health.js +5 -5
- package/api/cat/indices.js +14 -14
- package/api/cat/master.js +7 -7
- package/api/cat/nodeattrs.js +7 -7
- package/api/cat/nodes.d.ts +1 -1
- package/api/cat/nodes.js +11 -11
- package/api/cat/pendingTasks.js +9 -9
- package/api/cat/pitSegments.d.ts +2 -2
- package/api/cat/pitSegments.js +6 -6
- package/api/cat/plugins.js +8 -8
- package/api/cat/recovery.js +8 -8
- package/api/cat/repositories.js +8 -8
- package/api/cat/segmentReplication.d.ts +2 -2
- package/api/cat/segmentReplication.js +18 -17
- package/api/cat/segments.js +8 -8
- package/api/cat/shards.js +10 -10
- package/api/cat/snapshots.js +9 -9
- package/api/cat/tasks.js +8 -8
- package/api/cat/templates.js +8 -8
- package/api/cat/threadPool.js +8 -8
- package/api/cluster/getComponentTemplate.d.ts +1 -0
- package/api/cluster/getComponentTemplate.js +1 -0
- package/api/cluster/reroute.d.ts +1 -2
- package/api/cluster/state.d.ts +1 -1
- package/api/cluster/stats.d.ts +9 -1
- package/api/index.d.ts +58 -2
- package/api/indices/addBlock.d.ts +1 -2
- package/api/indices/clone.d.ts +2 -3
- package/api/indices/close.d.ts +1 -2
- package/api/indices/putTemplate.d.ts +1 -1
- package/api/indices/rollover.d.ts +2 -3
- package/api/indices/shardStores.d.ts +1 -1
- package/api/indices/shrink.d.ts +2 -3
- package/api/indices/split.d.ts +1 -2
- package/api/indices/stats.d.ts +1 -1
- package/api/indices/upgrade.d.ts +3 -2
- package/api/indices/upgrade.js +0 -1
- package/api/ml/_api.js +80 -0
- package/api/ml/chunkModel.d.ts +37 -0
- package/api/ml/chunkModel.js +53 -0
- package/api/ml/createConnector.d.ts +1 -1
- package/api/ml/createMemory.d.ts +36 -0
- package/api/ml/createMemory.js +47 -0
- package/api/ml/createMessage.d.ts +42 -0
- package/api/ml/createMessage.js +50 -0
- package/api/ml/createModelMeta.d.ts +46 -0
- package/api/ml/createModelMeta.js +47 -0
- package/api/ml/deleteMemory.d.ts +31 -0
- package/api/ml/deleteMemory.js +49 -0
- package/api/ml/getConnector.d.ts +30 -0
- package/api/ml/getConnector.js +49 -0
- package/api/ml/getMemory.d.ts +36 -0
- package/api/ml/getMemory.js +49 -0
- package/api/ml/getMessage.d.ts +31 -0
- package/api/ml/getMessage.js +55 -0
- package/api/ml/getMessageTraces.d.ts +30 -0
- package/api/ml/getMessageTraces.js +49 -0
- package/api/ml/getModel.d.ts +30 -0
- package/api/ml/getModel.js +49 -0
- package/api/ml/loadModel.d.ts +33 -0
- package/api/ml/loadModel.js +49 -0
- package/api/ml/predict.d.ts +40 -0
- package/api/ml/predict.js +53 -0
- package/api/ml/predictModel.d.ts +36 -0
- package/api/ml/predictModel.js +50 -0
- package/api/ml/registerModel.d.ts +4 -3
- package/api/ml/registerModelMeta.d.ts +46 -0
- package/api/ml/registerModelMeta.js +47 -0
- package/api/ml/searchConnectors.d.ts +36 -0
- package/api/ml/searchConnectors.js +47 -0
- package/api/ml/searchMemory.d.ts +36 -0
- package/api/ml/searchMemory.js +47 -0
- package/api/ml/searchMessage.d.ts +37 -0
- package/api/ml/searchMessage.js +50 -0
- package/api/ml/searchModelGroup.d.ts +36 -0
- package/api/ml/searchModelGroup.js +47 -0
- package/api/ml/searchModels.d.ts +3 -2
- package/api/ml/searchModels.js +1 -1
- package/api/ml/train.d.ts +37 -0
- package/api/ml/train.js +50 -0
- package/api/ml/trainPredict.d.ts +38 -0
- package/api/ml/trainPredict.js +50 -0
- package/api/ml/undeployModel.d.ts +8 -1
- package/api/ml/undeployModel.js +5 -5
- package/api/ml/unloadModel.d.ts +37 -0
- package/api/ml/unloadModel.js +49 -0
- package/api/ml/updateConnector.d.ts +45 -0
- package/api/ml/updateConnector.js +50 -0
- package/api/ml/updateMemory.d.ts +35 -0
- package/api/ml/updateMemory.js +50 -0
- package/api/ml/updateMessage.d.ts +40 -0
- package/api/ml/updateMessage.js +50 -0
- package/api/ml/updateModel.d.ts +43 -0
- package/api/ml/updateModel.js +50 -0
- package/api/ml/updateModelGroup.d.ts +40 -0
- package/api/ml/updateModelGroup.js +50 -0
- package/api/ml/uploadChunk.d.ts +37 -0
- package/api/ml/uploadChunk.js +53 -0
- package/api/ml/uploadModel.d.ts +41 -0
- package/api/ml/uploadModel.js +47 -0
- package/api/nodes/info.d.ts +5 -1
- package/api/nodes/reloadSecureSettings.d.ts +5 -1
- package/api/nodes/stats.d.ts +5 -1
- package/api/nodes/usage.d.ts +5 -1
- package/api/tasks/cancel.d.ts +1 -1
- package/api/tasks/list.d.ts +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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
|
+
* Get a message traces.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_message_traces}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.message_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 getMessageTracesFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.message_id == null) return handleMissingParam('message_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, message_id, ...querystring } = params;
|
|
40
|
+
message_id = parsePathParam(message_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/memory/message/' + message_id + '/traces';
|
|
43
|
+
const method = 'GET';
|
|
44
|
+
body = body || '';
|
|
45
|
+
|
|
46
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = getMessageTracesFunc;
|
|
@@ -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_GetModel_Request extends Global.Params {
|
|
22
|
+
model_id: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Ml_GetModel_Response extends ApiResponse {
|
|
26
|
+
body: Ml_GetModel_ResponseBody;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Ml_GetModel_ResponseBody = Ml_Common.Model
|
|
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 model.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_model}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.model_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 getModelFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.model_id == null) return handleMissingParam('model_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, model_id, ...querystring } = params;
|
|
40
|
+
model_id = parsePathParam(model_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/models/' + model_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 = getModelFunc;
|
|
@@ -0,0 +1,33 @@
|
|
|
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_LoadModel_Request extends Global.Params {
|
|
21
|
+
model_id: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Ml_LoadModel_Response extends ApiResponse {
|
|
25
|
+
body: Ml_LoadModel_ResponseBody;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Ml_LoadModel_ResponseBody = {
|
|
29
|
+
status: string;
|
|
30
|
+
task_id: string;
|
|
31
|
+
task_type: 'BATCH_INGEST' | 'BATCH_PREDICTION' | 'DEPLOY_MODEL' | 'EXECUTION' | 'PREDICTION' | 'REGISTER_MODEL' | 'TRAINING' | 'TRAINING_AND_PREDICTION';
|
|
32
|
+
}
|
|
33
|
+
|
|
@@ -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
|
+
* Deploys a model.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.load_model}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.model_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 loadModelFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.model_id == null) return handleMissingParam('model_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, model_id, ...querystring } = params;
|
|
40
|
+
model_id = parsePathParam(model_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/models/' + model_id + '/_load';
|
|
43
|
+
const method = 'POST';
|
|
44
|
+
body = body || '';
|
|
45
|
+
|
|
46
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = loadModelFunc;
|
|
@@ -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_PredictModel_Request extends Global.Params {
|
|
22
|
+
body?: Ml_PredictModel_RequestBody;
|
|
23
|
+
model_id: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Ml_PredictModel_RequestBody = {
|
|
27
|
+
query_text?: string;
|
|
28
|
+
text_docs: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Ml_PredictModel_Response extends ApiResponse {
|
|
32
|
+
body: Ml_PredictModel_ResponseBody;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Ml_PredictModel_ResponseBody = Ml_Common.PredictModelResponse
|
|
36
|
+
|
|
@@ -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
|
+
* Predicts a model.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.predict_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 predictModelFunc(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 + '/_predict';
|
|
44
|
+
const method = 'POST';
|
|
45
|
+
body = body || '';
|
|
46
|
+
|
|
47
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = predictModelFunc;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Common from '../_types/_common'
|
|
18
19
|
import * as Global from '../_types/_global'
|
|
19
20
|
|
|
20
21
|
export interface Ml_RegisterModel_Request extends Global.Params {
|
|
@@ -23,10 +24,10 @@ export interface Ml_RegisterModel_Request extends Global.Params {
|
|
|
23
24
|
|
|
24
25
|
export type Ml_RegisterModel_RequestBody = {
|
|
25
26
|
description?: string;
|
|
26
|
-
model_format
|
|
27
|
-
model_group_id?:
|
|
27
|
+
model_format?: Common.ModelFormat;
|
|
28
|
+
model_group_id?: Common.Id;
|
|
28
29
|
name: string;
|
|
29
|
-
version:
|
|
30
|
+
version: Common.VersionString;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export interface Ml_RegisterModel_Response extends ApiResponse {
|
|
@@ -0,0 +1,46 @@
|
|
|
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_RegisterModelMeta_Request extends Global.Params {
|
|
23
|
+
body?: Ml_RegisterModelMeta_RequestBody;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Ml_RegisterModelMeta_RequestBody = {
|
|
27
|
+
description?: string;
|
|
28
|
+
model_config: Ml_Common.ModelConfig;
|
|
29
|
+
model_content_hash_value: string;
|
|
30
|
+
model_format: Common.ModelFormat;
|
|
31
|
+
model_group_id?: Common.Id;
|
|
32
|
+
name: string;
|
|
33
|
+
total_chunks: number;
|
|
34
|
+
url?: string;
|
|
35
|
+
version: Common.VersionString;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface Ml_RegisterModelMeta_Response extends ApiResponse {
|
|
39
|
+
body: Ml_RegisterModelMeta_ResponseBody;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type Ml_RegisterModelMeta_ResponseBody = {
|
|
43
|
+
model_id: string;
|
|
44
|
+
status: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -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 model metadata.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.register_model_meta}
|
|
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 registerModelMetaFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
|
|
38
|
+
let { body, ...querystring } = params;
|
|
39
|
+
|
|
40
|
+
const path = '/_plugins/_ml/models/_register_meta';
|
|
41
|
+
const method = 'POST';
|
|
42
|
+
body = body || '';
|
|
43
|
+
|
|
44
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = registerModelMetaFunc;
|
|
@@ -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_SearchMemory_Request extends Global.Params {
|
|
22
|
+
body?: Ml_SearchMemory_RequestBody;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type Ml_SearchMemory_RequestBody = {
|
|
26
|
+
query?: Ml_Common.Query;
|
|
27
|
+
size?: number;
|
|
28
|
+
sort?: Ml_Common.SortMemory[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Ml_SearchMemory_Response extends ApiResponse {
|
|
32
|
+
body: Ml_SearchMemory_ResponseBody;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Ml_SearchMemory_ResponseBody = Ml_Common.SearchMemoryResponse
|
|
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
|
+
* Search memory.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.search_memory}
|
|
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 searchMemoryFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
|
|
38
|
+
let { body, ...querystring } = params;
|
|
39
|
+
|
|
40
|
+
const path = '/_plugins/_ml/memory/_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 = searchMemoryFunc;
|