@opensearch-project/opensearch 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/OpenSearchApi.d.ts +82 -8
- package/api/_core/count.js +1 -1
- package/api/_core/createPit.d.ts +1 -2
- package/api/_core/deleteAllPits.d.ts +2 -2
- package/api/_core/deleteByQuery.d.ts +2 -1
- package/api/_core/deleteByQuery.js +1 -1
- package/api/_core/deletePit.d.ts +2 -2
- package/api/_core/getAllPits.d.ts +2 -2
- package/api/_core/rankEval.d.ts +1 -1
- package/api/_core/reindex.d.ts +1 -0
- package/api/_core/reindex.js +1 -0
- package/api/_core/renderSearchTemplate.d.ts +1 -1
- package/api/_core/searchShards.d.ts +0 -11
- package/api/_core/searchShards.js +0 -1
- package/api/_core/updateByQuery.d.ts +2 -1
- package/api/_core/updateByQuery.js +1 -1
- package/api/_types/_common.aggregations.d.ts +37 -156
- package/api/_types/_common.d.ts +4 -11
- package/api/_types/_common.query_dsl.d.ts +64 -39
- package/api/_types/_core.field_caps.d.ts +1 -1
- package/api/_types/{_core._common.d.ts → _core.pit.d.ts} +0 -12
- package/api/_types/_core.rank_eval.d.ts +3 -3
- package/api/_types/_core.termvectors.d.ts +1 -1
- package/api/_types/index.d.ts +2 -2
- package/api/_types/ml._common.d.ts +193 -28
- package/api/asynchronousSearch/delete.js +1 -1
- package/api/asynchronousSearch/get.js +1 -1
- package/api/asynchronousSearch/search.js +4 -4
- package/api/asynchronousSearch/stats.js +1 -1
- package/api/cat/aliases.js +1 -1
- package/api/cat/allPitSegments.js +1 -1
- package/api/cat/clusterManager.js +1 -1
- package/api/cat/count.js +1 -1
- package/api/cat/fielddata.js +1 -1
- package/api/cat/health.js +1 -1
- package/api/cat/indices.js +2 -2
- package/api/cat/master.js +1 -1
- package/api/cat/nodeattrs.js +1 -1
- package/api/cat/nodes.js +1 -1
- package/api/cat/pendingTasks.js +1 -1
- package/api/cat/pitSegments.js +1 -1
- package/api/cat/plugins.js +1 -1
- package/api/cat/recovery.js +1 -1
- package/api/cat/repositories.js +1 -1
- package/api/cat/segmentReplication.js +2 -2
- package/api/cat/shards.js +1 -1
- package/api/cat/snapshots.js +1 -1
- package/api/cat/tasks.js +1 -1
- package/api/cat/templates.js +1 -1
- package/api/cat/threadPool.js +1 -1
- package/api/cluster/allocationExplain.js +4 -4
- package/api/cluster/deleteComponentTemplate.js +3 -3
- package/api/cluster/deleteDecommissionAwareness.js +1 -1
- package/api/cluster/deleteVotingConfigExclusions.js +2 -2
- package/api/cluster/existsComponentTemplate.js +4 -4
- package/api/cluster/getComponentTemplate.js +4 -4
- package/api/cluster/getDecommissionAwareness.js +2 -2
- package/api/cluster/getSettings.js +5 -5
- package/api/cluster/getWeightedRouting.js +1 -1
- package/api/cluster/health.js +14 -14
- package/api/cluster/pendingTasks.js +5 -5
- package/api/cluster/postVotingConfigExclusions.js +4 -4
- package/api/cluster/putComponentTemplate.js +6 -6
- package/api/cluster/putDecommissionAwareness.js +3 -3
- package/api/cluster/putSettings.js +5 -5
- package/api/cluster/putWeightedRouting.js +1 -1
- package/api/cluster/reroute.js +6 -6
- package/api/cluster/state.js +10 -10
- package/api/cluster/stats.js +5 -5
- package/api/index.d.ts +40 -6
- package/api/indices/simulateIndexTemplate.d.ts +5 -1
- package/api/ml/_api.js +51 -0
- package/api/ml/createController.d.ts +39 -0
- package/api/ml/createController.js +50 -0
- package/api/ml/createModelMeta.d.ts +1 -1
- package/api/ml/deleteController.d.ts +30 -0
- package/api/ml/deleteController.js +49 -0
- package/api/ml/executeAgent.d.ts +36 -0
- package/api/ml/executeAgent.js +50 -0
- package/api/ml/executeAlgorithm.d.ts +45 -0
- package/api/ml/executeAlgorithm.js +50 -0
- package/api/ml/getAgent.d.ts +30 -0
- package/api/ml/getAgent.js +49 -0
- package/api/ml/getAllMemories.d.ts +34 -0
- package/api/ml/getAllMemories.js +48 -0
- package/api/ml/getAllMessages.d.ts +35 -0
- package/api/ml/getAllMessages.js +51 -0
- package/api/ml/getAllTools.d.ts +28 -0
- package/api/ml/getAllTools.js +45 -0
- package/api/ml/getController.d.ts +34 -0
- package/api/ml/getController.js +49 -0
- package/api/ml/getMemory.d.ts +2 -8
- package/api/ml/getMemory.js +5 -5
- package/api/ml/getMessage.d.ts +2 -3
- package/api/ml/getMessage.js +6 -12
- package/api/ml/getMessageTraces.d.ts +6 -1
- package/api/ml/getMessageTraces.js +2 -0
- package/api/ml/getProfile.d.ts +30 -0
- package/api/ml/getProfile.js +47 -0
- package/api/ml/getProfileModels.d.ts +31 -0
- package/api/ml/getProfileModels.js +49 -0
- package/api/ml/getProfileTasks.d.ts +31 -0
- package/api/ml/getProfileTasks.js +49 -0
- package/api/ml/getStats.d.ts +31 -0
- package/api/ml/getStats.js +50 -0
- package/api/ml/getTool.d.ts +30 -0
- package/api/ml/getTool.js +49 -0
- package/api/ml/registerModel.d.ts +6 -2
- package/api/ml/registerModelMeta.d.ts +1 -1
- package/api/ml/searchAgents.d.ts +36 -0
- package/api/ml/searchAgents.js +47 -0
- package/api/ml/searchTasks.d.ts +36 -0
- package/api/ml/searchTasks.js +47 -0
- package/api/ml/undeployModel.d.ts +1 -1
- package/api/ml/unloadModel.d.ts +1 -1
- package/api/ml/updateController.d.ts +37 -0
- package/api/ml/updateController.js +50 -0
- package/api/ml/updateModel.d.ts +2 -1
- package/api/ml/uploadModel.d.ts +2 -1
- package/package.json +1 -1
|
@@ -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_GetAgent_Request extends Global.Params {
|
|
22
|
+
agent_id: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Ml_GetAgent_Response extends ApiResponse {
|
|
26
|
+
body: Ml_GetAgent_ResponseBody;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Ml_GetAgent_ResponseBody = Ml_Common.GetAgentResponse
|
|
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
|
+
* Get an agent.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_agent}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.agent_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 getAgentFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.agent_id == null) return handleMissingParam('agent_id', this, callback);
|
|
38
|
+
|
|
39
|
+
let { body, agent_id, ...querystring } = params;
|
|
40
|
+
agent_id = parsePathParam(agent_id);
|
|
41
|
+
|
|
42
|
+
const path = '/_plugins/_ml/agents/' + agent_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 = getAgentFunc;
|
|
@@ -0,0 +1,34 @@
|
|
|
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_GetAllMemories_Request extends Global.Params {
|
|
22
|
+
max_results?: number;
|
|
23
|
+
next_token?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Ml_GetAllMemories_Response extends ApiResponse {
|
|
27
|
+
body: Ml_GetAllMemories_ResponseBody;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Ml_GetAllMemories_ResponseBody = {
|
|
31
|
+
memories: Ml_Common.Memory[];
|
|
32
|
+
next_token?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
* Get all memories.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_all_memories}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} [params]
|
|
28
|
+
* @param {number} [params.max_results] - The maximum number of results to return. If there are fewer memories than the number set in `max_results`, the response returns only the number of memories that exist. Default is `10`.
|
|
29
|
+
* @param {number} [params.next_token] - The index of the first memory in the sorted list of memories to return. Memories are ordered by `create_time`. For example, if memories `A`, `B`, and `C` exist, `next_token=1` returns memories `B` and `C`. Default is `0` (return all memories).
|
|
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 getAllMemoriesFunc(params, options, callback) {
|
|
37
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
38
|
+
|
|
39
|
+
let { body, ...querystring } = params;
|
|
40
|
+
|
|
41
|
+
const path = '/_plugins/_ml/memory';
|
|
42
|
+
const method = 'GET';
|
|
43
|
+
body = body || '';
|
|
44
|
+
|
|
45
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = getAllMemoriesFunc;
|
|
@@ -0,0 +1,35 @@
|
|
|
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_GetAllMessages_Request extends Global.Params {
|
|
22
|
+
max_results?: number;
|
|
23
|
+
memory_id: string;
|
|
24
|
+
next_token?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Ml_GetAllMessages_Response extends ApiResponse {
|
|
28
|
+
body: Ml_GetAllMessages_ResponseBody;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type Ml_GetAllMessages_ResponseBody = {
|
|
32
|
+
messages: Ml_Common.Message[];
|
|
33
|
+
next_token?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
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 all messages in a memory.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_all_messages}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {number} [params.max_results]
|
|
29
|
+
* @param {number} [params.next_token]
|
|
30
|
+
* @param {string} params.memory_id
|
|
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 getAllMessagesFunc(params, options, callback) {
|
|
38
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
39
|
+
if (params.memory_id == null) return handleMissingParam('memory_id', this, callback);
|
|
40
|
+
|
|
41
|
+
let { body, memory_id, ...querystring } = params;
|
|
42
|
+
memory_id = parsePathParam(memory_id);
|
|
43
|
+
|
|
44
|
+
const path = '/_plugins/_ml/memory/' + memory_id + '/messages';
|
|
45
|
+
const method = 'GET';
|
|
46
|
+
body = body || '';
|
|
47
|
+
|
|
48
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = getAllMessagesFunc;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 type Ml_GetAllTools_Request = Global.Params & Record<string, any>
|
|
22
|
+
|
|
23
|
+
export interface Ml_GetAllTools_Response extends ApiResponse {
|
|
24
|
+
body: Ml_GetAllTools_ResponseBody;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type Ml_GetAllTools_ResponseBody = Ml_Common.Tool[]
|
|
28
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get tools.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_all_tools}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} [params] - (Unused)
|
|
28
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
29
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
30
|
+
*
|
|
31
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
32
|
+
*/
|
|
33
|
+
function getAllToolsFunc(params, options, callback) {
|
|
34
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
35
|
+
|
|
36
|
+
let { body, ...querystring } = params;
|
|
37
|
+
|
|
38
|
+
const path = '/_plugins/_ml/tools';
|
|
39
|
+
const method = 'GET';
|
|
40
|
+
body = body || '';
|
|
41
|
+
|
|
42
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = getAllToolsFunc;
|
|
@@ -0,0 +1,34 @@
|
|
|
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_GetController_Request extends Global.Params {
|
|
23
|
+
model_id: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Ml_GetController_Response extends ApiResponse {
|
|
27
|
+
body: Ml_GetController_ResponseBody;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Ml_GetController_ResponseBody = {
|
|
31
|
+
model_id?: Common.Name;
|
|
32
|
+
user_rate_limiter?: Record<string, Ml_Common.RateLimiter>;
|
|
33
|
+
}
|
|
34
|
+
|
|
@@ -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 controller.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_controller}
|
|
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 getControllerFunc(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/controllers/' + 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 = getControllerFunc;
|
package/api/ml/getMemory.d.ts
CHANGED
|
@@ -19,18 +19,12 @@ import * as Global from '../_types/_global'
|
|
|
19
19
|
import * as Ml_Common from '../_types/ml._common'
|
|
20
20
|
|
|
21
21
|
export interface Ml_GetMemory_Request extends Global.Params {
|
|
22
|
-
|
|
23
|
-
memory_id?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type Ml_GetMemory_RequestBody = {
|
|
27
|
-
max_results?: number;
|
|
28
|
-
next_token?: number;
|
|
22
|
+
memory_id: string;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
export interface Ml_GetMemory_Response extends ApiResponse {
|
|
32
26
|
body: Ml_GetMemory_ResponseBody;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
export type Ml_GetMemory_ResponseBody = Ml_Common.
|
|
29
|
+
export type Ml_GetMemory_ResponseBody = Ml_Common.Memory
|
|
36
30
|
|
package/api/ml/getMemory.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
'use strict';
|
|
18
18
|
|
|
19
|
-
const { normalizeArguments, parsePathParam } = require('../utils');
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Get a memory.
|
|
@@ -24,9 +24,8 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Ml
|
|
26
26
|
*
|
|
27
|
-
* @param {object}
|
|
28
|
-
* @param {string}
|
|
29
|
-
* @param {object} [params.body]
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.memory_id
|
|
30
29
|
*
|
|
31
30
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
31
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -35,11 +34,12 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
35
34
|
*/
|
|
36
35
|
function getMemoryFunc(params, options, callback) {
|
|
37
36
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.memory_id == null) return handleMissingParam('memory_id', this, callback);
|
|
38
38
|
|
|
39
39
|
let { body, memory_id, ...querystring } = params;
|
|
40
40
|
memory_id = parsePathParam(memory_id);
|
|
41
41
|
|
|
42
|
-
const path =
|
|
42
|
+
const path = '/_plugins/_ml/memory/' + memory_id;
|
|
43
43
|
const method = 'GET';
|
|
44
44
|
body = body || '';
|
|
45
45
|
|
package/api/ml/getMessage.d.ts
CHANGED
|
@@ -19,13 +19,12 @@ import * as Global from '../_types/_global'
|
|
|
19
19
|
import * as Ml_Common from '../_types/ml._common'
|
|
20
20
|
|
|
21
21
|
export interface Ml_GetMessage_Request extends Global.Params {
|
|
22
|
-
|
|
23
|
-
message_id?: string;
|
|
22
|
+
message_id: string;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export interface Ml_GetMessage_Response extends ApiResponse {
|
|
27
26
|
body: Ml_GetMessage_ResponseBody;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
export type Ml_GetMessage_ResponseBody = Ml_Common.
|
|
29
|
+
export type Ml_GetMessage_ResponseBody = Ml_Common.Message
|
|
31
30
|
|
package/api/ml/getMessage.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
'use strict';
|
|
18
18
|
|
|
19
|
-
const { normalizeArguments, parsePathParam } = require('../utils');
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Get a message.
|
|
@@ -24,9 +24,8 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Ml
|
|
26
26
|
*
|
|
27
|
-
* @param {object}
|
|
28
|
-
* @param {string}
|
|
29
|
-
* @param {string} [params.message_id]
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.message_id
|
|
30
29
|
*
|
|
31
30
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
31
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -35,17 +34,12 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
35
34
|
*/
|
|
36
35
|
function getMessageFunc(params, options, callback) {
|
|
37
36
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
if (params.message_id == null) return handleMissingParam('message_id', this, callback);
|
|
38
38
|
|
|
39
|
-
let { body,
|
|
40
|
-
memory_id = parsePathParam(memory_id);
|
|
39
|
+
let { body, message_id, ...querystring } = params;
|
|
41
40
|
message_id = parsePathParam(message_id);
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
if (memory_id != null) {
|
|
45
|
-
path = '/_plugins/_ml/memory/' + memory_id + '/messages';
|
|
46
|
-
} else {
|
|
47
|
-
path = '/_plugins/_ml/memory/message/' + message_id;
|
|
48
|
-
}
|
|
42
|
+
const path = '/_plugins/_ml/memory/message/' + message_id;
|
|
49
43
|
const method = 'GET';
|
|
50
44
|
body = body || '';
|
|
51
45
|
|
|
@@ -19,12 +19,17 @@ import * as Global from '../_types/_global'
|
|
|
19
19
|
import * as Ml_Common from '../_types/ml._common'
|
|
20
20
|
|
|
21
21
|
export interface Ml_GetMessageTraces_Request extends Global.Params {
|
|
22
|
+
max_results?: number;
|
|
22
23
|
message_id: string;
|
|
24
|
+
next_token?: number;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export interface Ml_GetMessageTraces_Response extends ApiResponse {
|
|
26
28
|
body: Ml_GetMessageTraces_ResponseBody;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
export type Ml_GetMessageTraces_ResponseBody =
|
|
31
|
+
export type Ml_GetMessageTraces_ResponseBody = {
|
|
32
|
+
next_token?: number;
|
|
33
|
+
traces: Ml_Common.Message[];
|
|
34
|
+
}
|
|
30
35
|
|
|
@@ -25,6 +25,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
25
25
|
* @memberOf API-Ml
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
+
* @param {number} [params.max_results]
|
|
29
|
+
* @param {number} [params.next_token]
|
|
28
30
|
* @param {string} params.message_id
|
|
29
31
|
*
|
|
30
32
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
@@ -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_GetProfile_Request extends Global.Params {
|
|
22
|
+
body?: Ml_Common.ProfileRequest;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Ml_GetProfile_Response extends ApiResponse {
|
|
26
|
+
body: Ml_GetProfile_ResponseBody;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Ml_GetProfile_ResponseBody = Ml_Common.GetProfileResponse
|
|
30
|
+
|
|
@@ -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
|
+
* Get a profile.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.get_profile}
|
|
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 getProfileFunc(params, options, callback) {
|
|
36
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
37
|
+
|
|
38
|
+
let { body, ...querystring } = params;
|
|
39
|
+
|
|
40
|
+
const path = '/_plugins/_ml/profile';
|
|
41
|
+
const method = 'GET';
|
|
42
|
+
body = body || '';
|
|
43
|
+
|
|
44
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = getProfileFunc;
|
|
@@ -0,0 +1,31 @@
|
|
|
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_GetProfileModels_Request extends Global.Params {
|
|
22
|
+
body?: Ml_Common.ProfileRequest;
|
|
23
|
+
model_id?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Ml_GetProfileModels_Response extends ApiResponse {
|
|
27
|
+
body: Ml_GetProfileModels_ResponseBody;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Ml_GetProfileModels_ResponseBody = Ml_Common.GetProfileResponse
|
|
31
|
+
|