Skip to content

Commit

Permalink
[AUTOCUT] Update opensearch-js to reflect the latest OpenSearch API s…
Browse files Browse the repository at this point in the history
…pec (2025-01-19) (#964)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nhtruong <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and nhtruong authored Jan 21, 2025
1 parent dada26a commit dc45862
Show file tree
Hide file tree
Showing 55 changed files with 1,673 additions and 87 deletions.
86 changes: 78 additions & 8 deletions api/OpenSearchApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,15 +705,33 @@ export default class OpenSearchAPI {
train (params: API.Ml_Train_Request, callback: callbackFn<API.Ml_Train_Response>): TransportRequestCallback;
train (params: API.Ml_Train_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Train_Response>): TransportRequestCallback;

getStats (params?: API.Ml_GetStats_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetStats_Response>;
getStats (callback: callbackFn<API.Ml_GetStats_Response>): TransportRequestCallback;
getStats (params: API.Ml_GetStats_Request, callback: callbackFn<API.Ml_GetStats_Response>): TransportRequestCallback;
getStats (params: API.Ml_GetStats_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetStats_Response>): TransportRequestCallback;

registerAgents (params?: API.Ml_RegisterAgents_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_RegisterAgents_Response>;
registerAgents (callback: callbackFn<API.Ml_RegisterAgents_Response>): TransportRequestCallback;
registerAgents (params: API.Ml_RegisterAgents_Request, callback: callbackFn<API.Ml_RegisterAgents_Response>): TransportRequestCallback;
registerAgents (params: API.Ml_RegisterAgents_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_RegisterAgents_Response>): TransportRequestCallback;

searchAgents (params?: API.Ml_SearchAgents_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_SearchAgents_Response>;
searchAgents (callback: callbackFn<API.Ml_SearchAgents_Response>): TransportRequestCallback;
searchAgents (params: API.Ml_SearchAgents_Request, callback: callbackFn<API.Ml_SearchAgents_Response>): TransportRequestCallback;
searchAgents (params: API.Ml_SearchAgents_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_SearchAgents_Response>): TransportRequestCallback;

deleteAgent (params: API.Ml_DeleteAgent_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_DeleteAgent_Response>;
deleteAgent (params: API.Ml_DeleteAgent_Request, callback: callbackFn<API.Ml_DeleteAgent_Response>): TransportRequestCallback;
deleteAgent (params: API.Ml_DeleteAgent_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteAgent_Response>): TransportRequestCallback;

getAgent (params: API.Ml_GetAgent_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetAgent_Response>;
getAgent (params: API.Ml_GetAgent_Request, callback: callbackFn<API.Ml_GetAgent_Response>): TransportRequestCallback;
getAgent (params: API.Ml_GetAgent_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetAgent_Response>): TransportRequestCallback;

executeAgent (params: API.Ml_ExecuteAgent_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_ExecuteAgent_Response>;
executeAgent (params: API.Ml_ExecuteAgent_Request, callback: callbackFn<API.Ml_ExecuteAgent_Response>): TransportRequestCallback;
executeAgent (params: API.Ml_ExecuteAgent_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_ExecuteAgent_Response>): TransportRequestCallback;

createConnector (params?: API.Ml_CreateConnector_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_CreateConnector_Response>;
createConnector (callback: callbackFn<API.Ml_CreateConnector_Response>): TransportRequestCallback;
createConnector (params: API.Ml_CreateConnector_Request, callback: callbackFn<API.Ml_CreateConnector_Response>): TransportRequestCallback;
Expand All @@ -736,10 +754,26 @@ export default class OpenSearchAPI {
updateConnector (params: API.Ml_UpdateConnector_Request, callback: callbackFn<API.Ml_UpdateConnector_Response>): TransportRequestCallback;
updateConnector (params: API.Ml_UpdateConnector_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateConnector_Response>): TransportRequestCallback;

getMemory (params?: API.Ml_GetMemory_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetMemory_Response>;
getMemory (callback: callbackFn<API.Ml_GetMemory_Response>): TransportRequestCallback;
getMemory (params: API.Ml_GetMemory_Request, callback: callbackFn<API.Ml_GetMemory_Response>): TransportRequestCallback;
getMemory (params: API.Ml_GetMemory_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetMemory_Response>): TransportRequestCallback;
deleteController (params: API.Ml_DeleteController_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_DeleteController_Response>;
deleteController (params: API.Ml_DeleteController_Request, callback: callbackFn<API.Ml_DeleteController_Response>): TransportRequestCallback;
deleteController (params: API.Ml_DeleteController_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteController_Response>): TransportRequestCallback;

getController (params: API.Ml_GetController_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetController_Response>;
getController (params: API.Ml_GetController_Request, callback: callbackFn<API.Ml_GetController_Response>): TransportRequestCallback;
getController (params: API.Ml_GetController_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetController_Response>): TransportRequestCallback;

createController (params: API.Ml_CreateController_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_CreateController_Response>;
createController (params: API.Ml_CreateController_Request, callback: callbackFn<API.Ml_CreateController_Response>): TransportRequestCallback;
createController (params: API.Ml_CreateController_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_CreateController_Response>): TransportRequestCallback;

updateController (params: API.Ml_UpdateController_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_UpdateController_Response>;
updateController (params: API.Ml_UpdateController_Request, callback: callbackFn<API.Ml_UpdateController_Response>): TransportRequestCallback;
updateController (params: API.Ml_UpdateController_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateController_Response>): TransportRequestCallback;

getAllMemories (params?: API.Ml_GetAllMemories_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetAllMemories_Response>;
getAllMemories (callback: callbackFn<API.Ml_GetAllMemories_Response>): TransportRequestCallback;
getAllMemories (params: API.Ml_GetAllMemories_Request, callback: callbackFn<API.Ml_GetAllMemories_Response>): TransportRequestCallback;
getAllMemories (params: API.Ml_GetAllMemories_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetAllMemories_Response>): TransportRequestCallback;

createMemory (params?: API.Ml_CreateMemory_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_CreateMemory_Response>;
createMemory (callback: callbackFn<API.Ml_CreateMemory_Response>): TransportRequestCallback;
Expand All @@ -755,6 +789,10 @@ export default class OpenSearchAPI {
deleteMemory (params: API.Ml_DeleteMemory_Request, callback: callbackFn<API.Ml_DeleteMemory_Response>): TransportRequestCallback;
deleteMemory (params: API.Ml_DeleteMemory_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteMemory_Response>): TransportRequestCallback;

getMemory (params: API.Ml_GetMemory_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetMemory_Response>;
getMemory (params: API.Ml_GetMemory_Request, callback: callbackFn<API.Ml_GetMemory_Response>): TransportRequestCallback;
getMemory (params: API.Ml_GetMemory_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetMemory_Response>): TransportRequestCallback;

updateMemory (params: API.Ml_UpdateMemory_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_UpdateMemory_Response>;
updateMemory (params: API.Ml_UpdateMemory_Request, callback: callbackFn<API.Ml_UpdateMemory_Response>): TransportRequestCallback;
updateMemory (params: API.Ml_UpdateMemory_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateMemory_Response>): TransportRequestCallback;
Expand All @@ -763,15 +801,18 @@ export default class OpenSearchAPI {
searchMessage (params: API.Ml_SearchMessage_Request, callback: callbackFn<API.Ml_SearchMessage_Response>): TransportRequestCallback;
searchMessage (params: API.Ml_SearchMessage_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_SearchMessage_Response>): TransportRequestCallback;

getMessage (params?: API.Ml_GetMessage_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetMessage_Response>;
getMessage (callback: callbackFn<API.Ml_GetMessage_Response>): TransportRequestCallback;
getMessage (params: API.Ml_GetMessage_Request, callback: callbackFn<API.Ml_GetMessage_Response>): TransportRequestCallback;
getMessage (params: API.Ml_GetMessage_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetMessage_Response>): TransportRequestCallback;
getAllMessages (params: API.Ml_GetAllMessages_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetAllMessages_Response>;
getAllMessages (params: API.Ml_GetAllMessages_Request, callback: callbackFn<API.Ml_GetAllMessages_Response>): TransportRequestCallback;
getAllMessages (params: API.Ml_GetAllMessages_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetAllMessages_Response>): TransportRequestCallback;

createMessage (params: API.Ml_CreateMessage_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_CreateMessage_Response>;
createMessage (params: API.Ml_CreateMessage_Request, callback: callbackFn<API.Ml_CreateMessage_Response>): TransportRequestCallback;
createMessage (params: API.Ml_CreateMessage_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_CreateMessage_Response>): TransportRequestCallback;

getMessage (params: API.Ml_GetMessage_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetMessage_Response>;
getMessage (params: API.Ml_GetMessage_Request, callback: callbackFn<API.Ml_GetMessage_Response>): TransportRequestCallback;
getMessage (params: API.Ml_GetMessage_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetMessage_Response>): TransportRequestCallback;

updateMessage (params: API.Ml_UpdateMessage_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_UpdateMessage_Response>;
updateMessage (params: API.Ml_UpdateMessage_Request, callback: callbackFn<API.Ml_UpdateMessage_Response>): TransportRequestCallback;
updateMessage (params: API.Ml_UpdateMessage_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateMessage_Response>): TransportRequestCallback;
Expand Down Expand Up @@ -869,6 +910,26 @@ export default class OpenSearchAPI {
createModelMeta (params: API.Ml_CreateModelMeta_Request, callback: callbackFn<API.Ml_CreateModelMeta_Response>): TransportRequestCallback;
createModelMeta (params: API.Ml_CreateModelMeta_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_CreateModelMeta_Response>): TransportRequestCallback;

getProfile (params?: API.Ml_GetProfile_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetProfile_Response>;
getProfile (callback: callbackFn<API.Ml_GetProfile_Response>): TransportRequestCallback;
getProfile (params: API.Ml_GetProfile_Request, callback: callbackFn<API.Ml_GetProfile_Response>): TransportRequestCallback;
getProfile (params: API.Ml_GetProfile_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetProfile_Response>): TransportRequestCallback;

getProfileModels (params?: API.Ml_GetProfileModels_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetProfileModels_Response>;
getProfileModels (callback: callbackFn<API.Ml_GetProfileModels_Response>): TransportRequestCallback;
getProfileModels (params: API.Ml_GetProfileModels_Request, callback: callbackFn<API.Ml_GetProfileModels_Response>): TransportRequestCallback;
getProfileModels (params: API.Ml_GetProfileModels_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetProfileModels_Response>): TransportRequestCallback;

getProfileTasks (params?: API.Ml_GetProfileTasks_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetProfileTasks_Response>;
getProfileTasks (callback: callbackFn<API.Ml_GetProfileTasks_Response>): TransportRequestCallback;
getProfileTasks (params: API.Ml_GetProfileTasks_Request, callback: callbackFn<API.Ml_GetProfileTasks_Response>): TransportRequestCallback;
getProfileTasks (params: API.Ml_GetProfileTasks_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetProfileTasks_Response>): TransportRequestCallback;

searchTasks (params?: API.Ml_SearchTasks_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_SearchTasks_Response>;
searchTasks (callback: callbackFn<API.Ml_SearchTasks_Response>): TransportRequestCallback;
searchTasks (params: API.Ml_SearchTasks_Request, callback: callbackFn<API.Ml_SearchTasks_Response>): TransportRequestCallback;
searchTasks (params: API.Ml_SearchTasks_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_SearchTasks_Response>): TransportRequestCallback;

deleteTask (params: API.Ml_DeleteTask_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_DeleteTask_Response>;
deleteTask (params: API.Ml_DeleteTask_Request, callback: callbackFn<API.Ml_DeleteTask_Response>): TransportRequestCallback;
deleteTask (params: API.Ml_DeleteTask_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteTask_Response>): TransportRequestCallback;
Expand All @@ -877,6 +938,15 @@ export default class OpenSearchAPI {
getTask (params: API.Ml_GetTask_Request, callback: callbackFn<API.Ml_GetTask_Response>): TransportRequestCallback;
getTask (params: API.Ml_GetTask_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetTask_Response>): TransportRequestCallback;

getAllTools (params?: API.Ml_GetAllTools_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetAllTools_Response>;
getAllTools (callback: callbackFn<API.Ml_GetAllTools_Response>): TransportRequestCallback;
getAllTools (params: API.Ml_GetAllTools_Request, callback: callbackFn<API.Ml_GetAllTools_Response>): TransportRequestCallback;
getAllTools (params: API.Ml_GetAllTools_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetAllTools_Response>): TransportRequestCallback;

getTool (params: API.Ml_GetTool_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetTool_Response>;
getTool (params: API.Ml_GetTool_Request, callback: callbackFn<API.Ml_GetTool_Response>): TransportRequestCallback;
getTool (params: API.Ml_GetTool_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetTool_Response>): TransportRequestCallback;

};

nodes: {
Expand Down
2 changes: 1 addition & 1 deletion api/_core/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified.
* @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
* @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
* @param {boolean} [params.ignore_throttled] - If `true`, concrete, expanded or aliased indexes are ignored when frozen.
* @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index.
* @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
Expand Down
2 changes: 0 additions & 2 deletions api/_types/_common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ export type Metadata = Record<string, any>

export type MinimumShouldMatch = number | string

export type ModelFormat = 'ONNX' | 'TORCH_SCRIPT'

export type MultiTermQueryRewrite = 'constant_score' | 'constant_score_boolean' | 'scoring_boolean' | string

export type Name = string
Expand Down
Loading

0 comments on commit dc45862

Please sign in to comment.