From d49d1f4e2cb827ab0d9909fa7d9f830117dbb47c Mon Sep 17 00:00:00 2001 From: nhtruong <644650+nhtruong@users.noreply.github.com> Date: Sun, 3 Aug 2025 00:13:19 +0000 Subject: [PATCH] Updated opensearch-js to reflect the latest OpenSearch API spec (2025-08-03) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- api/OpenSearchApi.d.ts | 254 ++++++++++++ api/OpenSearchApi.js | 14 + api/_core/bulk.d.ts | 9 +- api/_core/bulk.js | 2 +- api/_core/bulkStream.d.ts | 7 +- api/_core/bulkStream.js | 2 +- api/_core/clearScroll.js | 4 +- api/_core/count.js | 4 +- api/_core/create.js | 6 +- api/_core/createPit.js | 4 +- api/_core/delete.js | 6 +- api/_core/deleteByQuery.js | 4 +- api/_core/exists.js | 6 +- api/_core/existsSource.js | 6 +- api/_core/explain.d.ts | 6 +- api/_core/explain.js | 4 +- api/_core/fieldCaps.js | 6 +- api/_core/get.d.ts | 4 +- api/_core/get.js | 8 +- api/_core/getSource.d.ts | 2 +- api/_core/getSource.js | 8 +- api/_core/index.js | 6 +- api/_core/mget.js | 6 +- api/_core/msearch.js | 2 +- api/_core/msearchTemplate.js | 2 +- api/_core/mtermvectors.js | 14 +- api/_core/rankEval.js | 2 +- api/_core/scriptsPainlessExecute.d.ts | 2 +- api/_core/scroll.d.ts | 2 +- api/_core/search.d.ts | 6 +- api/_core/search.js | 5 +- api/_core/searchShards.d.ts | 5 + api/_core/searchShards.js | 3 +- api/_core/searchTemplate.d.ts | 21 +- api/_core/searchTemplate.js | 6 +- api/_core/termvectors.js | 14 +- api/_core/update.js | 2 +- api/_core/updateByQuery.js | 4 +- api/_types/_common.aggregations.d.ts | 379 ++++++------------ api/_types/_common.analysis.d.ts | 17 +- api/_types/_common.d.ts | 57 +-- api/_types/_common.mapping.d.ts | 2 +- api/_types/_common.query_dsl.d.ts | 11 +- api/_types/_core.bulk.d.ts | 31 +- api/_types/_core.explain.d.ts | 8 +- api/_types/_core.get.d.ts | 10 +- api/_types/_core.msearch.d.ts | 2 +- api/_types/_core.search.d.ts | 107 +++-- api/_types/asynchronous_search._common.d.ts | 7 +- api/_types/cluster._common.d.ts | 2 + .../cluster.decommission_awareness.d.ts | 4 +- api/_types/cluster.pending_tasks.d.ts | 2 + api/_types/cluster.weighted_routing.d.ts | 9 +- api/_types/flow_framework.common.d.ts | 6 +- api/_types/geospatial._common.d.ts | 153 +++++++ api/_types/index.d.ts | 12 + api/_types/indices._common.d.ts | 67 +++- api/_types/ingestion._common.d.ts | 68 ++++ api/_types/insights._common.d.ts | 2 + api/_types/knn._common.d.ts | 51 ++- api/_types/ltr._common.d.ts | 66 ++- api/_types/ml._common.d.ts | 245 ++++------- api/_types/neural._common.d.ts | 229 +++++++++++ api/_types/nodes._common.d.ts | 2 +- api/_types/nodes.info.d.ts | 9 +- api/_types/nodes.stats.d.ts | 1 + api/_types/observability._common.d.ts | 16 - api/_types/query._common.d.ts | 20 - api/_types/replication._common.d.ts | 4 +- api/_types/rollups._common.d.ts | 2 + api/_types/search_pipeline._common.d.ts | 20 +- api/_types/search_relevance._common.d.ts | 64 +++ api/_types/security._common.d.ts | 39 +- api/_types/security_analytics.alerts.d.ts | 59 +++ api/_types/security_analytics.findings.d.ts | 65 +++ api/_types/sm._common.d.ts | 42 +- api/_types/transforms._common.d.ts | 23 -- api/_types/wlm._common.d.ts | 8 +- api/cat/count.js | 2 +- api/cluster/deleteWeightedRouting.d.ts | 7 +- api/cluster/existsComponentTemplate.js | 2 +- api/cluster/getDecommissionAwareness.d.ts | 2 +- api/cluster/getWeightedRouting.d.ts | 4 +- api/cluster/health.d.ts | 3 +- api/cluster/putWeightedRouting.d.ts | 7 +- api/danglingIndices/listDanglingIndices.d.ts | 4 +- api/geospatial/_api.js | 46 +++ api/geospatial/deleteIp2GeoDatasource.d.ts | 30 ++ api/geospatial/deleteIp2GeoDatasource.js | 49 +++ api/geospatial/geojsonUploadPost.d.ts | 30 ++ api/geospatial/geojsonUploadPost.js | 49 +++ api/geospatial/geojsonUploadPut.d.ts | 30 ++ api/geospatial/geojsonUploadPut.js | 49 +++ api/geospatial/getIp2GeoDatasource.d.ts | 31 ++ api/geospatial/getIp2GeoDatasource.js | 48 +++ api/geospatial/getUploadStats.d.ts | 28 ++ api/geospatial/getUploadStats.js | 45 +++ api/geospatial/putIp2GeoDatasource.d.ts | 32 ++ api/geospatial/putIp2GeoDatasource.js | 53 +++ .../putIp2GeoDatasourceSettings.d.ts | 32 ++ api/geospatial/putIp2GeoDatasourceSettings.js | 50 +++ api/index.d.ts | 128 +++++- api/indices/clearCache.js | 4 +- api/indices/close.js | 2 +- api/indices/create.js | 2 +- api/indices/dataStreamsStats.js | 2 +- api/indices/delete.js | 2 +- api/indices/deleteAlias.js | 4 +- api/indices/deleteDataStream.js | 2 +- api/indices/deleteIndexTemplate.js | 2 +- api/indices/exists.js | 2 +- api/indices/existsAlias.js | 4 +- api/indices/existsIndexTemplate.js | 2 +- api/indices/flush.js | 2 +- api/indices/get.js | 2 +- api/indices/getAlias.js | 4 +- api/indices/getDataStream.js | 2 +- api/indices/getFieldMapping.js | 4 +- api/indices/getIndexTemplate.js | 2 +- api/indices/getMapping.js | 2 +- api/indices/getSettings.js | 4 +- api/indices/getTemplate.js | 2 +- api/indices/getUpgrade.js | 2 +- api/indices/open.js | 2 +- api/indices/putAlias.js | 2 +- api/indices/putSettings.js | 4 +- api/indices/recovery.js | 2 +- api/indices/refresh.js | 2 +- api/indices/rollover.js | 2 +- api/indices/segments.js | 2 +- api/indices/shardStores.js | 8 +- api/indices/simulateTemplate.js | 4 +- api/indices/stats.js | 8 +- api/indices/upgrade.js | 2 +- api/indices/validateQuery.js | 2 +- api/ingestion/_api.js | 30 ++ api/ingestion/getState.d.ts | 34 ++ api/ingestion/getState.js | 52 +++ api/ingestion/pause.d.ts | 33 ++ api/ingestion/pause.js | 51 +++ api/ingestion/resume.d.ts | 34 ++ api/ingestion/resume.js | 52 +++ api/insights/topQueries.d.ts | 2 +- api/knn/searchModels.d.ts | 2 +- api/knn/searchModels.js | 8 +- api/knn/stats.d.ts | 2 +- api/knn/stats.js | 4 +- api/knn/warmup.js | 2 +- api/list/indices.d.ts | 2 +- api/list/indices.js | 6 +- api/list/shards.d.ts | 2 +- api/list/shards.js | 4 +- api/ltr/_api.js | 75 ++++ api/ltr/addFeaturesToSet.d.ts | 37 ++ api/ltr/addFeaturesToSet.js | 55 +++ api/ltr/addFeaturesToSetByQuery.d.ts | 35 ++ api/ltr/addFeaturesToSetByQuery.js | 57 +++ api/ltr/cacheStats.d.ts | 28 ++ api/ltr/cacheStats.js | 45 +++ api/ltr/clearCache.d.ts | 30 ++ api/ltr/clearCache.js | 48 +++ api/ltr/createDefaultStore.d.ts | 28 ++ api/ltr/createDefaultStore.js | 45 +++ api/ltr/createFeature.d.ts | 35 ++ api/ltr/createFeature.js | 53 +++ api/ltr/createFeatureset.d.ts | 35 ++ api/ltr/createFeatureset.js | 53 +++ api/ltr/createModel.d.ts | 35 ++ api/ltr/createModel.js | 53 +++ api/ltr/createModelFromSet.d.ts | 35 ++ api/ltr/createModelFromSet.js | 53 +++ api/ltr/createStore.d.ts | 30 ++ api/ltr/createStore.js | 49 +++ api/ltr/deleteDefaultStore.d.ts | 28 ++ api/ltr/deleteDefaultStore.js | 45 +++ api/ltr/deleteFeature.d.ts | 31 ++ api/ltr/deleteFeature.js | 51 +++ api/ltr/deleteFeatureset.d.ts | 31 ++ api/ltr/deleteFeatureset.js | 51 +++ api/ltr/deleteModel.d.ts | 31 ++ api/ltr/deleteModel.js | 51 +++ api/ltr/deleteStore.d.ts | 30 ++ api/ltr/deleteStore.js | 49 +++ api/ltr/getFeature.d.ts | 30 ++ api/ltr/getFeature.js | 51 +++ api/ltr/getFeatureset.d.ts | 30 ++ api/ltr/getFeatureset.js | 51 +++ api/ltr/getModel.d.ts | 30 ++ api/ltr/getModel.js | 51 +++ api/ltr/getStore.d.ts | 30 ++ api/ltr/getStore.js | 49 +++ api/ltr/listStores.d.ts | 28 ++ api/ltr/listStores.js | 45 +++ api/ltr/searchFeatures.d.ts | 33 ++ api/ltr/searchFeatures.js | 51 +++ api/ltr/searchFeaturesets.d.ts | 33 ++ api/ltr/searchFeaturesets.js | 51 +++ api/ltr/searchModels.d.ts | 33 ++ api/ltr/searchModels.js | 51 +++ api/ltr/stats.d.ts | 2 +- api/ltr/stats.js | 4 +- api/ltr/updateFeature.d.ts | 35 ++ api/ltr/updateFeature.js | 53 +++ api/ltr/updateFeatureset.d.ts | 35 ++ api/ltr/updateFeatureset.js | 53 +++ api/ml/createConnector.d.ts | 2 +- api/ml/createModelMeta.d.ts | 1 + api/ml/executeAlgorithm.d.ts | 4 +- api/ml/executeAlgorithm.js | 2 +- api/ml/getStats.d.ts | 2 +- api/ml/getTool.d.ts | 2 +- api/ml/loadModel.d.ts | 3 +- api/ml/registerModel.d.ts | 3 + api/ml/registerModelGroup.d.ts | 2 +- api/ml/registerModelMeta.d.ts | 1 + api/ml/searchAgents.d.ts | 6 +- api/ml/searchConnectors.d.ts | 6 +- api/ml/searchMemory.d.ts | 6 +- api/ml/searchMessage.d.ts | 6 +- api/ml/searchModelGroup.d.ts | 6 +- api/ml/searchModels.d.ts | 6 +- api/ml/searchTasks.d.ts | 6 +- api/ml/updateConnector.d.ts | 4 +- api/neural/_api.js | 26 ++ api/neural/stats.d.ts | 36 ++ api/neural/stats.js | 55 +++ api/nodes/hotThreads.js | 12 +- api/nodes/info.js | 6 +- api/nodes/reloadSecureSettings.js | 2 +- api/nodes/stats.js | 18 +- api/query/datasourcesList.js | 2 +- api/searchRelevance/_api.js | 70 ++++ api/searchRelevance/deleteExperiments.d.ts | 29 ++ api/searchRelevance/deleteExperiments.js | 49 +++ api/searchRelevance/deleteJudgments.d.ts | 29 ++ api/searchRelevance/deleteJudgments.js | 49 +++ api/searchRelevance/deleteQuerySets.d.ts | 29 ++ api/searchRelevance/deleteQuerySets.js | 49 +++ .../deleteSearchConfigurations.d.ts | 29 ++ .../deleteSearchConfigurations.js | 49 +++ api/searchRelevance/getExperiments.d.ts | 30 ++ api/searchRelevance/getExperiments.js | 48 +++ api/searchRelevance/getJudgments.d.ts | 30 ++ api/searchRelevance/getJudgments.js | 48 +++ api/searchRelevance/getNodeStats.d.ts | 35 ++ api/searchRelevance/getNodeStats.js | 56 +++ api/searchRelevance/getQuerySets.d.ts | 30 ++ api/searchRelevance/getQuerySets.js | 48 +++ .../getSearchConfigurations.d.ts | 30 ++ .../getSearchConfigurations.js | 48 +++ api/searchRelevance/getStats.d.ts | 34 ++ api/searchRelevance/getStats.js | 53 +++ api/searchRelevance/postQuerySets.d.ts | 39 ++ api/searchRelevance/postQuerySets.js | 47 +++ api/searchRelevance/putExperiments.d.ts | 42 ++ api/searchRelevance/putExperiments.js | 47 +++ api/searchRelevance/putJudgments.d.ts | 54 +++ api/searchRelevance/putJudgments.js | 47 +++ api/searchRelevance/putQuerySets.d.ts | 39 ++ api/searchRelevance/putQuerySets.js | 47 +++ .../putSearchConfigurations.d.ts | 39 ++ .../putSearchConfigurations.js | 47 +++ api/security/getSslinfo.d.ts | 3 +- api/security/getSslinfo.js | 2 +- api/security/patchDistinguishedName.d.ts | 4 +- api/securityAnalytics/_api.js | 34 ++ api/securityAnalytics/getAlerts.d.ts | 42 ++ api/securityAnalytics/getAlerts.js | 58 +++ api/securityAnalytics/getFindings.d.ts | 43 ++ api/securityAnalytics/getFindings.js | 59 +++ .../searchFindingCorrelations.d.ts | 33 ++ .../searchFindingCorrelations.js | 52 +++ api/sm/deletePolicy.d.ts | 4 +- api/sm/getPolicies.d.ts | 3 +- api/sm/getPolicies.js | 2 +- api/snapshot/get.js | 2 +- api/sql/query.js | 2 +- api/transforms/delete.d.ts | 4 +- 278 files changed, 6650 insertions(+), 947 deletions(-) create mode 100644 api/_types/geospatial._common.d.ts create mode 100644 api/_types/ingestion._common.d.ts create mode 100644 api/_types/neural._common.d.ts create mode 100644 api/_types/search_relevance._common.d.ts create mode 100644 api/_types/security_analytics.alerts.d.ts create mode 100644 api/_types/security_analytics.findings.d.ts create mode 100644 api/geospatial/_api.js create mode 100644 api/geospatial/deleteIp2GeoDatasource.d.ts create mode 100644 api/geospatial/deleteIp2GeoDatasource.js create mode 100644 api/geospatial/geojsonUploadPost.d.ts create mode 100644 api/geospatial/geojsonUploadPost.js create mode 100644 api/geospatial/geojsonUploadPut.d.ts create mode 100644 api/geospatial/geojsonUploadPut.js create mode 100644 api/geospatial/getIp2GeoDatasource.d.ts create mode 100644 api/geospatial/getIp2GeoDatasource.js create mode 100644 api/geospatial/getUploadStats.d.ts create mode 100644 api/geospatial/getUploadStats.js create mode 100644 api/geospatial/putIp2GeoDatasource.d.ts create mode 100644 api/geospatial/putIp2GeoDatasource.js create mode 100644 api/geospatial/putIp2GeoDatasourceSettings.d.ts create mode 100644 api/geospatial/putIp2GeoDatasourceSettings.js create mode 100644 api/ingestion/_api.js create mode 100644 api/ingestion/getState.d.ts create mode 100644 api/ingestion/getState.js create mode 100644 api/ingestion/pause.d.ts create mode 100644 api/ingestion/pause.js create mode 100644 api/ingestion/resume.d.ts create mode 100644 api/ingestion/resume.js create mode 100644 api/ltr/addFeaturesToSet.d.ts create mode 100644 api/ltr/addFeaturesToSet.js create mode 100644 api/ltr/addFeaturesToSetByQuery.d.ts create mode 100644 api/ltr/addFeaturesToSetByQuery.js create mode 100644 api/ltr/cacheStats.d.ts create mode 100644 api/ltr/cacheStats.js create mode 100644 api/ltr/clearCache.d.ts create mode 100644 api/ltr/clearCache.js create mode 100644 api/ltr/createDefaultStore.d.ts create mode 100644 api/ltr/createDefaultStore.js create mode 100644 api/ltr/createFeature.d.ts create mode 100644 api/ltr/createFeature.js create mode 100644 api/ltr/createFeatureset.d.ts create mode 100644 api/ltr/createFeatureset.js create mode 100644 api/ltr/createModel.d.ts create mode 100644 api/ltr/createModel.js create mode 100644 api/ltr/createModelFromSet.d.ts create mode 100644 api/ltr/createModelFromSet.js create mode 100644 api/ltr/createStore.d.ts create mode 100644 api/ltr/createStore.js create mode 100644 api/ltr/deleteDefaultStore.d.ts create mode 100644 api/ltr/deleteDefaultStore.js create mode 100644 api/ltr/deleteFeature.d.ts create mode 100644 api/ltr/deleteFeature.js create mode 100644 api/ltr/deleteFeatureset.d.ts create mode 100644 api/ltr/deleteFeatureset.js create mode 100644 api/ltr/deleteModel.d.ts create mode 100644 api/ltr/deleteModel.js create mode 100644 api/ltr/deleteStore.d.ts create mode 100644 api/ltr/deleteStore.js create mode 100644 api/ltr/getFeature.d.ts create mode 100644 api/ltr/getFeature.js create mode 100644 api/ltr/getFeatureset.d.ts create mode 100644 api/ltr/getFeatureset.js create mode 100644 api/ltr/getModel.d.ts create mode 100644 api/ltr/getModel.js create mode 100644 api/ltr/getStore.d.ts create mode 100644 api/ltr/getStore.js create mode 100644 api/ltr/listStores.d.ts create mode 100644 api/ltr/listStores.js create mode 100644 api/ltr/searchFeatures.d.ts create mode 100644 api/ltr/searchFeatures.js create mode 100644 api/ltr/searchFeaturesets.d.ts create mode 100644 api/ltr/searchFeaturesets.js create mode 100644 api/ltr/searchModels.d.ts create mode 100644 api/ltr/searchModels.js create mode 100644 api/ltr/updateFeature.d.ts create mode 100644 api/ltr/updateFeature.js create mode 100644 api/ltr/updateFeatureset.d.ts create mode 100644 api/ltr/updateFeatureset.js create mode 100644 api/neural/_api.js create mode 100644 api/neural/stats.d.ts create mode 100644 api/neural/stats.js create mode 100644 api/searchRelevance/_api.js create mode 100644 api/searchRelevance/deleteExperiments.d.ts create mode 100644 api/searchRelevance/deleteExperiments.js create mode 100644 api/searchRelevance/deleteJudgments.d.ts create mode 100644 api/searchRelevance/deleteJudgments.js create mode 100644 api/searchRelevance/deleteQuerySets.d.ts create mode 100644 api/searchRelevance/deleteQuerySets.js create mode 100644 api/searchRelevance/deleteSearchConfigurations.d.ts create mode 100644 api/searchRelevance/deleteSearchConfigurations.js create mode 100644 api/searchRelevance/getExperiments.d.ts create mode 100644 api/searchRelevance/getExperiments.js create mode 100644 api/searchRelevance/getJudgments.d.ts create mode 100644 api/searchRelevance/getJudgments.js create mode 100644 api/searchRelevance/getNodeStats.d.ts create mode 100644 api/searchRelevance/getNodeStats.js create mode 100644 api/searchRelevance/getQuerySets.d.ts create mode 100644 api/searchRelevance/getQuerySets.js create mode 100644 api/searchRelevance/getSearchConfigurations.d.ts create mode 100644 api/searchRelevance/getSearchConfigurations.js create mode 100644 api/searchRelevance/getStats.d.ts create mode 100644 api/searchRelevance/getStats.js create mode 100644 api/searchRelevance/postQuerySets.d.ts create mode 100644 api/searchRelevance/postQuerySets.js create mode 100644 api/searchRelevance/putExperiments.d.ts create mode 100644 api/searchRelevance/putExperiments.js create mode 100644 api/searchRelevance/putJudgments.d.ts create mode 100644 api/searchRelevance/putJudgments.js create mode 100644 api/searchRelevance/putQuerySets.d.ts create mode 100644 api/searchRelevance/putQuerySets.js create mode 100644 api/searchRelevance/putSearchConfigurations.d.ts create mode 100644 api/searchRelevance/putSearchConfigurations.js create mode 100644 api/securityAnalytics/_api.js create mode 100644 api/securityAnalytics/getAlerts.d.ts create mode 100644 api/securityAnalytics/getAlerts.js create mode 100644 api/securityAnalytics/getFindings.d.ts create mode 100644 api/securityAnalytics/getFindings.js create mode 100644 api/securityAnalytics/searchFindingCorrelations.d.ts create mode 100644 api/securityAnalytics/searchFindingCorrelations.js diff --git a/api/OpenSearchApi.d.ts b/api/OpenSearchApi.d.ts index b8646de8c..3e42a523e 100644 --- a/api/OpenSearchApi.d.ts +++ b/api/OpenSearchApi.d.ts @@ -339,6 +339,39 @@ export default class OpenSearchAPI { }; + geospatial: { + getUploadStats (params?: API.Geospatial_GetUploadStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUploadStats (callback: callbackFn): TransportRequestCallback; + getUploadStats (params: API.Geospatial_GetUploadStats_Request, callback: callbackFn): TransportRequestCallback; + getUploadStats (params: API.Geospatial_GetUploadStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + geojsonUploadPost (params: API.Geospatial_GeojsonUploadPost_Request, options?: TransportRequestOptions): TransportRequestPromise; + geojsonUploadPost (params: API.Geospatial_GeojsonUploadPost_Request, callback: callbackFn): TransportRequestCallback; + geojsonUploadPost (params: API.Geospatial_GeojsonUploadPost_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + geojsonUploadPut (params: API.Geospatial_GeojsonUploadPut_Request, options?: TransportRequestOptions): TransportRequestPromise; + geojsonUploadPut (params: API.Geospatial_GeojsonUploadPut_Request, callback: callbackFn): TransportRequestCallback; + geojsonUploadPut (params: API.Geospatial_GeojsonUploadPut_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getIp2GeoDatasource (params?: API.Geospatial_GetIp2GeoDatasource_Request, options?: TransportRequestOptions): TransportRequestPromise; + getIp2GeoDatasource (callback: callbackFn): TransportRequestCallback; + getIp2GeoDatasource (params: API.Geospatial_GetIp2GeoDatasource_Request, callback: callbackFn): TransportRequestCallback; + getIp2GeoDatasource (params: API.Geospatial_GetIp2GeoDatasource_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteIp2GeoDatasource (params: API.Geospatial_DeleteIp2GeoDatasource_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteIp2GeoDatasource (params: API.Geospatial_DeleteIp2GeoDatasource_Request, callback: callbackFn): TransportRequestCallback; + deleteIp2GeoDatasource (params: API.Geospatial_DeleteIp2GeoDatasource_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putIp2GeoDatasource (params: API.Geospatial_PutIp2GeoDatasource_Request, options?: TransportRequestOptions): TransportRequestPromise; + putIp2GeoDatasource (params: API.Geospatial_PutIp2GeoDatasource_Request, callback: callbackFn): TransportRequestCallback; + putIp2GeoDatasource (params: API.Geospatial_PutIp2GeoDatasource_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putIp2GeoDatasourceSettings (params: API.Geospatial_PutIp2GeoDatasourceSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + putIp2GeoDatasourceSettings (params: API.Geospatial_PutIp2GeoDatasourceSettings_Request, callback: callbackFn): TransportRequestCallback; + putIp2GeoDatasourceSettings (params: API.Geospatial_PutIp2GeoDatasourceSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + indices: { getAlias (params?: API.Indices_GetAlias_Request, options?: TransportRequestOptions): TransportRequestPromise; getAlias (callback: callbackFn): TransportRequestCallback; @@ -580,6 +613,21 @@ export default class OpenSearchAPI { }; + ingestion: { + pause (params: API.Ingestion_Pause_Request, options?: TransportRequestOptions): TransportRequestPromise; + pause (params: API.Ingestion_Pause_Request, callback: callbackFn): TransportRequestCallback; + pause (params: API.Ingestion_Pause_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + resume (params: API.Ingestion_Resume_Request, options?: TransportRequestOptions): TransportRequestPromise; + resume (params: API.Ingestion_Resume_Request, callback: callbackFn): TransportRequestCallback; + resume (params: API.Ingestion_Resume_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getState (params: API.Ingestion_GetState_Request, options?: TransportRequestOptions): TransportRequestPromise; + getState (params: API.Ingestion_GetState_Request, callback: callbackFn): TransportRequestCallback; + getState (params: API.Ingestion_GetState_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + insights: { topQueries (params: API.Insights_TopQueries_Request, options?: TransportRequestOptions): TransportRequestPromise; topQueries (params: API.Insights_TopQueries_Request, callback: callbackFn): TransportRequestCallback; @@ -693,6 +741,114 @@ export default class OpenSearchAPI { }; ltr: { + deleteDefaultStore (params?: API.Ltr_DeleteDefaultStore_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteDefaultStore (callback: callbackFn): TransportRequestCallback; + deleteDefaultStore (params: API.Ltr_DeleteDefaultStore_Request, callback: callbackFn): TransportRequestCallback; + deleteDefaultStore (params: API.Ltr_DeleteDefaultStore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + listStores (params?: API.Ltr_ListStores_Request, options?: TransportRequestOptions): TransportRequestPromise; + listStores (callback: callbackFn): TransportRequestCallback; + listStores (params: API.Ltr_ListStores_Request, callback: callbackFn): TransportRequestCallback; + listStores (params: API.Ltr_ListStores_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createDefaultStore (params?: API.Ltr_CreateDefaultStore_Request, options?: TransportRequestOptions): TransportRequestPromise; + createDefaultStore (callback: callbackFn): TransportRequestCallback; + createDefaultStore (params: API.Ltr_CreateDefaultStore_Request, callback: callbackFn): TransportRequestCallback; + createDefaultStore (params: API.Ltr_CreateDefaultStore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + cacheStats (params?: API.Ltr_CacheStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + cacheStats (callback: callbackFn): TransportRequestCallback; + cacheStats (params: API.Ltr_CacheStats_Request, callback: callbackFn): TransportRequestCallback; + cacheStats (params: API.Ltr_CacheStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clearCache (params?: API.Ltr_ClearCache_Request, options?: TransportRequestOptions): TransportRequestPromise; + clearCache (callback: callbackFn): TransportRequestCallback; + clearCache (params: API.Ltr_ClearCache_Request, callback: callbackFn): TransportRequestCallback; + clearCache (params: API.Ltr_ClearCache_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchFeatures (params?: API.Ltr_SearchFeatures_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchFeatures (callback: callbackFn): TransportRequestCallback; + searchFeatures (params: API.Ltr_SearchFeatures_Request, callback: callbackFn): TransportRequestCallback; + searchFeatures (params: API.Ltr_SearchFeatures_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteFeature (params: API.Ltr_DeleteFeature_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteFeature (params: API.Ltr_DeleteFeature_Request, callback: callbackFn): TransportRequestCallback; + deleteFeature (params: API.Ltr_DeleteFeature_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getFeature (params: API.Ltr_GetFeature_Request, options?: TransportRequestOptions): TransportRequestPromise; + getFeature (params: API.Ltr_GetFeature_Request, callback: callbackFn): TransportRequestCallback; + getFeature (params: API.Ltr_GetFeature_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateFeature (params: API.Ltr_UpdateFeature_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateFeature (params: API.Ltr_UpdateFeature_Request, callback: callbackFn): TransportRequestCallback; + updateFeature (params: API.Ltr_UpdateFeature_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createFeature (params: API.Ltr_CreateFeature_Request, options?: TransportRequestOptions): TransportRequestPromise; + createFeature (params: API.Ltr_CreateFeature_Request, callback: callbackFn): TransportRequestCallback; + createFeature (params: API.Ltr_CreateFeature_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchFeaturesets (params?: API.Ltr_SearchFeaturesets_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchFeaturesets (callback: callbackFn): TransportRequestCallback; + searchFeaturesets (params: API.Ltr_SearchFeaturesets_Request, callback: callbackFn): TransportRequestCallback; + searchFeaturesets (params: API.Ltr_SearchFeaturesets_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteFeatureset (params: API.Ltr_DeleteFeatureset_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteFeatureset (params: API.Ltr_DeleteFeatureset_Request, callback: callbackFn): TransportRequestCallback; + deleteFeatureset (params: API.Ltr_DeleteFeatureset_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getFeatureset (params: API.Ltr_GetFeatureset_Request, options?: TransportRequestOptions): TransportRequestPromise; + getFeatureset (params: API.Ltr_GetFeatureset_Request, callback: callbackFn): TransportRequestCallback; + getFeatureset (params: API.Ltr_GetFeatureset_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateFeatureset (params: API.Ltr_UpdateFeatureset_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateFeatureset (params: API.Ltr_UpdateFeatureset_Request, callback: callbackFn): TransportRequestCallback; + updateFeatureset (params: API.Ltr_UpdateFeatureset_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createFeatureset (params: API.Ltr_CreateFeatureset_Request, options?: TransportRequestOptions): TransportRequestPromise; + createFeatureset (params: API.Ltr_CreateFeatureset_Request, callback: callbackFn): TransportRequestCallback; + createFeatureset (params: API.Ltr_CreateFeatureset_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + addFeaturesToSet (params: API.Ltr_AddFeaturesToSet_Request, options?: TransportRequestOptions): TransportRequestPromise; + addFeaturesToSet (params: API.Ltr_AddFeaturesToSet_Request, callback: callbackFn): TransportRequestCallback; + addFeaturesToSet (params: API.Ltr_AddFeaturesToSet_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + addFeaturesToSetByQuery (params: API.Ltr_AddFeaturesToSetByQuery_Request, options?: TransportRequestOptions): TransportRequestPromise; + addFeaturesToSetByQuery (params: API.Ltr_AddFeaturesToSetByQuery_Request, callback: callbackFn): TransportRequestCallback; + addFeaturesToSetByQuery (params: API.Ltr_AddFeaturesToSetByQuery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createModelFromSet (params: API.Ltr_CreateModelFromSet_Request, options?: TransportRequestOptions): TransportRequestPromise; + createModelFromSet (params: API.Ltr_CreateModelFromSet_Request, callback: callbackFn): TransportRequestCallback; + createModelFromSet (params: API.Ltr_CreateModelFromSet_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchModels (params?: API.Ltr_SearchModels_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchModels (callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Ltr_SearchModels_Request, callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Ltr_SearchModels_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteModel (params: API.Ltr_DeleteModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteModel (params: API.Ltr_DeleteModel_Request, callback: callbackFn): TransportRequestCallback; + deleteModel (params: API.Ltr_DeleteModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getModel (params: API.Ltr_GetModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + getModel (params: API.Ltr_GetModel_Request, callback: callbackFn): TransportRequestCallback; + getModel (params: API.Ltr_GetModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createModel (params: API.Ltr_CreateModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + createModel (params: API.Ltr_CreateModel_Request, callback: callbackFn): TransportRequestCallback; + createModel (params: API.Ltr_CreateModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteStore (params: API.Ltr_DeleteStore_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteStore (params: API.Ltr_DeleteStore_Request, callback: callbackFn): TransportRequestCallback; + deleteStore (params: API.Ltr_DeleteStore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getStore (params: API.Ltr_GetStore_Request, options?: TransportRequestOptions): TransportRequestPromise; + getStore (params: API.Ltr_GetStore_Request, callback: callbackFn): TransportRequestCallback; + getStore (params: API.Ltr_GetStore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createStore (params: API.Ltr_CreateStore_Request, options?: TransportRequestOptions): TransportRequestPromise; + createStore (params: API.Ltr_CreateStore_Request, callback: callbackFn): TransportRequestCallback; + createStore (params: API.Ltr_CreateStore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + stats (params?: API.Ltr_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; stats (callback: callbackFn): TransportRequestCallback; stats (params: API.Ltr_Stats_Request, callback: callbackFn): TransportRequestCallback; @@ -961,6 +1117,14 @@ export default class OpenSearchAPI { }; + neural: { + stats (params?: API.Neural_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; + stats (callback: callbackFn): TransportRequestCallback; + stats (params: API.Neural_Stats_Request, callback: callbackFn): TransportRequestCallback; + stats (params: API.Neural_Stats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + nodes: { info (params?: API.Nodes_Info_Request, options?: TransportRequestOptions): TransportRequestPromise; info (callback: callbackFn): TransportRequestCallback; @@ -1212,6 +1376,79 @@ export default class OpenSearchAPI { }; + searchRelevance: { + getNodeStats (params: API.SearchRelevance_GetNodeStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + getNodeStats (params: API.SearchRelevance_GetNodeStats_Request, callback: callbackFn): TransportRequestCallback; + getNodeStats (params: API.SearchRelevance_GetNodeStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getExperiments (params?: API.SearchRelevance_GetExperiments_Request, options?: TransportRequestOptions): TransportRequestPromise; + getExperiments (callback: callbackFn): TransportRequestCallback; + getExperiments (params: API.SearchRelevance_GetExperiments_Request, callback: callbackFn): TransportRequestCallback; + getExperiments (params: API.SearchRelevance_GetExperiments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putExperiments (params?: API.SearchRelevance_PutExperiments_Request, options?: TransportRequestOptions): TransportRequestPromise; + putExperiments (callback: callbackFn): TransportRequestCallback; + putExperiments (params: API.SearchRelevance_PutExperiments_Request, callback: callbackFn): TransportRequestCallback; + putExperiments (params: API.SearchRelevance_PutExperiments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteExperiments (params: API.SearchRelevance_DeleteExperiments_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteExperiments (params: API.SearchRelevance_DeleteExperiments_Request, callback: callbackFn): TransportRequestCallback; + deleteExperiments (params: API.SearchRelevance_DeleteExperiments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getJudgments (params?: API.SearchRelevance_GetJudgments_Request, options?: TransportRequestOptions): TransportRequestPromise; + getJudgments (callback: callbackFn): TransportRequestCallback; + getJudgments (params: API.SearchRelevance_GetJudgments_Request, callback: callbackFn): TransportRequestCallback; + getJudgments (params: API.SearchRelevance_GetJudgments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putJudgments (params?: API.SearchRelevance_PutJudgments_Request, options?: TransportRequestOptions): TransportRequestPromise; + putJudgments (callback: callbackFn): TransportRequestCallback; + putJudgments (params: API.SearchRelevance_PutJudgments_Request, callback: callbackFn): TransportRequestCallback; + putJudgments (params: API.SearchRelevance_PutJudgments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteJudgments (params: API.SearchRelevance_DeleteJudgments_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteJudgments (params: API.SearchRelevance_DeleteJudgments_Request, callback: callbackFn): TransportRequestCallback; + deleteJudgments (params: API.SearchRelevance_DeleteJudgments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getQuerySets (params?: API.SearchRelevance_GetQuerySets_Request, options?: TransportRequestOptions): TransportRequestPromise; + getQuerySets (callback: callbackFn): TransportRequestCallback; + getQuerySets (params: API.SearchRelevance_GetQuerySets_Request, callback: callbackFn): TransportRequestCallback; + getQuerySets (params: API.SearchRelevance_GetQuerySets_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + postQuerySets (params?: API.SearchRelevance_PostQuerySets_Request, options?: TransportRequestOptions): TransportRequestPromise; + postQuerySets (callback: callbackFn): TransportRequestCallback; + postQuerySets (params: API.SearchRelevance_PostQuerySets_Request, callback: callbackFn): TransportRequestCallback; + postQuerySets (params: API.SearchRelevance_PostQuerySets_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putQuerySets (params?: API.SearchRelevance_PutQuerySets_Request, options?: TransportRequestOptions): TransportRequestPromise; + putQuerySets (callback: callbackFn): TransportRequestCallback; + putQuerySets (params: API.SearchRelevance_PutQuerySets_Request, callback: callbackFn): TransportRequestCallback; + putQuerySets (params: API.SearchRelevance_PutQuerySets_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteQuerySets (params: API.SearchRelevance_DeleteQuerySets_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteQuerySets (params: API.SearchRelevance_DeleteQuerySets_Request, callback: callbackFn): TransportRequestCallback; + deleteQuerySets (params: API.SearchRelevance_DeleteQuerySets_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getSearchConfigurations (params?: API.SearchRelevance_GetSearchConfigurations_Request, options?: TransportRequestOptions): TransportRequestPromise; + getSearchConfigurations (callback: callbackFn): TransportRequestCallback; + getSearchConfigurations (params: API.SearchRelevance_GetSearchConfigurations_Request, callback: callbackFn): TransportRequestCallback; + getSearchConfigurations (params: API.SearchRelevance_GetSearchConfigurations_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putSearchConfigurations (params?: API.SearchRelevance_PutSearchConfigurations_Request, options?: TransportRequestOptions): TransportRequestPromise; + putSearchConfigurations (callback: callbackFn): TransportRequestCallback; + putSearchConfigurations (params: API.SearchRelevance_PutSearchConfigurations_Request, callback: callbackFn): TransportRequestCallback; + putSearchConfigurations (params: API.SearchRelevance_PutSearchConfigurations_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteSearchConfigurations (params: API.SearchRelevance_DeleteSearchConfigurations_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteSearchConfigurations (params: API.SearchRelevance_DeleteSearchConfigurations_Request, callback: callbackFn): TransportRequestCallback; + deleteSearchConfigurations (params: API.SearchRelevance_DeleteSearchConfigurations_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getStats (params?: API.SearchRelevance_GetStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + getStats (callback: callbackFn): TransportRequestCallback; + getStats (params: API.SearchRelevance_GetStats_Request, callback: callbackFn): TransportRequestCallback; + getStats (params: API.SearchRelevance_GetStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + security: { getSslinfo (params?: API.Security_GetSslinfo_Request, options?: TransportRequestOptions): TransportRequestPromise; getSslinfo (callback: callbackFn): TransportRequestCallback; @@ -1550,6 +1787,23 @@ export default class OpenSearchAPI { }; + securityAnalytics: { + getAlerts (params?: API.SecurityAnalytics_GetAlerts_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAlerts (callback: callbackFn): TransportRequestCallback; + getAlerts (params: API.SecurityAnalytics_GetAlerts_Request, callback: callbackFn): TransportRequestCallback; + getAlerts (params: API.SecurityAnalytics_GetAlerts_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getFindings (params?: API.SecurityAnalytics_GetFindings_Request, options?: TransportRequestOptions): TransportRequestPromise; + getFindings (callback: callbackFn): TransportRequestCallback; + getFindings (params: API.SecurityAnalytics_GetFindings_Request, callback: callbackFn): TransportRequestCallback; + getFindings (params: API.SecurityAnalytics_GetFindings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchFindingCorrelations (params: API.SecurityAnalytics_SearchFindingCorrelations_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchFindingCorrelations (params: API.SecurityAnalytics_SearchFindingCorrelations_Request, callback: callbackFn): TransportRequestCallback; + searchFindingCorrelations (params: API.SecurityAnalytics_SearchFindingCorrelations_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + sm: { getPolicies (params?: API.Sm_GetPolicies_Request, options?: TransportRequestOptions): TransportRequestPromise; getPolicies (callback: callbackFn): TransportRequestCallback; diff --git a/api/OpenSearchApi.js b/api/OpenSearchApi.js index c9c8f6c2e..d4f2027df 100644 --- a/api/OpenSearchApi.js +++ b/api/OpenSearchApi.js @@ -28,15 +28,18 @@ class OpenSearchAPI { cluster: new(require('./cluster/_api'))(this), danglingIndices: new(require('./danglingIndices/_api'))(this), flowFramework: new(require('./flowFramework/_api'))(this), + geospatial: new(require('./geospatial/_api'))(this), http: new(require('./http/_api'))(this), indices: new(require('./indices/_api'))(this), ingest: new(require('./ingest/_api'))(this), + ingestion: new(require('./ingestion/_api'))(this), insights: new(require('./insights/_api'))(this), ism: new(require('./ism/_api'))(this), knn: new(require('./knn/_api'))(this), list: new(require('./list/_api'))(this), ltr: new(require('./ltr/_api'))(this), ml: new(require('./ml/_api'))(this), + neural: new(require('./neural/_api'))(this), nodes: new(require('./nodes/_api'))(this), notifications: new(require('./notifications/_api'))(this), observability: new(require('./observability/_api'))(this), @@ -46,6 +49,8 @@ class OpenSearchAPI { replication: new(require('./replication/_api'))(this), rollups: new(require('./rollups/_api'))(this), searchPipeline: new(require('./searchPipeline/_api'))(this), + searchRelevance: new(require('./searchRelevance/_api'))(this), + securityAnalytics: new(require('./securityAnalytics/_api'))(this), security: new(require('./security/_api'))(this), sm: new(require('./sm/_api'))(this), snapshot: new(require('./snapshot/_api'))(this), @@ -159,15 +164,18 @@ class OpenSearchAPI { cluster: { get() { return this[kApiModules].cluster } }, danglingIndices: { get() { return this[kApiModules].danglingIndices } }, flowFramework: { get() { return this[kApiModules].flowFramework } }, + geospatial: { get() { return this[kApiModules].geospatial } }, http: { get() { return this[kApiModules].http } }, indices: { get() { return this[kApiModules].indices } }, ingest: { get() { return this[kApiModules].ingest } }, + ingestion: { get() { return this[kApiModules].ingestion } }, insights: { get() { return this[kApiModules].insights } }, ism: { get() { return this[kApiModules].ism } }, knn: { get() { return this[kApiModules].knn } }, list: { get() { return this[kApiModules].list } }, ltr: { get() { return this[kApiModules].ltr } }, ml: { get() { return this[kApiModules].ml } }, + neural: { get() { return this[kApiModules].neural } }, nodes: { get() { return this[kApiModules].nodes } }, notifications: { get() { return this[kApiModules].notifications } }, observability: { get() { return this[kApiModules].observability } }, @@ -177,6 +185,8 @@ class OpenSearchAPI { replication: { get() { return this[kApiModules].replication } }, rollups: { get() { return this[kApiModules].rollups } }, searchPipeline: { get() { return this[kApiModules].searchPipeline } }, + searchRelevance: { get() { return this[kApiModules].searchRelevance } }, + securityAnalytics: { get() { return this[kApiModules].securityAnalytics } }, security: { get() { return this[kApiModules].security } }, sm: { get() { return this[kApiModules].sm } }, snapshot: { get() { return this[kApiModules].snapshot } }, @@ -195,6 +205,10 @@ class OpenSearchAPI { remote_store: { get() { return this[kApiModules].remoteStore } }, // Deprecated: Use searchPipeline instead. search_pipeline: { get() { return this[kApiModules].searchPipeline } }, + // Deprecated: Use searchRelevance instead. + search_relevance: { get() { return this[kApiModules].searchRelevance } }, + // Deprecated: Use securityAnalytics instead. + security_analytics: { get() { return this[kApiModules].securityAnalytics } }, }) } } diff --git a/api/_core/bulk.d.ts b/api/_core/bulk.d.ts index 6df4417ae..dec637d54 100644 --- a/api/_core/bulk.d.ts +++ b/api/_core/bulk.d.ts @@ -29,7 +29,7 @@ export interface Bulk_Request extends Global.Params { pipeline?: string; refresh?: Common.Refresh; require_alias?: boolean; - routing?: Common.RoutingInQueryString; + routing?: Common.Routing; timeout?: Common.Duration; type?: string; wait_for_active_shards?: Common.WaitForActiveShards; @@ -41,10 +41,5 @@ export interface Bulk_Response extends ApiResponse { body: Bulk_ResponseBody; } -export type Bulk_ResponseBody = { - errors: boolean; - ingest_took?: number; - items: Record[]; - took: number; -} +export type Bulk_ResponseBody = Core_Bulk.BulkResponseBase diff --git a/api/_core/bulk.js b/api/_core/bulk.js index acde21cec..84e08340e 100644 --- a/api/_core/bulk.js +++ b/api/_core/bulk.js @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. * @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. * @param {string} [params.type] - Default document type for items which don't provide one. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). diff --git a/api/_core/bulkStream.d.ts b/api/_core/bulkStream.d.ts index 4e8715c59..1e55899d7 100644 --- a/api/_core/bulkStream.d.ts +++ b/api/_core/bulkStream.d.ts @@ -43,10 +43,5 @@ export interface BulkStream_Response extends ApiResponse { body: BulkStream_ResponseBody; } -export type BulkStream_ResponseBody = { - errors: boolean; - ingest_took?: number; - items: Record[]; - took: number; -} +export type BulkStream_ResponseBody = Core_Bulk.BulkResponseBase diff --git a/api/_core/bulkStream.js b/api/_core/bulkStream.js index c4367d54f..0f0e3598b 100644 --- a/api/_core/bulkStream.js +++ b/api/_core/bulkStream.js @@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. * @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. * @param {string} [params.type] - Default document type for items which don't provide one. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). diff --git a/api/_core/clearScroll.js b/api/_core/clearScroll.js index 284d69e68..48f3e4640 100644 --- a/api/_core/clearScroll.js +++ b/api/_core/clearScroll.js @@ -25,8 +25,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Core * * @param {object} [params] - * @param {string} [params.scroll_id] DEPRECATED - Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. - * @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter + * @param {string} [params.scroll_id] DEPRECATED - A comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. + * @param {object} [params.body] - A comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/count.js b/api/_core/count.js index 833628f25..31ec5a8cc 100644 --- a/api/_core/count.js +++ b/api/_core/count.js @@ -37,9 +37,9 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {number} [params.min_score] - Sets the minimum `_score` value that documents must have to be included in the result. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. * @param {string} [params.q] - Query in the Lucene query string syntax. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. * @param {object} [params.body] - Query to restrict the results specified with the Query DSL (optional) * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/create.js b/api/_core/create.js index 1cc8d54e8..a624e0061 100644 --- a/api/_core/create.js +++ b/api/_core/create.js @@ -29,12 +29,12 @@ Returns a 409 response when a document with a same ID already exists in the inde * @param {object} params * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.version_type] - The specific version type: `external`, `external_gte`. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). - * @param {string} params.id - Unique identifier for the document. + * @param {string} params.id - The unique identifier for the document. * @param {string} params.index - Name of the data stream or index to target. If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. If the target doesn't exist and doesn't match a data stream template, this request creates the index. * @param {object} params.body - The document * diff --git a/api/_core/createPit.js b/api/_core/createPit.js index 391c8fde0..d9d99f498 100644 --- a/api/_core/createPit.js +++ b/api/_core/createPit.js @@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both. * @param {string} [params.keep_alive] - Specify the keep alive for point in time. * @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on. - * @param {string} [params.routing] - Comma-separated list of specific routing values. - * @param {array} params.index - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + * @param {string} [params.routing] - A comma-separated list of specific routing values. + * @param {array} params.index - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/delete.js b/api/_core/delete.js index 57e36831b..065484c95 100644 --- a/api/_core/delete.js +++ b/api/_core/delete.js @@ -28,12 +28,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period to wait for active shards. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.version_type] - The specific version type: `external`, `external_gte`. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). - * @param {string} params.id - Unique identifier for the document. + * @param {string} params.id - The unique identifier for the document. * @param {string} params.index - Name of the target index. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/deleteByQuery.js b/api/_core/deleteByQuery.js index 78bdf822e..7fc317da5 100644 --- a/api/_core/deleteByQuery.js +++ b/api/_core/deleteByQuery.js @@ -44,7 +44,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. * @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. Defaults to the index-level setting. * @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.scroll] - Period to retain the search context for scrolling. * @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation. * @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. @@ -58,7 +58,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.version] - If `true`, returns the document version as part of a hit. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). * @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. * @param {object} params.body - The search definition using the Query DSL * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/exists.js b/api/_core/exists.js index e3bc6aff3..9fb6a958c 100644 --- a/api/_core/exists.js +++ b/api/_core/exists.js @@ -29,14 +29,14 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.realtime] - If `true`, the request is real time as opposed to near real time. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. * @param {string} [params.routing] - Target the specified primary shard. * @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.version_type] - The specific version type: `external`, `external_gte`. * @param {string} params.id - Identifier of the document. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/existsSource.js b/api/_core/existsSource.js index 76cc332cf..00f756c36 100644 --- a/api/_core/existsSource.js +++ b/api/_core/existsSource.js @@ -29,13 +29,13 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.realtime] - If `true`, the request is real time as opposed to near real time. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. * @param {string} [params.routing] - Target the specified primary shard. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.version_type] - The specific version type: `external`, `external_gte`. * @param {string} params.id - Identifier of the document. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/explain.d.ts b/api/_core/explain.d.ts index c50cd9a9b..0d00e8e1d 100644 --- a/api/_core/explain.d.ts +++ b/api/_core/explain.d.ts @@ -51,8 +51,10 @@ export type Explain_ResponseBody = { _id: Common.Id; _index: Common.IndexName; _type?: Common.Type; - explanation?: Core_Explain.ExplanationDetail; - get?: Common.InlineGet; + explanation?: Core_Explain.Explanation; + get?: extends Common.InlineGet { + _source?: Common.TDocument; +}; matched: boolean; } diff --git a/api/_core/explain.js b/api/_core/explain.js index ada0c3b35..f32a62efe 100644 --- a/api/_core/explain.js +++ b/api/_core/explain.js @@ -19,7 +19,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); /** - * Returns information about why a specific matches (or doesn't match) a query. + * Returns information about why a specific document matches (or doesn't match) a query. *
See Also: {@link https://opensearch.org/docs/latest/api-reference/explain/ - explain} * * @memberOf API-Core @@ -35,7 +35,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @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. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. * @param {string} [params.q] - Query in the Lucene query string syntax. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.stored_fields] - A comma-separated list of stored fields to return in the response. * @param {string} params.id - Defines the document ID. * @param {string} params.index - Index names used to limit the request. Only a single index name can be provided to this parameter. diff --git a/api/_core/fieldCaps.js b/api/_core/fieldCaps.js index d65e7580f..45ef8c5e9 100644 --- a/api/_core/fieldCaps.js +++ b/api/_core/fieldCaps.js @@ -26,11 +26,11 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * * @param {object} [params] * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. - * @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.fields] - Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + * @param {string} [params.expand_wildcards] - The 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.fields] - A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. * @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indexes are not included in the response. * @param {boolean} [params.include_unmapped=false] - If `true`, unmapped fields are included in the response. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or `_all`. * @param {object} [params.body] - An index filter specified with the Query DSL * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/get.d.ts b/api/_core/get.d.ts index 9c1fe8f5c..4913a881c 100644 --- a/api/_core/get.d.ts +++ b/api/_core/get.d.ts @@ -39,5 +39,7 @@ export interface Get_Response extends ApiResponse { body: Get_ResponseBody; } -export type Get_ResponseBody = Core_Get.GetResult +export interface Get_ResponseBody extends Core_Get.GetResultBase { + _source?: Common.TDocument; +} diff --git a/api/_core/get.js b/api/_core/get.js index 662ef9cb8..49e3cc0a3 100644 --- a/api/_core/get.js +++ b/api/_core/get.js @@ -29,14 +29,14 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.realtime] - If `true`, the request is real time as opposed to near real time. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search. If `false`, do nothing with refreshes. * @param {string} [params.routing] - Target the specified primary shard. * @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `internal`, `external`, `external_gte`. - * @param {string} params.id - Unique identifier of the document. - * @param {string} params.index - Name of the index that contains the document. + * @param {string} [params.version_type] - The specific version type: `internal`, `external`, `external_gte`. + * @param {string} params.id - The unique identifier of the document. + * @param {string} params.index - The name of the index containing the document. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/getSource.d.ts b/api/_core/getSource.d.ts index 6eaf06812..5684f2421 100644 --- a/api/_core/getSource.d.ts +++ b/api/_core/getSource.d.ts @@ -37,5 +37,5 @@ export interface GetSource_Response extends ApiResponse { body: GetSource_ResponseBody; } -export type GetSource_ResponseBody = Record +export type GetSource_ResponseBody = Common.TDocument diff --git a/api/_core/getSource.js b/api/_core/getSource.js index 4bd27f4a4..76ccb3ecd 100644 --- a/api/_core/getSource.js +++ b/api/_core/getSource.js @@ -29,13 +29,13 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime] - Boolean) If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.realtime] - Boolean) If `true`, the request is real time as opposed to near real time. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search. If `false`, do nothing with refreshes. * @param {string} [params.routing] - Target the specified primary shard. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type. One of `internal`, `external`, `external_gte`. - * @param {string} params.id - Unique identifier of the document. - * @param {string} params.index - Name of the index that contains the document. + * @param {string} [params.version_type] - The specific version type. One of `internal`, `external`, `external_gte`. + * @param {string} params.id - The unique identifier of the document. + * @param {string} params.index - The name of the index containing the document. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/index.js b/api/_core/index.js index 007a5f652..790033865 100644 --- a/api/_core/index.js +++ b/api/_core/index.js @@ -31,13 +31,13 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. * @param {boolean} [params.require_alias=false] - If `true`, the destination must be an index alias. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. - * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.version_type] - The specific version type: `external`, `external_gte`. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). * @param {string} params.index - Name of the data stream or index to target. - * @param {string} [params.id] - Unique identifier for the document. + * @param {string} [params.id] - The unique identifier for the document. * @param {object} params.body - The document * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/mget.js b/api/_core/mget.js index 4fe9b4e0c..466475728 100644 --- a/api/_core/mget.js +++ b/api/_core/mget.js @@ -29,11 +29,11 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.realtime] - If `true`, the request is real time as opposed to near real time. * @param {string} [params.refresh] - If `true`, the request refreshes relevant shards before retrieving documents. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.stored_fields] - If `true`, retrieves the document fields stored in the index rather than the document `_source`. - * @param {string} [params.index] - Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. + * @param {string} [params.index] - The name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. * @param {object} params.body - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/msearch.js b/api/_core/msearch.js index c80d27f3e..c9142fae9 100644 --- a/api/_core/msearch.js +++ b/api/_core/msearch.js @@ -32,7 +32,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, `hits.total` are returned as an integer in the response. Defaults to false, which returns an object. * @param {string} [params.search_type] - Indicates whether global term and document frequencies should be used when scoring returned documents. * @param {boolean} [params.typed_keys] - Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases to search. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and index aliases to search. * @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/msearchTemplate.js b/api/_core/msearchTemplate.js index 4d8c9b959..e20d9c72d 100644 --- a/api/_core/msearchTemplate.js +++ b/api/_core/msearchTemplate.js @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, the response returns `hits.total` as an integer. If `false`, it returns `hits.total` as an object. * @param {string} [params.search_type] - The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. * @param {boolean} [params.typed_keys] - If `true`, the response prefixes aggregation and suggester names with their respective types. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*`. * @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/mtermvectors.js b/api/_core/mtermvectors.js index add491213..470364898 100644 --- a/api/_core/mtermvectors.js +++ b/api/_core/mtermvectors.js @@ -26,18 +26,18 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * * @param {object} [params] * @param {boolean} [params.field_statistics=true] - If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - * @param {array} [params.ids] - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {string} [params.fields] - A comma-separated list or a wildcard expression specifying the fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + * @param {array} [params.ids] - A comma-separated list of documents IDs. You must provide either the `docs` field in the request body or specify `ids` as a query parameter or in the request body. * @param {boolean} [params.offsets=true] - If `true`, the response includes term offsets. * @param {boolean} [params.payloads=true] - If `true`, the response includes term payloads. * @param {boolean} [params.positions=true] - If `true`, the response includes term positions. - * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime=true] - If `true`, the request is real-time as opposed to near-real-time. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.preference] - Specifies the node or shard on which the operation should be performed. See [preference query parameter]({{site.url}}{{site.baseurl}}/api-reference/search-apis/search/#the-preference-query-parameter) for a list of available options. By default the requests are routed randomly to available shard copies (primary or replica), with no guarantee of consistency across repeated queries. + * @param {boolean} [params.realtime=true] - If `true`, the request is real time as opposed to near real time. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {boolean} [params.term_statistics=false] - If `true`, the response includes term frequency and document frequency. * @param {number} [params.version] - If `true`, returns the document version as part of a hit. - * @param {string} [params.version_type] - Specific version type. - * @param {string} [params.index] - Name of the index that contains the documents. + * @param {string} [params.version_type] - The specific version type. + * @param {string} [params.index] - The name of the index that contains the document. * @param {object} [params.body] - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/rankEval.js b/api/_core/rankEval.js index 7c77ec401..0e4aa6a59 100644 --- a/api/_core/rankEval.js +++ b/api/_core/rankEval.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both. * @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indexes are not included in the response. * @param {string} [params.search_type] - Search operation type - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. * @param {object} params.body - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/scriptsPainlessExecute.d.ts b/api/_core/scriptsPainlessExecute.d.ts index b4354a84e..1a17502f2 100644 --- a/api/_core/scriptsPainlessExecute.d.ts +++ b/api/_core/scriptsPainlessExecute.d.ts @@ -34,6 +34,6 @@ export interface ScriptsPainlessExecute_Response extends ApiResponse { } export type ScriptsPainlessExecute_ResponseBody = { - result: number | string | boolean; + result: Common.TResult; } diff --git a/api/_core/scroll.d.ts b/api/_core/scroll.d.ts index fc5a26dca..67712154e 100644 --- a/api/_core/scroll.d.ts +++ b/api/_core/scroll.d.ts @@ -35,5 +35,5 @@ export interface Scroll_Response extends ApiResponse { body: Scroll_ResponseBody; } -export type Scroll_ResponseBody = Core_Search.ResponseBody +export type Scroll_ResponseBody = Core_Search.SearchResponse diff --git a/api/_core/search.d.ts b/api/_core/search.d.ts index 7ed23463e..7a61c578e 100644 --- a/api/_core/search.d.ts +++ b/api/_core/search.d.ts @@ -69,6 +69,7 @@ export interface Search_Request extends Global.Params { track_scores?: boolean; track_total_hits?: Core_Search.TrackHits; typed_keys?: boolean; + verbose_pipeline?: boolean; version?: boolean; } @@ -79,7 +80,7 @@ export type Search_RequestBody = { collapse?: Core_Search.FieldCollapse; docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; explain?: boolean; - ext?: Record>; + ext?: Record; fields?: Common_QueryDsl.FieldAndFormat[]; from?: number; highlight?: Core_Search.Highlight; @@ -89,7 +90,6 @@ export type Search_RequestBody = { post_filter?: Common_QueryDsl.QueryContainer; profile?: boolean; query?: Common_QueryDsl.QueryContainer; - rank?: Common.RankContainer; rescore?: Core_Search.Rescore | Core_Search.Rescore[]; script_fields?: Record; search_after?: Common.SortResults; @@ -111,5 +111,5 @@ export interface Search_Response extends ApiResponse { body: Search_ResponseBody; } -export type Search_ResponseBody = Core_Search.ResponseBody +export type Search_ResponseBody = Core_Search.SearchResponse diff --git a/api/_core/search.js b/api/_core/search.js index c357753d3..51ed77e02 100644 --- a/api/_core/search.js +++ b/api/_core/search.js @@ -52,7 +52,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.q] - Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing. * @param {boolean} [params.request_cache] - If `true`, the caching of search results is enabled for requests where `size` is `0`. Defaults to index level settings. * @param {boolean} [params.rest_total_hits_as_int=false] - Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.scroll] - Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed `1d` (24 hours). You can change this limit using the `search.max_keep_alive` cluster-level setting. * @param {string} [params.search_pipeline] - Customizable sequence of processing stages applied to search queries. * @param {string} [params.search_type] - How distributed term frequencies are calculated for relevance scoring. @@ -70,8 +70,9 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.track_scores] - If `true`, calculate and return document scores, even if the scores are not used for sorting. * @param {string} [params.track_total_hits] - Number of hits matching the query to count accurately. If `true`, the exact number of hits is returned at the cost of some performance. If `false`, the response does not include the total number of hits matching the query. * @param {boolean} [params.typed_keys] - If `true`, aggregation and suggester names are be prefixed by their respective types in the response. + * @param {boolean} [params.verbose_pipeline] - Enables or disables verbose mode for the search pipeline. When verbose mode is enabled, detailed information about each processor in the search pipeline is included in the search response. This includes the processor name, execution status, input, output, and time taken for processing. This parameter is primarily intended for debugging purposes, allowing users to track how data flows and transforms through the search pipeline. * @param {boolean} [params.version] - If `true`, returns document version as part of a hit. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. * @param {object} [params.body] - The search definition using the Query DSL * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/searchShards.d.ts b/api/_core/searchShards.d.ts index 37b877ee5..a57e37fb5 100644 --- a/api/_core/searchShards.d.ts +++ b/api/_core/searchShards.d.ts @@ -21,6 +21,7 @@ import * as Global from '../_types/_global' export interface SearchShards_Request extends Global.Params { allow_no_indices?: boolean; + body?: SearchShards_RequestBody; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; index?: Common.Indices; @@ -29,6 +30,10 @@ export interface SearchShards_Request extends Global.Params { routing?: Common.RoutingInQueryString; } +export type SearchShards_RequestBody = { + slice?: Common.SlicedScroll; +} + export interface SearchShards_Response extends ApiResponse { body: SearchShards_ResponseBody; } diff --git a/api/_core/searchShards.js b/api/_core/searchShards.js index b7ddf445f..952b5bd4e 100644 --- a/api/_core/searchShards.js +++ b/api/_core/searchShards.js @@ -30,8 +30,9 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.index] - Returns the indexes and shards that a search request would be executed against. + * @param {object} [params.body] * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/_core/searchTemplate.d.ts b/api/_core/searchTemplate.d.ts index 27983d0a4..9ff8256f9 100644 --- a/api/_core/searchTemplate.d.ts +++ b/api/_core/searchTemplate.d.ts @@ -16,7 +16,6 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' -import * as Common_Aggregations from '../_types/_common.aggregations' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' @@ -29,11 +28,13 @@ export interface SearchTemplate_Request extends Global.Params { ignore_throttled?: boolean; ignore_unavailable?: boolean; index?: Common.Indices; + phase_took?: boolean; preference?: string; profile?: boolean; rest_total_hits_as_int?: boolean; routing?: Common.RoutingInQueryString; scroll?: Common.Duration; + search_pipeline?: string; search_type?: Common.SearchType; typed_keys?: boolean; } @@ -41,7 +42,7 @@ export interface SearchTemplate_Request extends Global.Params { export type SearchTemplate_RequestBody = { explain?: boolean; id?: Common.Id; - params?: Record>; + params?: Record; profile?: boolean; source?: string; } @@ -50,21 +51,7 @@ export interface SearchTemplate_Response extends ApiResponse { body: SearchTemplate_ResponseBody; } -export type SearchTemplate_ResponseBody = { - _clusters?: Common.ClusterStatistics; - _scroll_id?: Common.ScrollId; - _shards: Common.ShardStatistics; - aggregations?: Record; - fields?: Record>; - hits: Core_Search.HitsMetadata; - max_score?: number; - num_reduce_phases?: number; - pit_id?: Common.Id; - profile?: Core_Search.Profile; +export interface SearchTemplate_ResponseBody extends Core_Search.SearchResult { status?: number; - suggest?: Record; - terminated_early?: boolean; - timed_out: boolean; - took: number; } diff --git a/api/_core/searchTemplate.js b/api/_core/searchTemplate.js index e4a4f7d88..ff2077e3c 100644 --- a/api/_core/searchTemplate.js +++ b/api/_core/searchTemplate.js @@ -31,14 +31,16 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.explain] - If `true`, the response includes additional details about score computation as part of a hit. * @param {boolean} [params.ignore_throttled] - If `true`, specified concrete, expanded, or aliased indexes are not included in the response when throttled. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.phase_took=false] - Indicates whether to return phase-level `took` time values in the response. * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. * @param {boolean} [params.profile] - If `true`, the query execution is profiled. * @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, `hits.total` are rendered as an integer in the response. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.scroll] - Specifies how long a consistent view of the index should be maintained for scrolled search. + * @param {string} [params.search_pipeline] - Customizable sequence of processing stages applied to search queries. * @param {string} [params.search_type] - The type of the search operation. * @param {boolean} [params.typed_keys] - If `true`, the response prefixes aggregation and suggester names with their respective types. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). * @param {object} params.body - The search definition template and its parameters. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/termvectors.js b/api/_core/termvectors.js index 904014153..3907dff6e 100644 --- a/api/_core/termvectors.js +++ b/api/_core/termvectors.js @@ -26,18 +26,18 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * * @param {object} params * @param {boolean} [params.field_statistics=true] - If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + * @param {string} [params.fields] - A comma-separated list or a wildcard expression specifying the fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. * @param {boolean} [params.offsets=true] - If `true`, the response includes term offsets. * @param {boolean} [params.payloads=true] - If `true`, the response includes term payloads. * @param {boolean} [params.positions=true] - If `true`, the response includes term positions. - * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. - * @param {boolean} [params.realtime=true] - If `true`, the request is real-time as opposed to near-real-time. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.preference] - Specifies the node or shard on which the operation should be performed. See [preference query parameter]({{site.url}}{{site.baseurl}}/api-reference/search-apis/search/#the-preference-query-parameter) for a list of available options. By default the requests are routed randomly to available shard copies (primary or replica), with no guarantee of consistency across repeated queries. + * @param {boolean} [params.realtime=true] - If `true`, the request is real time as opposed to near real time. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {boolean} [params.term_statistics=false] - If `true`, the response includes term frequency and document frequency. * @param {number} [params.version] - If `true`, returns the document version as part of a hit. - * @param {string} [params.version_type] - Specific version type. - * @param {string} params.index - Name of the index that contains the document. - * @param {string} [params.id] - Unique identifier of the document. + * @param {string} [params.version_type] - The specific version type. + * @param {string} params.index - The name of the index containing the document. + * @param {string} [params.id] - The unique identifier of the document. * @param {object} [params.body] - Define parameters and or supply a document to get termvectors for. See documentation. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_core/update.js b/api/_core/update.js index fe6d91538..16d543f22 100644 --- a/api/_core/update.js +++ b/api/_core/update.js @@ -34,7 +34,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.refresh] - If 'true', OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. * @param {boolean} [params.require_alias=false] - If `true`, the destination must be an index alias. * @param {number} [params.retry_on_conflict=0] - Specify how many times should the operation be retried when a conflict occurs. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.timeout] - Period to wait for dynamic mapping updates and active shards. This guarantees OpenSearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operations. Set to 'all' or any positive integer up to the total number of shards in the index (number_of_replicas+1). Defaults to 1 meaning the primary shard. * @param {string} params.id - Document ID diff --git a/api/_core/updateByQuery.js b/api/_core/updateByQuery.js index 96ce85df0..06af200d2 100644 --- a/api/_core/updateByQuery.js +++ b/api/_core/updateByQuery.js @@ -46,7 +46,7 @@ for example to pick up a mapping change. * @param {string} [params.refresh] - If `true`, OpenSearch refreshes affected shards to make the operation visible to search. * @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. * @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second. - * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.routing] - A custom value used to route operations to a specific shard. * @param {string} [params.scroll] - Period to retain the search context for scrolling. * @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation. * @param {string} [params.search_timeout] - Explicit timeout for each search request. @@ -60,7 +60,7 @@ for example to pick up a mapping change. * @param {boolean} [params.version] - If `true`, returns the document version as part of a hit. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). * @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. * @param {object} [params.body] - The search definition using the Query DSL * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/_types/_common.aggregations.d.ts b/api/_types/_common.aggregations.d.ts index e3ce338f6..1bf3d28bd 100644 --- a/api/_types/_common.aggregations.d.ts +++ b/api/_types/_common.aggregations.d.ts @@ -28,7 +28,7 @@ export type AdjacencyMatrixBucket = MultiBucketBase & { key: string; } -export type Aggregate = CardinalityAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | PercentilesBucketAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MaxAggregate | SumAggregate | AvgAggregate | WeightedAvgAggregate | ValueCountAggregate | SimpleValueAggregate | DerivativeAggregate | BucketMetricValueAggregate | StatsAggregate | StatsBucketAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | GeoBoundsAggregate | GeoCentroidAggregate | HistogramAggregate | DateHistogramAggregate | AutoDateHistogramAggregate | VariableWidthHistogramAggregate | StringTermsAggregate | LongTermsAggregate | DoubleTermsAggregate | UnmappedTermsAggregate | LongRareTermsAggregate | StringRareTermsAggregate | UnmappedRareTermsAggregate | MultiTermsAggregate | MissingAggregate | NestedAggregate | ReverseNestedAggregate | GlobalAggregate | FilterAggregate | ChildrenAggregate | ParentAggregate | SamplerAggregate | UnmappedSamplerAggregate | GeoHashGridAggregate | GeoTileGridAggregate | RangeAggregate | DateRangeAggregate | GeoDistanceAggregate | IpRangeAggregate | FiltersAggregate | AdjacencyMatrixAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | UnmappedSignificantTermsAggregate | CompositeAggregate | ScriptedMetricAggregate | TopHitsAggregate | InferenceAggregate | StringStatsAggregate | BoxPlotAggregate | TopMetricsAggregate | TTestAggregate | RateAggregate | CumulativeCardinalityAggregate | MatrixStatsAggregate | GeoLineAggregate +export type Aggregate = AdjacencyMatrixAggregate | AutoDateHistogramAggregate | AvgAggregate | BoxPlotAggregate | BucketMetricValueAggregate | CardinalityAggregate | ChildrenAggregate | CompositeAggregate | DateHistogramAggregate | DateRangeAggregate | DerivativeAggregate | DoubleTermsAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | FilterAggregate | FiltersAggregate | GeoBoundsAggregate | GeoCentroidAggregate | GeoDistanceAggregate | GeoHashGridAggregate | GeoTileGridAggregate | GlobalAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | HistogramAggregate | IpRangeAggregate | LongRareTermsAggregate | LongTermsAggregate | MatrixStatsAggregate | MaxAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MissingAggregate | MultiTermsAggregate | NestedAggregate | ParentAggregate | PercentilesBucketAggregate | RangeAggregate | RateAggregate | ReverseNestedAggregate | SamplerAggregate | ScriptedMetricAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | CumulativeCardinalityAggregate | SimpleValueAggregate | StatsAggregate | StatsBucketAggregate | StringRareTermsAggregate | StringTermsAggregate | SumAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | TTestAggregate | TopHitsAggregate | UnmappedRareTermsAggregate | UnmappedSignificantTermsAggregate | UnmappedTermsAggregate | ValueCountAggregate | VariableWidthHistogramAggregate | WeightedAvgAggregate export type AggregateBase = { meta?: Common.Metadata; @@ -95,8 +95,6 @@ export type AggregationContainer = { geo_distance: GeoDistanceAggregation; } | { geohash_grid: GeoHashGridAggregation; -} | { - geo_line: GeoLineAggregation; } | { geotile_grid: GeoTileGridAggregation; } | { @@ -105,10 +103,6 @@ export type AggregationContainer = { histogram: HistogramAggregation; } | { ip_range: IpRangeAggregation; -} | { - inference: InferenceAggregation; -} | { - line: GeoLineAggregation; } | { matrix_stats: MatrixStatsAggregation; } | { @@ -165,8 +159,6 @@ export type AggregationContainer = { stats: StatsAggregation; } | { stats_bucket: StatsBucketAggregation; -} | { - string_stats: StringStatsAggregation; } | { sum: SumAggregation; } | { @@ -177,8 +169,6 @@ export type AggregationContainer = { top_hits: TopHitsAggregation; } | { t_test: TTestAggregation; -} | { - top_metrics: TopMetricsAggregation; } | { value_count: ValueCountAggregation; } | { @@ -188,14 +178,14 @@ export type AggregationContainer = { }) export type AggregationRange = { - from?: undefined | number | string; + from?: number | string | undefined; key?: string; - to?: undefined | number | string; + to?: number | string | undefined; } export type ArrayPercentilesItem = { key: string; - value: undefined | number | string; + value: number | undefined; value_as_string?: string; } @@ -252,38 +242,16 @@ export type BucketPathAggregation = Aggregation & { buckets_path?: BucketsPath; } -export type BucketsAdjacencyMatrixBucket = Record | AdjacencyMatrixBucket[] - -export type BucketsCompositeBucket = Record | CompositeBucket[] +export type Buckets = Record | TBucket[] export type BucketScriptAggregation = PipelineAggregationBase & { script?: Common.Script; } -export type BucketsDateHistogramBucket = Record | DateHistogramBucket[] - -export type BucketsDoubleTermsBucket = Record | DoubleTermsBucket[] - export type BucketSelectorAggregation = PipelineAggregationBase & { script?: Common.Script; } -export type BucketsFiltersBucket = Record | FiltersBucket[] - -export type BucketsGeoHashGridBucket = Record | GeoHashGridBucket[] - -export type BucketsGeoTileGridBucket = Record | GeoTileGridBucket[] - -export type BucketsHistogramBucket = Record | HistogramBucket[] - -export type BucketsIpRangeBucket = Record | IpRangeBucket[] - -export type BucketsLongRareTermsBucket = Record | LongRareTermsBucket[] - -export type BucketsLongTermsBucket = Record | LongTermsBucket[] - -export type BucketsMultiTermsBucket = Record | MultiTermsBucket[] - export type BucketSortAggregation = Aggregation & { from?: number; gap_policy?: GapPolicy; @@ -293,21 +261,7 @@ export type BucketSortAggregation = Aggregation & { export type BucketsPath = string | string[] | Record -export type BucketsQueryContainer = Record | Common_QueryDsl.QueryContainer[] - -export type BucketsRangeBucket = Record | RangeBucket[] - -export type BucketsSignificantLongTermsBucket = Record | SignificantLongTermsBucket[] - -export type BucketsSignificantStringTermsBucket = Record | SignificantStringTermsBucket[] - -export type BucketsStringRareTermsBucket = Record | StringRareTermsBucket[] - -export type BucketsStringTermsBucket = Record | StringTermsBucket[] - -export type BucketsVariableWidthHistogramBucket = Record | VariableWidthHistogramBucket[] - -export type BucketsVoid = Record | Common.Void[] +export type BucketsQueryContainer = Buckets & (Record | Common_QueryDsl.QueryContainer[]) export type CalendarInterval = 'second' | '1s' | 'minute' | '1m' | 'hour' | '1h' | 'day' | '1d' | 'week' | '1w' | 'month' | '1M' | 'quarter' | '1q' | 'year' | '1Y' @@ -334,14 +288,6 @@ export type ChiSquareHeuristic = { include_negatives: boolean; } -export type ClassificationInferenceOptions = { - num_top_classes?: number; - num_top_feature_importance_values?: number; - prediction_field_type?: string; - results_field?: string; - top_classes_results_field?: string; -} - export type CompositeAggregate = MultiBucketAggregateBaseCompositeBucket & { after_key?: CompositeAggregateKey; } @@ -427,7 +373,7 @@ export type DateHistogramBucket = MultiBucketBase & { key_as_string?: string; } -export type DateRangeAggregate = RangeAggregate & Record +export type DateRangeAggregate = RangeAggregateBase & Record export type DateRangeAggregation = BucketAggregationBase & { field?: Common.Field; @@ -475,30 +421,37 @@ export type EwmaMovingAverageAggregation = MovingAverageAggregationBase & { settings: EwmaModelSettings; } -export type ExtendedBoundsdouble = { - max: number; - min: number; +export type ExtendedBounds = { + max: T; + min: T; } -export type ExtendedBoundsFieldDateMath = { - max: FieldDateMath; - min: FieldDateMath; +export type ExtendedBoundsDouble = ExtendedBounds & { + max?: number; + min?: number; } -export type ExtendedStatsAggregate = StatsAggregate & { - std_deviation: undefined | number | string; +export type ExtendedBoundsFieldDateMath = ExtendedBounds & { + max?: FieldDateMath; + min?: FieldDateMath; +} + +export type ExtendedStatsAggregate = ExtendedStatsAggregateBase & Record + +export type ExtendedStatsAggregateBase = StatsAggregateBase & { + std_deviation: number | undefined; std_deviation_as_string?: string; std_deviation_bounds?: StandardDeviationBounds; std_deviation_bounds_as_string?: StandardDeviationBoundsAsString; - std_deviation_population: undefined | number | string; - std_deviation_sampling: undefined | number | string; - sum_of_squares: undefined | number | string; + std_deviation_population: number | undefined; + std_deviation_sampling: number | undefined; + sum_of_squares: number | undefined; sum_of_squares_as_string?: string; - variance: undefined | number | string; + variance: number | undefined; variance_as_string?: string; - variance_population: undefined | number | string; + variance_population: number | undefined; variance_population_as_string?: string; - variance_sampling: undefined | number | string; + variance_sampling: number | undefined; variance_sampling_as_string?: string; } @@ -506,7 +459,7 @@ export type ExtendedStatsAggregation = FormatMetricAggregationBase & { sigma?: number; } -export type ExtendedStatsBucketAggregate = ExtendedStatsAggregate & Record +export type ExtendedStatsBucketAggregate = ExtendedStatsAggregateBase & Record export type ExtendedStatsBucketAggregation = PipelineAggregationBase & { sigma?: number; @@ -555,7 +508,7 @@ export type GeoCentroidAggregation = MetricAggregationBase & { location?: Common.GeoLocation; } -export type GeoDistanceAggregate = RangeAggregate & Record +export type GeoDistanceAggregate = RangeAggregateBase & Record export type GeoDistanceAggregation = BucketAggregationBase & { distance_type?: Common.GeoDistanceType; @@ -579,28 +532,6 @@ export type GeoHashGridBucket = MultiBucketBase & { key: Common.GeoHash; } -export type GeoLineAggregate = AggregateBase & { - geometry: Common.GeoLine; - properties: Record; - type: string; -} - -export type GeoLineAggregation = { - include_sort?: boolean; - point: GeoLinePoint; - size?: number; - sort: GeoLineSort; - sort_order?: Common.SortOrder; -} - -export type GeoLinePoint = { - field: Common.Field; -} - -export type GeoLineSort = { - field: Common.Field; -} - export type GeoTileGridAggregate = MultiBucketAggregateBaseGeoTileGridBucket & Record export type GeoTileGridAggregation = BucketAggregationBase & { @@ -634,10 +565,10 @@ export type HdrPercentilesAggregate = PercentilesAggregateBase & Record export type HistogramAggregation = BucketAggregationBase & { - extended_bounds?: ExtendedBoundsdouble; + extended_bounds?: ExtendedBoundsDouble; field?: Common.Field; format?: string; - hard_bounds?: ExtendedBoundsdouble; + hard_bounds?: ExtendedBoundsDouble; interval?: number; keyed?: boolean; min_doc_count?: number; @@ -683,40 +614,6 @@ export type HoltWintersMovingAverageAggregation = MovingAverageAggregationBase & export type HoltWintersType = 'add' | 'mult' -export type InferenceAggregate = AggregateBase & { - feature_importance?: InferenceFeatureImportance[]; - top_classes?: InferenceTopClassEntry[]; - value?: Common.FieldValue; - warning?: string; -} - -export type InferenceAggregation = PipelineAggregationBase & { - inference_config?: InferenceConfigContainer; - model_id: Common.Name; -} - -export type InferenceClassImportance = { - class_name: string; - importance: number; -} - -export type InferenceConfigContainer = { - classification?: ClassificationInferenceOptions; - regression?: RegressionInferenceOptions; -} - -export type InferenceFeatureImportance = { - classes?: InferenceClassImportance[]; - feature_name: string; - importance?: number; -} - -export type InferenceTopClassEntry = { - class_name: Common.FieldValue; - class_probability: number; - class_score: number; -} - export type IpRangeAggregate = MultiBucketAggregateBaseIpRangeBucket & Record export type IpRangeAggregation = BucketAggregationBase & { @@ -736,7 +633,7 @@ export type IpRangeBucket = MultiBucketBase & { to?: string; } -export type KeyedPercentiles = Record +export type KeyedPercentiles = Record export type LinearMovingAverageAggregation = MovingAverageAggregationBase & { model: 'linear'; @@ -753,10 +650,12 @@ export type LongRareTermsBucket = MultiBucketBase & { export type LongTermsAggregate = TermsAggregateBaseLongTermsBucket & Record export type LongTermsBucket = TermsBucketBase & { - key: number; + key: LongTermsBucketKey; key_as_string?: string; } +export type LongTermsBucketKey = number | string + export type MatrixAggregation = Aggregation & { fields?: Common.Fields; missing?: Record; @@ -837,80 +736,60 @@ export type MovingPercentilesAggregation = PipelineAggregationBase & { window?: number; } -export type MultiBucketAggregateBaseAdjacencyMatrixBucket = AggregateBase & { - buckets: BucketsAdjacencyMatrixBucket; -} - -export type MultiBucketAggregateBaseCompositeBucket = AggregateBase & { - buckets: BucketsCompositeBucket; -} - -export type MultiBucketAggregateBaseDateHistogramBucket = AggregateBase & { - buckets: BucketsDateHistogramBucket; -} - -export type MultiBucketAggregateBaseDoubleTermsBucket = AggregateBase & { - buckets: BucketsDoubleTermsBucket; +export type MultiBucketAggregateBase = AggregateBase & { + buckets: Buckets & (Record | TBucket[]); } -export type MultiBucketAggregateBaseFiltersBucket = AggregateBase & { - buckets: BucketsFiltersBucket; +export type MultiBucketAggregateBaseAdjacencyMatrixBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | AdjacencyMatrixBucket[]); } -export type MultiBucketAggregateBaseGeoHashGridBucket = AggregateBase & { - buckets: BucketsGeoHashGridBucket; +export type MultiBucketAggregateBaseCompositeBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | CompositeBucket[]); } -export type MultiBucketAggregateBaseGeoTileGridBucket = AggregateBase & { - buckets: BucketsGeoTileGridBucket; +export type MultiBucketAggregateBaseDateHistogramBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | DateHistogramBucket[]); } -export type MultiBucketAggregateBaseHistogramBucket = AggregateBase & { - buckets: BucketsHistogramBucket; +export type MultiBucketAggregateBaseFiltersBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | FiltersBucket[]); } -export type MultiBucketAggregateBaseIpRangeBucket = AggregateBase & { - buckets: BucketsIpRangeBucket; +export type MultiBucketAggregateBaseGeoHashGridBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | GeoHashGridBucket[]); } -export type MultiBucketAggregateBaseLongRareTermsBucket = AggregateBase & { - buckets: BucketsLongRareTermsBucket; +export type MultiBucketAggregateBaseGeoTileGridBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | GeoTileGridBucket[]); } -export type MultiBucketAggregateBaseLongTermsBucket = AggregateBase & { - buckets: BucketsLongTermsBucket; +export type MultiBucketAggregateBaseHistogramBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | HistogramBucket[]); } -export type MultiBucketAggregateBaseMultiTermsBucket = AggregateBase & { - buckets: BucketsMultiTermsBucket; +export type MultiBucketAggregateBaseIpRangeBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | IpRangeBucket[]); } -export type MultiBucketAggregateBaseRangeBucket = AggregateBase & { - buckets: BucketsRangeBucket; +export type MultiBucketAggregateBaseLongRareTermsBucket = MultiBucketAggregateBase & { + buckets?: Buckets & (Record | LongRareTermsBucket[]); } -export type MultiBucketAggregateBaseSignificantLongTermsBucket = AggregateBase & { - buckets: BucketsSignificantLongTermsBucket; +export type MultiBucketAggregateBaseRangeBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | RangeBucket[]); } -export type MultiBucketAggregateBaseSignificantStringTermsBucket = AggregateBase & { - buckets: BucketsSignificantStringTermsBucket; +export type MultiBucketAggregateBaseStringRareTermsBucket = MultiBucketAggregateBase & { + buckets?: Buckets & (Record | StringRareTermsBucket[]); } -export type MultiBucketAggregateBaseStringRareTermsBucket = AggregateBase & { - buckets: BucketsStringRareTermsBucket; +export type MultiBucketAggregateBaseVariableWidthHistogramBucket = MultiBucketAggregateBase & { + buckets: Buckets & (Record | VariableWidthHistogramBucket[]); } -export type MultiBucketAggregateBaseStringTermsBucket = AggregateBase & { - buckets: BucketsStringTermsBucket; -} - -export type MultiBucketAggregateBaseVariableWidthHistogramBucket = AggregateBase & { - buckets: BucketsVariableWidthHistogramBucket; -} - -export type MultiBucketAggregateBaseVoid = AggregateBase & { - buckets: BucketsVoid; +export type MultiBucketAggregateBaseVoid = MultiBucketAggregateBase & { + buckets?: Buckets & (Record | Common.Void[]); } export type MultiBucketBase = { @@ -946,9 +825,7 @@ export type MutualInformationHeuristic = { include_negatives?: boolean; } -export type NestedAggregate = AggregateBase & { - doc_count?: number; -} +export type NestedAggregate = SingleBucketAggregateBase & Record export type NestedAggregation = BucketAggregationBase & { path?: Common.Field; @@ -999,7 +876,9 @@ export type PipelineAggregationBase = BucketPathAggregation & { gap_policy?: GapPolicy; } -export type RangeAggregate = MultiBucketAggregateBaseRangeBucket & Record +export type RangeAggregate = RangeAggregateBase & Record + +export type RangeAggregateBase = MultiBucketAggregateBaseRangeBucket & Record export type RangeAggregation = BucketAggregationBase & { field?: Common.Field; @@ -1040,11 +919,6 @@ export type RateAggregation = FormatMetricAggregationBase & { export type RateMode = 'sum' | 'value_count' -export type RegressionInferenceOptions = { - num_top_feature_importance_values?: number; - results_field?: Common.Field; -} - export type ReverseNestedAggregate = SingleBucketAggregateBase & Record export type ReverseNestedAggregation = BucketAggregationBase & { @@ -1064,7 +938,7 @@ export type ScriptedHeuristic = { } export type ScriptedMetricAggregate = AggregateBase & { - value: Record; + value: any; } export type ScriptedMetricAggregation = MetricAggregationBase & { @@ -1092,19 +966,21 @@ export type SignificantStringTermsBucket = SignificantTermsBucketBase & { key: string; } -export type SignificantTermsAggregateBaseSignificantLongTermsBucket = MultiBucketAggregateBaseSignificantLongTermsBucket & { +export type SignificantTermsAggregateBase = MultiBucketAggregateBase & { bg_count?: number; doc_count?: number; } -export type SignificantTermsAggregateBaseSignificantStringTermsBucket = MultiBucketAggregateBaseSignificantStringTermsBucket & { - bg_count?: number; - doc_count?: number; +export type SignificantTermsAggregateBaseSignificantLongTermsBucket = SignificantTermsAggregateBase & { + buckets?: Buckets & (Record | SignificantLongTermsBucket[]); } -export type SignificantTermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & { - bg_count?: number; - doc_count?: number; +export type SignificantTermsAggregateBaseSignificantStringTermsBucket = SignificantTermsAggregateBase & { + buckets?: Buckets & (Record | SignificantStringTermsBucket[]); +} + +export type SignificantTermsAggregateBaseVoid = SignificantTermsAggregateBase & { + buckets?: Buckets & (Record | Common.Void[]); } export type SignificantTermsAggregation = BucketAggregationBase & { @@ -1163,17 +1039,17 @@ export type SingleBucketAggregateBase = AggregateBase & { } export type SingleMetricAggregateBase = AggregateBase & { - value: undefined | number | string; + value: number | undefined; value_as_string?: string; } export type StandardDeviationBounds = { - lower: undefined | number | string; - lower_population: undefined | number | string; - lower_sampling: undefined | number | string; - upper: undefined | number | string; - upper_population: undefined | number | string; - upper_sampling: undefined | number | string; + lower: number | undefined; + lower_population: number | undefined; + lower_sampling: number | undefined; + upper: number | undefined; + upper_population: number | undefined; + upper_sampling: number | undefined; } export type StandardDeviationBoundsAsString = { @@ -1185,13 +1061,15 @@ export type StandardDeviationBoundsAsString = { upper_sampling: string; } -export type StatsAggregate = AggregateBase & { - avg: undefined | number | string; +export type StatsAggregate = StatsAggregateBase & Record + +export type StatsAggregateBase = AggregateBase & { + avg: number | undefined; avg_as_string?: string; count: number; - max: undefined | number | string; + max: number | undefined; max_as_string?: string; - min: undefined | number | string; + min: number | undefined; min_as_string?: string; sum: number; sum_as_string?: string; @@ -1199,7 +1077,7 @@ export type StatsAggregate = AggregateBase & { export type StatsAggregation = FormatMetricAggregationBase & Record -export type StatsBucketAggregate = StatsAggregate & Record +export type StatsBucketAggregate = StatsAggregateBase & Record export type StatsBucketAggregation = PipelineAggregationBase & Record @@ -1209,26 +1087,10 @@ export type StringRareTermsBucket = MultiBucketBase & { key: string; } -export type StringStatsAggregate = AggregateBase & { - avg_length: undefined | number | string; - avg_length_as_string?: string; - count: number; - distribution?: undefined | Record | string; - entropy: undefined | number | string; - max_length: undefined | number | string; - max_length_as_string?: string; - min_length: undefined | number | string; - min_length_as_string?: string; -} - -export type StringStatsAggregation = MetricAggregationBase & { - show_distribution?: boolean; -} - export type StringTermsAggregate = TermsAggregateBaseStringTermsBucket & Record export type StringTermsBucket = TermsBucketBase & { - key: Common.FieldValue; + key: string; } export type SumAggregate = SingleMetricAggregateBase & Record @@ -1237,6 +1099,10 @@ export type SumAggregation = FormatMetricAggregationBase & Record export type SumBucketAggregation = PipelineAggregationBase & Record +export type T = Record + +export type TBucket = Record + export type TDigest = { compression?: number; } @@ -1245,29 +1111,29 @@ export type TDigestPercentileRanksAggregate = PercentilesAggregateBase & Record< export type TDigestPercentilesAggregate = PercentilesAggregateBase & Record -export type TermsAggregateBaseDoubleTermsBucket = MultiBucketAggregateBaseDoubleTermsBucket & { +export type TermsAggregateBase = MultiBucketAggregateBase & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export type TermsAggregateBaseLongTermsBucket = MultiBucketAggregateBaseLongTermsBucket & { - doc_count_error_upper_bound?: number; - sum_other_doc_count?: number; +export type TermsAggregateBaseDoubleTermsBucket = TermsAggregateBase & { + buckets?: Buckets & (Record | DoubleTermsBucket[]); } -export type TermsAggregateBaseMultiTermsBucket = MultiBucketAggregateBaseMultiTermsBucket & { - doc_count_error_upper_bound?: number; - sum_other_doc_count?: number; +export type TermsAggregateBaseLongTermsBucket = TermsAggregateBase & { + buckets?: Buckets & (Record | LongTermsBucket[]); } -export type TermsAggregateBaseStringTermsBucket = MultiBucketAggregateBaseStringTermsBucket & { - doc_count_error_upper_bound?: number; - sum_other_doc_count?: number; +export type TermsAggregateBaseMultiTermsBucket = TermsAggregateBase & { + buckets?: Buckets & (Record | MultiTermsBucket[]); } -export type TermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & { - doc_count_error_upper_bound?: number; - sum_other_doc_count?: number; +export type TermsAggregateBaseStringTermsBucket = TermsAggregateBase & { + buckets?: Buckets & (Record | StringTermsBucket[]); +} + +export type TermsAggregateBaseVoid = TermsAggregateBase & { + buckets?: Buckets & (Record | Common.Void[]); } export type TermsAggregation = BucketAggregationBase & { @@ -1313,7 +1179,7 @@ export type TestPopulation = { } export type TopHitsAggregate = AggregateBase & { - hits: Core_Search.HitsMetadata; + hits: Core_Search.HitsMetadataJsonValue; } export type TopHitsAggregation = MetricAggregationBase & { @@ -1331,27 +1197,8 @@ export type TopHitsAggregation = MetricAggregationBase & { version?: boolean; } -export type TopMetrics = { - metrics: Record; - sort: Common.FieldValue[]; -} - -export type TopMetricsAggregate = AggregateBase & { - top: TopMetrics[]; -} - -export type TopMetricsAggregation = MetricAggregationBase & { - metrics?: TopMetricsValue | TopMetricsValue[]; - size?: number; - sort?: Common.Sort; -} - -export type TopMetricsValue = { - field: Common.Field; -} - export type TTestAggregate = AggregateBase & { - value: undefined | number | string; + value: number | undefined; value_as_string?: string; } @@ -1365,8 +1212,6 @@ export type TTestType = 'heteroscedastic' | 'homoscedastic' | 'paired' export type UnmappedRareTermsAggregate = MultiBucketAggregateBaseVoid & Record -export type UnmappedSamplerAggregate = SingleBucketAggregateBase & Record - export type UnmappedSignificantTermsAggregate = SignificantTermsAggregateBaseVoid & Record export type UnmappedTermsAggregate = TermsAggregateBaseVoid & Record diff --git a/api/_types/_common.analysis.d.ts b/api/_types/_common.analysis.d.ts index 402dd5dd8..3c3fc1b6c 100644 --- a/api/_types/_common.analysis.d.ts +++ b/api/_types/_common.analysis.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer | SmartcnAnalyzer | CjkAnalyzer | PhoneAnalyzer +export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer | SmartcnAnalyzer | CjkAnalyzer | PhoneAnalyzer | PhoneSearchAnalyzer export type AsciiFoldingTokenFilter = TokenFilterBase & { preserve_original?: Common.StringifiedBoolean; @@ -438,9 +438,16 @@ export type PersianStemTokenFilter = TokenFilterBase & { type: 'persian_stem'; } -export type PhoneAnalyzer = { +export type PhoneAnalyzer = PhoneAnalyzerBase & { + type: 'phone'; +} + +export type PhoneAnalyzerBase = { 'phone-region'?: string; - type?: 'phone' | 'phone-search'; +} + +export type PhoneSearchAnalyzer = PhoneAnalyzerBase & { + type: 'phone-search'; } export type PhoneticEncoder = 'beider_morse' | 'caverphone1' | 'caverphone2' | 'cologne' | 'daitch_mokotoff' | 'double_metaphone' | 'haasephonetik' | 'koelnerphonetik' | 'metaphone' | 'nysiis' | 'refined_soundex' | 'soundex' @@ -480,8 +487,8 @@ export type ReverseTokenFilter = TokenFilterBase & { export type ShingleTokenFilter = TokenFilterBase & { filler_token?: string; - max_shingle_size?: number | string; - min_shingle_size?: number | string; + max_shingle_size?: Common.StringifiedInteger; + min_shingle_size?: Common.StringifiedInteger; output_unigrams?: boolean; output_unigrams_if_no_shingles?: boolean; token_separator?: string; diff --git a/api/_types/_common.d.ts b/api/_types/_common.d.ts index cac0d9eab..6c25be1ee 100644 --- a/api/_types/_common.d.ts +++ b/api/_types/_common.d.ts @@ -80,22 +80,7 @@ export type ByteCount = number export type ByteUnit = 'b' | 'kb' | 'k' | 'mb' | 'm' | 'gb' | 'g' | 'tb' | 't' | 'pb' | 'p' -export type ClusterDetails = { - _shards?: ShardStatistics; - failures?: ShardFailure[]; - indices: string; - status: ClusterSearchStatus; - timed_out: boolean; - took?: DurationValueUnitMillis; -} - -export type ClusterSearchStatus = 'failed' | 'partial' | 'running' | 'skipped' | 'successful' - export type ClusterStatistics = { - details?: Record; - failed: number; - partial: number; - running: number; skipped: number; successful: number; total: number; @@ -234,8 +219,10 @@ export type GeoDistanceSort = { distance_type?: GeoDistanceType; ignore_unmapped?: boolean; mode?: SortMode; + nested?: NestedSortValue; order?: SortOrder; unit?: DistanceUnit; + validation_method?: Common_QueryDsl.GeoValidationMethod; [key: string]: any | GeoLocation[]; } @@ -249,11 +236,6 @@ export type GeoHashLocation = { export type GeoHashPrecision = number | string -export type GeoLine = { - coordinates: number[][]; - type: string; -} - export type GeoLocation = LatLonGeoLocation | GeoHashLocation | number[] | string export type GeoShapeRelation = 'contains' | 'disjoint' | 'intersects' | 'within' @@ -324,9 +306,10 @@ export type InlineGet = { _primary_term?: number; _routing?: Routing; _seq_no?: SequenceNumber; - _source?: Record; - fields?: Record>; + _source?: TDocument; + fields?: Record; found: boolean; + [key: string]: any; } export type InlineGetDictUserDefined = { @@ -336,6 +319,7 @@ export type InlineGetDictUserDefined = { _source?: Record; fields?: Record>; found: boolean; + [key: string]: any | Record; } export type InlineScript = string | (ScriptBase & { @@ -417,6 +401,7 @@ export type NodeShard = { primary: boolean; recovery_source?: Record; relocating_node?: NodeId | undefined; + searchOnly?: boolean; shard: number; state: Indices_Stats.ShardRoutingState; unassigned_info?: Cluster_AllocationExplain.UnassignedInformation; @@ -486,12 +471,6 @@ export type QueryCacheStats = { total_count: number; } -export type RankBase = Record - -export type RankContainer = { - rrf?: RrfRank; -} - export type RecoveryStats = { current_as_source: number; current_as_target: number; @@ -606,8 +585,6 @@ export type ResourceStats = { total: ResourceStat; } -export type ResourceType = 'index_or_alias' - export type Result = 'created' | 'deleted' | 'noop' | 'not_found' | 'updated' export type Retries = { @@ -619,11 +596,6 @@ export type Routing = string export type RoutingInQueryString = StringOrStringArray -export type RrfRank = RankBase & { - rank_constant?: number; - window_size?: number; -} - export type ScoreSort = { order?: SortOrder; } @@ -746,6 +718,13 @@ export type ShardFailure = { status?: string; } +export type ShardInfo = { + failed: uint; + failures?: ShardFailure[]; + successful: uint; + total: uint; +} + export type ShardsOperationResponseBase = { _shards: ShardStatistics; } @@ -829,6 +808,8 @@ export type TaskFailure = { export type TaskId = string +export type TDocument = Record + export type TermFrequencyNormalization = 'h1' | 'h2' | 'h3' | 'no' | 'z' export type ThreadInfo = { @@ -865,6 +846,8 @@ export type TranslogStats = { export type TransportAddress = string +export type TResult = Record + export type Type = string export type uint = number @@ -891,9 +874,9 @@ export type VersionType = 'external' | 'external_gte' | 'force' | 'internal' export type Void = Record -export type WaitForActiveShardOptions = 'all' | 'index-setting' +export type WaitForActiveShardOptions = 'all' | undefined -export type WaitForActiveShards = number | WaitForActiveShardOptions +export type WaitForActiveShards = StringifiedInteger | WaitForActiveShardOptions export type WaitForEvents = 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid' diff --git a/api/_types/_common.mapping.d.ts b/api/_types/_common.mapping.d.ts index 3758922ba..764dc01cb 100644 --- a/api/_types/_common.mapping.d.ts +++ b/api/_types/_common.mapping.d.ts @@ -119,7 +119,7 @@ export type DoubleRangeProperty = RangePropertyBase & { type: 'double_range'; } -export type DynamicMapping = 'false' | 'strict' | 'strict_allow_templates' | 'true' +export type DynamicMapping = 'false' | 'strict' | 'strict_allow_templates' | 'true' | boolean export type DynamicTemplate = { mapping?: Property; diff --git a/api/_types/_common.query_dsl.d.ts b/api/_types/_common.query_dsl.d.ts index 360e73926..4620524e1 100644 --- a/api/_types/_common.query_dsl.d.ts +++ b/api/_types/_common.query_dsl.d.ts @@ -555,6 +555,7 @@ export type QueryContainer = { span_or?: SpanOrQuery; span_term?: Record; span_within?: SpanWithinQuery; + template?: Record; term?: Record; terms?: TermsQuery; terms_set?: Record; @@ -745,20 +746,24 @@ export type TermQuery = Common.FieldValue | (QueryBase & { }) export type TermsLookup = { - id?: Common.Id; - index?: Common.IndexName; - path?: Common.Field; + id: Common.Id; + index: Common.IndexName; + path: Common.Field; routing?: Common.Routing; + store?: boolean; } export type TermsQuery = QueryBase & { _name?: any; boost?: any; + value_type?: TermsQueryValueType; [key: string]: any | TermsQueryField; } export type TermsQueryField = Common.FieldValue[] | TermsLookup +export type TermsQueryValueType = 'bitmap' | 'default' + export type TermsSetQuery = QueryBase & { minimum_should_match_field?: Common.Field; minimum_should_match_script?: Common.Script; diff --git a/api/_types/_core.bulk.d.ts b/api/_types/_core.bulk.d.ts index 2f136b2d6..d54ef787b 100644 --- a/api/_types/_core.bulk.d.ts +++ b/api/_types/_core.bulk.d.ts @@ -17,20 +17,34 @@ import * as Common from './_common' import * as Core_Search from './_core.search' +export type BulkResponseBase = { + errors: boolean; + ingest_took?: number; + items: Record[]; + took: number; +} + export type CreateOperation = WriteOperation -export type DeleteOperation = OperationBase +export type DeleteOperation = OperationBase & { + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} -export type IndexOperation = WriteOperation +export type IndexOperation = WriteOperation & { + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + op_type?: Common.OpType; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} export type OperationBase = { _id?: Common.Id; _index?: Common.IndexName; - if_primary_term?: number; - if_seq_no?: Common.SequenceNumber; routing?: Common.Routing; - version?: Common.VersionNumber; - version_type?: Common.VersionType; } export type OperationContainer = { @@ -45,7 +59,7 @@ export type ResponseItem = { _index: string; _primary_term?: number; _seq_no?: Common.SequenceNumber; - _shards?: Common.ShardStatistics; + _shards?: Common.ShardInfo; _type?: string; _version?: Common.VersionNumber; error?: Common.ErrorCause; @@ -66,12 +80,13 @@ export type UpdateAction = { } export type UpdateOperation = OperationBase & { + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; require_alias?: boolean; retry_on_conflict?: number; } export type WriteOperation = OperationBase & { - dynamic_templates?: Record; pipeline?: string; require_alias?: boolean; } diff --git a/api/_types/_core.explain.d.ts b/api/_types/_core.explain.d.ts index 16092472a..016770b87 100644 --- a/api/_types/_core.explain.d.ts +++ b/api/_types/_core.explain.d.ts @@ -17,13 +17,7 @@ export type Explanation = { description: string; - details: ExplanationDetail[]; - value: number; -} - -export type ExplanationDetail = { - description: string; - details?: ExplanationDetail[]; + details?: Explanation[]; value: number; } diff --git a/api/_types/_core.get.d.ts b/api/_types/_core.get.d.ts index 1ba5ab906..4284f2ee4 100644 --- a/api/_types/_core.get.d.ts +++ b/api/_types/_core.get.d.ts @@ -16,16 +16,20 @@ import * as Common from './_common' -export type GetResult = { +export type GetResult = GetResultBase & { + _source?: Common.TDocument; +} + +export type GetResultBase = { _id: Common.Id; _index: Common.IndexName; _primary_term?: number; _routing?: string; _seq_no?: Common.SequenceNumber; - _source?: Record; + _source?: Common.TDocument; _type?: Common.Type; _version?: Common.VersionNumber; - fields?: Record>; + fields?: Record; found: boolean; } diff --git a/api/_types/_core.msearch.d.ts b/api/_types/_core.msearch.d.ts index 7e1562161..5c632e3ac 100644 --- a/api/_types/_core.msearch.d.ts +++ b/api/_types/_core.msearch.d.ts @@ -66,7 +66,7 @@ export type MultisearchHeader = { search_type?: Common.SearchType; } -export type MultiSearchItem = Core_Search.ResponseBody & { +export type MultiSearchItem = Core_Search.SearchResult & { status?: number; } diff --git a/api/_types/_core.search.d.ts b/api/_types/_core.search.d.ts index 313db9aa1..4d3b99346 100644 --- a/api/_types/_core.search.d.ts +++ b/api/_types/_core.search.d.ts @@ -104,9 +104,13 @@ export type CompletionContext = Context | { prefix?: boolean; } -export type CompletionSuggest = SuggestBase & { - options: CompletionSuggestOption | CompletionSuggestOption[]; -} +export type CompletionSuggest = SuggestBase & ({ + options: (CompletionSuggestOption & { + _source?: TDocument; +}) | (CompletionSuggestOption & { + _source?: TDocument; +}[]); +}) export type CompletionSuggester = SuggesterBase & { contexts?: Record; @@ -120,10 +124,10 @@ export type CompletionSuggestOption = { _index?: Common.IndexName; _routing?: Common.Routing; _score?: number; - _source?: Record; + _source?: TDocument; collate_match?: boolean; contexts?: Record; - fields?: Record>; + fields?: Record; score?: number; text: string; } @@ -231,17 +235,17 @@ export type HighlightField = HighlightBase & { export type Hit = { _explanation?: Core_Explain.Explanation; - _id: Common.Id; + _id?: Common.Id; _ignored?: string[]; - _index: Common.IndexName; + _index?: Common.IndexName; _nested?: NestedIdentity; _node?: string; _primary_term?: number; _routing?: string; - _score?: undefined | number | string; + _score?: undefined | number; _seq_no?: Common.SequenceNumber; _shard?: string; - _source?: Record; + _source?: TDocument; _type?: Common.Type; _version?: Common.VersionNumber; fields?: Record; @@ -253,11 +257,19 @@ export type Hit = { } export type HitsMetadata = { - hits: Hit[]; - max_score?: undefined | number | string; + hits: Hit & { + _source?: T; +}[]; + max_score?: undefined | number; total?: TotalHits | number; } +export type HitsMetadataJsonValue = HitsMetadata & { + hits?: { + _source?: any; +}[]; +} + export type InnerHits = { _source?: SourceConfig; collapse?: FieldCollapse; @@ -345,6 +357,16 @@ export type PointInTimeReference = { keep_alive?: Common.Duration; } +export type ProcessorExecutionDetail = { + duration_millis?: number; + error?: string; + input_data?: any; + output_data?: any; + processor_name?: string; + status?: string; + tag?: string; +} + export type Profile = { shards: ShardProfile[]; } @@ -390,31 +412,58 @@ export type RescoreQuery = { score_mode?: ScoreMode; } -export type ResponseBody = { +export type ScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' + +export type SearchProfile = { + collector: Collector[]; + query: QueryProfile[]; + rewrite_time: number; +} + +export type SearchResponse = SearchResult & Record + +export type SearchResult = { _clusters?: Common.ClusterStatistics; _scroll_id?: Common.ScrollId; _shards: Common.ShardStatistics; aggregations?: Record; - fields?: Record>; - hits: HitsMetadata; - max_score?: number; + fields?: Record; + hits: HitsMetadata & { + hits?: Hit & { + _source?: TDocument; +}[]; +}; num_reduce_phases?: number; phase_took?: Common.PhaseTook; pit_id?: Common.Id; + processor_results?: ProcessorExecutionDetail[]; profile?: Profile; - suggest?: Record; + suggest?: Record; terminated_early?: boolean; timed_out: boolean; took: number; } -export type ScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' - -export type SearchProfile = { - collector: Collector[]; - query: QueryProfile[]; - rewrite_time: number; -} +export type SearchResultJsonValue = SearchResult & ({ + hits?: { + hits?: { + _source?: any; +}[]; +}; + suggest?: Record; +}) export type ShardProfile = { aggregations: AggregationProfile[]; @@ -444,7 +493,13 @@ export type StupidBackoffSmoothingModel = { discount: number; } -export type Suggest = CompletionSuggest | PhraseSuggest | TermSuggest +export type Suggest = (CompletionSuggest & ({ + options?: (CompletionSuggestOption & { + _source?: TDocument; +}) | (CompletionSuggestOption & { + _source?: TDocument; +}[]); +})) | PhraseSuggest | TermSuggest export type SuggestBase = { length: number; @@ -473,6 +528,10 @@ export type SuggestFuzziness = { export type SuggestSort = 'frequency' | 'score' +export type T = Record + +export type TDocument = Record + export type TermSuggest = SuggestBase & { options: TermSuggestOption | TermSuggestOption[]; } diff --git a/api/_types/asynchronous_search._common.d.ts b/api/_types/asynchronous_search._common.d.ts index b3ee30330..044ca1906 100644 --- a/api/_types/asynchronous_search._common.d.ts +++ b/api/_types/asynchronous_search._common.d.ts @@ -18,6 +18,7 @@ import * as Common from './_common' import * as Common_Aggregations from './_common.aggregations' import * as Common_QueryDsl from './_common.query_dsl' import * as Core_Search from './_core.search' +import * as Nodes_Common from './nodes._common' export type AsynchronousSearchStats = { cancelled?: number; @@ -38,7 +39,7 @@ export type NodesStats = { export type ResponseBody = { expiration_time_in_millis?: number; id?: string; - response?: Core_Search.ResponseBody; + response?: Core_Search.SearchResponse; start_time_in_millis?: number; state?: string; took?: number; @@ -60,7 +61,6 @@ export type Search = { post_filter?: Common_QueryDsl.QueryContainer; profile?: boolean; query?: Common_QueryDsl.QueryContainer; - rank?: Common.RankContainer; script_fields?: Record; search_after?: Common.SortResults; seq_no_primary_term?: boolean; @@ -77,8 +77,7 @@ export type Search = { version?: boolean; } -export type StatsResponse = { - _nodes?: Common.NodeStatistics; +export type StatsResponse = Nodes_Common.NodesResponseBase & { cluster_name?: string; nodes?: Record; } diff --git a/api/_types/cluster._common.d.ts b/api/_types/cluster._common.d.ts index 224868ee6..02f00d400 100644 --- a/api/_types/cluster._common.d.ts +++ b/api/_types/cluster._common.d.ts @@ -37,3 +37,5 @@ export type ComponentTemplateSummary = { version?: Common.VersionNumber; } +export type WaitForNodes = number | string + diff --git a/api/_types/cluster.decommission_awareness.d.ts b/api/_types/cluster.decommission_awareness.d.ts index 0cb185df7..8e14a44d7 100644 --- a/api/_types/cluster.decommission_awareness.d.ts +++ b/api/_types/cluster.decommission_awareness.d.ts @@ -15,7 +15,5 @@ */ -export type DecommissionStatusResponse = ZoneDecommissionStatusResponse - -export type ZoneDecommissionStatusResponse = Record +export type DecommissionStatus = 'INIT' | 'DRAINING' | 'IN_PROGRESS' | 'SUCCESSFUL' | 'FAILED' diff --git a/api/_types/cluster.pending_tasks.d.ts b/api/_types/cluster.pending_tasks.d.ts index bb4bf6337..3fa6203a6 100644 --- a/api/_types/cluster.pending_tasks.d.ts +++ b/api/_types/cluster.pending_tasks.d.ts @@ -21,6 +21,8 @@ export type PendingTask = { insert_order: number; priority: string; source: string; + time_in_execution?: Common.Duration; + time_in_execution_millis?: Common.DurationValueUnitMillis; time_in_queue?: Common.Duration; time_in_queue_millis: Common.DurationValueUnitMillis; } diff --git a/api/_types/cluster.weighted_routing.d.ts b/api/_types/cluster.weighted_routing.d.ts index 5aa3f0263..b93884c9f 100644 --- a/api/_types/cluster.weighted_routing.d.ts +++ b/api/_types/cluster.weighted_routing.d.ts @@ -16,15 +16,8 @@ import * as Common from './_common' -export type Weights = WeightsBase & { - weights?: Record; -} - export type WeightsBase = { _version?: Common.VersionNumber; -} - -export type WeightsResponse = Weights & { - discovered_cluster_manager?: boolean; + weights?: Record; } diff --git a/api/_types/flow_framework.common.d.ts b/api/_types/flow_framework.common.d.ts index 529fdcaec..7486e90ac 100644 --- a/api/_types/flow_framework.common.d.ts +++ b/api/_types/flow_framework.common.d.ts @@ -80,7 +80,7 @@ export type SearchStateResponse = { provision_end_time?: Common.DateTime; provision_start_time?: Common.DateTime; provisioning_progress?: string; - resources_created?: ResourcesCreated; + resources_created?: ResourcesCreated | ResourcesCreated[]; state?: string; user?: user; workflow_id?: string; @@ -159,6 +159,8 @@ export type WorkflowSearchStateResponse = { took?: number; } +export type WorkFlowState = 'COMPLETED' | 'FAILED' | 'NOT_STARTED' | 'PROVISIONING' + export type WorkFlowStatusDefaultResponse = { error?: string; resources_created?: string[]; @@ -172,7 +174,7 @@ export type WorkFlowStatusFullResponse = { provision_start_time?: string; provisioning_progress?: string; resources_created?: string[]; - state?: 'COMPLETED' | 'FAILED' | 'NOT_STARTED' | 'PROVISIONING'; + state?: WorkFlowState; user?: user; user_outputs?: string[]; workflow_id?: string; diff --git a/api/_types/geospatial._common.d.ts b/api/_types/geospatial._common.d.ts new file mode 100644 index 000000000..08209cce2 --- /dev/null +++ b/api/_types/geospatial._common.d.ts @@ -0,0 +1,153 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type Database = { + fields?: string[]; + provider?: string; + sha256_hash?: string; + updated_at_in_epoch_millis?: Common.EpochTimeUnitMillis; + valid_for_in_days?: number; +} + +export type DataSource = { + database: Database; + endpoint: string; + name: Common.Name; + next_update_at_in_epoch_millis: Common.EpochTimeUnitMillis; + state: DataSourceState; + update_interval_in_days: number; + update_stats: UpdateStats; +} + +export type DataSourceState = 'AVAILABLE' | 'CREATE_FAILED' | 'CREATING' | 'DELETING' + +export type Envelope = PointCoordinates[] + +export type GeoJSONData = { + geometry: Geometry; + properties?: Record; + type: GeoJSONDataType; +} + +export type GeoJSONDataType = 'Feature' | 'FeatureCollection' + +export type GeoJSONRequest = { + data: GeoJSONData[]; + field?: string; + index: Common.IndexName; + type: GeospatialFieldType; +} + +export type Geometry = GeoShapes | GeometryCollection + +export type GeometryCollection = { + geometries: Geometry[]; + type: 'GeometryCollection'; +} + +export type GeoShapes = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | Envelope + +export type GeospatialFieldType = 'geo_point' | 'geo_shape' + +export type GeoSpatialGeojsonUploadResponse = { + errors: boolean; + failure: number; + success: number; + took: Common.DurationValueUnitMillis; + total: number; +} + +export type GeoSpatialUploadStats = { + metrics: UploadStatsMetric[]; + total: UploadStatsTotal; +} + +export type GetDataSourceResponse = { + datasources: DataSource[]; +} + +export type LineString = { + coordinates: LineStringCoordinates; + type: 'LineString'; +} + +export type LineStringCoordinates = PointCoordinates[] + +export type MultiLineString = { + coordinates: MultiLineStringCoordinates; + type: 'MultiLineString'; +} + +export type MultiLineStringCoordinates = LineStringCoordinates[] + +export type MultiPoint = { + coordinates: MultiPointCoordinates; + type: 'MultiPoint'; +} + +export type MultiPointCoordinates = PointCoordinates[] + +export type MultiPolygon = { + coordinates: MultiPolygonCoordinates; + type: 'MultiPolygon'; +} + +export type MultiPolygonCoordinates = PolygonCoordinates[] + +export type Point = { + coordinates: PointCoordinates; + type: 'Point'; +} + +export type PointCoordinates = number[] + +export type Polygon = { + coordinates: PolygonCoordinates; + type: 'Polygon'; +} + +export type PolygonCoordinates = PointCoordinates[][] + +export type PutIP2GeoDataSourceRequest = { + endpoint?: string; + update_interval_in_days?: number; +} + +export type UpdateStats = { + last_processing_time_in_millis?: Common.EpochTimeUnitMillis; + last_succeeded_at_in_epoch_millis?: Common.EpochTimeUnitMillis; +} + +export type UploadStatsMetric = { + duration: Common.DurationValueUnitMillis; + failed: number; + id: Common.Id; + node_id: Common.NodeId; + success: number; + type: string; + upload: number; +} + +export type UploadStatsTotal = { + duration: Common.DurationValueUnitMillis; + failed: number; + request_count: number; + success: number; + upload: number; +} + diff --git a/api/_types/index.d.ts b/api/_types/index.d.ts index 9d26691d2..e2b246d24 100644 --- a/api/_types/index.d.ts +++ b/api/_types/index.d.ts @@ -74,6 +74,7 @@ import * as Cluster_WeightedRouting from './cluster.weighted_routing' import * as DanglingIndices_ListDanglingIndices from './dangling_indices.list_dangling_indices' import * as FlowFramework_Common from './flow_framework.common' import * as FlowFramework_Errors from './flow_framework.errors' +import * as Geospatial_Common from './geospatial._common' import * as Indices_Common from './indices._common' import * as Indices_AddBlock from './indices.add_block' import * as Indices_Analyze from './indices.analyze' @@ -94,11 +95,13 @@ import * as Indices_UpdateAliases from './indices.update_aliases' import * as Indices_ValidateQuery from './indices.validate_query' import * as Ingest_Common from './ingest._common' import * as Ingest_Simulate from './ingest.simulate' +import * as Ingestion_Common from './ingestion._common' import * as Insights_Common from './insights._common' import * as Ism_Common from './ism._common' import * as Knn_Common from './knn._common' import * as Ltr_Common from './ltr._common' import * as Ml_Common from './ml._common' +import * as Neural_Common from './neural._common' import * as Nodes_Common from './nodes._common' import * as Nodes_Info from './nodes.info' import * as Nodes_ReloadSecureSettings from './nodes.reload_secure_settings' @@ -111,6 +114,9 @@ import * as RemoteStore_Common from './remote_store._common' import * as Replication_Common from './replication._common' import * as Rollups_Common from './rollups._common' import * as SearchPipeline_Common from './search_pipeline._common' +import * as SearchRelevance_Common from './search_relevance._common' +import * as SecurityAnalytics_Alerts from './security_analytics.alerts' +import * as SecurityAnalytics_Findings from './security_analytics.findings' import * as Security_Common from './security._common' import * as Sm_Common from './sm._common' import * as Snapshot_Common from './snapshot._common' @@ -184,6 +190,7 @@ export { DanglingIndices_ListDanglingIndices, FlowFramework_Common, FlowFramework_Errors, + Geospatial_Common, Indices_Common, Indices_AddBlock, Indices_Analyze, @@ -204,11 +211,13 @@ export { Indices_ValidateQuery, Ingest_Common, Ingest_Simulate, + Ingestion_Common, Insights_Common, Ism_Common, Knn_Common, Ltr_Common, Ml_Common, + Neural_Common, Nodes_Common, Nodes_Info, Nodes_ReloadSecureSettings, @@ -221,6 +230,9 @@ export { Replication_Common, Rollups_Common, SearchPipeline_Common, + SearchRelevance_Common, + SecurityAnalytics_Alerts, + SecurityAnalytics_Findings, Security_Common, Sm_Common, Snapshot_Common, diff --git a/api/_types/indices._common.d.ts b/api/_types/indices._common.d.ts index c6430cf55..9c146a3ff 100644 --- a/api/_types/indices._common.d.ts +++ b/api/_types/indices._common.d.ts @@ -18,6 +18,7 @@ import * as Common from './_common' import * as Common_Analysis from './_common.analysis' import * as Common_Mapping from './_common.mapping' import * as Common_QueryDsl from './_common.query_dsl' +import * as Ingestion_Common from './ingestion._common' export type Alias = { filter?: Common_QueryDsl.QueryContainer; @@ -37,6 +38,8 @@ export type AliasDefinition = { search_routing?: string; } +export type BuiltinStorageType = 'fs' | 'hybridfs' | 'mmapfs' | 'niofs' + export type DataStream = { _meta?: Common.Metadata; allow_custom_routing?: boolean; @@ -82,22 +85,6 @@ export type FielddataFrequencyFilter = { export type IndexCheckOnStartup = 'checksum' | 'false' | 'true' -export type IndexError = { - error?: IndexErrorCause; - status?: number; -} - -export type IndexErrorCause = { - index?: Common.IndexName; - index_uuid?: Common.Uuid; - reason?: string; - 'resource.id'?: Common.IndexName; - 'resource.type'?: Common.ResourceType; - root_cause?: IndexErrorCause[]; - type: string; - [key: string]: any | Record; -} - export type IndexGetUpgradeStatus = { indices?: Record; size_in_bytes?: Common.ByteCount; @@ -171,6 +158,7 @@ export type IndexSettingBlocks = { read?: Common.StringifiedBoolean; read_only?: Common.StringifiedBoolean; read_only_allow_delete?: Common.StringifiedBoolean; + search_only?: Common.StringifiedBoolean; write?: Common.StringifiedBoolean; } @@ -192,7 +180,7 @@ export type IndexSettings = { creation_date_string?: Common.DateTime; default_pipeline?: Common.PipelineName; final_pipeline?: Common.PipelineName; - format?: string | number; + format?: Common.StringifiedInteger; gc_deletes?: Common.Duration; hidden?: Common.StringifiedBoolean; highlight?: IndexSettingsHighlight; @@ -200,6 +188,7 @@ export type IndexSettings = { index?: IndexSettings; indexing?: IndexSettingsIndexing; indexing_pressure?: IndexingPressure; + ingestion_source?: IngestionSource; knn?: Common.StringifiedBoolean; 'knn.algo_param.ef_search'?: Common.StringifiedInteger; lifecycle?: IndexSettingsLifecycle; @@ -223,12 +212,13 @@ export type IndexSettings = { number_of_replicas?: Common.StringifiedInteger; number_of_routing_shards?: Common.StringifiedInteger; number_of_shards?: Common.StringifiedInteger; - priority?: number | string; + priority?: Common.StringifiedInteger; provided_name?: Common.Name; queries?: IndexSettingsQueries; query_string?: IndexSettingsQueryString; 'query_string.lenient'?: Common.StringifiedBoolean; refresh_interval?: Common.Duration; + 'replication.type'?: ReplicationType; routing?: IndexRouting; routing_partition_size?: Common.StringifiedInteger; routing_path?: Common.StringOrStringArray; @@ -379,6 +369,7 @@ export type IndexSettingsSearch = { default_pipeline?: string; idle?: SearchIdle; slowlog?: SearchSlowlog; + star_tree_index?: IndexSettingsSearchStarTreeIndex; throttled?: Common.StringifiedBoolean; } @@ -391,6 +382,10 @@ export type IndexSettingsSearchConcurrentSegmentSearch = { mode?: string; } +export type IndexSettingsSearchStarTreeIndex = { + enabled?: Common.StringifiedBoolean; +} + export type IndexSettingsSimilarity = { bm25?: IndexSettingsSimilarityBm25; dfi?: IndexSettingsSimilarityDfi; @@ -528,6 +523,38 @@ export type IndexVersioning = { created_string?: string; } +export type IngestionSource = { + error_strategy?: Ingestion_Common.ErrorPolicy; + internal_queue_size?: Common.StringifiedInteger; + num_processor_threads?: Common.StringifiedInteger; + param?: Record; + pointer?: IngestionSourcePointer; + 'pointer.init.reset'?: IngestionSourcePointerInitReset; + 'pointer.init.reset.value'?: string; + poll?: IngestionSourcePoll; + 'poll.max_batch_size'?: Common.StringifiedLong; + 'poll.timeout'?: Common.StringifiedInteger; + type?: IngestionSourceType; +} + +export type IngestionSourcePointer = { + init?: IngestionSourcePointerInit; +} + +export type IngestionSourcePointerInit = { + reset?: IngestionSourcePointerInitReset; + 'reset.value'?: string; +} + +export type IngestionSourcePointerInitReset = 'EARLIEST' | 'LATEST' | 'NONE' | 'RESET_BY_OFFSET' | 'RESET_BY_TIMESTAMP' | 'earliest' | 'latest' | 'none' | 'reset_by_offset' | 'reset_by_timestamp' + +export type IngestionSourcePoll = { + max_batch_size?: Common.StringifiedLong; + timeout?: Common.StringifiedInteger; +} + +export type IngestionSourceType = 'file' | 'kafka' | 'kinesis' | 'none' + export type ManagedBy = 'Data stream lifecycle' | 'Index Lifecycle Management' | 'Unmanaged' export type NumericFielddata = { @@ -536,6 +563,8 @@ export type NumericFielddata = { export type NumericFielddataFormat = 'array' | 'disabled' +export type ReplicationType = 'DOCUMENT' | 'SEGMENT' + export type RetentionLease = { period: Common.Duration; } @@ -578,7 +607,7 @@ export type SoftDeletesRetention = { operations?: Common.StringifiedLong; } -export type StorageType = 'fs' | 'hybridfs' | 'mmapfs' | 'niofs' | string +export type StorageType = BuiltinStorageType | string export type TemplateMapping = { aliases: Record; diff --git a/api/_types/ingestion._common.d.ts b/api/_types/ingestion._common.d.ts new file mode 100644 index 000000000..2623b47d9 --- /dev/null +++ b/api/_types/ingestion._common.d.ts @@ -0,0 +1,68 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type ErrorPolicy = 'BLOCK' | 'DROP' + +export type GetIngestionStateResponse = { + _shards?: Common.ShardStatistics; + ingestion_state?: Record; + next_page_token?: string; +} + +export type IngestionStateShardFailure = { + error: string; + shard: number; +} + +export type PauseIngestionResponse = { + acknowledged: boolean; + error?: string; + failures?: IngestionStateShardFailure[]; + shards_acknowledged: boolean; +} + +export type PollerState = 'CLOSED' | 'NONE' | 'PAUSED' | 'POLLING' | 'PROCESSING' + +export type ResetMode = 'OFFSET' | 'TIMESTAMP' + +export type ResetSettings = { + mode: ResetMode; + shard: number; + value: string; +} + +export type ResumeIngestionRequest = { + reset_settings?: ResetSettings[]; +} + +export type ResumeIngestionResponse = { + acknowledged: boolean; + error?: string; + failures?: IngestionStateShardFailure[]; + shards_acknowledged: boolean; +} + +export type ShardIngestionState = { + batch_start_pointer?: string; + error_policy?: ErrorPolicy; + poller_paused?: boolean; + poller_state?: PollerState; + shard?: number; + write_block_enabled?: boolean; +} + diff --git a/api/_types/insights._common.d.ts b/api/_types/insights._common.d.ts index 067fb1645..39202f57e 100644 --- a/api/_types/insights._common.d.ts +++ b/api/_types/insights._common.d.ts @@ -32,6 +32,8 @@ export type Measurements = { memory?: Measurement; } +export type MetricType = 'cpu' | 'latency' | 'memory' + export type Source = { _source?: Core_Search.SourceConfig; aggregations?: Record; diff --git a/api/_types/knn._common.d.ts b/api/_types/knn._common.d.ts index c13231dd8..843f89482 100644 --- a/api/_types/knn._common.d.ts +++ b/api/_types/knn._common.d.ts @@ -15,12 +15,15 @@ */ import * as Common from './_common' +import * as Nodes_Common from './nodes._common' export type DeletedModel = { model_id: string; - result: 'deleted' | 'error'; + result: DeletionResult; } +export type DeletionResult = 'deleted' | 'error' + export type GraphMergeStats = { current?: number; current_docs?: number; @@ -48,13 +51,15 @@ export type KnnMethod = { space_type?: string; } +export type KnnStatName = 'cache_capacity_reached' | 'circuit_breaker_triggered' | 'eviction_count' | 'faiss_initialized' | 'graph_index_errors' | 'graph_index_requests' | 'graph_memory_usage' | 'graph_memory_usage_percentage' | 'graph_query_errors' | 'graph_query_requests' | 'graph_stats' | 'hit_count' | 'indexing_from_model_degraded' | 'indices_in_cache' | 'knn_query_requests' | 'knn_query_with_filter_requests' | 'load_exception_count' | 'load_success_count' | 'lucene_initialized' | 'max_distance_query_requests' | 'max_distance_query_with_filter_requests' | 'min_score_query_requests' | 'min_score_query_with_filter_requests' | 'miss_count' | 'model_index_status' | 'nmslib_initialized' | 'script_compilation_errors' | 'script_compilations' | 'script_query_errors' | 'script_query_requests' | 'total_load_time' | 'training_errors' | 'training_memory_usage' | 'training_memory_usage_percentage' | 'training_requests' + export type NodeStats = { cache_capacity_reached?: boolean; eviction_count?: number; faiss_initialized?: boolean; graph_index_errors?: number; graph_index_requests?: number; - graph_memory_usage?: number; + graph_memory_usage?: Common.ByteCount; graph_memory_usage_percentage?: Common.PercentageNumber; graph_query_errors?: number; graph_query_requests?: number; @@ -73,19 +78,53 @@ export type NodeStats = { min_score_query_with_filter_requests?: number; miss_count?: number; nmslib_initialized?: boolean; + remote_vector_index_build_stats?: RemoteVectorIndexBuildStats; script_compilation_errors?: number; script_compilations?: number; script_query_errors?: number; script_query_requests?: number; - total_load_time?: number; + total_load_time?: Common.DurationValueUnitNanos; training_errors?: number; - training_memory_usage?: number; + training_memory_usage?: Common.ByteCount; training_memory_usage_percentage?: Common.PercentageNumber; training_requests?: number; } -export type Stats = { - _nodes?: Common.NodeStatistics; +export type RemoteVectorIndexBuildStats = { + build_stats?: RemoteVectorIndexBuildStatsDetails; + client_stats?: RemoteVectorIndexClientStats; + repository_stats?: RemoteVectorIndexRepositoryStats; +} + +export type RemoteVectorIndexBuildStatsDetails = { + remote_index_build_current_flush_operations?: number; + remote_index_build_current_flush_size?: Common.ByteCount; + remote_index_build_current_merge_operations?: number; + remote_index_build_current_merge_size?: Common.ByteCount; + remote_index_build_flush_time_in_millis?: Common.DurationValueUnitMillis; + remote_index_build_merge_time_in_millis?: Common.DurationValueUnitMillis; +} + +export type RemoteVectorIndexClientStats = { + build_request_failure_count?: number; + build_request_success_count?: number; + index_build_failure_count?: number; + index_build_success_count?: number; + status_request_failure_count?: number; + status_request_success_count?: number; + waiting_time_in_ms?: Common.DurationValueUnitMillis; +} + +export type RemoteVectorIndexRepositoryStats = { + read_failure_count?: number; + read_success_count?: number; + successful_read_time_in_millis?: Common.DurationValueUnitMillis; + successful_write_time_in_millis?: Common.DurationValueUnitMillis; + write_failure_count?: number; + write_success_count?: number; +} + +export type Stats = Nodes_Common.NodesResponseBase & { circuit_breaker_triggered?: boolean; cluster_name?: Common.Name; model_index_status?: Common.HealthStatus | undefined; diff --git a/api/_types/ltr._common.d.ts b/api/_types/ltr._common.d.ts index 648916895..d5d1e179f 100644 --- a/api/_types/ltr._common.d.ts +++ b/api/_types/ltr._common.d.ts @@ -15,6 +15,25 @@ */ import * as Common from './_common' +import * as Nodes_Common from './nodes._common' + +export type AcknowledgedResponse = { + acknowledged?: boolean; + index?: string; + shards_acknowledged?: boolean; +} + +export type CacheAllStats = { + features?: CacheItemStats; + featuresets?: CacheItemStats; + models?: CacheItemStats; + total?: CacheItemStats; +} + +export type CacheItemStats = { + count?: number; + ram?: number; +} export type CacheStat = { entry_count?: number; @@ -30,20 +49,63 @@ export type CacheStats = { model?: CacheStat; } +export type CacheStatsResponse = { + _nodes?: Common.NodeStatistics; + all?: CacheAllStats; + cluster_name?: Common.Name; + nodes?: Record; + stores?: Record; +} + +export type ListStoresResponse = { + stores: Record; +} + +export type LtrStatName = 'cache' | 'request_error_count' | 'request_total_count' | 'status' | 'stores' + +export type NodeDetails = { + hostname?: string; + name?: string; + stats?: NodeStatsDetails; +} + export type NodeStats = { cache?: CacheStats; request_error_count?: number; request_total_count?: number; } -export type Stats = { - _nodes?: Common.NodeStatistics; +export type NodeStatsDetails = { + features?: CacheItemStats; + featuresets?: CacheItemStats; + models?: CacheItemStats; + total?: CacheItemStats; +} + +export type NotFoundResponse = { + _id?: string; + _index?: string; + found?: boolean; +} + +export type Stats = Nodes_Common.NodesResponseBase & { cluster_name?: Common.Name; nodes?: Record; status?: string; stores?: StoreStats; } +export type StoreDetails = { + counts?: Record; + index?: string; + store?: string; + version?: number; +} + +export type StoreExistsResponse = { + exists?: boolean; +} + export type StoreStat = { feature_count?: number; featureset_count?: number; diff --git a/api/_types/ml._common.d.ts b/api/_types/ml._common.d.ts index 7109de8e1..65458c137 100644 --- a/api/_types/ml._common.d.ts +++ b/api/_types/ml._common.d.ts @@ -16,6 +16,7 @@ import * as Common from './_common' import * as Common_Analysis from './_common.analysis' +import * as Common_QueryDsl from './_common.query_dsl' export type Action = { action_type?: string; @@ -27,8 +28,14 @@ export type Action = { url?: string; } +export type AdditionalConfig = { + space_type?: string; +} + export type AdditionalInfo = Record +export type AgentType = 'conversational' | 'conversational_flow' | 'flow' + export type Aggregation = { field?: string; max?: Aggregation; @@ -36,10 +43,6 @@ export type Aggregation = { [key: string]: any; } -export type Algorithm = { - value?: FunctionName; -} - export type AlgorithmOperations = { deploy?: ModelStats; execute?: ModelStats; @@ -52,13 +55,6 @@ export type AlgorithmOperations = { export type Algorithms = Record -export type BoolQuery = { - filter?: Filter[]; - must?: Filter[]; - must_not?: Filter; - should?: Filter[]; -} - export type Buckets = { end_time?: number; entities?: Entity[]; @@ -68,9 +64,11 @@ export type Buckets = { export type ByteBuffer = { array?: string; - order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN'; + order?: ByteOrder; } +export type ByteOrder = 'BIG_ENDIAN' | 'LITTLE_ENDIAN' + export type ClientConfig = { connection_timeout?: number; max_connection?: number; @@ -82,10 +80,14 @@ export type ClientConfig = { } export type ColumnMeta = { - column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING'; + column_type?: ColumnType; name?: Common.Name; } +export type ColumnType = 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING' + +export type ConnectorProtocol = 'aws_sigv4' | 'http' + export type Credential = { access_key?: string; secret_key?: string; @@ -113,20 +115,7 @@ export type ExecuteLocalSampleCalculatorResponse = { result?: number; } -export type Exists = { - field?: Common.Field; -} - -export type Filter = { - exists?: Exists; - match?: Match; - nested?: Nested; - range?: Range; - term?: Term; - terms?: Term; -} - -export type FunctionName = 'AD_LIBSVM' | 'AGENT' | 'ANOMALY_LOCALIZATION' | 'BATCH_RCF' | 'CONNECTOR' | 'FIT_RCF' | 'KMEANS' | 'LINEAR_REGRESSION' | 'LOCAL_SAMPLE_CALCULATOR' | 'LOGISTIC_REGRESSION' | 'METRICS_CORRELATION' | 'QUESTION_ANSWERING' | 'RCF_SUMMARIZE' | 'REMOTE' | 'SAMPLE_ALGO' | 'SPARSE_ENCODING' | 'SPARSE_TOKENIZE' | 'TEXT_EMBEDDING' | 'TEXT_SIMILARITY' +export type FunctionName = 'AD_LIBSVM' | 'ad_libsvm' | 'AGENT' | 'agent' | 'ANOMALY_LOCALIZATION' | 'anomaly_localization' | 'BATCH_RCF' | 'batch_rcf' | 'CONNECTOR' | 'connector' | 'FIT_RCF' | 'fit_rcf' | 'KMEANS' | 'kmeans' | 'LINEAR_REGRESSION' | 'linear_regression' | 'LOCAL_SAMPLE_CALCULATOR' | 'local_sample_calculator' | 'LOGISTIC_REGRESSION' | 'logistic_regression' | 'METRICS_CORRELATION' | 'metrics_correlation' | 'QUESTION_ANSWERING' | 'question_answering' | 'RCF_SUMMARIZE' | 'rcf_summarize' | 'REMOTE' | 'remote' | 'SAMPLE_ALGO' | 'sample_algo' | 'SPARSE_ENCODING' | 'sparse_encoding' | 'SPARSE_TOKENIZE' | 'sparse_tokenize' | 'TEXT_EMBEDDING' | 'text_embedding' | 'TEXT_SIMILARITY' | 'text_similarity' export type GetAgentResponse = { created_time?: number; @@ -135,7 +124,7 @@ export type GetAgentResponse = { last_updated_time?: number; name?: Common.Name; tools?: ToolItems[]; - type?: 'conversational' | 'conversational_flow' | 'flow'; + type?: AgentType; } export type GetConnectorResponse = { @@ -145,7 +134,7 @@ export type GetConnectorResponse = { last_updated_time?: number; name?: Common.Name; parameters?: Parameters; - protocol?: 'aws_sigv4' | 'http'; + protocol?: ConnectorProtocol; version?: Common.VersionString; } @@ -154,13 +143,13 @@ export type GetProfileResponse = { } export type GetStatsResponse = { - ml_config_index_status?: 'green' | 'non-existent' | 'red' | 'yellow'; + ml_config_index_status?: MlIndexStatus; ml_connector_count?: number; - ml_connector_index_status?: 'green' | 'non-existent' | 'red' | 'yellow'; - ml_controller_index_status?: 'green' | 'non-existent' | 'red' | 'yellow'; + ml_connector_index_status?: MlIndexStatus; + ml_controller_index_status?: MlIndexStatus; ml_model_count?: number; - ml_model_index_status?: 'green' | 'non-existent' | 'red' | 'yellow'; - ml_task_index_status?: 'green' | 'non-existent' | 'red' | 'yellow'; + ml_model_index_status?: MlIndexStatus; + ml_task_index_status?: MlIndexStatus; nodes?: NodeStats; } @@ -174,7 +163,7 @@ export type Guardrails = { response_validation_regex?: string; source_fields?: Common.Fields; stop_words?: Common_Analysis.StopWords; - type?: 'local_regex' | 'model'; + type?: GuardrailsType; } export type GuardrailsInputOutput = { @@ -182,6 +171,8 @@ export type GuardrailsInputOutput = { response_validation_regex?: string; } +export type GuardrailsType = 'local_regex' | 'model' + export type Headers = { content_type?: string; [key: string]: any; @@ -198,28 +189,18 @@ export type InferenceResults = { export type InputQuery = { _source?: string[]; - query?: Query; + query?: Common_QueryDsl.QueryContainer; size?: number; } -export type Key = { - gt?: number; - gte?: number; - lt?: number; - lte?: number; -} +export type KMeansDistanceType = 'COSINE' | 'EUCLIDEAN' | 'L1' export type LLM = { model_id?: string; parameters?: Parameters; } -export type Match = { - description?: string; - [key: string]: any; -} - -export type MatchAllQuery = Record +export type LocalSampleCalculatorOperation = 'max' | 'min' | 'sum' export type Memory = { additional_info?: AdditionalInfo; @@ -244,6 +225,16 @@ export type Message = { trace_number?: number; } +export type MlIndexStatus = 'green' | 'non-existent' | 'red' | 'yellow' + +export type MlInputDataType = 'DATA_FRAME' | 'QUESTION_ANSWERING' | 'REMOTE' | 'SEARCH_QUERY' | 'TEXT_DOCS' | 'TEXT_SIMILARITY' + +export type MlResultDataType = 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN' + +export type MlStatName = 'ml_config_index_status' | 'ml_connector_count' | 'ml_connector_index_status' | 'ml_controller_index_status' | 'ml_model_count' | 'ml_model_index_status' | 'ml_task_index_status' + +export type MlTaskType = 'BATCH_INGEST' | 'BATCH_PREDICTION' | 'DEPLOY_MODEL' | 'EXECUTION' | 'PREDICTION' | 'REGISTER_MODEL' | 'TRAINING' | 'TRAINING_AND_PREDICTION' + export type Model = { algorithm?: string; created_time?: number; @@ -255,13 +246,14 @@ export type Model = { model_content_size_in_bytes?: number; model_format?: ModelFormat; model_group_id?: string; - model_state: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED'; + model_state: ModelState; model_version?: string; name?: string; total_chunks?: number; } export type ModelConfig = { + additional_config?: AdditionalConfig; all_config?: string; embedding_dimension?: number; framework_type?: string; @@ -271,7 +263,7 @@ export type ModelConfig = { export type ModelFormat = 'ONNX' | 'TORCH_SCRIPT' export type ModelGroup = { - access: 'private' | 'public' | 'restricted'; + access: ModelGroupAccessMode; created_time?: number; description: string; last_updated_time?: number; @@ -280,6 +272,8 @@ export type ModelGroup = { owner?: Owner; } +export type ModelGroupAccessMode = 'private' | 'public' | 'restricted' + export type ModelGroupRegistration = { model_group_id: string; status: string; @@ -290,7 +284,7 @@ export type ModelProfile = { execute?: ModelStats; memory_size_estimation_cpu?: number; memory_size_estimation_gpu?: number; - model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED'; + model_state?: ModelState; predict?: ModelStats; predict_request_stats?: PredictRequestStats; predictor?: string; @@ -304,20 +298,14 @@ export type ModelProfile = { export type Models = Record +export type ModelState = 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED' + export type ModelStats = { ml_action_failure_count?: number; ml_action_request_count?: number; ml_executing_task_count?: number; } -export type Nested = { - boost?: number; - ignore_unmapped?: boolean; - path?: Common.Field; - query?: Query; - score_mode?: 'avg' | 'max' | 'min' | 'none' | 'sum'; -} - export type Node = { models?: Models; tasks?: Tasks; @@ -341,7 +329,7 @@ export type NodeStatsDetails = { export type Output = { byte_buffer?: ByteBuffer; data: number[]; - data_type?: 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN'; + data_type?: MlResultDataType; name?: string; result?: string; shape?: number[]; @@ -355,11 +343,6 @@ export type Owner = { user_requested_tenant?: undefined | string; } -export type OwnerNameKeyword = { - boost?: number; - value?: Common.FieldValue; -} - export type Parameters = Record export type PredictionResult = { @@ -370,7 +353,7 @@ export type PredictionResult = { export type PredictModelOutput = { byte_buffer?: ByteBuffer; data: number[]; - data_type?: 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN'; + data_type?: MlResultDataType; name?: string; shape?: number[]; } @@ -407,25 +390,13 @@ export type ProfileRequest = { task_ids?: Common.Id[]; } -export type Query = { - bool?: BoolQuery; - match?: Match; - match_all?: MatchAllQuery; - term?: Term; - [key: string]: any; -} - -export type Range = { - k1?: Key; - k2?: Key; - k3?: Key; -} - export type RateLimiter = { limit: Common.StringifiedDouble; - unit: 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS'; + unit: RateLimiterUnit; } +export type RateLimiterUnit = 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS' + export type Result = { buckets?: Buckets[]; } @@ -473,75 +444,8 @@ export type SearchResponse = { export type SearchTasksResponse = SearchResponse -export type Sort = { - _id?: SortOrder; - _index?: SortOrder; - _score?: SortOrder; - _seq_no?: SortOrder; - algorithm?: SortOrder; - auto_redeploy_retry_times?: SortOrder; - chunk_number?: SortOrder; - created_time?: SortOrder; - current_worker_node_count?: SortOrder; - deploy_to_all_nodes?: SortOrder; - is_hidden?: SortOrder; - last_registered_time?: SortOrder; - last_updated_time?: SortOrder; - model_content_hash_value?: SortOrder; - model_content_size_in_bytes?: SortOrder; - model_format?: SortOrder; - model_group_id?: SortOrder; - model_state?: SortOrder; - model_version?: SortOrder; - planning_worker_node_count?: SortOrder; - planning_worker_nodes?: SortOrder; - total_chunks?: SortOrder; -} - -export type SortAgent = { - _id?: SortOrder; - _index?: SortOrder; - _score?: SortOrder; - _seq_no?: SortOrder; - created_time?: SortOrder; - is_hidden?: SortOrder; - last_updated_time?: SortOrder; - parameters?: SortOrder; - tools?: SortOrder; - type?: SortOrder; -} - -export type SortMemory = { - _id?: SortOrder; - _index?: SortOrder; - _score?: SortOrder; - _seq_no?: SortOrder; - additional_info?: SortOrder; - application_time?: SortOrder; - create_time?: SortOrder; - updated_time?: SortOrder; - user?: SortOrder; -} - -export type SortMessage = { - _id?: SortOrder; - _index?: SortOrder; - _score?: SortOrder; - _seq_no?: SortOrder; - additional_info?: SortOrder; - create_time?: SortOrder; - memory_id?: SortOrder; - origin?: SortOrder; - parent_message_id?: SortOrder; - trace_number?: SortOrder; -} - -export type SortOrder = { - order?: 'asc' | 'desc'; -} - export type Source = { - access?: 'private' | 'public' | 'restricted'; + access?: ModelGroupAccessMode; actions?: Action[]; additional_info?: AdditionalInfo; algorithm?: string; @@ -559,7 +463,7 @@ export type Source = { error?: string; function_name?: FunctionName; input?: undefined | string; - input_type?: 'DATA_FRAME' | 'QUESTION_ANSWERING' | 'REMOTE' | 'SEARCH_QUERY' | 'TEXT_DOCS' | 'TEXT_SIMILARITY'; + input_type?: MlInputDataType; is_async?: boolean; is_hidden?: boolean; last_deployed_time?: number; @@ -575,7 +479,7 @@ export type Source = { model_format?: ModelFormat; model_group_id?: string; model_id?: Common.Name; - model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED'; + model_state?: ModelState; model_task_type?: string; model_version?: string; name?: Common.Name; @@ -586,14 +490,14 @@ export type Source = { planning_worker_node_count?: number; planning_worker_nodes?: Common.NodeIds[]; prompt_template?: undefined | string; - protocol?: 'aws_sigv4' | 'http'; + protocol?: ConnectorProtocol; response?: undefined | string; state?: Status; - task_type?: 'BATCH_INGEST' | 'BATCH_PREDICTION' | 'DEPLOY_MODEL' | 'EXECUTION' | 'PREDICTION' | 'REGISTER_MODEL' | 'TRAINING' | 'TRAINING_AND_PREDICTION'; + task_type?: MlTaskType; tools?: ToolItems[]; total_chunks?: number; trace_number?: undefined | string; - type?: 'conversational' | 'conversational_flow' | 'flow'; + type?: AgentType; updated_time?: string; url?: string; user?: string; @@ -610,32 +514,33 @@ export type Task = { is_async?: boolean; last_update_time?: number; model_id?: string; - state: 'CANCELLED' | 'CANCELLING' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'EXPIRED' | 'FAILED' | 'RUNNING'; + state: TaskState; task_id?: string; - task_type?: 'BATCH_INGEST' | 'BATCH_PREDICTION' | 'DEPLOY_MODEL' | 'EXECUTION' | 'PREDICTION' | 'REGISTER_MODEL' | 'TRAINING' | 'TRAINING_AND_PREDICTION'; + task_type?: MlTaskType; worker_node?: Common.NodeIds[]; } export type Tasks = Record -export type Term = { - _id?: Common.Id[]; - algorithm?: Algorithm; - function_name?: FunctionName; - model_id?: Common.Name; - name?: OwnerNameKeyword; - 'owner.name.keyword'?: OwnerNameKeyword; - type?: Type; -} +export type TaskState = 'CANCELLED' | 'CANCELLING' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'EXPIRED' | 'FAILED' | 'RUNNING' export type Tool = { + attributes?: ToolAttributes; description?: string; name?: Common.Name; type?: string; version?: Common.VersionString; } +export type ToolAttributes = { + input_schema?: string; + strict?: boolean; + [key: string]: any | Record; +} + export type ToolItems = { + attributes?: ToolAttributes; + description?: string; include_output_in_agent_response?: boolean; name?: string; parameters?: Parameters; @@ -643,9 +548,11 @@ export type ToolItems = { [key: string]: any; } +export type ToolName = 'AgentTool' | 'CatIndexTool' | 'ConnectorTool' | 'CreateAnomalyDetectorTool' | 'IndexMappingTool' | 'ListIndexTool' | 'LogPatternTool' | 'MLModelTool' | 'NeuralSparseSearchTool' | 'PPLTool' | 'RAGTool' | 'SearchAlertsTool' | 'SearchAnomalyDetectorsTool' | 'SearchAnomalyResultsTool' | 'SearchIndexTool' | 'SearchMonitorsTool' | 'VectorDBTool' | 'VisualizationTool' + export type TrainParameters = { centroids?: number; - distance_type?: 'COSINE' | 'EUCLIDEAN' | 'L1'; + distance_type?: KMeansDistanceType; iterations?: number; } @@ -659,10 +566,6 @@ export type TrainResponse = { status: Status; } -export type Type = { - value?: 'conversational' | 'conversational_flow' | 'flow'; -} - export type UndeployModelNode = { stats?: UndeployModelNodeStats; } @@ -684,7 +587,7 @@ export type UpdateModelGroupResponse = { } export type Values = { - column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING'; + column_type?: ColumnType; value?: number; } diff --git a/api/_types/neural._common.d.ts b/api/_types/neural._common.d.ts new file mode 100644 index 000000000..97a442e7a --- /dev/null +++ b/api/_types/neural._common.d.ts @@ -0,0 +1,229 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Nodes_Common from './nodes._common' + +export type FlatNeuralInfoStats = { + cluster_version?: InfoStringStat; + 'processors.ingest.skip_existing_processors'?: InfoCounterStat; + 'processors.ingest.sparse_encoding_processors'?: InfoCounterStat; + 'processors.ingest.text_chunking_delimiter_processors'?: InfoCounterStat; + 'processors.ingest.text_chunking_fixed_char_length_processors'?: InfoCounterStat; + 'processors.ingest.text_chunking_fixed_token_length_processors'?: InfoCounterStat; + 'processors.ingest.text_chunking_processors'?: InfoCounterStat; + 'processors.ingest.text_embedding_processors_in_pipelines'?: InfoCounterStat; + 'processors.ingest.text_image_embedding_processors'?: InfoCounterStat; + 'processors.search.hybrid.comb_arithmetic_processors'?: InfoCounterStat; + 'processors.search.hybrid.comb_geometric_processors'?: InfoCounterStat; + 'processors.search.hybrid.comb_harmonic_processors'?: InfoCounterStat; + 'processors.search.hybrid.comb_rrf_processors'?: InfoCounterStat; + 'processors.search.hybrid.norm_l2_processors'?: InfoCounterStat; + 'processors.search.hybrid.norm_minmax_processors'?: InfoCounterStat; + 'processors.search.hybrid.norm_zscore_processors'?: InfoCounterStat; + 'processors.search.hybrid.normalization_processors'?: InfoCounterStat; + 'processors.search.hybrid.rank_based_normalization_processors'?: InfoCounterStat; + 'processors.search.neural_query_enricher_processors'?: InfoCounterStat; + 'processors.search.neural_sparse_two_phase_processors'?: InfoCounterStat; + 'processors.search.rerank_by_field_processors'?: InfoCounterStat; + 'processors.search.rerank_ml_processors'?: InfoCounterStat; +} + +export type FlatNeuralNodeStats = { + 'processors.ingest.semantic_field_chunking_executions'?: TimestampedEventCounterStat; + 'processors.ingest.semantic_field_executions'?: TimestampedEventCounterStat; + 'processors.ingest.skip_existing_executions'?: TimestampedEventCounterStat; + 'processors.ingest.sparse_encoding_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_chunking_delimiter_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_chunking_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_chunking_fixed_char_length_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_chunking_fixed_token_length_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_embedding_executions'?: TimestampedEventCounterStat; + 'processors.ingest.text_image_embedding_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.comb_arithmetic_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.comb_geometric_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.comb_harmonic_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.comb_rrf_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.norm_l2_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.norm_minmax_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.norm_zscore_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.normalization_processor_executions'?: TimestampedEventCounterStat; + 'processors.search.hybrid.rank_based_normalization_processor_executions'?: TimestampedEventCounterStat; + 'processors.search.neural_query_enricher_executions'?: TimestampedEventCounterStat; + 'processors.search.neural_sparse_two_phase_executions'?: TimestampedEventCounterStat; + 'processors.search.rerank_by_field_executions'?: TimestampedEventCounterStat; + 'processors.search.rerank_ml_executions'?: TimestampedEventCounterStat; + 'query.hybrid.hybrid_query_requests'?: TimestampedEventCounterStat; + 'query.hybrid.hybrid_query_with_filter_requests'?: TimestampedEventCounterStat; + 'query.hybrid.hybrid_query_with_inner_hits_requests'?: TimestampedEventCounterStat; + 'query.hybrid.hybrid_query_with_pagination_requests'?: TimestampedEventCounterStat; + 'query.neural_sparse.neural_sparse_query_requests'?: TimestampedEventCounterStat; + 'query.neural.neural_query_against_knn_requests'?: TimestampedEventCounterStat; + 'query.neural.neural_query_against_semantic_dense_requests'?: TimestampedEventCounterStat; + 'query.neural.neural_query_against_semantic_sparse_requests'?: TimestampedEventCounterStat; + 'query.neural.neural_query_requests'?: TimestampedEventCounterStat; + 'semantic_highlighting.semantic_highlighting_request_count'?: TimestampedEventCounterStat; +} + +export type FlatNeuralStats = Nodes_Common.NodesResponseBase & { + all_nodes?: FlatNeuralNodeStats; + cluster_name?: string; + info?: FlatNeuralInfoStats; + nodes?: Record; +} + +export type InfoCounterStat = number | (StatMetadata & { + stat_type?: 'info_counter'; +}) + +export type InfoStringStat = string | (StatMetadata & { + stat_type?: 'info_string'; +}) + +export type NestedNeuralInfoStats = { + cluster_version?: InfoStringStat; + processors?: NestedNeuralInfoStatsProcessors; +} + +export type NestedNeuralInfoStatsProcessors = { + ingest?: NestedNeuralInfoStatsProcessorsIngest; + search?: NestedNeuralInfoStatsProcessorsSearch; +} + +export type NestedNeuralInfoStatsProcessorsIngest = { + skip_existing_processors?: InfoCounterStat; + sparse_encoding_processors?: InfoCounterStat; + text_chunking_delimiter_processors?: InfoCounterStat; + text_chunking_fixed_char_length_processors?: InfoCounterStat; + text_chunking_fixed_token_length_processors?: InfoCounterStat; + text_chunking_processors?: InfoCounterStat; + text_embedding_processors_in_pipelines?: InfoCounterStat; + text_image_embedding_processors?: InfoCounterStat; +} + +export type NestedNeuralInfoStatsProcessorsSearch = { + hybrid?: NestedNeuralInfoStatsProcessorsSearchHybrid; + neural_query_enricher_processors?: InfoCounterStat; + neural_sparse_two_phase_processors?: InfoCounterStat; + rerank_by_field_processors?: InfoCounterStat; + rerank_ml_processors?: InfoCounterStat; +} + +export type NestedNeuralInfoStatsProcessorsSearchHybrid = { + comb_arithmetic_processors?: InfoCounterStat; + comb_geometric_processors?: InfoCounterStat; + comb_harmonic_processors?: InfoCounterStat; + comb_rrf_processors?: InfoCounterStat; + norm_l2_processors?: InfoCounterStat; + norm_minmax_processors?: InfoCounterStat; + norm_zscore_processors?: InfoCounterStat; + normalization_processors?: InfoCounterStat; + rank_based_normalization_processors?: InfoCounterStat; +} + +export type NestedNeuralNodeStats = { + processors?: NestedNeuralNodeStatsProcessors; + query?: NestedNeuralNodeStatsQuery; + semantic_highlighting?: NestedNeuralNodeStatsSemanticHighlighting; +} + +export type NestedNeuralNodeStatsProcessors = { + ingest?: NestedNeuralNodeStatsProcessorsIngest; + search?: NestedNeuralNodeStatsProcessorsSearch; +} + +export type NestedNeuralNodeStatsProcessorsIngest = { + semantic_field_chunking_executions?: TimestampedEventCounterStat; + semantic_field_executions?: TimestampedEventCounterStat; + skip_existing_executions?: TimestampedEventCounterStat; + sparse_encoding_executions?: TimestampedEventCounterStat; + text_chunking_delimiter_executions?: TimestampedEventCounterStat; + text_chunking_executions?: TimestampedEventCounterStat; + text_chunking_fixed_char_length_executions?: TimestampedEventCounterStat; + text_chunking_fixed_token_length_executions?: TimestampedEventCounterStat; + text_embedding_executions?: TimestampedEventCounterStat; + text_image_embedding_executions?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsProcessorsSearch = { + hybrid?: NestedNeuralNodeStatsProcessorsSearchHybrid; + neural_query_enricher_executions?: TimestampedEventCounterStat; + neural_sparse_two_phase_executions?: TimestampedEventCounterStat; + rerank_by_field_executions?: TimestampedEventCounterStat; + rerank_ml_executions?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsProcessorsSearchHybrid = { + comb_arithmetic_executions?: TimestampedEventCounterStat; + comb_geometric_executions?: TimestampedEventCounterStat; + comb_harmonic_executions?: TimestampedEventCounterStat; + comb_rrf_executions?: TimestampedEventCounterStat; + norm_l2_executions?: TimestampedEventCounterStat; + norm_minmax_executions?: TimestampedEventCounterStat; + norm_zscore_executions?: TimestampedEventCounterStat; + normalization_processor_executions?: TimestampedEventCounterStat; + rank_based_normalization_processor_executions?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsQuery = { + hybrid?: NestedNeuralNodeStatsQueryHybrid; + neural?: NestedNeuralNodeStatsQueryNeural; + neural_sparse?: NestedNeuralNodeStatsQueryNeuralSparse; +} + +export type NestedNeuralNodeStatsQueryHybrid = { + hybrid_query_requests?: TimestampedEventCounterStat; + hybrid_query_with_filter_requests?: TimestampedEventCounterStat; + hybrid_query_with_inner_hits_requests?: TimestampedEventCounterStat; + hybrid_query_with_pagination_requests?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsQueryNeural = { + neural_query_against_knn_requests?: TimestampedEventCounterStat; + neural_query_against_semantic_dense_requests?: TimestampedEventCounterStat; + neural_query_against_semantic_sparse_requests?: TimestampedEventCounterStat; + neural_query_requests?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsQueryNeuralSparse = { + neural_sparse_query_requests?: TimestampedEventCounterStat; +} + +export type NestedNeuralNodeStatsSemanticHighlighting = { + semantic_highlighting_request_count?: TimestampedEventCounterStat; +} + +export type NestedNeuralStats = Nodes_Common.NodesResponseBase & { + all_nodes?: NestedNeuralNodeStats; + cluster_name?: string; + info?: NestedNeuralInfoStats; + nodes?: Record; +} + +export type NeuralStatName = 'cluster_version' | 'comb_arithmetic_executions' | 'comb_arithmetic_processors' | 'comb_geometric_executions' | 'comb_geometric_processors' | 'comb_harmonic_executions' | 'comb_harmonic_processors' | 'comb_rrf_executions' | 'comb_rrf_processors' | 'hybrid_query_requests' | 'hybrid_query_with_filter_requests' | 'hybrid_query_with_inner_hits_requests' | 'hybrid_query_with_pagination_requests' | 'neural_query_against_knn_requests' | 'neural_query_against_semantic_dense_requests' | 'neural_query_against_semantic_sparse_requests' | 'neural_query_enricher_executions' | 'neural_query_enricher_processors' | 'neural_query_requests' | 'neural_sparse_query_requests' | 'neural_sparse_two_phase_executions' | 'neural_sparse_two_phase_processors' | 'norm_l2_executions' | 'norm_l2_processors' | 'norm_minmax_executions' | 'norm_minmax_processors' | 'norm_zscore_executions' | 'norm_zscore_processors' | 'normalization_processor_executions' | 'normalization_processors' | 'rank_based_normalization_processor_executions' | 'rank_based_normalization_processors' | 'rerank_by_field_executions' | 'rerank_by_field_processors' | 'rerank_ml_executions' | 'rerank_ml_processors' | 'semantic_field_chunking_executions' | 'semantic_field_executions' | 'semantic_highlighting_request_count' | 'skip_existing_executions' | 'skip_existing_processors' | 'sparse_encoding_executions' | 'sparse_encoding_processors' | 'text_chunking_delimiter_executions' | 'text_chunking_delimiter_processors' | 'text_chunking_executions' | 'text_chunking_fixed_char_length_executions' | 'text_chunking_fixed_char_length_processors' | 'text_chunking_fixed_token_length_executions' | 'text_chunking_fixed_token_length_processors' | 'text_chunking_processors' | 'text_embedding_executions' | 'text_embedding_processors_in_pipelines' | 'text_image_embedding_executions' | 'text_image_embedding_processors' + +export type NeuralStats = NestedNeuralStats | FlatNeuralStats + +export type StatMetadata = { + stat_type: string; + value: number | string; +} + +export type TimestampedEventCounterStat = number | (StatMetadata & { + minutes_since_last_event?: number; + stat_type?: 'timestamped_event_counter'; + trailing_interval_value?: number; +}) + diff --git a/api/_types/nodes._common.d.ts b/api/_types/nodes._common.d.ts index 8d7a894c9..131242e62 100644 --- a/api/_types/nodes._common.d.ts +++ b/api/_types/nodes._common.d.ts @@ -20,5 +20,5 @@ export type NodesResponseBase = { _nodes?: Common.NodeStatistics; } -export type SampleType = 'block' | 'cpu' | 'wait' +export type SampleType = string diff --git a/api/_types/nodes.info.d.ts b/api/_types/nodes.info.d.ts index a11e31e0a..244e54628 100644 --- a/api/_types/nodes.info.d.ts +++ b/api/_types/nodes.info.d.ts @@ -155,9 +155,14 @@ export type NodeInfoSearch = { remote: NodeInfoSearchRemote; } +export type NodeInfoSearchPipelineProcessor = { + type: string; +} + export type NodeInfoSearchPipelines = { - request_processors?: NodeInfoIngestProcessor[]; - response_processors?: NodeInfoIngestProcessor[]; + phase_results_processors?: NodeInfoSearchPipelineProcessor[]; + request_processors?: NodeInfoSearchPipelineProcessor[]; + response_processors?: NodeInfoSearchPipelineProcessor[]; } export type NodeInfoSearchRemote = { diff --git a/api/_types/nodes.stats.d.ts b/api/_types/nodes.stats.d.ts index c8a012af6..506f03db2 100644 --- a/api/_types/nodes.stats.d.ts +++ b/api/_types/nodes.stats.d.ts @@ -583,6 +583,7 @@ export type ShardSegmentReplicationBackpressureStats = { export type ShardTaskCancellationStats = { search_shard_task?: ShardTaskCancellationStatsDetail; + search_task?: ShardTaskCancellationStatsDetail; } export type ShardTaskCancellationStatsDetail = { diff --git a/api/_types/observability._common.d.ts b/api/_types/observability._common.d.ts index b9cb072b7..ef7ee522f 100644 --- a/api/_types/observability._common.d.ts +++ b/api/_types/observability._common.d.ts @@ -15,17 +15,6 @@ */ -export type ErrorResponse = { - reason: string; - root_cause: RootCause[]; - type: string; -} - -export type NotFoundResponse = { - error: ErrorResponse; - status: number; -} - export type ObservabilityObject = { createdTimeMs?: number; lastUpdatedTimeMs?: number; @@ -56,11 +45,6 @@ export type QueryFilter = { query: string; } -export type RootCause = { - reason: string; - type: string; -} - export type SavedQuery = { description: string; name: string; diff --git a/api/_types/query._common.d.ts b/api/_types/query._common.d.ts index c9540bd2a..2231eae08 100644 --- a/api/_types/query._common.d.ts +++ b/api/_types/query._common.d.ts @@ -38,10 +38,6 @@ export type DataSourceConfiguration = { export type DataSourceList = DataSource[] -export type DataSourceNotFound = { - error: ErrorResponse; -} - export type DataSourceRetrieve = { allowedRoles?: string[]; configuration?: DataSourceConfiguration; @@ -53,19 +49,3 @@ export type DataSourceRetrieve = { status: string; } -export type Error = { - reason: string; - root_cause: RootCause[]; - type: string; -} - -export type ErrorResponse = { - error?: Error; - status?: number; -} - -export type RootCause = { - reason: string; - type: string; -} - diff --git a/api/_types/replication._common.d.ts b/api/_types/replication._common.d.ts index f448216f1..0ab5a5bdf 100644 --- a/api/_types/replication._common.d.ts +++ b/api/_types/replication._common.d.ts @@ -110,6 +110,8 @@ export type Replication = { use_roles?: UseRoles; } +export type ReplicationStatus = 'BOOTSTRAPPING' | 'PAUSED' | 'REPLICATION NOT IN PROGRESS' | 'RUNNING' | 'SYNCING' + export type SettingsBody = { index?: IndexSchema; } @@ -119,7 +121,7 @@ export type Status = { leader_alias?: Common.IndexAlias; leader_index?: Common.IndexName; reason?: string; - status?: 'BOOTSTRAPPING' | 'PAUSED' | 'REPLICATION NOT IN PROGRESS' | 'RUNNING' | 'SYNCING'; + status?: ReplicationStatus; syncing_details?: SyncingDetails; } diff --git a/api/_types/rollups._common.d.ts b/api/_types/rollups._common.d.ts index f5768ca4b..066ee0b20 100644 --- a/api/_types/rollups._common.d.ts +++ b/api/_types/rollups._common.d.ts @@ -15,6 +15,7 @@ */ import * as Common from './_common' +import * as Indices_Common from './indices._common' export type Cron = { expression?: string; @@ -88,6 +89,7 @@ export type Rollup = { schema_version?: number; source_index?: string; target_index?: string; + target_index_settings?: Indices_Common.IndexSettings; } export type RollupEntity = { diff --git a/api/_types/search_pipeline._common.d.ts b/api/_types/search_pipeline._common.d.ts index 11a6e0341..7beef9c7c 100644 --- a/api/_types/search_pipeline._common.d.ts +++ b/api/_types/search_pipeline._common.d.ts @@ -73,6 +73,8 @@ export type PersonalizeSearchRankingResponseProcessor = { export type PhaseResultsProcessor = { 'normalization-processor': NormalizationPhaseResultsProcessor; +} | { + 'score-ranker-processor': ScoreRankerPhaseResultsProcessor; } export type RenameFieldResponseProcessor = { @@ -133,10 +135,14 @@ export type RetrievalAugmentedGenerationResponseProcessor = { } export type ScoreCombination = { - parameters?: number[]; + parameters?: ScoreCombinationParameters; technique?: ScoreCombinationTechnique; } +export type ScoreCombinationParameters = { + weights?: number[]; +} + export type ScoreCombinationTechnique = 'arithmetic_mean' | 'geometric_mean' | 'harmonic_mean' export type ScoreNormalization = { @@ -145,9 +151,21 @@ export type ScoreNormalization = { export type ScoreNormalizationTechnique = 'l2' | 'min_max' +export type ScoreRankerCombination = { + rank_constant?: number; + technique: ScoreRankerCombinationTechnique; +} + +export type ScoreRankerCombinationTechnique = 'rrf' + +export type ScoreRankerPhaseResultsProcessor = { + combination: ScoreRankerCombination; +} + export type SearchPipelineMap = Record export type SearchPipelineStructure = { + description?: string; phase_results_processors?: PhaseResultsProcessor[]; request_processors?: RequestProcessor[]; response_processors?: ResponseProcessor[]; diff --git a/api/_types/search_relevance._common.d.ts b/api/_types/search_relevance._common.d.ts new file mode 100644 index 000000000..6b07b1911 --- /dev/null +++ b/api/_types/search_relevance._common.d.ts @@ -0,0 +1,64 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type Experiment = { + id?: string; + judgmentList?: string[]; + querySetId?: string; + results?: Record; + searchConfigurationList?: string[]; + size?: number; + status?: string; + timestamp?: string; + type?: string; +} + +export type GenericObject = { + _shards?: Record; + hits?: Record; + timed_out?: boolean; + took?: number; +} + +export type Judgment = { + id?: string; + judgmentScores?: Record; + metadata?: Record; + name?: string; + status?: string; + timestamp?: string; + type?: string; +} + +export type QuerySet = { + description?: string; + id?: string; + name?: string; + querySetQueries?: Record; + sampling?: string; + timestamp?: string; +} + +export type SearchConfiguration = { + id?: string; + index?: string; + name?: string; + query?: string; + searchPipeline?: string; + timestamp?: string; +} + diff --git a/api/_types/security._common.d.ts b/api/_types/security._common.d.ts index d6420aa0d..a4c052058 100644 --- a/api/_types/security._common.d.ts +++ b/api/_types/security._common.d.ts @@ -14,6 +14,7 @@ * modify the API generator. */ +import * as Nodes_Common from './nodes._common' export type AccountDetails = { backend_roles?: string[]; @@ -40,7 +41,7 @@ export type ActionGroupsMap = Record export type AllowListConfig = { enabled?: boolean; - requests?: Record; + requests?: Record; } export type AuditConfig = { @@ -80,18 +81,12 @@ export type AuthInfo = { size_of_custom_attributes?: string; size_of_user?: string; sso_logout_url?: undefined | string; - tenants?: Record; + tenants?: Record; user?: string; user_name?: string; user_requested_tenant?: undefined | string; } -export type CertificateCountPerNode = { - failed?: number; - successful?: number; - total?: number; -} - export type CertificatesDetail = { issuer_dn?: string; not_after?: string; @@ -190,9 +185,11 @@ export type DynamicOptions = { export type Error = { message?: string; - status?: 'BAD_REQUEST' | 'CONFLICT' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'NOT_FOUND' | 'NOT_IMPLEMENTED' | 'UNAUTHORIZED'; + status?: ErrorStatus; } +export type ErrorStatus = 'BAD_REQUEST' | 'CONFLICT' | 'FORBIDDEN' | 'INTERNAL_SERVER_ERROR' | 'NOT_FOUND' | 'NOT_IMPLEMENTED' | 'UNAUTHORIZED' + export type GenerateOBOToken = { authenticationToken?: string; durationSeconds?: string; @@ -204,8 +201,7 @@ export type GetCertificates = { transport_certificates_list?: CertificatesDetail[]; } -export type GetCertificatesNew = { - _nodes?: Record; +export type GetCertificatesNew = Nodes_Common.NodesResponseBase & { cluster_name?: string; nodes?: Record; } @@ -213,6 +209,7 @@ export type GetCertificatesNew = { export type HealthInfo = { message?: undefined | string; mode?: string; + settings?: Record; status?: string; } @@ -252,10 +249,8 @@ export type PatchOperation = { value?: Record; } -export type PatchOperations = PatchOperation[] - export type PermissionsInfo = { - disabled_endpoints?: Record; + disabled_endpoints?: Record; has_api_access?: boolean; user?: string; user_name?: string; @@ -295,12 +290,12 @@ export type SSLInfo = { peer_certificates_list?: string[]; principal: undefined | string; ssl_cipher: undefined | string; - ssl_openssl_available: boolean; - ssl_openssl_non_available_cause: undefined | string; - ssl_openssl_supports_hostname_validation: boolean; - ssl_openssl_supports_key_manager_factory: boolean; - ssl_openssl_version: number | string; - ssl_openssl_version_string: undefined | string; + ssl_openssl_available?: boolean; + ssl_openssl_non_available_cause?: undefined | string; + ssl_openssl_supports_hostname_validation?: boolean; + ssl_openssl_supports_key_manager_factory?: boolean; + ssl_openssl_version?: number | string; + ssl_openssl_version_string?: undefined | string; ssl_protocol: undefined | string; ssl_provider_http: undefined | string; ssl_provider_transport_client: string; @@ -325,13 +320,13 @@ export type TenantsMap = Record export type UpgradeCheck = { status?: string; - upgradeActions?: Record; + upgradeActions?: Record>; upgradeAvailable?: boolean; } export type UpgradePerform = { status?: string; - upgrades?: Record; + upgrades?: Record>; } export type User = { diff --git a/api/_types/security_analytics.alerts.d.ts b/api/_types/security_analytics.alerts.d.ts new file mode 100644 index 000000000..75f5916e1 --- /dev/null +++ b/api/_types/security_analytics.alerts.d.ts @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type ActionExecutionResult = { + action_id?: string; + last_execution_time?: string; + throttled_count?: number; +} + +export type Alert = { + acknowledged_time?: undefined | string; + action_execution_results?: ActionExecutionResult[]; + alert_history?: AlertError[]; + detector_id?: string; + end_time?: undefined | string; + error_message?: undefined | string; + finding_ids?: string[]; + id?: string; + last_notification_time?: string; + related_doc_ids?: string[]; + schema_version?: number; + severity?: string; + start_time?: string; + state?: AlertState; + trigger_id?: string; + trigger_name?: string; + version?: number; +} + +export type AlertError = { + message?: string; + timestamp?: string; +} + +export type Alerts = Alert[] + +export type AlertSeverityLevel = '1' | '2' | '3' | '4' | '5' | 'ALL' + +export type AlertState = 'ACKNOWLEDGED' | 'ACTIVE' | 'COMPLETED' | 'DELETED' | 'ERROR' + +export type GetAlertsResponse = { + alerts: Alerts; + total_alerts: number; +} + diff --git a/api/_types/security_analytics.findings.d.ts b/api/_types/security_analytics.findings.d.ts new file mode 100644 index 000000000..8b9bb366a --- /dev/null +++ b/api/_types/security_analytics.findings.d.ts @@ -0,0 +1,65 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type DetectionType = 'rule' | 'threat' + +export type Document = { + document?: string; + found?: boolean; + id?: string; + index?: string; +} + +export type Finding = { + detectorId?: string; + document_list?: Document[]; + id?: string; + index?: string; + queries?: Query[]; + related_doc_ids?: string[]; + timestamp?: number; +} + +export type Findings = Finding[] + +export type FindingWithScore = { + detector_type?: string; + finding?: string; + rules?: string[]; + score?: number; +} + +export type GetFindingsResponse = { + findings: Findings; + total_findings: number; +} + +export type Query = { + fields?: string[]; + id?: string; + name?: string; + query?: string; + query_field_names?: string[]; + tags?: string[]; +} + +export type RuleSeverity = 'critical' | 'high' | 'low' | 'medium' + +export type SearchFindingCorrelationsResponse = { + findings: FindingWithScore[]; +} + diff --git a/api/_types/sm._common.d.ts b/api/_types/sm._common.d.ts index a3547ab33..58c0f17f9 100644 --- a/api/_types/sm._common.d.ts +++ b/api/_types/sm._common.d.ts @@ -15,11 +15,6 @@ */ -export type BadRequestResponse = { - error?: string; - status?: number; -} - export type CreateUpdatePolicyRequest = { creation: CreationConfig; deletion?: DeletionConfig; @@ -43,17 +38,6 @@ export type CronSchedule = { cron?: CronExpression; } -export type DeletePolicyResponse = { - _id: string; - _index: string; - _primary_term: number; - _seq_no: number; - _shards: ShardsInfo; - _version: number; - forced_refresh: boolean; - result: string; -} - export type DeletionCondition = { max_age?: string; max_count?: number; @@ -92,13 +76,15 @@ export type GetPoliciesResponse = { export type IntervalConfig = { period: number; start_time: number; - unit: 'Days' | 'Hours' | 'Minutes'; + unit: IntervalUnit; } export type IntervalSchedule = { interval?: IntervalConfig; } +export type IntervalUnit = 'Days' | 'Hours' | 'Minutes' + export type ListedPolicy = { _id: string; _primary_term?: number; @@ -106,17 +92,6 @@ export type ListedPolicy = { sm_policy: SMPolicy; } -export type NotFoundError = { - reason: string; - root_cause?: RootCause[]; - type: string; -} - -export type NotFoundResponse = { - error: NotFoundError; - status: number; -} - export type NotificationChannel = { id: string; } @@ -149,17 +124,6 @@ export type RetryMetadata = { count?: number; } -export type RootCause = { - reason?: string; - type?: string; -} - -export type ShardsInfo = { - failed?: number; - successful?: number; - total?: number; -} - export type SMPolicy = { creation: CreationConfig; deletion?: DeletionConfig; diff --git a/api/_types/transforms._common.d.ts b/api/_types/transforms._common.d.ts index 956526f6f..d3d08935c 100644 --- a/api/_types/transforms._common.d.ts +++ b/api/_types/transforms._common.d.ts @@ -30,29 +30,6 @@ export type DateHistogramGroup = { timezone?: string; } -export type DeletedTransformResponse = { - _id: Common.Id; - _index: string; - _primary_term: number; - _seq_no: Common.SequenceNumber; - _shards: Common.ShardStatistics; - _type?: Common.Type; - _version: Common.VersionNumber; - forced_refresh: boolean; - result: string; - status: number; -} - -export type DeleteTransformResponseItem = { - delete?: DeletedTransformResponse; -} - -export type DeleteTransformsResponse = { - errors?: boolean; - items?: DeleteTransformResponseItem[]; - took?: number; -} - export type Explain = { metadata_id?: undefined | string; transform_metadata?: TransformMetadata | undefined; diff --git a/api/_types/wlm._common.d.ts b/api/_types/wlm._common.d.ts index c1db44570..1feb2f4f2 100644 --- a/api/_types/wlm._common.d.ts +++ b/api/_types/wlm._common.d.ts @@ -17,7 +17,7 @@ export type QueryGroupCreate = { name: string; - resiliency_mode: 'enforced' | 'monitor' | 'soft'; + resiliency_mode: ResiliencyMode; resource_limits: { cpu?: number; memory: number; @@ -30,7 +30,7 @@ export type QueryGroupCreate = { export type QueryGroupResponse = { _id: string; name: string; - resiliency_mode: 'enforced' | 'monitor' | 'soft'; + resiliency_mode: ResiliencyMode; resource_limits: { cpu?: number; memory: number; @@ -42,10 +42,12 @@ export type QueryGroupResponse = { } export type QueryGroupUpdate = { - resiliency_mode?: 'enforced' | 'monitor' | 'soft'; + resiliency_mode?: ResiliencyMode; resource_limits?: ResourceLimitsSchema; } +export type ResiliencyMode = 'enforced' | 'monitor' | 'soft' + export type ResourceLimitsSchema = { cpu?: number; memory?: number; diff --git a/api/cat/count.js b/api/cat/count.js index 9acffba1d..534b370c3 100644 --- a/api/cat/count.js +++ b/api/cat/count.js @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.help=false] - Returns help information. * @param {array} [params.s] - A comma-separated list of column names or column aliases to sort by. * @param {boolean} [params.v=false] - Enables verbose mode, which displays column headers. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/cluster/deleteWeightedRouting.d.ts b/api/cluster/deleteWeightedRouting.d.ts index f31f138e9..61cf92af6 100644 --- a/api/cluster/deleteWeightedRouting.d.ts +++ b/api/cluster/deleteWeightedRouting.d.ts @@ -15,12 +15,15 @@ */ import { ApiResponse } from '../../lib/Transport' -import * as Cluster_WeightedRouting from '../_types/cluster.weighted_routing' import * as Common from '../_types/_common' import * as Global from '../_types/_global' export interface Cluster_DeleteWeightedRouting_Request extends Global.Params { - body?: Cluster_WeightedRouting.WeightsBase; + body?: Cluster_DeleteWeightedRouting_RequestBody; +} + +export type Cluster_DeleteWeightedRouting_RequestBody = { + _version?: Common.VersionNumber; } export interface Cluster_DeleteWeightedRouting_Response extends ApiResponse { diff --git a/api/cluster/existsComponentTemplate.js b/api/cluster/existsComponentTemplate.js index b4f90bfde..f235aae9a 100644 --- a/api/cluster/existsComponentTemplate.js +++ b/api/cluster/existsComponentTemplate.js @@ -26,7 +26,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * * @param {object} params * @param {string} [params.cluster_manager_timeout] - The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units). - * @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false, information is retrieved from the cluster manager node. + * @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node. * @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value. * @param {string} params.name - The name of the component template. Wildcard (*) expressions are supported. * diff --git a/api/cluster/getDecommissionAwareness.d.ts b/api/cluster/getDecommissionAwareness.d.ts index 6dd808aaf..d7a07573f 100644 --- a/api/cluster/getDecommissionAwareness.d.ts +++ b/api/cluster/getDecommissionAwareness.d.ts @@ -26,5 +26,5 @@ export interface Cluster_GetDecommissionAwareness_Response extends ApiResponse { body: Cluster_GetDecommissionAwareness_ResponseBody; } -export type Cluster_GetDecommissionAwareness_ResponseBody = Cluster_DecommissionAwareness.DecommissionStatusResponse +export type Cluster_GetDecommissionAwareness_ResponseBody = Record diff --git a/api/cluster/getWeightedRouting.d.ts b/api/cluster/getWeightedRouting.d.ts index 5b3f64668..a6b3c9583 100644 --- a/api/cluster/getWeightedRouting.d.ts +++ b/api/cluster/getWeightedRouting.d.ts @@ -26,5 +26,7 @@ export interface Cluster_GetWeightedRouting_Response extends ApiResponse { body: Cluster_GetWeightedRouting_ResponseBody; } -export type Cluster_GetWeightedRouting_ResponseBody = Cluster_WeightedRouting.WeightsResponse +export interface Cluster_GetWeightedRouting_ResponseBody extends Cluster_WeightedRouting.WeightsBase { + discovered_cluster_manager?: boolean; +} diff --git a/api/cluster/health.d.ts b/api/cluster/health.d.ts index 22729f6c0..968afff86 100644 --- a/api/cluster/health.d.ts +++ b/api/cluster/health.d.ts @@ -15,6 +15,7 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Cluster_Common from '../_types/cluster._common' import * as Cluster_Health from '../_types/cluster.health' import * as Common from '../_types/_common' import * as Global from '../_types/_global' @@ -32,7 +33,7 @@ export interface Cluster_Health_Request extends Global.Params { wait_for_events?: Common.WaitForEvents; wait_for_no_initializing_shards?: boolean; wait_for_no_relocating_shards?: boolean; - wait_for_nodes?: string | number; + wait_for_nodes?: Cluster_Common.WaitForNodes; wait_for_status?: Common.HealthStatus; } diff --git a/api/cluster/putWeightedRouting.d.ts b/api/cluster/putWeightedRouting.d.ts index 8e18825d6..2ce0e30f7 100644 --- a/api/cluster/putWeightedRouting.d.ts +++ b/api/cluster/putWeightedRouting.d.ts @@ -16,16 +16,19 @@ import { ApiResponse } from '../../lib/Transport' import * as Cluster_WeightedRouting from '../_types/cluster.weighted_routing' +import * as Common from '../_types/_common' import * as Global from '../_types/_global' export interface Cluster_PutWeightedRouting_Request extends Global.Params { attribute: string; - body?: Cluster_WeightedRouting.Weights; + body?: Cluster_PutWeightedRouting_RequestBody; } +export type Cluster_PutWeightedRouting_RequestBody = Cluster_WeightedRouting.WeightsBase & Record + export interface Cluster_PutWeightedRouting_Response extends ApiResponse { body: Cluster_PutWeightedRouting_ResponseBody; } -export type Cluster_PutWeightedRouting_ResponseBody = Record +export type Cluster_PutWeightedRouting_ResponseBody = Common.AcknowledgedResponseBase diff --git a/api/danglingIndices/listDanglingIndices.d.ts b/api/danglingIndices/listDanglingIndices.d.ts index 58e009145..744d7df81 100644 --- a/api/danglingIndices/listDanglingIndices.d.ts +++ b/api/danglingIndices/listDanglingIndices.d.ts @@ -18,6 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as DanglingIndices_ListDanglingIndices from '../_types/dangling_indices.list_dangling_indices' import * as Global from '../_types/_global' +import * as Nodes_Common from '../_types/nodes._common' export type DanglingIndices_ListDanglingIndices_Request = Global.Params & Record @@ -25,8 +26,7 @@ export interface DanglingIndices_ListDanglingIndices_Response extends ApiRespons body: DanglingIndices_ListDanglingIndices_ResponseBody; } -export type DanglingIndices_ListDanglingIndices_ResponseBody = { - _nodes?: Common.NodeStatistics; +export interface DanglingIndices_ListDanglingIndices_ResponseBody extends Nodes_Common.NodesResponseBase { cluster_name?: Common.Name; dangling_indices: DanglingIndices_ListDanglingIndices.DanglingIndex[]; } diff --git a/api/geospatial/_api.js b/api/geospatial/_api.js new file mode 100644 index 000000000..372eb0b24 --- /dev/null +++ b/api/geospatial/_api.js @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Geospatial */ + +function GeospatialApi(bindObj) { + this.deleteIp2GeoDatasource = require('./deleteIp2GeoDatasource').bind(bindObj); + this.geojsonUploadPost = require('./geojsonUploadPost').bind(bindObj); + this.geojsonUploadPut = require('./geojsonUploadPut').bind(bindObj); + this.getIp2GeoDatasource = require('./getIp2GeoDatasource').bind(bindObj); + this.getUploadStats = require('./getUploadStats').bind(bindObj); + this.putIp2GeoDatasource = require('./putIp2GeoDatasource').bind(bindObj); + this.putIp2GeoDatasourceSettings = require('./putIp2GeoDatasourceSettings').bind(bindObj); + + // Deprecated: Use deleteIp2GeoDatasource instead. + this.delete_ip2geo_datasource = require('./deleteIp2GeoDatasource').bind(bindObj); + // Deprecated: Use geojsonUploadPost instead. + this.geojson_upload_post = require('./geojsonUploadPost').bind(bindObj); + // Deprecated: Use geojsonUploadPut instead. + this.geojson_upload_put = require('./geojsonUploadPut').bind(bindObj); + // Deprecated: Use getIp2GeoDatasource instead. + this.get_ip2geo_datasource = require('./getIp2GeoDatasource').bind(bindObj); + // Deprecated: Use getUploadStats instead. + this.get_upload_stats = require('./getUploadStats').bind(bindObj); + // Deprecated: Use putIp2GeoDatasource instead. + this.put_ip2geo_datasource = require('./putIp2GeoDatasource').bind(bindObj); + // Deprecated: Use putIp2GeoDatasourceSettings instead. + this.put_ip2geo_datasource_settings = require('./putIp2GeoDatasourceSettings').bind(bindObj); +} + +module.exports = GeospatialApi; diff --git a/api/geospatial/deleteIp2GeoDatasource.d.ts b/api/geospatial/deleteIp2GeoDatasource.d.ts new file mode 100644 index 000000000..a6182fb11 --- /dev/null +++ b/api/geospatial/deleteIp2GeoDatasource.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Geospatial_DeleteIp2GeoDatasource_Request extends Global.Params { + name: string; +} + +export interface Geospatial_DeleteIp2GeoDatasource_Response extends ApiResponse { + body: Geospatial_DeleteIp2GeoDatasource_ResponseBody; +} + +export type Geospatial_DeleteIp2GeoDatasource_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/geospatial/deleteIp2GeoDatasource.js b/api/geospatial/deleteIp2GeoDatasource.js new file mode 100644 index 000000000..21149bfb3 --- /dev/null +++ b/api/geospatial/deleteIp2GeoDatasource.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a specific IP2Geo data source. + *
See Also: {@link https://docs.opensearch.org/docs/latest/ingest-pipelines/processors/ip2geo/#deleting-the-ip2geo-data-source - geospatial.delete_ip2geo_datasource} + * + * @memberOf API-Geospatial + * + * @param {object} params + * @param {string} params.name + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteIp2GeoDatasourceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_plugins/geospatial/ip2geo/datasource/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteIp2GeoDatasourceFunc; diff --git a/api/geospatial/geojsonUploadPost.d.ts b/api/geospatial/geojsonUploadPost.d.ts new file mode 100644 index 000000000..68a3bc1e6 --- /dev/null +++ b/api/geospatial/geojsonUploadPost.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export interface Geospatial_GeojsonUploadPost_Request extends Global.Params { + body: Geospatial_Common.GeoJSONRequest; +} + +export interface Geospatial_GeojsonUploadPost_Response extends ApiResponse { + body: Geospatial_GeojsonUploadPost_ResponseBody; +} + +export type Geospatial_GeojsonUploadPost_ResponseBody = Geospatial_Common.GeoSpatialGeojsonUploadResponse + diff --git a/api/geospatial/geojsonUploadPost.js b/api/geospatial/geojsonUploadPost.js new file mode 100644 index 000000000..586c4f7d0 --- /dev/null +++ b/api/geospatial/geojsonUploadPost.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Use an OpenSearch query to upload `GeoJSON`, operation will fail if index exists. +- When type is `geo_point`, only Point geometry is allowed +- When type is `geo_shape`, all geometry types are allowed (Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Envelope). + *
See Also: {@link undefined - geospatial.geojson_upload_post} + * + * @memberOf API-Geospatial + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function geojsonUploadPostFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/geospatial/geojson/_upload'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = geojsonUploadPostFunc; diff --git a/api/geospatial/geojsonUploadPut.d.ts b/api/geospatial/geojsonUploadPut.d.ts new file mode 100644 index 000000000..89f3c7a69 --- /dev/null +++ b/api/geospatial/geojsonUploadPut.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export interface Geospatial_GeojsonUploadPut_Request extends Global.Params { + body: Geospatial_Common.GeoJSONRequest; +} + +export interface Geospatial_GeojsonUploadPut_Response extends ApiResponse { + body: Geospatial_GeojsonUploadPut_ResponseBody; +} + +export type Geospatial_GeojsonUploadPut_ResponseBody = Geospatial_Common.GeoSpatialGeojsonUploadResponse + diff --git a/api/geospatial/geojsonUploadPut.js b/api/geospatial/geojsonUploadPut.js new file mode 100644 index 000000000..7eab590cb --- /dev/null +++ b/api/geospatial/geojsonUploadPut.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Use an OpenSearch query to upload `GeoJSON` regardless if index exists. +- When type is `geo_point`, only Point geometry is allowed +- When type is `geo_shape`, all geometry types are allowed (Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Envelope). + *
See Also: {@link undefined - geospatial.geojson_upload_put} + * + * @memberOf API-Geospatial + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function geojsonUploadPutFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/geospatial/geojson/_upload'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = geojsonUploadPutFunc; diff --git a/api/geospatial/getIp2GeoDatasource.d.ts b/api/geospatial/getIp2GeoDatasource.d.ts new file mode 100644 index 000000000..f56efabe3 --- /dev/null +++ b/api/geospatial/getIp2GeoDatasource.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export interface Geospatial_GetIp2GeoDatasource_Request extends Global.Params { + name?: Common.StringOrStringArray; +} + +export interface Geospatial_GetIp2GeoDatasource_Response extends ApiResponse { + body: Geospatial_GetIp2GeoDatasource_ResponseBody; +} + +export type Geospatial_GetIp2GeoDatasource_ResponseBody = Geospatial_Common.GetDataSourceResponse + diff --git a/api/geospatial/getIp2GeoDatasource.js b/api/geospatial/getIp2GeoDatasource.js new file mode 100644 index 000000000..937e9ced9 --- /dev/null +++ b/api/geospatial/getIp2GeoDatasource.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Get one or more IP2Geo data sources, defaulting to returning all if no names specified. + *
See Also: {@link https://docs.opensearch.org/docs/latest/ingest-pipelines/processors/ip2geo/#sending-a-get-request - geospatial.get_ip2geo_datasource} + * + * @memberOf API-Geospatial + * + * @param {object} [params] + * @param {string} [params.name] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getIp2GeoDatasourceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_plugins/geospatial/ip2geo/datasource', name].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getIp2GeoDatasourceFunc; diff --git a/api/geospatial/getUploadStats.d.ts b/api/geospatial/getUploadStats.d.ts new file mode 100644 index 000000000..6e93c2033 --- /dev/null +++ b/api/geospatial/getUploadStats.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export type Geospatial_GetUploadStats_Request = Global.Params & Record + +export interface Geospatial_GetUploadStats_Response extends ApiResponse { + body: Geospatial_GetUploadStats_ResponseBody; +} + +export type Geospatial_GetUploadStats_ResponseBody = Geospatial_Common.GeoSpatialUploadStats + diff --git a/api/geospatial/getUploadStats.js b/api/geospatial/getUploadStats.js new file mode 100644 index 000000000..119f41c97 --- /dev/null +++ b/api/geospatial/getUploadStats.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves statistics for all geospatial uploads. + *
See Also: {@link undefined - geospatial.get_upload_stats} + * + * @memberOf API-Geospatial + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUploadStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/geospatial/_upload/stats'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUploadStatsFunc; diff --git a/api/geospatial/putIp2GeoDatasource.d.ts b/api/geospatial/putIp2GeoDatasource.d.ts new file mode 100644 index 000000000..ba34c3aee --- /dev/null +++ b/api/geospatial/putIp2GeoDatasource.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export interface Geospatial_PutIp2GeoDatasource_Request extends Global.Params { + body?: Geospatial_Common.PutIP2GeoDataSourceRequest; + name: string; +} + +export interface Geospatial_PutIp2GeoDatasource_Response extends ApiResponse { + body: Geospatial_PutIp2GeoDatasource_ResponseBody; +} + +export type Geospatial_PutIp2GeoDatasource_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/geospatial/putIp2GeoDatasource.js b/api/geospatial/putIp2GeoDatasource.js new file mode 100644 index 000000000..8c59ae2c5 --- /dev/null +++ b/api/geospatial/putIp2GeoDatasource.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create a specific IP2Geo data source. +Default values: + - `endpoint`: `"https://geoip.maps.opensearch.org/v1/geolite2-city/manifest.json"` + - `update_interval_in_days`: 3. + *
See Also: {@link https://docs.opensearch.org/docs/latest/ingest-pipelines/processors/ip2geo/#data-source-options - geospatial.put_ip2geo_datasource} + * + * @memberOf API-Geospatial + * + * @param {object} params + * @param {string} params.name + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putIp2GeoDatasourceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_plugins/geospatial/ip2geo/datasource/' + name; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putIp2GeoDatasourceFunc; diff --git a/api/geospatial/putIp2GeoDatasourceSettings.d.ts b/api/geospatial/putIp2GeoDatasourceSettings.d.ts new file mode 100644 index 000000000..80e3d2b5e --- /dev/null +++ b/api/geospatial/putIp2GeoDatasourceSettings.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Geospatial_Common from '../_types/geospatial._common' +import * as Global from '../_types/_global' + +export interface Geospatial_PutIp2GeoDatasourceSettings_Request extends Global.Params { + body: Geospatial_Common.PutIP2GeoDataSourceRequest; + name: string; +} + +export interface Geospatial_PutIp2GeoDatasourceSettings_Response extends ApiResponse { + body: Geospatial_PutIp2GeoDatasourceSettings_ResponseBody; +} + +export type Geospatial_PutIp2GeoDatasourceSettings_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/geospatial/putIp2GeoDatasourceSettings.js b/api/geospatial/putIp2GeoDatasourceSettings.js new file mode 100644 index 000000000..cc8f3e225 --- /dev/null +++ b/api/geospatial/putIp2GeoDatasourceSettings.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Update a specific IP2Geo data source. + *
See Also: {@link https://docs.opensearch.org/docs/latest/ingest-pipelines/processors/ip2geo/#updating-an-ip2geo-data-source - geospatial.put_ip2geo_datasource_settings} + * + * @memberOf API-Geospatial + * + * @param {object} params + * @param {string} params.name + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putIp2GeoDatasourceSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_plugins/geospatial/ip2geo/datasource/' + name + '/_settings'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putIp2GeoDatasourceSettingsFunc; diff --git a/api/index.d.ts b/api/index.d.ts index 84e5fc406..2a81c817a 100644 --- a/api/index.d.ts +++ b/api/index.d.ts @@ -36,7 +36,7 @@ import { GetScript_Request, GetScript_Response, GetScript_ResponseBody } from '. import { PutScript_Request, PutScript_RequestBody, PutScript_Response, PutScript_ResponseBody } from './_core/putScript'; import { ScriptsPainlessExecute_Request, ScriptsPainlessExecute_RequestBody, ScriptsPainlessExecute_Response, ScriptsPainlessExecute_ResponseBody } from './_core/scriptsPainlessExecute'; import { Search_Request, Search_RequestBody, Search_Response, Search_ResponseBody } from './_core/search'; -import { SearchShards_Request, SearchShards_Response, SearchShards_ResponseBody } from './_core/searchShards'; +import { SearchShards_Request, SearchShards_RequestBody, SearchShards_Response, SearchShards_ResponseBody } from './_core/searchShards'; import { DeletePit_Request, DeletePit_RequestBody, DeletePit_Response, DeletePit_ResponseBody } from './_core/deletePit'; import { DeleteAllPits_Request, DeleteAllPits_Response, DeleteAllPits_ResponseBody } from './_core/deleteAllPits'; import { GetAllPits_Request, GetAllPits_Response, GetAllPits_ResponseBody } from './_core/getAllPits'; @@ -137,8 +137,8 @@ import { Cluster_Health_Request, Cluster_Health_Response, Cluster_Health_Respons import { Cluster_PendingTasks_Request, Cluster_PendingTasks_Response, Cluster_PendingTasks_ResponseBody } from './cluster/pendingTasks'; import { Cluster_Reroute_Request, Cluster_Reroute_RequestBody, Cluster_Reroute_Response, Cluster_Reroute_ResponseBody } from './cluster/reroute'; import { Cluster_GetWeightedRouting_Request, Cluster_GetWeightedRouting_Response, Cluster_GetWeightedRouting_ResponseBody } from './cluster/getWeightedRouting'; -import { Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody } from './cluster/putWeightedRouting'; -import { Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody } from './cluster/deleteWeightedRouting'; +import { Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_RequestBody, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody } from './cluster/putWeightedRouting'; +import { Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_RequestBody, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody } from './cluster/deleteWeightedRouting'; import { Cluster_GetSettings_Request, Cluster_GetSettings_Response, Cluster_GetSettings_ResponseBody } from './cluster/getSettings'; import { Cluster_PutSettings_Request, Cluster_PutSettings_RequestBody, Cluster_PutSettings_Response, Cluster_PutSettings_ResponseBody } from './cluster/putSettings'; import { Cluster_State_Request, Cluster_State_Response, Cluster_State_ResponseBody } from './cluster/state'; @@ -162,6 +162,32 @@ import { Insights_TopQueries_Request, Insights_TopQueries_Response, Insights_Top import { List_Help_Request, List_Help_Response, List_Help_ResponseBody } from './list/help'; import { List_Indices_Request, List_Indices_Response, List_Indices_ResponseBody } from './list/indices'; import { List_Shards_Request, List_Shards_Response, List_Shards_ResponseBody } from './list/shards'; +import { Ltr_DeleteDefaultStore_Request, Ltr_DeleteDefaultStore_Response, Ltr_DeleteDefaultStore_ResponseBody } from './ltr/deleteDefaultStore'; +import { Ltr_ListStores_Request, Ltr_ListStores_Response, Ltr_ListStores_ResponseBody } from './ltr/listStores'; +import { Ltr_CreateDefaultStore_Request, Ltr_CreateDefaultStore_Response, Ltr_CreateDefaultStore_ResponseBody } from './ltr/createDefaultStore'; +import { Ltr_CacheStats_Request, Ltr_CacheStats_Response, Ltr_CacheStats_ResponseBody } from './ltr/cacheStats'; +import { Ltr_ClearCache_Request, Ltr_ClearCache_Response, Ltr_ClearCache_ResponseBody } from './ltr/clearCache'; +import { Ltr_SearchFeatures_Request, Ltr_SearchFeatures_Response, Ltr_SearchFeatures_ResponseBody } from './ltr/searchFeatures'; +import { Ltr_DeleteFeature_Request, Ltr_DeleteFeature_Response, Ltr_DeleteFeature_ResponseBody } from './ltr/deleteFeature'; +import { Ltr_GetFeature_Request, Ltr_GetFeature_Response, Ltr_GetFeature_ResponseBody } from './ltr/getFeature'; +import { Ltr_UpdateFeature_Request, Ltr_UpdateFeature_RequestBody, Ltr_UpdateFeature_Response, Ltr_UpdateFeature_ResponseBody } from './ltr/updateFeature'; +import { Ltr_CreateFeature_Request, Ltr_CreateFeature_RequestBody, Ltr_CreateFeature_Response, Ltr_CreateFeature_ResponseBody } from './ltr/createFeature'; +import { Ltr_SearchFeaturesets_Request, Ltr_SearchFeaturesets_Response, Ltr_SearchFeaturesets_ResponseBody } from './ltr/searchFeaturesets'; +import { Ltr_DeleteFeatureset_Request, Ltr_DeleteFeatureset_Response, Ltr_DeleteFeatureset_ResponseBody } from './ltr/deleteFeatureset'; +import { Ltr_GetFeatureset_Request, Ltr_GetFeatureset_Response, Ltr_GetFeatureset_ResponseBody } from './ltr/getFeatureset'; +import { Ltr_UpdateFeatureset_Request, Ltr_UpdateFeatureset_RequestBody, Ltr_UpdateFeatureset_Response, Ltr_UpdateFeatureset_ResponseBody } from './ltr/updateFeatureset'; +import { Ltr_CreateFeatureset_Request, Ltr_CreateFeatureset_RequestBody, Ltr_CreateFeatureset_Response, Ltr_CreateFeatureset_ResponseBody } from './ltr/createFeatureset'; +import { Ltr_AddFeaturesToSet_Request, Ltr_AddFeaturesToSet_RequestBody, Ltr_AddFeaturesToSet_Response, Ltr_AddFeaturesToSet_ResponseBody } from './ltr/addFeaturesToSet'; +import { Ltr_AddFeaturesToSetByQuery_Request, Ltr_AddFeaturesToSetByQuery_Response, Ltr_AddFeaturesToSetByQuery_ResponseBody } from './ltr/addFeaturesToSetByQuery'; +import { Ltr_CreateModelFromSet_Request, Ltr_CreateModelFromSet_RequestBody, Ltr_CreateModelFromSet_Response, Ltr_CreateModelFromSet_ResponseBody } from './ltr/createModelFromSet'; +import { Ltr_SearchModels_Request, Ltr_SearchModels_Response, Ltr_SearchModels_ResponseBody } from './ltr/searchModels'; +import { Ltr_DeleteModel_Request, Ltr_DeleteModel_Response, Ltr_DeleteModel_ResponseBody } from './ltr/deleteModel'; +import { Ltr_GetModel_Request, Ltr_GetModel_Response, Ltr_GetModel_ResponseBody } from './ltr/getModel'; +import { Ltr_CreateModel_Request, Ltr_CreateModel_RequestBody, Ltr_CreateModel_Response, Ltr_CreateModel_ResponseBody } from './ltr/createModel'; +import { Ltr_DeleteStore_Request, Ltr_DeleteStore_Response, Ltr_DeleteStore_ResponseBody } from './ltr/deleteStore'; +import { Ltr_GetStore_Request, Ltr_GetStore_Response, Ltr_GetStore_ResponseBody } from './ltr/getStore'; +import { Ltr_CreateStore_Request, Ltr_CreateStore_Response, Ltr_CreateStore_ResponseBody } from './ltr/createStore'; +import { Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody } from './ltr/stats'; import { Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody } from './nodes/info'; import { Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody } from './nodes/hotThreads'; import { Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody } from './nodes/reloadSecureSettings'; @@ -201,7 +227,7 @@ import { Security_GetDistinguishedNames_Request, Security_GetDistinguishedNames_ import { Security_PatchDistinguishedNames_Request, Security_PatchDistinguishedNames_RequestBody, Security_PatchDistinguishedNames_Response, Security_PatchDistinguishedNames_ResponseBody } from './security/patchDistinguishedNames'; import { Security_DeleteDistinguishedName_Request, Security_DeleteDistinguishedName_Response, Security_DeleteDistinguishedName_ResponseBody } from './security/deleteDistinguishedName'; import { Security_GetDistinguishedName_Request, Security_GetDistinguishedName_Response, Security_GetDistinguishedName_ResponseBody } from './security/getDistinguishedName'; -import { Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody } from './security/patchDistinguishedName'; +import { Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_RequestBody, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody } from './security/patchDistinguishedName'; import { Security_UpdateDistinguishedName_Request, Security_UpdateDistinguishedName_Response, Security_UpdateDistinguishedName_ResponseBody } from './security/updateDistinguishedName'; import { Security_GetPermissionsInfo_Request, Security_GetPermissionsInfo_Response, Security_GetPermissionsInfo_ResponseBody } from './security/getPermissionsInfo'; import { Security_GetRoles_Request, Security_GetRoles_Response, Security_GetRoles_ResponseBody } from './security/getRoles'; @@ -275,7 +301,6 @@ import { Knn_TrainModel_Request, Knn_TrainModel_Response, Knn_TrainModel_Respons import { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody } from './knn/deleteModel'; import { Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody } from './knn/getModel'; import { Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody } from './knn/warmup'; -import { Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody } from './ltr/stats'; import { Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody } from './ml/executeAlgorithm'; import { Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody } from './ml/predict'; import { Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody } from './ml/trainPredict'; @@ -335,6 +360,7 @@ import { Ml_DeleteTask_Request, Ml_DeleteTask_Response, Ml_DeleteTask_ResponseBo import { Ml_GetTask_Request, Ml_GetTask_Response, Ml_GetTask_ResponseBody } from './ml/getTask'; import { Ml_GetAllTools_Request, Ml_GetAllTools_Response, Ml_GetAllTools_ResponseBody } from './ml/getAllTools'; import { Ml_GetTool_Request, Ml_GetTool_Response, Ml_GetTool_ResponseBody } from './ml/getTool'; +import { Neural_Stats_Request, Neural_Stats_Response, Neural_Stats_ResponseBody } from './neural/stats'; import { Notifications_ListChannels_Request, Notifications_ListChannels_Response, Notifications_ListChannels_ResponseBody } from './notifications/listChannels'; import { Notifications_DeleteConfigs_Request, Notifications_DeleteConfigs_Response, Notifications_DeleteConfigs_ResponseBody } from './notifications/deleteConfigs'; import { Notifications_GetConfigs_Request, Notifications_GetConfigs_RequestBody, Notifications_GetConfigs_Response, Notifications_GetConfigs_ResponseBody } from './notifications/getConfigs'; @@ -383,6 +409,24 @@ import { Rollups_Put_Request, Rollups_Put_Response, Rollups_Put_ResponseBody } f import { Rollups_Explain_Request, Rollups_Explain_Response, Rollups_Explain_ResponseBody } from './rollups/explain'; import { Rollups_Start_Request, Rollups_Start_Response, Rollups_Start_ResponseBody } from './rollups/start'; import { Rollups_Stop_Request, Rollups_Stop_Response, Rollups_Stop_ResponseBody } from './rollups/stop'; +import { SearchRelevance_GetNodeStats_Request, SearchRelevance_GetNodeStats_Response, SearchRelevance_GetNodeStats_ResponseBody } from './searchRelevance/getNodeStats'; +import { SearchRelevance_GetExperiments_Request, SearchRelevance_GetExperiments_Response, SearchRelevance_GetExperiments_ResponseBody } from './searchRelevance/getExperiments'; +import { SearchRelevance_PutExperiments_Request, SearchRelevance_PutExperiments_RequestBody, SearchRelevance_PutExperiments_Response, SearchRelevance_PutExperiments_ResponseBody } from './searchRelevance/putExperiments'; +import { SearchRelevance_DeleteExperiments_Request, SearchRelevance_DeleteExperiments_Response, SearchRelevance_DeleteExperiments_ResponseBody } from './searchRelevance/deleteExperiments'; +import { SearchRelevance_GetJudgments_Request, SearchRelevance_GetJudgments_Response, SearchRelevance_GetJudgments_ResponseBody } from './searchRelevance/getJudgments'; +import { SearchRelevance_PutJudgments_Request, SearchRelevance_PutJudgments_RequestBody, SearchRelevance_PutJudgments_Response, SearchRelevance_PutJudgments_ResponseBody } from './searchRelevance/putJudgments'; +import { SearchRelevance_DeleteJudgments_Request, SearchRelevance_DeleteJudgments_Response, SearchRelevance_DeleteJudgments_ResponseBody } from './searchRelevance/deleteJudgments'; +import { SearchRelevance_GetQuerySets_Request, SearchRelevance_GetQuerySets_Response, SearchRelevance_GetQuerySets_ResponseBody } from './searchRelevance/getQuerySets'; +import { SearchRelevance_PostQuerySets_Request, SearchRelevance_PostQuerySets_RequestBody, SearchRelevance_PostQuerySets_Response, SearchRelevance_PostQuerySets_ResponseBody } from './searchRelevance/postQuerySets'; +import { SearchRelevance_PutQuerySets_Request, SearchRelevance_PutQuerySets_RequestBody, SearchRelevance_PutQuerySets_Response, SearchRelevance_PutQuerySets_ResponseBody } from './searchRelevance/putQuerySets'; +import { SearchRelevance_DeleteQuerySets_Request, SearchRelevance_DeleteQuerySets_Response, SearchRelevance_DeleteQuerySets_ResponseBody } from './searchRelevance/deleteQuerySets'; +import { SearchRelevance_GetSearchConfigurations_Request, SearchRelevance_GetSearchConfigurations_Response, SearchRelevance_GetSearchConfigurations_ResponseBody } from './searchRelevance/getSearchConfigurations'; +import { SearchRelevance_PutSearchConfigurations_Request, SearchRelevance_PutSearchConfigurations_RequestBody, SearchRelevance_PutSearchConfigurations_Response, SearchRelevance_PutSearchConfigurations_ResponseBody } from './searchRelevance/putSearchConfigurations'; +import { SearchRelevance_DeleteSearchConfigurations_Request, SearchRelevance_DeleteSearchConfigurations_Response, SearchRelevance_DeleteSearchConfigurations_ResponseBody } from './searchRelevance/deleteSearchConfigurations'; +import { SearchRelevance_GetStats_Request, SearchRelevance_GetStats_Response, SearchRelevance_GetStats_ResponseBody } from './searchRelevance/getStats'; +import { SecurityAnalytics_GetAlerts_Request, SecurityAnalytics_GetAlerts_Response, SecurityAnalytics_GetAlerts_ResponseBody } from './securityAnalytics/getAlerts'; +import { SecurityAnalytics_GetFindings_Request, SecurityAnalytics_GetFindings_Response, SecurityAnalytics_GetFindings_ResponseBody } from './securityAnalytics/getFindings'; +import { SecurityAnalytics_SearchFindingCorrelations_Request, SecurityAnalytics_SearchFindingCorrelations_Response, SecurityAnalytics_SearchFindingCorrelations_ResponseBody } from './securityAnalytics/searchFindingCorrelations'; import { Sm_GetPolicies_Request, Sm_GetPolicies_Response, Sm_GetPolicies_ResponseBody } from './sm/getPolicies'; import { Sm_DeletePolicy_Request, Sm_DeletePolicy_Response, Sm_DeletePolicy_ResponseBody } from './sm/deletePolicy'; import { Sm_GetPolicy_Request, Sm_GetPolicy_Response, Sm_GetPolicy_ResponseBody } from './sm/getPolicy'; @@ -399,6 +443,13 @@ import { Transforms_Put_Request, Transforms_Put_Response, Transforms_Put_Respons import { Transforms_Explain_Request, Transforms_Explain_Response, Transforms_Explain_ResponseBody } from './transforms/explain'; import { Transforms_Start_Request, Transforms_Start_Response, Transforms_Start_ResponseBody } from './transforms/start'; import { Transforms_Stop_Request, Transforms_Stop_Response, Transforms_Stop_ResponseBody } from './transforms/stop'; +import { Geospatial_GetUploadStats_Request, Geospatial_GetUploadStats_Response, Geospatial_GetUploadStats_ResponseBody } from './geospatial/getUploadStats'; +import { Geospatial_GeojsonUploadPost_Request, Geospatial_GeojsonUploadPost_Response, Geospatial_GeojsonUploadPost_ResponseBody } from './geospatial/geojsonUploadPost'; +import { Geospatial_GeojsonUploadPut_Request, Geospatial_GeojsonUploadPut_Response, Geospatial_GeojsonUploadPut_ResponseBody } from './geospatial/geojsonUploadPut'; +import { Geospatial_GetIp2GeoDatasource_Request, Geospatial_GetIp2GeoDatasource_Response, Geospatial_GetIp2GeoDatasource_ResponseBody } from './geospatial/getIp2GeoDatasource'; +import { Geospatial_DeleteIp2GeoDatasource_Request, Geospatial_DeleteIp2GeoDatasource_Response, Geospatial_DeleteIp2GeoDatasource_ResponseBody } from './geospatial/deleteIp2GeoDatasource'; +import { Geospatial_PutIp2GeoDatasource_Request, Geospatial_PutIp2GeoDatasource_Response, Geospatial_PutIp2GeoDatasource_ResponseBody } from './geospatial/putIp2GeoDatasource'; +import { Geospatial_PutIp2GeoDatasourceSettings_Request, Geospatial_PutIp2GeoDatasourceSettings_Response, Geospatial_PutIp2GeoDatasourceSettings_ResponseBody } from './geospatial/putIp2GeoDatasourceSettings'; import { RemoteStore_Restore_Request, RemoteStore_Restore_RequestBody, RemoteStore_Restore_Response, RemoteStore_Restore_ResponseBody } from './remoteStore/restore'; import { SearchPipeline_Get_Request, SearchPipeline_Get_Response, SearchPipeline_Get_ResponseBody } from './searchPipeline/get'; import { SearchPipeline_Delete_Request, SearchPipeline_Delete_Response, SearchPipeline_Delete_ResponseBody } from './searchPipeline/delete'; @@ -421,6 +472,9 @@ import { Wlm_GetQueryGroup_Request, Wlm_GetQueryGroup_Response, Wlm_GetQueryGrou import { Wlm_CreateQueryGroup_Request, Wlm_CreateQueryGroup_Response, Wlm_CreateQueryGroup_ResponseBody } from './wlm/createQueryGroup'; import { Wlm_DeleteQueryGroup_Request, Wlm_DeleteQueryGroup_Response, Wlm_DeleteQueryGroup_ResponseBody } from './wlm/deleteQueryGroup'; import { Wlm_UpdateQueryGroup_Request, Wlm_UpdateQueryGroup_Response, Wlm_UpdateQueryGroup_ResponseBody } from './wlm/updateQueryGroup'; +import { Ingestion_Pause_Request, Ingestion_Pause_Response, Ingestion_Pause_ResponseBody } from './ingestion/pause'; +import { Ingestion_Resume_Request, Ingestion_Resume_Response, Ingestion_Resume_ResponseBody } from './ingestion/resume'; +import { Ingestion_GetState_Request, Ingestion_GetState_Response, Ingestion_GetState_ResponseBody } from './ingestion/getState'; export { Info_Request, Info_Response, Info_ResponseBody, @@ -445,7 +499,7 @@ export { PutScript_Request, PutScript_RequestBody, PutScript_Response, PutScript_ResponseBody, ScriptsPainlessExecute_Request, ScriptsPainlessExecute_RequestBody, ScriptsPainlessExecute_Response, ScriptsPainlessExecute_ResponseBody, Search_Request, Search_RequestBody, Search_Response, Search_ResponseBody, - SearchShards_Request, SearchShards_Response, SearchShards_ResponseBody, + SearchShards_Request, SearchShards_RequestBody, SearchShards_Response, SearchShards_ResponseBody, DeletePit_Request, DeletePit_RequestBody, DeletePit_Response, DeletePit_ResponseBody, DeleteAllPits_Request, DeleteAllPits_Response, DeleteAllPits_ResponseBody, GetAllPits_Request, GetAllPits_Response, GetAllPits_ResponseBody, @@ -546,8 +600,8 @@ export { Cluster_PendingTasks_Request, Cluster_PendingTasks_Response, Cluster_PendingTasks_ResponseBody, Cluster_Reroute_Request, Cluster_Reroute_RequestBody, Cluster_Reroute_Response, Cluster_Reroute_ResponseBody, Cluster_GetWeightedRouting_Request, Cluster_GetWeightedRouting_Response, Cluster_GetWeightedRouting_ResponseBody, - Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody, - Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody, + Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_RequestBody, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody, + Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_RequestBody, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody, Cluster_GetSettings_Request, Cluster_GetSettings_Response, Cluster_GetSettings_ResponseBody, Cluster_PutSettings_Request, Cluster_PutSettings_RequestBody, Cluster_PutSettings_Response, Cluster_PutSettings_ResponseBody, Cluster_State_Request, Cluster_State_Response, Cluster_State_ResponseBody, @@ -571,6 +625,32 @@ export { List_Help_Request, List_Help_Response, List_Help_ResponseBody, List_Indices_Request, List_Indices_Response, List_Indices_ResponseBody, List_Shards_Request, List_Shards_Response, List_Shards_ResponseBody, + Ltr_DeleteDefaultStore_Request, Ltr_DeleteDefaultStore_Response, Ltr_DeleteDefaultStore_ResponseBody, + Ltr_ListStores_Request, Ltr_ListStores_Response, Ltr_ListStores_ResponseBody, + Ltr_CreateDefaultStore_Request, Ltr_CreateDefaultStore_Response, Ltr_CreateDefaultStore_ResponseBody, + Ltr_CacheStats_Request, Ltr_CacheStats_Response, Ltr_CacheStats_ResponseBody, + Ltr_ClearCache_Request, Ltr_ClearCache_Response, Ltr_ClearCache_ResponseBody, + Ltr_SearchFeatures_Request, Ltr_SearchFeatures_Response, Ltr_SearchFeatures_ResponseBody, + Ltr_DeleteFeature_Request, Ltr_DeleteFeature_Response, Ltr_DeleteFeature_ResponseBody, + Ltr_GetFeature_Request, Ltr_GetFeature_Response, Ltr_GetFeature_ResponseBody, + Ltr_UpdateFeature_Request, Ltr_UpdateFeature_RequestBody, Ltr_UpdateFeature_Response, Ltr_UpdateFeature_ResponseBody, + Ltr_CreateFeature_Request, Ltr_CreateFeature_RequestBody, Ltr_CreateFeature_Response, Ltr_CreateFeature_ResponseBody, + Ltr_SearchFeaturesets_Request, Ltr_SearchFeaturesets_Response, Ltr_SearchFeaturesets_ResponseBody, + Ltr_DeleteFeatureset_Request, Ltr_DeleteFeatureset_Response, Ltr_DeleteFeatureset_ResponseBody, + Ltr_GetFeatureset_Request, Ltr_GetFeatureset_Response, Ltr_GetFeatureset_ResponseBody, + Ltr_UpdateFeatureset_Request, Ltr_UpdateFeatureset_RequestBody, Ltr_UpdateFeatureset_Response, Ltr_UpdateFeatureset_ResponseBody, + Ltr_CreateFeatureset_Request, Ltr_CreateFeatureset_RequestBody, Ltr_CreateFeatureset_Response, Ltr_CreateFeatureset_ResponseBody, + Ltr_AddFeaturesToSet_Request, Ltr_AddFeaturesToSet_RequestBody, Ltr_AddFeaturesToSet_Response, Ltr_AddFeaturesToSet_ResponseBody, + Ltr_AddFeaturesToSetByQuery_Request, Ltr_AddFeaturesToSetByQuery_Response, Ltr_AddFeaturesToSetByQuery_ResponseBody, + Ltr_CreateModelFromSet_Request, Ltr_CreateModelFromSet_RequestBody, Ltr_CreateModelFromSet_Response, Ltr_CreateModelFromSet_ResponseBody, + Ltr_SearchModels_Request, Ltr_SearchModels_Response, Ltr_SearchModels_ResponseBody, + Ltr_DeleteModel_Request, Ltr_DeleteModel_Response, Ltr_DeleteModel_ResponseBody, + Ltr_GetModel_Request, Ltr_GetModel_Response, Ltr_GetModel_ResponseBody, + Ltr_CreateModel_Request, Ltr_CreateModel_RequestBody, Ltr_CreateModel_Response, Ltr_CreateModel_ResponseBody, + Ltr_DeleteStore_Request, Ltr_DeleteStore_Response, Ltr_DeleteStore_ResponseBody, + Ltr_GetStore_Request, Ltr_GetStore_Response, Ltr_GetStore_ResponseBody, + Ltr_CreateStore_Request, Ltr_CreateStore_Response, Ltr_CreateStore_ResponseBody, + Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody, Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody, Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody, Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody, @@ -610,7 +690,7 @@ export { Security_PatchDistinguishedNames_Request, Security_PatchDistinguishedNames_RequestBody, Security_PatchDistinguishedNames_Response, Security_PatchDistinguishedNames_ResponseBody, Security_DeleteDistinguishedName_Request, Security_DeleteDistinguishedName_Response, Security_DeleteDistinguishedName_ResponseBody, Security_GetDistinguishedName_Request, Security_GetDistinguishedName_Response, Security_GetDistinguishedName_ResponseBody, - Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody, + Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_RequestBody, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody, Security_UpdateDistinguishedName_Request, Security_UpdateDistinguishedName_Response, Security_UpdateDistinguishedName_ResponseBody, Security_GetPermissionsInfo_Request, Security_GetPermissionsInfo_Response, Security_GetPermissionsInfo_ResponseBody, Security_GetRoles_Request, Security_GetRoles_Response, Security_GetRoles_ResponseBody, @@ -684,7 +764,6 @@ export { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody, Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody, Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody, - Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody, Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody, Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody, Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody, @@ -744,6 +823,7 @@ export { Ml_GetTask_Request, Ml_GetTask_Response, Ml_GetTask_ResponseBody, Ml_GetAllTools_Request, Ml_GetAllTools_Response, Ml_GetAllTools_ResponseBody, Ml_GetTool_Request, Ml_GetTool_Response, Ml_GetTool_ResponseBody, + Neural_Stats_Request, Neural_Stats_Response, Neural_Stats_ResponseBody, Notifications_ListChannels_Request, Notifications_ListChannels_Response, Notifications_ListChannels_ResponseBody, Notifications_DeleteConfigs_Request, Notifications_DeleteConfigs_Response, Notifications_DeleteConfigs_ResponseBody, Notifications_GetConfigs_Request, Notifications_GetConfigs_RequestBody, Notifications_GetConfigs_Response, Notifications_GetConfigs_ResponseBody, @@ -792,6 +872,24 @@ export { Rollups_Explain_Request, Rollups_Explain_Response, Rollups_Explain_ResponseBody, Rollups_Start_Request, Rollups_Start_Response, Rollups_Start_ResponseBody, Rollups_Stop_Request, Rollups_Stop_Response, Rollups_Stop_ResponseBody, + SearchRelevance_GetNodeStats_Request, SearchRelevance_GetNodeStats_Response, SearchRelevance_GetNodeStats_ResponseBody, + SearchRelevance_GetExperiments_Request, SearchRelevance_GetExperiments_Response, SearchRelevance_GetExperiments_ResponseBody, + SearchRelevance_PutExperiments_Request, SearchRelevance_PutExperiments_RequestBody, SearchRelevance_PutExperiments_Response, SearchRelevance_PutExperiments_ResponseBody, + SearchRelevance_DeleteExperiments_Request, SearchRelevance_DeleteExperiments_Response, SearchRelevance_DeleteExperiments_ResponseBody, + SearchRelevance_GetJudgments_Request, SearchRelevance_GetJudgments_Response, SearchRelevance_GetJudgments_ResponseBody, + SearchRelevance_PutJudgments_Request, SearchRelevance_PutJudgments_RequestBody, SearchRelevance_PutJudgments_Response, SearchRelevance_PutJudgments_ResponseBody, + SearchRelevance_DeleteJudgments_Request, SearchRelevance_DeleteJudgments_Response, SearchRelevance_DeleteJudgments_ResponseBody, + SearchRelevance_GetQuerySets_Request, SearchRelevance_GetQuerySets_Response, SearchRelevance_GetQuerySets_ResponseBody, + SearchRelevance_PostQuerySets_Request, SearchRelevance_PostQuerySets_RequestBody, SearchRelevance_PostQuerySets_Response, SearchRelevance_PostQuerySets_ResponseBody, + SearchRelevance_PutQuerySets_Request, SearchRelevance_PutQuerySets_RequestBody, SearchRelevance_PutQuerySets_Response, SearchRelevance_PutQuerySets_ResponseBody, + SearchRelevance_DeleteQuerySets_Request, SearchRelevance_DeleteQuerySets_Response, SearchRelevance_DeleteQuerySets_ResponseBody, + SearchRelevance_GetSearchConfigurations_Request, SearchRelevance_GetSearchConfigurations_Response, SearchRelevance_GetSearchConfigurations_ResponseBody, + SearchRelevance_PutSearchConfigurations_Request, SearchRelevance_PutSearchConfigurations_RequestBody, SearchRelevance_PutSearchConfigurations_Response, SearchRelevance_PutSearchConfigurations_ResponseBody, + SearchRelevance_DeleteSearchConfigurations_Request, SearchRelevance_DeleteSearchConfigurations_Response, SearchRelevance_DeleteSearchConfigurations_ResponseBody, + SearchRelevance_GetStats_Request, SearchRelevance_GetStats_Response, SearchRelevance_GetStats_ResponseBody, + SecurityAnalytics_GetAlerts_Request, SecurityAnalytics_GetAlerts_Response, SecurityAnalytics_GetAlerts_ResponseBody, + SecurityAnalytics_GetFindings_Request, SecurityAnalytics_GetFindings_Response, SecurityAnalytics_GetFindings_ResponseBody, + SecurityAnalytics_SearchFindingCorrelations_Request, SecurityAnalytics_SearchFindingCorrelations_Response, SecurityAnalytics_SearchFindingCorrelations_ResponseBody, Sm_GetPolicies_Request, Sm_GetPolicies_Response, Sm_GetPolicies_ResponseBody, Sm_DeletePolicy_Request, Sm_DeletePolicy_Response, Sm_DeletePolicy_ResponseBody, Sm_GetPolicy_Request, Sm_GetPolicy_Response, Sm_GetPolicy_ResponseBody, @@ -808,6 +906,13 @@ export { Transforms_Explain_Request, Transforms_Explain_Response, Transforms_Explain_ResponseBody, Transforms_Start_Request, Transforms_Start_Response, Transforms_Start_ResponseBody, Transforms_Stop_Request, Transforms_Stop_Response, Transforms_Stop_ResponseBody, + Geospatial_GetUploadStats_Request, Geospatial_GetUploadStats_Response, Geospatial_GetUploadStats_ResponseBody, + Geospatial_GeojsonUploadPost_Request, Geospatial_GeojsonUploadPost_Response, Geospatial_GeojsonUploadPost_ResponseBody, + Geospatial_GeojsonUploadPut_Request, Geospatial_GeojsonUploadPut_Response, Geospatial_GeojsonUploadPut_ResponseBody, + Geospatial_GetIp2GeoDatasource_Request, Geospatial_GetIp2GeoDatasource_Response, Geospatial_GetIp2GeoDatasource_ResponseBody, + Geospatial_DeleteIp2GeoDatasource_Request, Geospatial_DeleteIp2GeoDatasource_Response, Geospatial_DeleteIp2GeoDatasource_ResponseBody, + Geospatial_PutIp2GeoDatasource_Request, Geospatial_PutIp2GeoDatasource_Response, Geospatial_PutIp2GeoDatasource_ResponseBody, + Geospatial_PutIp2GeoDatasourceSettings_Request, Geospatial_PutIp2GeoDatasourceSettings_Response, Geospatial_PutIp2GeoDatasourceSettings_ResponseBody, RemoteStore_Restore_Request, RemoteStore_Restore_RequestBody, RemoteStore_Restore_Response, RemoteStore_Restore_ResponseBody, SearchPipeline_Get_Request, SearchPipeline_Get_Response, SearchPipeline_Get_ResponseBody, SearchPipeline_Delete_Request, SearchPipeline_Delete_Response, SearchPipeline_Delete_ResponseBody, @@ -830,4 +935,7 @@ export { Wlm_CreateQueryGroup_Request, Wlm_CreateQueryGroup_Response, Wlm_CreateQueryGroup_ResponseBody, Wlm_DeleteQueryGroup_Request, Wlm_DeleteQueryGroup_Response, Wlm_DeleteQueryGroup_ResponseBody, Wlm_UpdateQueryGroup_Request, Wlm_UpdateQueryGroup_Response, Wlm_UpdateQueryGroup_ResponseBody, + Ingestion_Pause_Request, Ingestion_Pause_Response, Ingestion_Pause_ResponseBody, + Ingestion_Resume_Request, Ingestion_Resume_Response, Ingestion_Resume_ResponseBody, + Ingestion_GetState_Request, Ingestion_GetState_Response, Ingestion_GetState_ResponseBody, }; \ No newline at end of file diff --git a/api/indices/clearCache.js b/api/indices/clearCache.js index 624bec3f0..2bc28d08c 100644 --- a/api/indices/clearCache.js +++ b/api/indices/clearCache.js @@ -28,10 +28,10 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.fielddata] - If `true`, clears the fields cache. Use the `fields` parameter to clear the cache of specific fields only. - * @param {string} [params.fields] - Comma-separated list of field names used to limit the `fielddata` parameter. + * @param {string} [params.fields] - A comma-separated list of field names used to limit the `fielddata` parameter. * @param {boolean} [params.file=false] - If `true`, clears the unused entries from the file cache on nodes with the Search role. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * @param {boolean} [params.query] - If `true`, clears the query cache. * @param {boolean} [params.request] - If `true`, clears the request cache. * diff --git a/api/indices/close.js b/api/indices/close.js index f2f9a17d2..76c491d1e 100644 --- a/api/indices/close.js +++ b/api/indices/close.js @@ -32,7 +32,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). - * @param {string} params.index - Comma-separated list or wildcard expression of index names used to limit the request. + * @param {string} params.index - A comma-separated list or wildcard expression of index names used to limit the request. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/create.js b/api/indices/create.js index 0b31096cb..2631ad242 100644 --- a/api/indices/create.js +++ b/api/indices/create.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). - * @param {string} params.index - Name of the index you wish to create. + * @param {string} params.index - The name of the index you wish to create. * @param {object} [params.body] - The configuration for the index (`settings` and `mappings`) * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/indices/dataStreamsStats.js b/api/indices/dataStreamsStats.js index a5a1dec15..4864ecc4e 100644 --- a/api/indices/dataStreamsStats.js +++ b/api/indices/dataStreamsStats.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Indices * * @param {object} [params] - * @param {string} [params.name] - Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. + * @param {string} [params.name] - A comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/delete.js b/api/indices/delete.js index e8e8c6ae7..96c02fb36 100644 --- a/api/indices/delete.js +++ b/api/indices/delete.js @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.ignore_unavailable=false] - If `false`, the request returns an error if it targets a missing or closed index. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} params.index - Comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. + * @param {string} params.index - A comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/deleteAlias.js b/api/indices/deleteAlias.js index 1c2fb9a68..4710073c6 100644 --- a/api/indices/deleteAlias.js +++ b/api/indices/deleteAlias.js @@ -28,8 +28,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} params.index - Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). - * @param {string} params.name - Comma-separated list of aliases to remove. Supports wildcards (`*`). To remove all aliases, use `*` or `_all`. + * @param {string} params.index - A comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). + * @param {string} params.name - A comma-separated list of aliases to remove. Supports wildcards (`*`). To remove all aliases, use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/deleteDataStream.js b/api/indices/deleteDataStream.js index f96bf8a71..8869bad46 100644 --- a/api/indices/deleteDataStream.js +++ b/api/indices/deleteDataStream.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @memberOf API-Indices * * @param {object} params - * @param {string} params.name - Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. + * @param {string} params.name - A comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/deleteIndexTemplate.js b/api/indices/deleteIndexTemplate.js index b9b8db345..e223ea573 100644 --- a/api/indices/deleteIndexTemplate.js +++ b/api/indices/deleteIndexTemplate.js @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} params.name - Name of the index template to delete. Wildcard (*) expressions are supported. + * @param {string} params.name - The name of the index template to delete. Wildcard (*) expressions are supported. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/exists.js b/api/indices/exists.js index 28ab92772..8aa317850 100644 --- a/api/indices/exists.js +++ b/api/indices/exists.js @@ -32,7 +32,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.ignore_unavailable=false] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.include_defaults=false] - If `true`, return all default settings in the response. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/existsAlias.js b/api/indices/existsAlias.js index eec6e1130..9225e24d6 100644 --- a/api/indices/existsAlias.js +++ b/api/indices/existsAlias.js @@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.ignore_unavailable] - If `false`, requests that include a missing data stream or index in the target indexes or data streams return an error. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. - * @param {string} params.name - Comma-separated list of aliases to check. Supports wildcards (`*`). - * @param {string} [params.index] - Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} params.name - A comma-separated list of aliases to check. Supports wildcards (`*`). + * @param {string} [params.index] - A comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/existsIndexTemplate.js b/api/indices/existsIndexTemplate.js index 7f3eaface..63b30fa48 100644 --- a/api/indices/existsIndexTemplate.js +++ b/api/indices/existsIndexTemplate.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.flat_settings=false] - Return settings in flat format. * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} params.name - Name of the index template to check existence of. Wildcard (*) expressions are supported. + * @param {string} params.name - The name of the index template to check existence of. Wildcard (*) expressions are supported. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/flush.js b/api/indices/flush.js index 1968d0e62..89cfb20f7 100644 --- a/api/indices/flush.js +++ b/api/indices/flush.js @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.force] - If `true`, the request forces a flush even if there are no changes to commit to the index. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.wait_if_ongoing=true] - If `true`, the flush operation blocks until execution when another flush operation is running. If `false`, OpenSearch returns an error if you request a flush when another flush operation is running. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to flush. Supports wildcards (`*`). To flush all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to flush. Supports wildcards (`*`). To flush all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/get.js b/api/indices/get.js index 3d15ae2e1..b121921a6 100644 --- a/api/indices/get.js +++ b/api/indices/get.js @@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.include_defaults=false] - If `true`, return all default settings in the response. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} params.index - Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. + * @param {string} params.index - A comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getAlias.js b/api/indices/getAlias.js index 6c0071191..f8a08acae 100644 --- a/api/indices/getAlias.js +++ b/api/indices/getAlias.js @@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. - * @param {string} [params.name] - Comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. - * @param {string} [params.index] - Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.name] - A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getDataStream.js b/api/indices/getDataStream.js index 24200b9e6..a7e30ee0f 100644 --- a/api/indices/getDataStream.js +++ b/api/indices/getDataStream.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Indices * * @param {object} [params] - * @param {string} [params.name] - Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. + * @param {string} [params.name] - A comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getFieldMapping.js b/api/indices/getFieldMapping.js index f31424090..195a51dbd 100644 --- a/api/indices/getFieldMapping.js +++ b/api/indices/getFieldMapping.js @@ -30,8 +30,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.include_defaults] - If `true`, return all default settings in the response. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. - * @param {string} params.fields - Comma-separated list or wildcard expression of fields used to limit returned information. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} params.fields - A comma-separated list or wildcard expression of fields used to limit returned information. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getIndexTemplate.js b/api/indices/getIndexTemplate.js index 065785541..027dec182 100644 --- a/api/indices/getIndexTemplate.js +++ b/api/indices/getIndexTemplate.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} [params.name] - Name of the index template to retrieve. Wildcard (*) expressions are supported. + * @param {string} [params.name] - The name of the index template to retrieve. Wildcard (*) expressions are supported. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getMapping.js b/api/indices/getMapping.js index e5bbb106a..dc268c509 100644 --- a/api/indices/getMapping.js +++ b/api/indices/getMapping.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * diff --git a/api/indices/getSettings.js b/api/indices/getSettings.js index b1333b4b0..505542148 100644 --- a/api/indices/getSettings.js +++ b/api/indices/getSettings.js @@ -33,8 +33,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.include_defaults=false] - If `true`, return all default settings in the response. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} [params.name] - Comma-separated list or wildcard expression of settings to retrieve. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.name] - A comma-separated list or wildcard expression of settings to retrieve. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getTemplate.js b/api/indices/getTemplate.js index 752e9d8c2..d93226edf 100644 --- a/api/indices/getTemplate.js +++ b/api/indices/getTemplate.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} [params.name] - Comma-separated list of index template names used to limit the request. Wildcard (`*`) expressions are supported. To return all index templates, omit this parameter or use a value of `_all` or `*`. + * @param {string} [params.name] - A comma-separated list of index template names used to limit the request. Wildcard (`*`) expressions are supported. To return all index templates, omit this parameter or use a value of `_all` or `*`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/getUpgrade.js b/api/indices/getUpgrade.js index 94020836b..5d306de8b 100644 --- a/api/indices/getUpgrade.js +++ b/api/indices/getUpgrade.js @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both. * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indexes should be ignored when unavailable (missing or closed). - * @param {array} [params.index] - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + * @param {array} [params.index] - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/open.js b/api/indices/open.js index 2e871b41e..296143eb8 100644 --- a/api/indices/open.js +++ b/api/indices/open.js @@ -34,7 +34,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). * @param {boolean} [params.wait_for_completion=true] - Should this request wait until the operation has completed before returning. - * @param {string} params.index - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). By default, you must explicitly name the indexes you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. + * @param {string} params.index - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). By default, you must explicitly name the indexes you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/putAlias.js b/api/indices/putAlias.js index 92529ac6e..e2a69c039 100644 --- a/api/indices/putAlias.js +++ b/api/indices/putAlias.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.name] - Alias to update. If the alias doesn't exist, the request creates it. Index alias names support date math. - * @param {string} [params.index] - Comma-separated list of data streams or indexes to add. Supports wildcards (`*`). Wildcard patterns that match both data streams and indexes return an error. + * @param {string} [params.index] - A comma-separated list of data streams or indexes to add. Supports wildcards (`*`). Wildcard patterns that match both data streams and indexes return an error. * @param {object} [params.body] - The settings for the alias, such as `routing` or `filter` * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/indices/putSettings.js b/api/indices/putSettings.js index 93168b73d..f12018610 100644 --- a/api/indices/putSettings.js +++ b/api/indices/putSettings.js @@ -33,8 +33,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. * @param {boolean} [params.preserve_existing=false] - If `true`, existing index settings remain unchanged. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * @param {object} params.body - The index settings to be updated. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {object} params.body - The configuration settings for an index. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/recovery.js b/api/indices/recovery.js index 2b6817030..f11979698 100644 --- a/api/indices/recovery.js +++ b/api/indices/recovery.js @@ -27,7 +27,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {object} [params] * @param {boolean} [params.active_only=false] - If `true`, the response only includes ongoing shard recoveries. * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about shard recoveries. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/refresh.js b/api/indices/refresh.js index 0cc6dc8bf..29591be92 100644 --- a/api/indices/refresh.js +++ b/api/indices/refresh.js @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/rollover.js b/api/indices/rollover.js index be4603d21..bd999e5f5 100644 --- a/api/indices/rollover.js +++ b/api/indices/rollover.js @@ -32,7 +32,7 @@ is considered to be too large or too old. * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). * @param {string} params.alias - Name of the data stream or index alias to roll over. - * @param {string} [params.new_index] - Name of the index to create. Supports date math. Data streams do not support this parameter. + * @param {string} [params.new_index] - The name of the index to create. Supports date math. Data streams do not support this parameter. * @param {object} [params.body] - The conditions that needs to be met for executing rollover * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/indices/segments.js b/api/indices/segments.js index 466ed7823..30fd0e5dd 100644 --- a/api/indices/segments.js +++ b/api/indices/segments.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @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`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. * @param {boolean} [params.verbose=false] - If `true`, the request returns a verbose response. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/shardStores.js b/api/indices/shardStores.js index 9f6852765..e912cc560 100644 --- a/api/indices/shardStores.js +++ b/api/indices/shardStores.js @@ -25,11 +25,11 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Indices * * @param {object} [params] - * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. + * @param {boolean} [params.allow_no_indices=false] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. * @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. - * @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indexes are not included in the response. - * @param {string} [params.status] - List of shard health statuses used to limit the request. - * @param {string} [params.index] - List of data streams, indexes, and aliases used to limit the request. + * @param {boolean} [params.ignore_unavailable=false] - If `true`, missing or closed indexes are not included in the response. + * @param {string} [params.status=yellow,red] - A list of shard health statuses used to limit the request. + * @param {string} [params.index] - Limits health reporting to a specific source. Can be a single source or a comma-separated list of sources (comprised of data streams, indexes, and aliases). * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/simulateTemplate.js b/api/indices/simulateTemplate.js index f4009ff93..f4f7f539a 100644 --- a/api/indices/simulateTemplate.js +++ b/api/indices/simulateTemplate.js @@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @param {boolean} [params.create=false] - If `true`, the template passed in the body is only used if no existing templates match the same index patterns. If `false`, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {string} [params.name] - Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body. - * @param {object} [params.body] - New index template definition to be simulated, if no index template name is specified. + * @param {string} [params.name] - The name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body. + * @param {object} [params.body] - The configuration for an index template. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/stats.js b/api/indices/stats.js index 362b8f78e..6492eba63 100644 --- a/api/indices/stats.js +++ b/api/indices/stats.js @@ -25,12 +25,12 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Indices * * @param {object} [params] - * @param {string} [params.completion_fields] - Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. + * @param {string} [params.completion_fields] - A comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. * @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.fielddata_fields] - Comma-separated list or wildcard expressions of fields to include in field data statistics. - * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. + * @param {string} [params.fielddata_fields] - A comma-separated list or wildcard expressions of fields to include in field data statistics. + * @param {string} [params.fields] - A comma-separated list or wildcard expressions of fields to include in the statistics. * @param {boolean} [params.forbid_closed_indices=true] - If `true`, statistics are not collected from closed indexes. - * @param {string} [params.groups] - Comma-separated list of search groups to include in the search statistics. + * @param {string} [params.groups] - A comma-separated list of search groups to include in the search statistics. * @param {boolean} [params.include_segment_file_sizes=false] - If `true`, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). * @param {boolean} [params.include_unloaded_segments=false] - If `true`, the response includes information from segments that are not loaded into memory. * @param {string} [params.level] - Indicates whether statistics are aggregated at the cluster, index, or shard level. diff --git a/api/indices/upgrade.js b/api/indices/upgrade.js index 43b18cb47..8557f7c82 100644 --- a/api/indices/upgrade.js +++ b/api/indices/upgrade.js @@ -30,7 +30,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indexes should be ignored when unavailable (missing or closed). * @param {boolean} [params.only_ancient_segments] - If `true`, only ancient (an older Lucene major release) segments will be upgraded. * @param {boolean} [params.wait_for_completion=false] - Should this request wait until the operation has completed before returning. - * @param {array} [params.index] - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + * @param {array} [params.index] - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/indices/validateQuery.js b/api/indices/validateQuery.js index 46406a24d..444a7771d 100644 --- a/api/indices/validateQuery.js +++ b/api/indices/validateQuery.js @@ -37,7 +37,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @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. * @param {string} [params.q] - Query in the Lucene query string syntax. * @param {boolean} [params.rewrite] - If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. * @param {object} [params.body] - The query definition specified with the Query DSL * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/ingestion/_api.js b/api/ingestion/_api.js new file mode 100644 index 000000000..44230bb67 --- /dev/null +++ b/api/ingestion/_api.js @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Ingestion */ + +function IngestionApi(bindObj) { + this.getState = require('./getState').bind(bindObj); + this.pause = require('./pause').bind(bindObj); + this.resume = require('./resume').bind(bindObj); + + // Deprecated: Use getState instead. + this.get_state = require('./getState').bind(bindObj); +} + +module.exports = IngestionApi; diff --git a/api/ingestion/getState.d.ts b/api/ingestion/getState.d.ts new file mode 100644 index 000000000..aaea391aa --- /dev/null +++ b/api/ingestion/getState.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' +import * as Ingestion_Common from '../_types/ingestion._common' + +export interface Ingestion_GetState_Request extends Global.Params { + index: string; + next_token?: string; + size?: number; + timeout?: Common.Duration; +} + +export interface Ingestion_GetState_Response extends ApiResponse { + body: Ingestion_GetState_ResponseBody; +} + +export type Ingestion_GetState_ResponseBody = Ingestion_Common.GetIngestionStateResponse + diff --git a/api/ingestion/getState.js b/api/ingestion/getState.js new file mode 100644 index 000000000..3b83cdd59 --- /dev/null +++ b/api/ingestion/getState.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Use this API to retrieve the ingestion state for a given index. + *
See Also: {@link https://docs.opensearch.org/docs/latest/api-reference/document-apis/pull-based-ingestion-management/ - ingestion.get_state} + * + * @memberOf API-Ingestion + * + * @param {object} params + * @param {string} [params.next_token] - Token to retrieve the next page of results. + * @param {number} [params.size] - Number of results to return per page. + * @param {string} [params.timeout] - Timeout for the request. + * @param {string} params.index - Index for which ingestion state should be retrieved. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getStateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/ingestion/_state'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getStateFunc; diff --git a/api/ingestion/pause.d.ts b/api/ingestion/pause.d.ts new file mode 100644 index 000000000..c17677faa --- /dev/null +++ b/api/ingestion/pause.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' +import * as Ingestion_Common from '../_types/ingestion._common' + +export interface Ingestion_Pause_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + index: string; + timeout?: Common.Duration; +} + +export interface Ingestion_Pause_Response extends ApiResponse { + body: Ingestion_Pause_ResponseBody; +} + +export type Ingestion_Pause_ResponseBody = Ingestion_Common.PauseIngestionResponse + diff --git a/api/ingestion/pause.js b/api/ingestion/pause.js new file mode 100644 index 000000000..7af91c8b7 --- /dev/null +++ b/api/ingestion/pause.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Use this API to pause ingestion for a given index. + *
See Also: {@link https://docs.opensearch.org/docs/latest/api-reference/document-apis/pull-based-ingestion-management/ - ingestion.pause} + * + * @memberOf API-Ingestion + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Time to wait for cluster manager connection. + * @param {string} [params.timeout] - Timeout for the request. + * @param {string} params.index - Index for which ingestion should be paused. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pauseFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/ingestion/_pause'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pauseFunc; diff --git a/api/ingestion/resume.d.ts b/api/ingestion/resume.d.ts new file mode 100644 index 000000000..e70c188b0 --- /dev/null +++ b/api/ingestion/resume.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' +import * as Ingestion_Common from '../_types/ingestion._common' + +export interface Ingestion_Resume_Request extends Global.Params { + body?: Ingestion_Common.ResumeIngestionRequest; + cluster_manager_timeout?: Common.Duration; + index: string; + timeout?: Common.Duration; +} + +export interface Ingestion_Resume_Response extends ApiResponse { + body: Ingestion_Resume_ResponseBody; +} + +export type Ingestion_Resume_ResponseBody = Ingestion_Common.ResumeIngestionResponse + diff --git a/api/ingestion/resume.js b/api/ingestion/resume.js new file mode 100644 index 000000000..071d74a9d --- /dev/null +++ b/api/ingestion/resume.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Use this API to resume ingestion for the given index. + *
See Also: {@link https://docs.opensearch.org/docs/latest/api-reference/document-apis/pull-based-ingestion-management/ - ingestion.resume} + * + * @memberOf API-Ingestion + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Time to wait for cluster manager connection. + * @param {string} [params.timeout] - Timeout for the request. + * @param {string} params.index - Index for which ingestion should be resumed. + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function resumeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/ingestion/_resume'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = resumeFunc; diff --git a/api/insights/topQueries.d.ts b/api/insights/topQueries.d.ts index e7d45594c..cc18c75de 100644 --- a/api/insights/topQueries.d.ts +++ b/api/insights/topQueries.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' import * as Insights_Common from '../_types/insights._common' export interface Insights_TopQueries_Request extends Global.Params { - type: 'cpu' | 'latency' | 'memory'; + type: Insights_Common.MetricType; } export interface Insights_TopQueries_Response extends ApiResponse { diff --git a/api/knn/searchModels.d.ts b/api/knn/searchModels.d.ts index dbd42e219..1f7d98866 100644 --- a/api/knn/searchModels.d.ts +++ b/api/knn/searchModels.d.ts @@ -72,5 +72,5 @@ export interface Knn_SearchModels_Response extends ApiResponse { body: Knn_SearchModels_ResponseBody; } -export type Knn_SearchModels_ResponseBody = Core_Search.ResponseBody +export type Knn_SearchModels_ResponseBody = Core_Search.SearchResultJsonValue & Record diff --git a/api/knn/searchModels.js b/api/knn/searchModels.js index 77edcb388..8a9ea4542 100644 --- a/api/knn/searchModels.js +++ b/api/knn/searchModels.js @@ -36,7 +36,7 @@ const { normalizeArguments } = require('../utils'); * @param {boolean} [params.ccs_minimize_roundtrips=true] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. * @param {string} [params.default_operator] - The default operator for query string query (AND or OR). * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string. - * @param {array} [params.docvalue_fields] - Comma-separated list of fields to return as the docvalue representation of a field for each hit. + * @param {array} [params.docvalue_fields] - A comma-separated list of fields to return as the docvalue representation of a field for each hit. * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both. * @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit. * @param {number} [params.from=0] - Starting offset. @@ -49,14 +49,14 @@ const { normalizeArguments } = require('../utils'); * @param {string} [params.q] - Query in the Lucene query string syntax. * @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting. * @param {boolean} [params.rest_total_hits_as_int=false] - Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - * @param {string} [params.routing] - Comma-separated list of specific routing values. + * @param {string} [params.routing] - A comma-separated list of specific routing values. * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search. * @param {string} [params.search_type] - Search operation type. * @param {boolean} [params.seq_no_primary_term] - Specify whether to return sequence number and primary term of the last modification of each hit. * @param {number} [params.size=10] - Number of hits to return. - * @param {array} [params.sort] - Comma-separated list of : pairs. + * @param {array} [params.sort] - A comma-separated list of : pairs. * @param {array} [params.stats] - Specific 'tag' of the request for logging and statistical purposes. - * @param {array} [params.stored_fields] - Comma-separated list of stored fields to return. + * @param {array} [params.stored_fields] - A comma-separated list of stored fields to return. * @param {string} [params.suggest_field] - Specify which field to use for suggestions. * @param {string} [params.suggest_mode] - Specify suggest mode. * @param {number} [params.suggest_size] - How many suggestions to return in response. diff --git a/api/knn/stats.d.ts b/api/knn/stats.d.ts index 37b7a581b..6038643e8 100644 --- a/api/knn/stats.d.ts +++ b/api/knn/stats.d.ts @@ -21,7 +21,7 @@ import * as Knn_Common from '../_types/knn._common' export interface Knn_Stats_Request extends Global.Params { node_id?: string[]; - stat?: 'cache_capacity_reached' | 'circuit_breaker_triggered' | 'eviction_count' | 'faiss_initialized' | 'graph_index_errors' | 'graph_index_requests' | 'graph_memory_usage' | 'graph_memory_usage_percentage' | 'graph_query_errors' | 'graph_query_requests' | 'graph_stats' | 'hit_count' | 'indexing_from_model_degraded' | 'indices_in_cache' | 'knn_query_requests' | 'knn_query_with_filter_requests' | 'load_exception_count' | 'load_success_count' | 'lucene_initialized' | 'max_distance_query_requests' | 'max_distance_query_with_filter_requests' | 'min_score_query_requests' | 'min_score_query_with_filter_requests' | 'miss_count' | 'model_index_status' | 'nmslib_initialized' | 'script_compilation_errors' | 'script_compilations' | 'script_query_errors' | 'script_query_requests' | 'total_load_time' | 'training_errors' | 'training_memory_usage' | 'training_memory_usage_percentage' | 'training_requests'[]; + stat?: Knn_Common.KnnStatName | Knn_Common.KnnStatName[]; timeout?: Common.Duration; } diff --git a/api/knn/stats.js b/api/knn/stats.js index 1c47936a2..11379c76d 100644 --- a/api/knn/stats.js +++ b/api/knn/stats.js @@ -26,8 +26,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * * @param {object} [params] * @param {string} [params.timeout] - Operation timeout. - * @param {array} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. - * @param {array} [params.stat] - Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. + * @param {array} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {string} [params.stat] - A comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/knn/warmup.js b/api/knn/warmup.js index 815cee29c..bb97c796d 100644 --- a/api/knn/warmup.js +++ b/api/knn/warmup.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @memberOf API-Knn * * @param {object} params - * @param {array} params.index - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + * @param {array} params.index - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/list/indices.d.ts b/api/list/indices.d.ts index ff526c54f..0800a0dec 100644 --- a/api/list/indices.d.ts +++ b/api/list/indices.d.ts @@ -35,7 +35,7 @@ export interface List_Indices_Request extends Global.Params { pri?: boolean; s?: string[]; size?: number; - sort?: 'asc' | 'desc'; + sort?: Common.SortOrder; time?: Common.TimeUnit; v?: boolean; } diff --git a/api/list/indices.js b/api/list/indices.js index 7e4671c62..ec4b7eb45 100644 --- a/api/list/indices.js +++ b/api/list/indices.js @@ -29,7 +29,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @param {string} [params.expand_wildcards] - The type of index that wildcard patterns can match. * @param {string} [params.format] - A short version of the Accept header, such as `JSON`, `YAML`. - * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {array} [params.h] - A comma-separated list of column names to display. * @param {string} [params.health] - The health status used to limit returned indexes. By default, the response includes indexes of any health status. * @param {boolean} [params.help=false] - Return help information. * @param {boolean} [params.include_unloaded_segments=false] - If `true`, the response includes information from segments that are not loaded into memory. @@ -37,12 +37,12 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to cluster-manager node. * @param {null | string} [params.next_token] - Token to retrieve next page of indexes. * @param {boolean} [params.pri=false] - If `true`, the response only includes information from primary shards. - * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {array} [params.s] - A comma-separated list of column names or column aliases to sort by. * @param {number} [params.size] - Maximum number of indexes to be displayed in a page. * @param {string} [params.sort] - Defines order in which indexes will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created indexes would be displayed first. * @param {string} [params.time] - The unit used to display time values. * @param {boolean} [params.v=false] - Verbose mode. Display column headers. - * @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/list/shards.d.ts b/api/list/shards.d.ts index ac9ff2c0c..4ce4da958 100644 --- a/api/list/shards.d.ts +++ b/api/list/shards.d.ts @@ -31,7 +31,7 @@ export interface List_Shards_Request extends Global.Params { next_token?: undefined | string; s?: string[]; size?: number; - sort?: 'asc' | 'desc'; + sort?: Common.SortOrder; time?: Common.TimeUnit; v?: boolean; } diff --git a/api/list/shards.js b/api/list/shards.js index 635504c3c..c0c6fad78 100644 --- a/api/list/shards.js +++ b/api/list/shards.js @@ -28,12 +28,12 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @param {string} [params.bytes] - The unit used to display byte values. * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. * @param {string} [params.format] - A short version of the Accept header, such as `JSON`, `YAML`. - * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {array} [params.h] - A comma-separated list of column names to display. * @param {boolean} [params.help=false] - Return help information. * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to cluster-manager node. * @param {null | string} [params.next_token] - Token to retrieve next page of shards. - * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {array} [params.s] - A comma-separated list of column names or column aliases to sort by. * @param {number} [params.size] - Maximum number of shards to be displayed in a page. * @param {string} [params.sort] - Defines order in which shards will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created shards would be displayed first. * @param {string} [params.time] - The unit in which to display time values. diff --git a/api/ltr/_api.js b/api/ltr/_api.js index 71a8aebcf..b0b239a22 100644 --- a/api/ltr/_api.js +++ b/api/ltr/_api.js @@ -19,8 +19,83 @@ /** @namespace API-Ltr */ function LtrApi(bindObj) { + this.addFeaturesToSet = require('./addFeaturesToSet').bind(bindObj); + this.addFeaturesToSetByQuery = require('./addFeaturesToSetByQuery').bind(bindObj); + this.cacheStats = require('./cacheStats').bind(bindObj); + this.clearCache = require('./clearCache').bind(bindObj); + this.createDefaultStore = require('./createDefaultStore').bind(bindObj); + this.createFeature = require('./createFeature').bind(bindObj); + this.createFeatureset = require('./createFeatureset').bind(bindObj); + this.createModel = require('./createModel').bind(bindObj); + this.createModelFromSet = require('./createModelFromSet').bind(bindObj); + this.createStore = require('./createStore').bind(bindObj); + this.deleteDefaultStore = require('./deleteDefaultStore').bind(bindObj); + this.deleteFeature = require('./deleteFeature').bind(bindObj); + this.deleteFeatureset = require('./deleteFeatureset').bind(bindObj); + this.deleteModel = require('./deleteModel').bind(bindObj); + this.deleteStore = require('./deleteStore').bind(bindObj); + this.getFeature = require('./getFeature').bind(bindObj); + this.getFeatureset = require('./getFeatureset').bind(bindObj); + this.getModel = require('./getModel').bind(bindObj); + this.getStore = require('./getStore').bind(bindObj); + this.listStores = require('./listStores').bind(bindObj); + this.searchFeatures = require('./searchFeatures').bind(bindObj); + this.searchFeaturesets = require('./searchFeaturesets').bind(bindObj); + this.searchModels = require('./searchModels').bind(bindObj); this.stats = require('./stats').bind(bindObj); + this.updateFeature = require('./updateFeature').bind(bindObj); + this.updateFeatureset = require('./updateFeatureset').bind(bindObj); + // Deprecated: Use addFeaturesToSet instead. + this.add_features_to_set = require('./addFeaturesToSet').bind(bindObj); + // Deprecated: Use addFeaturesToSetByQuery instead. + this.add_features_to_set_by_query = require('./addFeaturesToSetByQuery').bind(bindObj); + // Deprecated: Use cacheStats instead. + this.cache_stats = require('./cacheStats').bind(bindObj); + // Deprecated: Use clearCache instead. + this.clear_cache = require('./clearCache').bind(bindObj); + // Deprecated: Use createDefaultStore instead. + this.create_default_store = require('./createDefaultStore').bind(bindObj); + // Deprecated: Use createFeature instead. + this.create_feature = require('./createFeature').bind(bindObj); + // Deprecated: Use createFeatureset instead. + this.create_featureset = require('./createFeatureset').bind(bindObj); + // Deprecated: Use createModel instead. + this.create_model = require('./createModel').bind(bindObj); + // Deprecated: Use createModelFromSet instead. + this.create_model_from_set = require('./createModelFromSet').bind(bindObj); + // Deprecated: Use createStore instead. + this.create_store = require('./createStore').bind(bindObj); + // Deprecated: Use deleteDefaultStore instead. + this.delete_default_store = require('./deleteDefaultStore').bind(bindObj); + // Deprecated: Use deleteFeature instead. + this.delete_feature = require('./deleteFeature').bind(bindObj); + // Deprecated: Use deleteFeatureset instead. + this.delete_featureset = require('./deleteFeatureset').bind(bindObj); + // Deprecated: Use deleteModel instead. + this.delete_model = require('./deleteModel').bind(bindObj); + // Deprecated: Use deleteStore instead. + this.delete_store = require('./deleteStore').bind(bindObj); + // Deprecated: Use getFeature instead. + this.get_feature = require('./getFeature').bind(bindObj); + // Deprecated: Use getFeatureset instead. + this.get_featureset = require('./getFeatureset').bind(bindObj); + // Deprecated: Use getModel instead. + this.get_model = require('./getModel').bind(bindObj); + // Deprecated: Use getStore instead. + this.get_store = require('./getStore').bind(bindObj); + // Deprecated: Use listStores instead. + this.list_stores = require('./listStores').bind(bindObj); + // Deprecated: Use searchFeatures instead. + this.search_features = require('./searchFeatures').bind(bindObj); + // Deprecated: Use searchFeaturesets instead. + this.search_featuresets = require('./searchFeaturesets').bind(bindObj); + // Deprecated: Use searchModels instead. + this.search_models = require('./searchModels').bind(bindObj); + // Deprecated: Use updateFeature instead. + this.update_feature = require('./updateFeature').bind(bindObj); + // Deprecated: Use updateFeatureset instead. + this.update_featureset = require('./updateFeatureset').bind(bindObj); } module.exports = LtrApi; diff --git a/api/ltr/addFeaturesToSet.d.ts b/api/ltr/addFeaturesToSet.d.ts new file mode 100644 index 000000000..b4a17a345 --- /dev/null +++ b/api/ltr/addFeaturesToSet.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_AddFeaturesToSet_Request extends Global.Params { + body: Ltr_AddFeaturesToSet_RequestBody; + merge?: boolean; + name: string; + routing?: string; + store?: string; + version?: number; +} + +export type Ltr_AddFeaturesToSet_RequestBody = Record + +export interface Ltr_AddFeaturesToSet_Response extends ApiResponse { + body: Ltr_AddFeaturesToSet_ResponseBody; +} + +export type Ltr_AddFeaturesToSet_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/addFeaturesToSet.js b/api/ltr/addFeaturesToSet.js new file mode 100644 index 000000000..0fdb540fb --- /dev/null +++ b/api/ltr/addFeaturesToSet.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Add features to an existing feature set in the default feature store. + *
See Also: {@link undefined - ltr.add_features_to_set} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {boolean} [params.merge=false] - Whether to merge the feature list or append only. + * @param {string} [params.routing] - Specific routing value. + * @param {number} [params.version] - Version check to ensure feature set is modified with expected version. + * @param {string} params.name - The name of the feature set to add features to. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The features to add to the feature set. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function addFeaturesToSetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, store, ...querystring } = params; + name = parsePathParam(name); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', name, '_addfeatures'].filter(c => c != null).join('/'); + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = addFeaturesToSetFunc; diff --git a/api/ltr/addFeaturesToSetByQuery.d.ts b/api/ltr/addFeaturesToSetByQuery.d.ts new file mode 100644 index 000000000..1a020ecc8 --- /dev/null +++ b/api/ltr/addFeaturesToSetByQuery.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_AddFeaturesToSetByQuery_Request extends Global.Params { + merge?: boolean; + name: string; + query: string; + routing?: string; + store?: string; + version?: number; +} + +export interface Ltr_AddFeaturesToSetByQuery_Response extends ApiResponse { + body: Ltr_AddFeaturesToSetByQuery_ResponseBody; +} + +export type Ltr_AddFeaturesToSetByQuery_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/addFeaturesToSetByQuery.js b/api/ltr/addFeaturesToSetByQuery.js new file mode 100644 index 000000000..84a8eb2a1 --- /dev/null +++ b/api/ltr/addFeaturesToSetByQuery.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Add features to an existing feature set in the default feature store. + *
See Also: {@link undefined - ltr.add_features_to_set_by_query} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {boolean} [params.merge=false] - Whether to merge the feature list or append only. + * @param {string} [params.routing] - Specific routing value. + * @param {number} [params.version] - Version check to ensure feature set is modified with expected version. + * @param {string} params.name - The name of the feature set to add features to. + * @param {string} params.query - Query string to filter existing features from the store by name. When provided, only features matching this query will be added to the feature set, and no request body should be included. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function addFeaturesToSetByQueryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.query == null) return handleMissingParam('query', this, callback); + + let { body, name, query, store, ...querystring } = params; + name = parsePathParam(name); + query = parsePathParam(query); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', name, '_addfeatures', query].filter(c => c != null).join('/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = addFeaturesToSetByQueryFunc; diff --git a/api/ltr/cacheStats.d.ts b/api/ltr/cacheStats.d.ts new file mode 100644 index 000000000..86f37ee38 --- /dev/null +++ b/api/ltr/cacheStats.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export type Ltr_CacheStats_Request = Global.Params & Record + +export interface Ltr_CacheStats_Response extends ApiResponse { + body: Ltr_CacheStats_ResponseBody; +} + +export type Ltr_CacheStats_ResponseBody = Ltr_Common.CacheStatsResponse + diff --git a/api/ltr/cacheStats.js b/api/ltr/cacheStats.js new file mode 100644 index 000000000..c144cddda --- /dev/null +++ b/api/ltr/cacheStats.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves cache statistics for all feature stores. + *
See Also: {@link undefined - ltr.cache_stats} + * + * @memberOf API-Ltr + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function cacheStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_ltr/_cachestats'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = cacheStatsFunc; diff --git a/api/ltr/clearCache.d.ts b/api/ltr/clearCache.d.ts new file mode 100644 index 000000000..a68c5e4f4 --- /dev/null +++ b/api/ltr/clearCache.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export interface Ltr_ClearCache_Request extends Global.Params { + store?: string; +} + +export interface Ltr_ClearCache_Response extends ApiResponse { + body: Ltr_ClearCache_ResponseBody; +} + +export type Ltr_ClearCache_ResponseBody = Ltr_Common.AcknowledgedResponse + diff --git a/api/ltr/clearCache.js b/api/ltr/clearCache.js new file mode 100644 index 000000000..bf79b9e83 --- /dev/null +++ b/api/ltr/clearCache.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Clears the store caches. + *
See Also: {@link undefined - ltr.clear_cache} + * + * @memberOf API-Ltr + * + * @param {object} [params] + * @param {string} [params.store] - The name of the feature store for which to clear the cache. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function clearCacheFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = ['/_ltr', store, '_clearcache'].filter(c => c != null).join('/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = clearCacheFunc; diff --git a/api/ltr/createDefaultStore.d.ts b/api/ltr/createDefaultStore.d.ts new file mode 100644 index 000000000..f3cdd518e --- /dev/null +++ b/api/ltr/createDefaultStore.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export type Ltr_CreateDefaultStore_Request = Global.Params & Record + +export interface Ltr_CreateDefaultStore_Response extends ApiResponse { + body: Ltr_CreateDefaultStore_ResponseBody; +} + +export type Ltr_CreateDefaultStore_ResponseBody = Ltr_Common.AcknowledgedResponse + diff --git a/api/ltr/createDefaultStore.js b/api/ltr/createDefaultStore.js new file mode 100644 index 000000000..f8c2b3fc1 --- /dev/null +++ b/api/ltr/createDefaultStore.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates the default feature store. + *
See Also: {@link undefined - ltr.create_default_store} + * + * @memberOf API-Ltr + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createDefaultStoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_ltr'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createDefaultStoreFunc; diff --git a/api/ltr/createFeature.d.ts b/api/ltr/createFeature.d.ts new file mode 100644 index 000000000..2f0d2efe4 --- /dev/null +++ b/api/ltr/createFeature.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_CreateFeature_Request extends Global.Params { + body: Ltr_CreateFeature_RequestBody; + id: string; + routing?: string; + store?: string; +} + +export type Ltr_CreateFeature_RequestBody = Record + +export interface Ltr_CreateFeature_Response extends ApiResponse { + body: Ltr_CreateFeature_ResponseBody; +} + +export type Ltr_CreateFeature_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/createFeature.js b/api/ltr/createFeature.js new file mode 100644 index 000000000..fed78f523 --- /dev/null +++ b/api/ltr/createFeature.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create or update a feature in the default feature store. + *
See Also: {@link undefined - ltr.create_feature} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.id - The name of the feature. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The feature definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createFeatureFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_feature', id].filter(c => c != null).join('/'); + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createFeatureFunc; diff --git a/api/ltr/createFeatureset.d.ts b/api/ltr/createFeatureset.d.ts new file mode 100644 index 000000000..ac1ad4359 --- /dev/null +++ b/api/ltr/createFeatureset.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_CreateFeatureset_Request extends Global.Params { + body: Ltr_CreateFeatureset_RequestBody; + id: string; + routing?: string; + store?: string; +} + +export type Ltr_CreateFeatureset_RequestBody = Record + +export interface Ltr_CreateFeatureset_Response extends ApiResponse { + body: Ltr_CreateFeatureset_ResponseBody; +} + +export type Ltr_CreateFeatureset_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/createFeatureset.js b/api/ltr/createFeatureset.js new file mode 100644 index 000000000..1493683e2 --- /dev/null +++ b/api/ltr/createFeatureset.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create or update a feature set in the default feature store. + *
See Also: {@link undefined - ltr.create_featureset} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.id - The name of the feature set. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The feature set definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createFeaturesetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', id].filter(c => c != null).join('/'); + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createFeaturesetFunc; diff --git a/api/ltr/createModel.d.ts b/api/ltr/createModel.d.ts new file mode 100644 index 000000000..b1788914a --- /dev/null +++ b/api/ltr/createModel.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_CreateModel_Request extends Global.Params { + body: Ltr_CreateModel_RequestBody; + id: string; + routing?: string; + store?: string; +} + +export type Ltr_CreateModel_RequestBody = Record + +export interface Ltr_CreateModel_Response extends ApiResponse { + body: Ltr_CreateModel_ResponseBody; +} + +export type Ltr_CreateModel_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/createModel.js b/api/ltr/createModel.js new file mode 100644 index 000000000..d77e8db5f --- /dev/null +++ b/api/ltr/createModel.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create or update a model in the default feature store. + *
See Also: {@link undefined - ltr.create_model} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.id - The name of the model. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The model definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_model', id].filter(c => c != null).join('/'); + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createModelFunc; diff --git a/api/ltr/createModelFromSet.d.ts b/api/ltr/createModelFromSet.d.ts new file mode 100644 index 000000000..5c00f3ddb --- /dev/null +++ b/api/ltr/createModelFromSet.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_CreateModelFromSet_Request extends Global.Params { + body: Ltr_CreateModelFromSet_RequestBody; + name: string; + routing?: string; + store?: string; +} + +export type Ltr_CreateModelFromSet_RequestBody = Record + +export interface Ltr_CreateModelFromSet_Response extends ApiResponse { + body: Ltr_CreateModelFromSet_ResponseBody; +} + +export type Ltr_CreateModelFromSet_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/createModelFromSet.js b/api/ltr/createModelFromSet.js new file mode 100644 index 000000000..969e13a9a --- /dev/null +++ b/api/ltr/createModelFromSet.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create a model from an existing feature set in the default feature store. + *
See Also: {@link undefined - ltr.create_model_from_set} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.name - The name of the feature set to use for creating the model. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The model definition for creating from a feature set. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createModelFromSetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, store, ...querystring } = params; + name = parsePathParam(name); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', name, '_createmodel'].filter(c => c != null).join('/'); + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createModelFromSetFunc; diff --git a/api/ltr/createStore.d.ts b/api/ltr/createStore.d.ts new file mode 100644 index 000000000..ccb54b972 --- /dev/null +++ b/api/ltr/createStore.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export interface Ltr_CreateStore_Request extends Global.Params { + store: string; +} + +export interface Ltr_CreateStore_Response extends ApiResponse { + body: Ltr_CreateStore_ResponseBody; +} + +export type Ltr_CreateStore_ResponseBody = Ltr_Common.AcknowledgedResponse + diff --git a/api/ltr/createStore.js b/api/ltr/createStore.js new file mode 100644 index 000000000..336e00b63 --- /dev/null +++ b/api/ltr/createStore.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates a new feature store with the specified name. + *
See Also: {@link undefined - ltr.create_store} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.store - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createStoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.store == null) return handleMissingParam('store', this, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = '/_ltr/' + store; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createStoreFunc; diff --git a/api/ltr/deleteDefaultStore.d.ts b/api/ltr/deleteDefaultStore.d.ts new file mode 100644 index 000000000..1930aaafd --- /dev/null +++ b/api/ltr/deleteDefaultStore.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export type Ltr_DeleteDefaultStore_Request = Global.Params & Record + +export interface Ltr_DeleteDefaultStore_Response extends ApiResponse { + body: Ltr_DeleteDefaultStore_ResponseBody; +} + +export type Ltr_DeleteDefaultStore_ResponseBody = Ltr_Common.AcknowledgedResponse + diff --git a/api/ltr/deleteDefaultStore.js b/api/ltr/deleteDefaultStore.js new file mode 100644 index 000000000..34fabb398 --- /dev/null +++ b/api/ltr/deleteDefaultStore.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Deletes the default feature store. + *
See Also: {@link undefined - ltr.delete_default_store} + * + * @memberOf API-Ltr + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteDefaultStoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_ltr'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteDefaultStoreFunc; diff --git a/api/ltr/deleteFeature.d.ts b/api/ltr/deleteFeature.d.ts new file mode 100644 index 000000000..3aca85926 --- /dev/null +++ b/api/ltr/deleteFeature.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_DeleteFeature_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_DeleteFeature_Response extends ApiResponse { + body: Ltr_DeleteFeature_ResponseBody; +} + +export type Ltr_DeleteFeature_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/deleteFeature.js b/api/ltr/deleteFeature.js new file mode 100644 index 000000000..a4aa9add7 --- /dev/null +++ b/api/ltr/deleteFeature.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a feature from the default feature store. + *
See Also: {@link undefined - ltr.delete_feature} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the feature. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFeatureFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_feature', id].filter(c => c != null).join('/'); + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFeatureFunc; diff --git a/api/ltr/deleteFeatureset.d.ts b/api/ltr/deleteFeatureset.d.ts new file mode 100644 index 000000000..46d6ee51d --- /dev/null +++ b/api/ltr/deleteFeatureset.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_DeleteFeatureset_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_DeleteFeatureset_Response extends ApiResponse { + body: Ltr_DeleteFeatureset_ResponseBody; +} + +export type Ltr_DeleteFeatureset_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/deleteFeatureset.js b/api/ltr/deleteFeatureset.js new file mode 100644 index 000000000..22ee99487 --- /dev/null +++ b/api/ltr/deleteFeatureset.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a feature set from the default feature store. + *
See Also: {@link undefined - ltr.delete_featureset} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the feature set. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFeaturesetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', id].filter(c => c != null).join('/'); + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFeaturesetFunc; diff --git a/api/ltr/deleteModel.d.ts b/api/ltr/deleteModel.d.ts new file mode 100644 index 000000000..9f8688418 --- /dev/null +++ b/api/ltr/deleteModel.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_DeleteModel_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_DeleteModel_Response extends ApiResponse { + body: Ltr_DeleteModel_ResponseBody; +} + +export type Ltr_DeleteModel_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/deleteModel.js b/api/ltr/deleteModel.js new file mode 100644 index 000000000..6a7349e72 --- /dev/null +++ b/api/ltr/deleteModel.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a model from the default feature store. + *
See Also: {@link undefined - ltr.delete_model} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the model. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_model', id].filter(c => c != null).join('/'); + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteModelFunc; diff --git a/api/ltr/deleteStore.d.ts b/api/ltr/deleteStore.d.ts new file mode 100644 index 000000000..20d156f2c --- /dev/null +++ b/api/ltr/deleteStore.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export interface Ltr_DeleteStore_Request extends Global.Params { + store: string; +} + +export interface Ltr_DeleteStore_Response extends ApiResponse { + body: Ltr_DeleteStore_ResponseBody; +} + +export type Ltr_DeleteStore_ResponseBody = Ltr_Common.AcknowledgedResponse + diff --git a/api/ltr/deleteStore.js b/api/ltr/deleteStore.js new file mode 100644 index 000000000..a00c89f3b --- /dev/null +++ b/api/ltr/deleteStore.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a feature store with the specified name. + *
See Also: {@link undefined - ltr.delete_store} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.store - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteStoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.store == null) return handleMissingParam('store', this, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = '/_ltr/' + store; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteStoreFunc; diff --git a/api/ltr/getFeature.d.ts b/api/ltr/getFeature.d.ts new file mode 100644 index 000000000..8feb799cd --- /dev/null +++ b/api/ltr/getFeature.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Ltr_GetFeature_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_GetFeature_Response extends ApiResponse { + body: Ltr_GetFeature_ResponseBody; +} + +export type Ltr_GetFeature_ResponseBody = Record + diff --git a/api/ltr/getFeature.js b/api/ltr/getFeature.js new file mode 100644 index 000000000..78c189ea9 --- /dev/null +++ b/api/ltr/getFeature.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get a feature from the default feature store. + *
See Also: {@link undefined - ltr.get_feature} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the feature. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFeatureFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_feature', id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFeatureFunc; diff --git a/api/ltr/getFeatureset.d.ts b/api/ltr/getFeatureset.d.ts new file mode 100644 index 000000000..4bef14db3 --- /dev/null +++ b/api/ltr/getFeatureset.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Ltr_GetFeatureset_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_GetFeatureset_Response extends ApiResponse { + body: Ltr_GetFeatureset_ResponseBody; +} + +export type Ltr_GetFeatureset_ResponseBody = Record + diff --git a/api/ltr/getFeatureset.js b/api/ltr/getFeatureset.js new file mode 100644 index 000000000..5b4dac9cc --- /dev/null +++ b/api/ltr/getFeatureset.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get a feature set from the default feature store. + *
See Also: {@link undefined - ltr.get_featureset} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the feature set. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFeaturesetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFeaturesetFunc; diff --git a/api/ltr/getModel.d.ts b/api/ltr/getModel.d.ts new file mode 100644 index 000000000..41ca5ffd2 --- /dev/null +++ b/api/ltr/getModel.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Ltr_GetModel_Request extends Global.Params { + id: string; + store?: string; +} + +export interface Ltr_GetModel_Response extends ApiResponse { + body: Ltr_GetModel_ResponseBody; +} + +export type Ltr_GetModel_ResponseBody = Record + diff --git a/api/ltr/getModel.js b/api/ltr/getModel.js new file mode 100644 index 000000000..de68dcbf3 --- /dev/null +++ b/api/ltr/getModel.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get a model from the default feature store. + *
See Also: {@link undefined - ltr.get_model} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.id - The name of the model. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_model', id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getModelFunc; diff --git a/api/ltr/getStore.d.ts b/api/ltr/getStore.d.ts new file mode 100644 index 000000000..995185e29 --- /dev/null +++ b/api/ltr/getStore.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export interface Ltr_GetStore_Request extends Global.Params { + store: string; +} + +export interface Ltr_GetStore_Response extends ApiResponse { + body: Ltr_GetStore_ResponseBody; +} + +export type Ltr_GetStore_ResponseBody = Ltr_Common.StoreExistsResponse + diff --git a/api/ltr/getStore.js b/api/ltr/getStore.js new file mode 100644 index 000000000..7ab200a6a --- /dev/null +++ b/api/ltr/getStore.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Checks if a store exists. + *
See Also: {@link undefined - ltr.get_store} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} params.store - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getStoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.store == null) return handleMissingParam('store', this, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = '/_ltr/' + store; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getStoreFunc; diff --git a/api/ltr/listStores.d.ts b/api/ltr/listStores.d.ts new file mode 100644 index 000000000..e5ca718b3 --- /dev/null +++ b/api/ltr/listStores.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ltr_Common from '../_types/ltr._common' + +export type Ltr_ListStores_Request = Global.Params & Record + +export interface Ltr_ListStores_Response extends ApiResponse { + body: Ltr_ListStores_ResponseBody; +} + +export type Ltr_ListStores_ResponseBody = Ltr_Common.ListStoresResponse + diff --git a/api/ltr/listStores.js b/api/ltr/listStores.js new file mode 100644 index 000000000..7f23b2316 --- /dev/null +++ b/api/ltr/listStores.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Lists all available feature stores. + *
See Also: {@link undefined - ltr.list_stores} + * + * @memberOf API-Ltr + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function listStoresFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_ltr'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = listStoresFunc; diff --git a/api/ltr/searchFeatures.d.ts b/api/ltr/searchFeatures.d.ts new file mode 100644 index 000000000..1fbe509ff --- /dev/null +++ b/api/ltr/searchFeatures.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Core_Search from '../_types/_core.search' +import * as Global from '../_types/_global' + +export interface Ltr_SearchFeatures_Request extends Global.Params { + from?: number; + prefix?: string; + size?: number; + store?: string; +} + +export interface Ltr_SearchFeatures_Response extends ApiResponse { + body: Ltr_SearchFeatures_ResponseBody; +} + +export type Ltr_SearchFeatures_ResponseBody = Core_Search.SearchResultJsonValue & Record + diff --git a/api/ltr/searchFeatures.js b/api/ltr/searchFeatures.js new file mode 100644 index 000000000..4f43dd358 --- /dev/null +++ b/api/ltr/searchFeatures.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Search for features in a feature store. + *
See Also: {@link undefined - ltr.search_features} + * + * @memberOf API-Ltr + * + * @param {object} [params] + * @param {number} [params.from=0] - The offset from the first result (for pagination). + * @param {string} [params.prefix] - A name prefix to filter features by. + * @param {number} [params.size=20] - The number of features to return. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchFeaturesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = ['/_ltr', store, '_feature'].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchFeaturesFunc; diff --git a/api/ltr/searchFeaturesets.d.ts b/api/ltr/searchFeaturesets.d.ts new file mode 100644 index 000000000..b9c213a4b --- /dev/null +++ b/api/ltr/searchFeaturesets.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Core_Search from '../_types/_core.search' +import * as Global from '../_types/_global' + +export interface Ltr_SearchFeaturesets_Request extends Global.Params { + from?: number; + prefix?: string; + size?: number; + store?: string; +} + +export interface Ltr_SearchFeaturesets_Response extends ApiResponse { + body: Ltr_SearchFeaturesets_ResponseBody; +} + +export type Ltr_SearchFeaturesets_ResponseBody = Core_Search.SearchResultJsonValue & Record + diff --git a/api/ltr/searchFeaturesets.js b/api/ltr/searchFeaturesets.js new file mode 100644 index 000000000..3e6122861 --- /dev/null +++ b/api/ltr/searchFeaturesets.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Search for feature sets in a feature store. + *
See Also: {@link undefined - ltr.search_featuresets} + * + * @memberOf API-Ltr + * + * @param {object} [params] + * @param {number} [params.from=0] - The offset from the first result (for pagination). + * @param {string} [params.prefix] - A name prefix to filter feature sets by. + * @param {number} [params.size=20] - The number of feature sets to return. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchFeaturesetsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset'].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchFeaturesetsFunc; diff --git a/api/ltr/searchModels.d.ts b/api/ltr/searchModels.d.ts new file mode 100644 index 000000000..eaee3d29b --- /dev/null +++ b/api/ltr/searchModels.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Core_Search from '../_types/_core.search' +import * as Global from '../_types/_global' + +export interface Ltr_SearchModels_Request extends Global.Params { + from?: number; + prefix?: string; + size?: number; + store?: string; +} + +export interface Ltr_SearchModels_Response extends ApiResponse { + body: Ltr_SearchModels_ResponseBody; +} + +export type Ltr_SearchModels_ResponseBody = Core_Search.SearchResultJsonValue & Record + diff --git a/api/ltr/searchModels.js b/api/ltr/searchModels.js new file mode 100644 index 000000000..f707f4f3d --- /dev/null +++ b/api/ltr/searchModels.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Search for models in a feature store. + *
See Also: {@link undefined - ltr.search_models} + * + * @memberOf API-Ltr + * + * @param {object} [params] + * @param {number} [params.from=0] - The offset from the first result (for pagination). + * @param {string} [params.prefix] - A name prefix to filter models by. + * @param {number} [params.size=20] - The number of models to return. + * @param {string} [params.store] - The name of the feature store. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchModelsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, store, ...querystring } = params; + store = parsePathParam(store); + + const path = ['/_ltr', store, '_model'].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchModelsFunc; diff --git a/api/ltr/stats.d.ts b/api/ltr/stats.d.ts index 75561230b..b86132e50 100644 --- a/api/ltr/stats.d.ts +++ b/api/ltr/stats.d.ts @@ -21,7 +21,7 @@ import * as Ltr_Common from '../_types/ltr._common' export interface Ltr_Stats_Request extends Global.Params { node_id?: string[]; - stat?: 'cache' | 'request_error_count' | 'request_total_count'[]; + stat?: Ltr_Common.LtrStatName | Ltr_Common.LtrStatName[]; timeout?: Common.Duration; } diff --git a/api/ltr/stats.js b/api/ltr/stats.js index 64d97f3e4..44222bf5c 100644 --- a/api/ltr/stats.js +++ b/api/ltr/stats.js @@ -26,8 +26,8 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * * @param {object} [params] * @param {string} [params.timeout] - The time in milliseconds to wait for a response. - * @param {array} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. - * @param {array} [params.stat] - Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. + * @param {array} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {string} [params.stat] - A comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/ltr/updateFeature.d.ts b/api/ltr/updateFeature.d.ts new file mode 100644 index 000000000..fe2037fed --- /dev/null +++ b/api/ltr/updateFeature.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_UpdateFeature_Request extends Global.Params { + body: Ltr_UpdateFeature_RequestBody; + id: string; + routing?: string; + store?: string; +} + +export type Ltr_UpdateFeature_RequestBody = Record + +export interface Ltr_UpdateFeature_Response extends ApiResponse { + body: Ltr_UpdateFeature_ResponseBody; +} + +export type Ltr_UpdateFeature_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/updateFeature.js b/api/ltr/updateFeature.js new file mode 100644 index 000000000..3a3b0aa6a --- /dev/null +++ b/api/ltr/updateFeature.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Update a feature in the default feature store. + *
See Also: {@link undefined - ltr.update_feature} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.id - The name of the feature. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The updated feature definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateFeatureFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_feature', id].filter(c => c != null).join('/'); + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateFeatureFunc; diff --git a/api/ltr/updateFeatureset.d.ts b/api/ltr/updateFeatureset.d.ts new file mode 100644 index 000000000..d30aa05ea --- /dev/null +++ b/api/ltr/updateFeatureset.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' + +export interface Ltr_UpdateFeatureset_Request extends Global.Params { + body: Ltr_UpdateFeatureset_RequestBody; + id: string; + routing?: string; + store?: string; +} + +export type Ltr_UpdateFeatureset_RequestBody = Record + +export interface Ltr_UpdateFeatureset_Response extends ApiResponse { + body: Ltr_UpdateFeatureset_ResponseBody; +} + +export type Ltr_UpdateFeatureset_ResponseBody = Common.WriteResponseBase + diff --git a/api/ltr/updateFeatureset.js b/api/ltr/updateFeatureset.js new file mode 100644 index 000000000..3d3d58d7f --- /dev/null +++ b/api/ltr/updateFeatureset.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Update a feature set in the default feature store. + *
See Also: {@link undefined - ltr.update_featureset} + * + * @memberOf API-Ltr + * + * @param {object} params + * @param {string} [params.routing] - Specific routing value. + * @param {string} params.id - The name of the feature set. + * @param {string} [params.store] - The name of the feature store. + * @param {object} params.body - The updated feature set definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateFeaturesetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, store, ...querystring } = params; + id = parsePathParam(id); + store = parsePathParam(store); + + const path = ['/_ltr', store, '_featureset', id].filter(c => c != null).join('/'); + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateFeaturesetFunc; diff --git a/api/ml/createConnector.d.ts b/api/ml/createConnector.d.ts index 166890f24..0f863f0bb 100644 --- a/api/ml/createConnector.d.ts +++ b/api/ml/createConnector.d.ts @@ -29,7 +29,7 @@ export type Ml_CreateConnector_RequestBody = { description: string; name: string; parameters: Ml_Common.Parameters; - protocol: 'aws_sigv4' | 'http'; + protocol: Ml_Common.ConnectorProtocol; version: number; } diff --git a/api/ml/createModelMeta.d.ts b/api/ml/createModelMeta.d.ts index b095e6ff1..6fd5023c2 100644 --- a/api/ml/createModelMeta.d.ts +++ b/api/ml/createModelMeta.d.ts @@ -25,6 +25,7 @@ export interface Ml_CreateModelMeta_Request extends Global.Params { export type Ml_CreateModelMeta_RequestBody = { description?: string; + function_name?: Ml_Common.FunctionName; model_config: Ml_Common.ModelConfig; model_content_hash_value: string; model_format: Ml_Common.ModelFormat; diff --git a/api/ml/executeAlgorithm.d.ts b/api/ml/executeAlgorithm.d.ts index d82ae1331..d86645c93 100644 --- a/api/ml/executeAlgorithm.d.ts +++ b/api/ml/executeAlgorithm.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' export interface Ml_ExecuteAlgorithm_Request extends Global.Params { - algorithm_name: 'anomaly_localization' | 'local_sample_calculator'; + algorithm_name: Ml_Common.FunctionName; body?: Ml_ExecuteAlgorithm_RequestBody; } @@ -32,7 +32,7 @@ export type Ml_ExecuteAlgorithm_RequestBody = { metrics?: number[][]; min_time_interval?: number; num_outputs?: number; - operation?: 'max' | 'min' | 'sum'; + operation?: Ml_Common.LocalSampleCalculatorOperation; start_time?: number; time_field_name?: string; } diff --git a/api/ml/executeAlgorithm.js b/api/ml/executeAlgorithm.js index cbd8c3b57..265f353e7 100644 --- a/api/ml/executeAlgorithm.js +++ b/api/ml/executeAlgorithm.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @memberOf API-Ml * * @param {object} params - * @param {string} params.algorithm_name + * @param {string} params.algorithm_name - The function name. * @param {object} [params.body] * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} diff --git a/api/ml/getStats.d.ts b/api/ml/getStats.d.ts index f54b92665..0902f859d 100644 --- a/api/ml/getStats.d.ts +++ b/api/ml/getStats.d.ts @@ -20,7 +20,7 @@ import * as Ml_Common from '../_types/ml._common' export interface Ml_GetStats_Request extends Global.Params { node_id?: string; - stat?: 'ml_config_index_status' | 'ml_connector_count' | 'ml_connector_index_status' | 'ml_controller_index_status' | 'ml_model_count' | 'ml_model_index_status' | 'ml_task_index_status'; + stat?: Ml_Common.MlStatName | Ml_Common.MlStatName[]; } export interface Ml_GetStats_Response extends ApiResponse { diff --git a/api/ml/getTool.d.ts b/api/ml/getTool.d.ts index c2edc3491..17ba86241 100644 --- a/api/ml/getTool.d.ts +++ b/api/ml/getTool.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' export interface Ml_GetTool_Request extends Global.Params { - tool_name: 'AgentTool' | 'CatIndexTool' | 'ConnectorTool' | 'CreateAnomalyDetectorTool' | 'IndexMappingTool' | 'LogPatternTool' | 'MLModelTool' | 'NeuralSparseSearchTool' | 'PPLTool' | 'RAGTool' | 'SearchAlertsTool' | 'SearchAnomalyDetectorsTool' | 'SearchAnomalyResultsTool' | 'SearchIndexTool' | 'SearchMonitorsTool' | 'VectorDBTool' | 'VisualizationTool'; + tool_name: Ml_Common.ToolName; } export interface Ml_GetTool_Response extends ApiResponse { diff --git a/api/ml/loadModel.d.ts b/api/ml/loadModel.d.ts index 4174f94ae..1e745e7e3 100644 --- a/api/ml/loadModel.d.ts +++ b/api/ml/loadModel.d.ts @@ -16,6 +16,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' export interface Ml_LoadModel_Request extends Global.Params { model_id: string; @@ -28,6 +29,6 @@ export interface Ml_LoadModel_Response extends ApiResponse { export type Ml_LoadModel_ResponseBody = { status: string; task_id: string; - task_type: 'BATCH_INGEST' | 'BATCH_PREDICTION' | 'DEPLOY_MODEL' | 'EXECUTION' | 'PREDICTION' | 'REGISTER_MODEL' | 'TRAINING' | 'TRAINING_AND_PREDICTION'; + task_type: Ml_Common.MlTaskType; } diff --git a/api/ml/registerModel.d.ts b/api/ml/registerModel.d.ts index b6948bf93..c685b809d 100644 --- a/api/ml/registerModel.d.ts +++ b/api/ml/registerModel.d.ts @@ -27,9 +27,12 @@ export type Ml_RegisterModel_RequestBody = { connector_id?: string; description?: string; function_name?: string; + model_config?: Ml_Common.ModelConfig; + model_content_hash_value?: string; model_format?: Ml_Common.ModelFormat; model_group_id?: Common.Id; name: string; + url?: string; version?: Common.VersionString; } diff --git a/api/ml/registerModelGroup.d.ts b/api/ml/registerModelGroup.d.ts index cb4de3574..b6abe656a 100644 --- a/api/ml/registerModelGroup.d.ts +++ b/api/ml/registerModelGroup.d.ts @@ -23,7 +23,7 @@ export interface Ml_RegisterModelGroup_Request extends Global.Params { } export type Ml_RegisterModelGroup_RequestBody = { - access_mode?: 'private' | 'public' | 'restricted'; + access_mode?: Ml_Common.ModelGroupAccessMode; add_all_backend_roles?: boolean; backend_roles?: string[]; description?: string; diff --git a/api/ml/registerModelMeta.d.ts b/api/ml/registerModelMeta.d.ts index f3cb2d6a0..1d07f0b1d 100644 --- a/api/ml/registerModelMeta.d.ts +++ b/api/ml/registerModelMeta.d.ts @@ -25,6 +25,7 @@ export interface Ml_RegisterModelMeta_Request extends Global.Params { export type Ml_RegisterModelMeta_RequestBody = { description?: string; + function_name?: Ml_Common.FunctionName; model_config: Ml_Common.ModelConfig; model_content_hash_value: string; model_format: Ml_Common.ModelFormat; diff --git a/api/ml/searchAgents.d.ts b/api/ml/searchAgents.d.ts index f5459a031..a5b8c5922 100644 --- a/api/ml/searchAgents.d.ts +++ b/api/ml/searchAgents.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchAgents_Request extends Global.Params { } export type Ml_SearchAgents_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.SortAgent[]; + sort?: Common.Sort; } export interface Ml_SearchAgents_Response extends ApiResponse { diff --git a/api/ml/searchConnectors.d.ts b/api/ml/searchConnectors.d.ts index 4c1f2ad1d..bce960510 100644 --- a/api/ml/searchConnectors.d.ts +++ b/api/ml/searchConnectors.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchConnectors_Request extends Global.Params { } export type Ml_SearchConnectors_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: string[]; + sort?: Common.Sort; } export interface Ml_SearchConnectors_Response extends ApiResponse { diff --git a/api/ml/searchMemory.d.ts b/api/ml/searchMemory.d.ts index 876688170..abd39d03d 100644 --- a/api/ml/searchMemory.d.ts +++ b/api/ml/searchMemory.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchMemory_Request extends Global.Params { } export type Ml_SearchMemory_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.SortMemory[]; + sort?: Common.Sort; } export interface Ml_SearchMemory_Response extends ApiResponse { diff --git a/api/ml/searchMessage.d.ts b/api/ml/searchMessage.d.ts index 9c66b3683..9f6d735ae 100644 --- a/api/ml/searchMessage.d.ts +++ b/api/ml/searchMessage.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -24,9 +26,9 @@ export interface Ml_SearchMessage_Request extends Global.Params { } export type Ml_SearchMessage_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.SortMessage[]; + sort?: Common.Sort; } export interface Ml_SearchMessage_Response extends ApiResponse { diff --git a/api/ml/searchModelGroup.d.ts b/api/ml/searchModelGroup.d.ts index 82cea2cee..06bbcfcf7 100644 --- a/api/ml/searchModelGroup.d.ts +++ b/api/ml/searchModelGroup.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchModelGroup_Request extends Global.Params { } export type Ml_SearchModelGroup_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.Sort[]; + sort?: Common.Sort; } export interface Ml_SearchModelGroup_Response extends ApiResponse { diff --git a/api/ml/searchModels.d.ts b/api/ml/searchModels.d.ts index 20428e651..f82c97433 100644 --- a/api/ml/searchModels.d.ts +++ b/api/ml/searchModels.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchModels_Request extends Global.Params { } export type Ml_SearchModels_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.Sort[]; + sort?: Common.Sort; } export interface Ml_SearchModels_Response extends ApiResponse { diff --git a/api/ml/searchTasks.d.ts b/api/ml/searchTasks.d.ts index 7240d0b01..c717f4ad2 100644 --- a/api/ml/searchTasks.d.ts +++ b/api/ml/searchTasks.d.ts @@ -15,6 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' @@ -23,9 +25,9 @@ export interface Ml_SearchTasks_Request extends Global.Params { } export type Ml_SearchTasks_RequestBody = { - query?: Ml_Common.Query; + query?: Common_QueryDsl.QueryContainer; size?: number; - sort?: Ml_Common.Sort[]; + sort?: Common.Sort; } export interface Ml_SearchTasks_Response extends ApiResponse { diff --git a/api/ml/updateConnector.d.ts b/api/ml/updateConnector.d.ts index 9a7ef8323..857278ec2 100644 --- a/api/ml/updateConnector.d.ts +++ b/api/ml/updateConnector.d.ts @@ -25,7 +25,7 @@ export interface Ml_UpdateConnector_Request extends Global.Params { } export type Ml_UpdateConnector_RequestBody = { - access_mode?: 'private' | 'public' | 'restricted'; + access_mode?: Ml_Common.ModelGroupAccessMode; actions?: Ml_Common.Action[]; backend_roles?: string[]; credential?: Ml_Common.Credential; @@ -33,7 +33,7 @@ export type Ml_UpdateConnector_RequestBody = { name?: Common.Name; parameters?: Ml_Common.Parameters; 'parameters.skip_validating_missing_parameters'?: boolean; - protocol?: 'aws_sigv4' | 'http'; + protocol?: Ml_Common.ConnectorProtocol; version?: Common.VersionNumber; } diff --git a/api/neural/_api.js b/api/neural/_api.js new file mode 100644 index 000000000..6c9360c20 --- /dev/null +++ b/api/neural/_api.js @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Neural */ + +function NeuralApi(bindObj) { + this.stats = require('./stats').bind(bindObj); + +} + +module.exports = NeuralApi; diff --git a/api/neural/stats.d.ts b/api/neural/stats.d.ts new file mode 100644 index 000000000..b5e6082c5 --- /dev/null +++ b/api/neural/stats.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Neural_Common from '../_types/neural._common' + +export interface Neural_Stats_Request extends Global.Params { + flat_stat_paths?: boolean; + include_all_nodes?: boolean; + include_individual_nodes?: boolean; + include_info?: boolean; + include_metadata?: boolean; + node_id?: string; + stat?: Neural_Common.NeuralStatName | Neural_Common.NeuralStatName[]; +} + +export interface Neural_Stats_Response extends ApiResponse { + body: Neural_Stats_ResponseBody; +} + +export type Neural_Stats_ResponseBody = Neural_Common.NeuralStats + diff --git a/api/neural/stats.js b/api/neural/stats.js new file mode 100644 index 000000000..cce4268d0 --- /dev/null +++ b/api/neural/stats.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides information about the current status of the neural-search plugin. + *
See Also: {@link undefined - neural.stats} + * + * @memberOf API-Neural + * + * @param {object} [params] + * @param {boolean} [params.flat_stat_paths=false] - Whether to return stats in the flat form, which can improve readability, especially for heavily nested stats. For example, the flat form of `"processors": { "ingest": { "text_embedding_executions": 20181212 } }` is `"processors.ingest.text_embedding_executions": "20181212"`. + * @param {boolean} [params.include_all_nodes=true] - When `true` includes aggregated statistics across all nodes in the `all_nodes` category. When `false`, excludes the `all_nodes` category from the response. + * @param {boolean} [params.include_individual_nodes=true] - When `true` includes statistics for individual nodes in the `nodes` category. When `false`, excludes the `nodes` category from the response. + * @param {boolean} [params.include_info=true] - When `true` includes cluster-wide information in the `info` category. When `false`, excludes the `info` category from the response. + * @param {boolean} [params.include_metadata=false] - Whether to return stat metadata instead of the raw stat value, includes additional information about the stat. These can include things like type hints, time since last stats being recorded, or recent rolling interval values + * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; leave empty to get information from all nodes. + * @param {string} [params.stat] - A comma-separated list of stats to retrieve; use empty string to retrieve all stats. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, stat, ...querystring } = params; + node_id = parsePathParam(node_id); + stat = parsePathParam(stat); + + const path = ['/_plugins/_neural', node_id, 'stats', stat].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statsFunc; diff --git a/api/nodes/hotThreads.js b/api/nodes/hotThreads.js index 733b84248..432671289 100644 --- a/api/nodes/hotThreads.js +++ b/api/nodes/hotThreads.js @@ -25,13 +25,13 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Nodes * * @param {object} [params] - * @param {boolean} [params.ignore_idle_threads=true] - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue. - * @param {string} [params.interval] - The interval for the second sampling of threads. - * @param {number} [params.snapshots=10] - Number of samples of thread stack trace. - * @param {number} [params.threads=3] - Specify the number of threads to provide information for. - * @param {string} [params.timeout] - Operation timeout. + * @param {boolean} [params.ignore_idle_threads=true] - Whether to show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue. + * @param {string} [params.interval] - The time interval between thread stack trace samples. + * @param {number} [params.snapshots=10] - The number of thread stack trace samples to collect. + * @param {number} [params.threads=3] - The number of threads to provide information for. + * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.type] - The type to sample. - * @param {array} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {array} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/nodes/info.js b/api/nodes/info.js index cb4bedcfd..f4e69d03d 100644 --- a/api/nodes/info.js +++ b/api/nodes/info.js @@ -25,10 +25,10 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Nodes * * @param {object} [params] - * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. - * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {boolean} [params.flat_settings=false] - When `true`, returns settings in flat format. + * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {array} [params.metric] - Limits the information returned to the specific metrics. Supports a comma-separated list, such as `http,ingest`. - * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information. + * @param {string} [params.node_id] - A comma-separated list of node IDs or names used to limit returned information. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/nodes/reloadSecureSettings.js b/api/nodes/reloadSecureSettings.js index b8c9b4f82..19af874f4 100644 --- a/api/nodes/reloadSecureSettings.js +++ b/api/nodes/reloadSecureSettings.js @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Nodes * * @param {object} [params] - * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {string} [params.node_id] - The names of particular nodes in the cluster to target. * @param {object} [params.body] - An object containing the password for the OpenSearch keystore. * diff --git a/api/nodes/stats.js b/api/nodes/stats.js index 08d663cea..f9e7160b1 100644 --- a/api/nodes/stats.js +++ b/api/nodes/stats.js @@ -25,17 +25,17 @@ const { normalizeArguments, parsePathParam } = require('../utils'); * @memberOf API-Nodes * * @param {object} [params] - * @param {string} [params.completion_fields] - Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. - * @param {string} [params.fielddata_fields] - Comma-separated list or wildcard expressions of fields to include in field data statistics. - * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. - * @param {array} [params.groups] - Comma-separated list of search groups to include in the search statistics. - * @param {boolean} [params.include_segment_file_sizes=false] - If `true`, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). + * @param {string} [params.completion_fields] - A comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. + * @param {string} [params.fielddata_fields] - A comma-separated list or wildcard expressions of fields to include in field data statistics. + * @param {string} [params.fields] - A comma-separated list or wildcard expressions of fields to include in the statistics. + * @param {array} [params.groups] - A comma-separated list of search groups to include in the search statistics. + * @param {boolean} [params.include_segment_file_sizes=false] - When `true`, reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). * @param {string} [params.level] - Indicates whether statistics are aggregated at the cluster, index, or shard level. - * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * @param {array} [params.types] - A comma-separated list of document types for the indexing index metric. - * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information. - * @param {array} [params.metric] - Limit the information returned to the specified metrics - * @param {array} [params.index_metric] - Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. + * @param {string} [params.node_id] - A comma-separated list of node IDs or names used to limit returned information. + * @param {array} [params.metric] - Limit the information returned to the specified metrics. + * @param {array} [params.index_metric] - Limit the information returned for indexes metric to the specified index metrics. It can be used only if indexes (or all) metric is specified. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/query/datasourcesList.js b/api/query/datasourcesList.js index e81f192b1..65a636c06 100644 --- a/api/query/datasourcesList.js +++ b/api/query/datasourcesList.js @@ -19,7 +19,7 @@ const { normalizeArguments } = require('../utils'); /** - * Retrieves a list of all available datasources. + * Retrieves a list of all available data sources. *
See Also: {@link undefined - query.datasources_list} * * @memberOf API-Query diff --git a/api/searchRelevance/_api.js b/api/searchRelevance/_api.js new file mode 100644 index 000000000..799652092 --- /dev/null +++ b/api/searchRelevance/_api.js @@ -0,0 +1,70 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Search-Relevance */ + +function SearchRelevanceApi(bindObj) { + this.deleteExperiments = require('./deleteExperiments').bind(bindObj); + this.deleteJudgments = require('./deleteJudgments').bind(bindObj); + this.deleteQuerySets = require('./deleteQuerySets').bind(bindObj); + this.deleteSearchConfigurations = require('./deleteSearchConfigurations').bind(bindObj); + this.getExperiments = require('./getExperiments').bind(bindObj); + this.getJudgments = require('./getJudgments').bind(bindObj); + this.getNodeStats = require('./getNodeStats').bind(bindObj); + this.getQuerySets = require('./getQuerySets').bind(bindObj); + this.getSearchConfigurations = require('./getSearchConfigurations').bind(bindObj); + this.getStats = require('./getStats').bind(bindObj); + this.postQuerySets = require('./postQuerySets').bind(bindObj); + this.putExperiments = require('./putExperiments').bind(bindObj); + this.putJudgments = require('./putJudgments').bind(bindObj); + this.putQuerySets = require('./putQuerySets').bind(bindObj); + this.putSearchConfigurations = require('./putSearchConfigurations').bind(bindObj); + + // Deprecated: Use deleteExperiments instead. + this.delete_experiments = require('./deleteExperiments').bind(bindObj); + // Deprecated: Use deleteJudgments instead. + this.delete_judgments = require('./deleteJudgments').bind(bindObj); + // Deprecated: Use deleteQuerySets instead. + this.delete_query_sets = require('./deleteQuerySets').bind(bindObj); + // Deprecated: Use deleteSearchConfigurations instead. + this.delete_search_configurations = require('./deleteSearchConfigurations').bind(bindObj); + // Deprecated: Use getExperiments instead. + this.get_experiments = require('./getExperiments').bind(bindObj); + // Deprecated: Use getJudgments instead. + this.get_judgments = require('./getJudgments').bind(bindObj); + // Deprecated: Use getNodeStats instead. + this.get_node_stats = require('./getNodeStats').bind(bindObj); + // Deprecated: Use getQuerySets instead. + this.get_query_sets = require('./getQuerySets').bind(bindObj); + // Deprecated: Use getSearchConfigurations instead. + this.get_search_configurations = require('./getSearchConfigurations').bind(bindObj); + // Deprecated: Use getStats instead. + this.get_stats = require('./getStats').bind(bindObj); + // Deprecated: Use postQuerySets instead. + this.post_query_sets = require('./postQuerySets').bind(bindObj); + // Deprecated: Use putExperiments instead. + this.put_experiments = require('./putExperiments').bind(bindObj); + // Deprecated: Use putJudgments instead. + this.put_judgments = require('./putJudgments').bind(bindObj); + // Deprecated: Use putQuerySets instead. + this.put_query_sets = require('./putQuerySets').bind(bindObj); + // Deprecated: Use putSearchConfigurations instead. + this.put_search_configurations = require('./putSearchConfigurations').bind(bindObj); +} + +module.exports = SearchRelevanceApi; diff --git a/api/searchRelevance/deleteExperiments.d.ts b/api/searchRelevance/deleteExperiments.d.ts new file mode 100644 index 000000000..f2107f4b8 --- /dev/null +++ b/api/searchRelevance/deleteExperiments.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_DeleteExperiments_Request extends Global.Params { + experiment_id: string; +} + +export interface SearchRelevance_DeleteExperiments_Response extends ApiResponse { + body: SearchRelevance_DeleteExperiments_ResponseBody; +} + +export type SearchRelevance_DeleteExperiments_ResponseBody = Record + diff --git a/api/searchRelevance/deleteExperiments.js b/api/searchRelevance/deleteExperiments.js new file mode 100644 index 000000000..47fa4c093 --- /dev/null +++ b/api/searchRelevance/deleteExperiments.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a specified experiment. + *
See Also: {@link undefined - search_relevance.delete_experiments} + * + * @memberOf API-Search-Relevance + * + * @param {object} params + * @param {string} params.experiment_id - The experiment id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteExperimentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.experiment_id == null) return handleMissingParam('experiment_id', this, callback); + + let { body, experiment_id, ...querystring } = params; + experiment_id = parsePathParam(experiment_id); + + const path = '/_plugins/_search_relevance/experiments/' + experiment_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteExperimentsFunc; diff --git a/api/searchRelevance/deleteJudgments.d.ts b/api/searchRelevance/deleteJudgments.d.ts new file mode 100644 index 000000000..6a090686a --- /dev/null +++ b/api/searchRelevance/deleteJudgments.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_DeleteJudgments_Request extends Global.Params { + judgment_id: string; +} + +export interface SearchRelevance_DeleteJudgments_Response extends ApiResponse { + body: SearchRelevance_DeleteJudgments_ResponseBody; +} + +export type SearchRelevance_DeleteJudgments_ResponseBody = Record + diff --git a/api/searchRelevance/deleteJudgments.js b/api/searchRelevance/deleteJudgments.js new file mode 100644 index 000000000..5e731276c --- /dev/null +++ b/api/searchRelevance/deleteJudgments.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a specified judgment. + *
See Also: {@link undefined - search_relevance.delete_judgments} + * + * @memberOf API-Search-Relevance + * + * @param {object} params + * @param {string} params.judgment_id - The judgment id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteJudgmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.judgment_id == null) return handleMissingParam('judgment_id', this, callback); + + let { body, judgment_id, ...querystring } = params; + judgment_id = parsePathParam(judgment_id); + + const path = '/_plugins/_search_relevance/judgments/' + judgment_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteJudgmentsFunc; diff --git a/api/searchRelevance/deleteQuerySets.d.ts b/api/searchRelevance/deleteQuerySets.d.ts new file mode 100644 index 000000000..755a3646d --- /dev/null +++ b/api/searchRelevance/deleteQuerySets.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_DeleteQuerySets_Request extends Global.Params { + query_set_id: string; +} + +export interface SearchRelevance_DeleteQuerySets_Response extends ApiResponse { + body: SearchRelevance_DeleteQuerySets_ResponseBody; +} + +export type SearchRelevance_DeleteQuerySets_ResponseBody = Record + diff --git a/api/searchRelevance/deleteQuerySets.js b/api/searchRelevance/deleteQuerySets.js new file mode 100644 index 000000000..e52500fe8 --- /dev/null +++ b/api/searchRelevance/deleteQuerySets.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a query set. + *
See Also: {@link undefined - search_relevance.delete_query_sets} + * + * @memberOf API-Search-Relevance + * + * @param {object} params + * @param {string} params.query_set_id - The query set id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteQuerySetsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.query_set_id == null) return handleMissingParam('query_set_id', this, callback); + + let { body, query_set_id, ...querystring } = params; + query_set_id = parsePathParam(query_set_id); + + const path = '/_plugins/_search_relevance/query_sets/' + query_set_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteQuerySetsFunc; diff --git a/api/searchRelevance/deleteSearchConfigurations.d.ts b/api/searchRelevance/deleteSearchConfigurations.d.ts new file mode 100644 index 000000000..01cbbb458 --- /dev/null +++ b/api/searchRelevance/deleteSearchConfigurations.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_DeleteSearchConfigurations_Request extends Global.Params { + search_configuration_id: string; +} + +export interface SearchRelevance_DeleteSearchConfigurations_Response extends ApiResponse { + body: SearchRelevance_DeleteSearchConfigurations_ResponseBody; +} + +export type SearchRelevance_DeleteSearchConfigurations_ResponseBody = Record + diff --git a/api/searchRelevance/deleteSearchConfigurations.js b/api/searchRelevance/deleteSearchConfigurations.js new file mode 100644 index 000000000..3effe9be4 --- /dev/null +++ b/api/searchRelevance/deleteSearchConfigurations.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a specified search configuration. + *
See Also: {@link undefined - search_relevance.delete_search_configurations} + * + * @memberOf API-Search-Relevance + * + * @param {object} params + * @param {string} params.search_configuration_id - The search configuration id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteSearchConfigurationsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.search_configuration_id == null) return handleMissingParam('search_configuration_id', this, callback); + + let { body, search_configuration_id, ...querystring } = params; + search_configuration_id = parsePathParam(search_configuration_id); + + const path = '/_plugins/_search_relevance/search_configurations/' + search_configuration_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteSearchConfigurationsFunc; diff --git a/api/searchRelevance/getExperiments.d.ts b/api/searchRelevance/getExperiments.d.ts new file mode 100644 index 000000000..c6257346c --- /dev/null +++ b/api/searchRelevance/getExperiments.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SearchRelevance_Common from '../_types/search_relevance._common' + +export interface SearchRelevance_GetExperiments_Request extends Global.Params { + experiment_id?: string; +} + +export interface SearchRelevance_GetExperiments_Response extends ApiResponse { + body: SearchRelevance_GetExperiments_ResponseBody; +} + +export type SearchRelevance_GetExperiments_ResponseBody = SearchRelevance_Common.Experiment | SearchRelevance_Common.GenericObject + diff --git a/api/searchRelevance/getExperiments.js b/api/searchRelevance/getExperiments.js new file mode 100644 index 000000000..c468ae004 --- /dev/null +++ b/api/searchRelevance/getExperiments.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Gets experiments. + *
See Also: {@link undefined - search_relevance.get_experiments} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.experiment_id] - The experiment id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getExperimentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, experiment_id, ...querystring } = params; + experiment_id = parsePathParam(experiment_id); + + const path = ['/_plugins/_search_relevance/experiments', experiment_id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getExperimentsFunc; diff --git a/api/searchRelevance/getJudgments.d.ts b/api/searchRelevance/getJudgments.d.ts new file mode 100644 index 000000000..2e4ff6773 --- /dev/null +++ b/api/searchRelevance/getJudgments.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SearchRelevance_Common from '../_types/search_relevance._common' + +export interface SearchRelevance_GetJudgments_Request extends Global.Params { + judgment_id?: string; +} + +export interface SearchRelevance_GetJudgments_Response extends ApiResponse { + body: SearchRelevance_GetJudgments_ResponseBody; +} + +export type SearchRelevance_GetJudgments_ResponseBody = SearchRelevance_Common.Judgment | SearchRelevance_Common.GenericObject + diff --git a/api/searchRelevance/getJudgments.js b/api/searchRelevance/getJudgments.js new file mode 100644 index 000000000..bf4a46295 --- /dev/null +++ b/api/searchRelevance/getJudgments.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Gets judgments. + *
See Also: {@link undefined - search_relevance.get_judgments} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.judgment_id] - The judgment id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getJudgmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, judgment_id, ...querystring } = params; + judgment_id = parsePathParam(judgment_id); + + const path = ['/_plugins/_search_relevance/judgments', judgment_id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getJudgmentsFunc; diff --git a/api/searchRelevance/getNodeStats.d.ts b/api/searchRelevance/getNodeStats.d.ts new file mode 100644 index 000000000..c536b3ffd --- /dev/null +++ b/api/searchRelevance/getNodeStats.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_GetNodeStats_Request extends Global.Params { + flat_stat_paths?: string; + include_all_nodes?: string; + include_individual_nodes?: string; + include_info?: string; + include_metadata?: string; + node_id: string; + stat?: string; +} + +export interface SearchRelevance_GetNodeStats_Response extends ApiResponse { + body: SearchRelevance_GetNodeStats_ResponseBody; +} + +export type SearchRelevance_GetNodeStats_ResponseBody = Record + diff --git a/api/searchRelevance/getNodeStats.js b/api/searchRelevance/getNodeStats.js new file mode 100644 index 000000000..0e0997969 --- /dev/null +++ b/api/searchRelevance/getNodeStats.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Gets stats by node. + *
See Also: {@link undefined - search_relevance.get_node_stats} + * + * @memberOf API-Search-Relevance + * + * @param {object} params + * @param {string} [params.flat_stat_paths] - Requests flattened stat paths as keys + * @param {string} [params.include_all_nodes] - Whether to include all nodes + * @param {string} [params.include_individual_nodes] - Whether to include individual nodes + * @param {string} [params.include_info] - Whether to include info + * @param {string} [params.include_metadata] - Whether to include metadata + * @param {string} params.node_id - The node id + * @param {string} [params.stat] - The statistic to return + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getNodeStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.node_id == null) return handleMissingParam('node_id', this, callback); + + let { body, node_id, stat, ...querystring } = params; + node_id = parsePathParam(node_id); + stat = parsePathParam(stat); + + const path = ['/_plugins/_search_relevance', node_id, 'stats', stat].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getNodeStatsFunc; diff --git a/api/searchRelevance/getQuerySets.d.ts b/api/searchRelevance/getQuerySets.d.ts new file mode 100644 index 000000000..58d5e7373 --- /dev/null +++ b/api/searchRelevance/getQuerySets.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SearchRelevance_Common from '../_types/search_relevance._common' + +export interface SearchRelevance_GetQuerySets_Request extends Global.Params { + query_set_id?: string; +} + +export interface SearchRelevance_GetQuerySets_Response extends ApiResponse { + body: SearchRelevance_GetQuerySets_ResponseBody; +} + +export type SearchRelevance_GetQuerySets_ResponseBody = SearchRelevance_Common.QuerySet | SearchRelevance_Common.GenericObject + diff --git a/api/searchRelevance/getQuerySets.js b/api/searchRelevance/getQuerySets.js new file mode 100644 index 000000000..d83d360e9 --- /dev/null +++ b/api/searchRelevance/getQuerySets.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Lists the current query sets available. + *
See Also: {@link undefined - search_relevance.get_query_sets} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.query_set_id] - The query set id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getQuerySetsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, query_set_id, ...querystring } = params; + query_set_id = parsePathParam(query_set_id); + + const path = ['/_plugins/_search_relevance/query_sets', query_set_id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getQuerySetsFunc; diff --git a/api/searchRelevance/getSearchConfigurations.d.ts b/api/searchRelevance/getSearchConfigurations.d.ts new file mode 100644 index 000000000..8c2ebcfba --- /dev/null +++ b/api/searchRelevance/getSearchConfigurations.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SearchRelevance_Common from '../_types/search_relevance._common' + +export interface SearchRelevance_GetSearchConfigurations_Request extends Global.Params { + search_configuration_id?: string; +} + +export interface SearchRelevance_GetSearchConfigurations_Response extends ApiResponse { + body: SearchRelevance_GetSearchConfigurations_ResponseBody; +} + +export type SearchRelevance_GetSearchConfigurations_ResponseBody = SearchRelevance_Common.SearchConfiguration | SearchRelevance_Common.GenericObject + diff --git a/api/searchRelevance/getSearchConfigurations.js b/api/searchRelevance/getSearchConfigurations.js new file mode 100644 index 000000000..fe1581e1c --- /dev/null +++ b/api/searchRelevance/getSearchConfigurations.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Gets the search configurations. + *
See Also: {@link undefined - search_relevance.get_search_configurations} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.search_configuration_id] - The search configuration id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getSearchConfigurationsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, search_configuration_id, ...querystring } = params; + search_configuration_id = parsePathParam(search_configuration_id); + + const path = ['/_plugins/_search_relevance/search_configurations', search_configuration_id].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getSearchConfigurationsFunc; diff --git a/api/searchRelevance/getStats.d.ts b/api/searchRelevance/getStats.d.ts new file mode 100644 index 000000000..afc083832 --- /dev/null +++ b/api/searchRelevance/getStats.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_GetStats_Request extends Global.Params { + flat_stat_paths?: string; + include_all_nodes?: string; + include_individual_nodes?: string; + include_info?: string; + include_metadata?: string; + stat?: string; +} + +export interface SearchRelevance_GetStats_Response extends ApiResponse { + body: SearchRelevance_GetStats_ResponseBody; +} + +export type SearchRelevance_GetStats_ResponseBody = Record + diff --git a/api/searchRelevance/getStats.js b/api/searchRelevance/getStats.js new file mode 100644 index 000000000..091fe5d65 --- /dev/null +++ b/api/searchRelevance/getStats.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Gets stats. + *
See Also: {@link undefined - search_relevance.get_stats} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.flat_stat_paths] - Requests flattened stat paths as keys + * @param {string} [params.include_all_nodes] - Whether to include all nodes + * @param {string} [params.include_individual_nodes] - Whether to include individual nodes + * @param {string} [params.include_info] - Whether to include info + * @param {string} [params.include_metadata] - Whether to include metadata + * @param {string} [params.stat] - The statistic to return + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, stat, ...querystring } = params; + stat = parsePathParam(stat); + + const path = ['/_plugins/_search_relevance/stats', stat].filter(c => c != null).join('/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getStatsFunc; diff --git a/api/searchRelevance/postQuerySets.d.ts b/api/searchRelevance/postQuerySets.d.ts new file mode 100644 index 000000000..2b7931aa6 --- /dev/null +++ b/api/searchRelevance/postQuerySets.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_PostQuerySets_Request extends Global.Params { + body?: SearchRelevance_PostQuerySets_RequestBody; +} + +export type SearchRelevance_PostQuerySets_RequestBody = { + description?: string; + name?: string; + querySetSize?: number; + sampling?: string; +} + +export interface SearchRelevance_PostQuerySets_Response extends ApiResponse { + body: SearchRelevance_PostQuerySets_ResponseBody; +} + +export type SearchRelevance_PostQuerySets_ResponseBody = { + query_set_id?: string; + query_set_result?: string; +} + diff --git a/api/searchRelevance/postQuerySets.js b/api/searchRelevance/postQuerySets.js new file mode 100644 index 000000000..e734a1241 --- /dev/null +++ b/api/searchRelevance/postQuerySets.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates a new query set by sampling queries from the user behavior data. + *
See Also: {@link undefined - search_relevance.post_query_sets} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function postQuerySetsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_search_relevance/query_sets'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = postQuerySetsFunc; diff --git a/api/searchRelevance/putExperiments.d.ts b/api/searchRelevance/putExperiments.d.ts new file mode 100644 index 000000000..29da67914 --- /dev/null +++ b/api/searchRelevance/putExperiments.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_PutExperiments_Request extends Global.Params { + body?: SearchRelevance_PutExperiments_RequestBody; +} + +export type SearchRelevance_PutExperiments_RequestBody = { + judgmentList?: string[]; + querySetId?: string; + searchConfigurationList?: string[]; + size?: number; + type?: string; +} | { + querySetId?: string; + searchConfigurationList?: string[]; + size?: number; + type?: string; +} + +export interface SearchRelevance_PutExperiments_Response extends ApiResponse { + body: SearchRelevance_PutExperiments_ResponseBody; +} + +export type SearchRelevance_PutExperiments_ResponseBody = Record + diff --git a/api/searchRelevance/putExperiments.js b/api/searchRelevance/putExperiments.js new file mode 100644 index 000000000..c78b8d5bd --- /dev/null +++ b/api/searchRelevance/putExperiments.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates an experiment. + *
See Also: {@link undefined - search_relevance.put_experiments} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putExperimentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_search_relevance/experiments'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putExperimentsFunc; diff --git a/api/searchRelevance/putJudgments.d.ts b/api/searchRelevance/putJudgments.d.ts new file mode 100644 index 000000000..3d0e32a26 --- /dev/null +++ b/api/searchRelevance/putJudgments.d.ts @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_PutJudgments_Request extends Global.Params { + body?: SearchRelevance_PutJudgments_RequestBody; +} + +export type SearchRelevance_PutJudgments_RequestBody = { + contextFields?: string[]; + description?: string; + ignoreFailure?: boolean; + modelId?: string; + name?: string; + querySetId?: string; + searchConfigurationList?: string[]; + size?: number; + type?: string; +} | { + clickModel?: string; + description?: string; + maxRank?: number; + name?: string; + type?: string; +} | { + description?: string; + judgmentRatings?: Record[]; + name?: string; + type?: string; +} + +export interface SearchRelevance_PutJudgments_Response extends ApiResponse { + body: SearchRelevance_PutJudgments_ResponseBody; +} + +export type SearchRelevance_PutJudgments_ResponseBody = { + judgment_id?: string; +} + diff --git a/api/searchRelevance/putJudgments.js b/api/searchRelevance/putJudgments.js new file mode 100644 index 000000000..bbd80c478 --- /dev/null +++ b/api/searchRelevance/putJudgments.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates a judgment. + *
See Also: {@link undefined - search_relevance.put_judgments} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {string} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putJudgmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_search_relevance/judgments'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putJudgmentsFunc; diff --git a/api/searchRelevance/putQuerySets.d.ts b/api/searchRelevance/putQuerySets.d.ts new file mode 100644 index 000000000..ed796cbbc --- /dev/null +++ b/api/searchRelevance/putQuerySets.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_PutQuerySets_Request extends Global.Params { + body?: SearchRelevance_PutQuerySets_RequestBody; +} + +export type SearchRelevance_PutQuerySets_RequestBody = { + description?: string; + name?: string; + querySetQueries?: Record[]; + sampling?: string; +} + +export interface SearchRelevance_PutQuerySets_Response extends ApiResponse { + body: SearchRelevance_PutQuerySets_ResponseBody; +} + +export type SearchRelevance_PutQuerySets_ResponseBody = { + query_set_id?: string; + query_set_result?: string; +} + diff --git a/api/searchRelevance/putQuerySets.js b/api/searchRelevance/putQuerySets.js new file mode 100644 index 000000000..4d4a26dd5 --- /dev/null +++ b/api/searchRelevance/putQuerySets.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates a new query set by uploading manually. + *
See Also: {@link undefined - search_relevance.put_query_sets} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putQuerySetsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_search_relevance/query_sets'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putQuerySetsFunc; diff --git a/api/searchRelevance/putSearchConfigurations.d.ts b/api/searchRelevance/putSearchConfigurations.d.ts new file mode 100644 index 000000000..6fe379351 --- /dev/null +++ b/api/searchRelevance/putSearchConfigurations.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface SearchRelevance_PutSearchConfigurations_Request extends Global.Params { + body?: SearchRelevance_PutSearchConfigurations_RequestBody; +} + +export type SearchRelevance_PutSearchConfigurations_RequestBody = { + index?: string; + name?: string; + query?: string; + searchPipeline?: string; +} + +export interface SearchRelevance_PutSearchConfigurations_Response extends ApiResponse { + body: SearchRelevance_PutSearchConfigurations_ResponseBody; +} + +export type SearchRelevance_PutSearchConfigurations_ResponseBody = { + search_configuration_id?: string; + search_configuration_result?: string; +} + diff --git a/api/searchRelevance/putSearchConfigurations.js b/api/searchRelevance/putSearchConfigurations.js new file mode 100644 index 000000000..b3450a76f --- /dev/null +++ b/api/searchRelevance/putSearchConfigurations.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Creates a search configuration. + *
See Also: {@link undefined - search_relevance.put_search_configurations} + * + * @memberOf API-Search-Relevance + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putSearchConfigurationsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_search_relevance/search_configurations'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putSearchConfigurationsFunc; diff --git a/api/security/getSslinfo.d.ts b/api/security/getSslinfo.d.ts index 095db3f1c..e4b3354f3 100644 --- a/api/security/getSslinfo.d.ts +++ b/api/security/getSslinfo.d.ts @@ -15,11 +15,12 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' export interface Security_GetSslinfo_Request extends Global.Params { - show_dn?: boolean | string; + show_dn?: Common.StringifiedBoolean; } export interface Security_GetSslinfo_Response extends ApiResponse { diff --git a/api/security/getSslinfo.js b/api/security/getSslinfo.js index 5ce540133..d2ffa98f3 100644 --- a/api/security/getSslinfo.js +++ b/api/security/getSslinfo.js @@ -25,7 +25,7 @@ const { normalizeArguments } = require('../utils'); * @memberOf API-Security * * @param {object} [params] - * @param {boolean | string} [params.show_dn] - Whether to include all domain names in the response. + * @param {string} [params.show_dn] - Whether to include all domain names in the response. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/security/patchDistinguishedName.d.ts b/api/security/patchDistinguishedName.d.ts index 5af5d9bf8..5d8e4464d 100644 --- a/api/security/patchDistinguishedName.d.ts +++ b/api/security/patchDistinguishedName.d.ts @@ -19,10 +19,12 @@ import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' export interface Security_PatchDistinguishedName_Request extends Global.Params { - body?: Security_Common.PatchOperations; + body?: Security_PatchDistinguishedName_RequestBody; cluster_name: string; } +export type Security_PatchDistinguishedName_RequestBody = Security_Common.PatchOperation[] + export interface Security_PatchDistinguishedName_Response extends ApiResponse { body: Security_PatchDistinguishedName_ResponseBody; } diff --git a/api/securityAnalytics/_api.js b/api/securityAnalytics/_api.js new file mode 100644 index 000000000..52b7d6a35 --- /dev/null +++ b/api/securityAnalytics/_api.js @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Security-Analytics */ + +function SecurityAnalyticsApi(bindObj) { + this.getAlerts = require('./getAlerts').bind(bindObj); + this.getFindings = require('./getFindings').bind(bindObj); + this.searchFindingCorrelations = require('./searchFindingCorrelations').bind(bindObj); + + // Deprecated: Use getAlerts instead. + this.get_alerts = require('./getAlerts').bind(bindObj); + // Deprecated: Use getFindings instead. + this.get_findings = require('./getFindings').bind(bindObj); + // Deprecated: Use searchFindingCorrelations instead. + this.search_finding_correlations = require('./searchFindingCorrelations').bind(bindObj); +} + +module.exports = SecurityAnalyticsApi; diff --git a/api/securityAnalytics/getAlerts.d.ts b/api/securityAnalytics/getAlerts.d.ts new file mode 100644 index 000000000..4493ffcd1 --- /dev/null +++ b/api/securityAnalytics/getAlerts.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' +import * as SecurityAnalytics_Alerts from '../_types/security_analytics.alerts' + +export interface SecurityAnalytics_GetAlerts_Request extends Global.Params { + alertState?: SecurityAnalytics_Alerts.AlertState; + detector_id?: string; + detectorType?: string; + endTime?: number; + missing?: string; + searchString?: string; + severityLevel?: SecurityAnalytics_Alerts.AlertSeverityLevel; + size?: number; + sortOrder?: Common.SortOrder; + sortString?: string; + startIndex?: number; + startTime?: number; +} + +export interface SecurityAnalytics_GetAlerts_Response extends ApiResponse { + body: SecurityAnalytics_GetAlerts_ResponseBody; +} + +export type SecurityAnalytics_GetAlerts_ResponseBody = SecurityAnalytics_Alerts.GetAlertsResponse + diff --git a/api/securityAnalytics/getAlerts.js b/api/securityAnalytics/getAlerts.js new file mode 100644 index 000000000..80df66ba4 --- /dev/null +++ b/api/securityAnalytics/getAlerts.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieve alerts related to a specific detector type or detector ID. + *
See Also: {@link https://docs.opensearch.org/docs/latest/security-analytics/api-tools/alert-finding-api/#get-alerts - security_analytics.get_alerts} + * + * @memberOf API-Security-Analytics + * + * @param {object} [params] + * @param {string} [params.alertState] - Used to filter by alert state. Optional. + * @param {string} [params.detectorType] - The type of detector used to fetch alerts. Optional when `detector_id` is specified. Otherwise required. + * @param {string} [params.detector_id] - The ID of the detector used to fetch alerts. Optional when `detectorType` is specified. Otherwise required. + * @param {number} [params.endTime] - The end timestamp (in ms) of the time window in which you want to retrieve alerts. Optional. + * @param {string} [params.missing] - Used to sort by whether the field `missing` exists or not in the documents associated with the alert. Optional. + * @param {string} [params.searchString] - The alert attribute you want returned in the search. Optional. + * @param {string} [params.severityLevel] - Used to filter by alert severity level. Optional. + * @param {number} [params.size=20] - The maximum number of results returned in the response. Optional. + * @param {string} [params.sortOrder] - The order used to sort the list of findings. Possible values are `asc` or `desc`. Optional. + * @param {string} [params.sortString=start_time] - The string used by Security Analytics to sort the alerts. Optional. + * @param {number} [params.startIndex=0] - The pagination index. Optional. + * @param {number} [params.startTime] - The beginning timestamp (in ms) of the time window in which you want to retrieve alerts. Optional. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAlertsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security_analytics/alerts'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAlertsFunc; diff --git a/api/securityAnalytics/getFindings.d.ts b/api/securityAnalytics/getFindings.d.ts new file mode 100644 index 000000000..8376d03fd --- /dev/null +++ b/api/securityAnalytics/getFindings.d.ts @@ -0,0 +1,43 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Global from '../_types/_global' +import * as SecurityAnalytics_Findings from '../_types/security_analytics.findings' + +export interface SecurityAnalytics_GetFindings_Request extends Global.Params { + detectionType?: SecurityAnalytics_Findings.DetectionType; + detector_id?: string; + detectorType?: string; + endTime?: string; + findingIds?: string; + missing?: string; + searchString?: string; + severity?: SecurityAnalytics_Findings.RuleSeverity; + size?: number; + sortOrder?: Common.SortOrder; + sortString?: string; + startIndex?: number; + startTime?: number; +} + +export interface SecurityAnalytics_GetFindings_Response extends ApiResponse { + body: SecurityAnalytics_GetFindings_ResponseBody; +} + +export type SecurityAnalytics_GetFindings_ResponseBody = SecurityAnalytics_Findings.GetFindingsResponse + diff --git a/api/securityAnalytics/getFindings.js b/api/securityAnalytics/getFindings.js new file mode 100644 index 000000000..70ac3d198 --- /dev/null +++ b/api/securityAnalytics/getFindings.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieve findings related to a specific detector type or detector ID. + *
See Also: {@link https://docs.opensearch.org/docs/latest/security-analytics/api-tools/alert-finding-api/#get-findings - security_analytics.get_findings} + * + * @memberOf API-Security-Analytics + * + * @param {object} [params] + * @param {string} [params.detectionType] - The detection type that dictates the retrieval type for the findings. When the detection type is `threat`, it fetches threat intelligence feeds. When the detection type is `rule`, findings are fetched based on the detector’s rule. Optional. + * @param {string} [params.detectorType] - The type of detector used to fetch alerts. Optional when the `detector_id` is specified. Otherwise required. + * @param {string} [params.detector_id] - The ID of the detector used to fetch alerts. Optional when the `detectorType` is specified. Otherwise required. + * @param {string} [params.endTime] - The end timestamp (in ms) of the time window in which you want to retrieve findings. Optional. + * @param {string} [params.findingIds] - The comma-separated id list of findings for which you want retrieve details. Optional. + * @param {string} [params.missing] - Used to sort by whether the field `missing` exists or not in the documents associated with the finding. Optional. + * @param {string} [params.searchString] - The finding attribute you want returned in the search. To search in a specific index, specify the index name in the request path. For example, to search findings in the indexABC index, use `searchString=indexABC’. Optional. + * @param {string} [params.severity] - The rule severity for which retrieve findings. Severity can be `critical`, `high`, `medium`, or `low`. Optional. + * @param {number} [params.size=20] - The maximum number of results returned in the response. Optional. + * @param {string} [params.sortOrder] - The order used to sort the list of findings. Possible values are `asc` or `desc`. Optional. + * @param {string} [params.sortString=timestamp] - The string used by the Alerting plugin to sort the findings. Optional. + * @param {number} [params.startIndex=0] - The pagination index. Optional. + * @param {number} [params.startTime] - The beginning timestamp (in ms) of the time window in which you want to retrieve findings. Optional. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFindingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security_analytics/findings/_search'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFindingsFunc; diff --git a/api/securityAnalytics/searchFindingCorrelations.d.ts b/api/securityAnalytics/searchFindingCorrelations.d.ts new file mode 100644 index 000000000..1cf4f9b67 --- /dev/null +++ b/api/securityAnalytics/searchFindingCorrelations.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SecurityAnalytics_Findings from '../_types/security_analytics.findings' + +export interface SecurityAnalytics_SearchFindingCorrelations_Request extends Global.Params { + detector_type: string; + finding: string; + nearby_findings?: number; + time_window?: number; +} + +export interface SecurityAnalytics_SearchFindingCorrelations_Response extends ApiResponse { + body: SecurityAnalytics_SearchFindingCorrelations_ResponseBody; +} + +export type SecurityAnalytics_SearchFindingCorrelations_ResponseBody = SecurityAnalytics_Findings.SearchFindingCorrelationsResponse + diff --git a/api/securityAnalytics/searchFindingCorrelations.js b/api/securityAnalytics/searchFindingCorrelations.js new file mode 100644 index 000000000..2ee40e915 --- /dev/null +++ b/api/securityAnalytics/searchFindingCorrelations.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * List correlations for a finding. + *
See Also: {@link https://docs.opensearch.org/docs/latest/security-analytics/api-tools/correlation-eng/#list-correlations-for-a-finding-belonging-to-a-log-type - security_analytics.search_finding_correlations} + * + * @memberOf API-Security-Analytics + * + * @param {object} params + * @param {string} params.detector_type - The log type of findings you want to correlate with the specified finding. Required. + * @param {string} params.finding - The finding ID for which you want to find other findings that are correlated. Required. + * @param {number} [params.nearby_findings=10] - The number of nearby findings you want to return. Optional. + * @param {number} [params.time_window=300000] - The time window (in ms) in which all of the correlations must have occurred together. Optional. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchFindingCorrelationsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.detector_type == null) return handleMissingParam('detector_type', this, callback); + if (params.finding == null) return handleMissingParam('finding', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security_analytics/findings/correlate'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchFindingCorrelationsFunc; diff --git a/api/sm/deletePolicy.d.ts b/api/sm/deletePolicy.d.ts index f4bfc9c4b..3e2a75906 100644 --- a/api/sm/deletePolicy.d.ts +++ b/api/sm/deletePolicy.d.ts @@ -15,8 +15,8 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' import * as Global from '../_types/_global' -import * as Sm_Common from '../_types/sm._common' export interface Sm_DeletePolicy_Request extends Global.Params { policy_name: string; @@ -26,5 +26,5 @@ export interface Sm_DeletePolicy_Response extends ApiResponse { body: Sm_DeletePolicy_ResponseBody; } -export type Sm_DeletePolicy_ResponseBody = Sm_Common.DeletePolicyResponse +export type Sm_DeletePolicy_ResponseBody = Common.WriteResponseBase diff --git a/api/sm/getPolicies.d.ts b/api/sm/getPolicies.d.ts index 376ff27d4..002804c73 100644 --- a/api/sm/getPolicies.d.ts +++ b/api/sm/getPolicies.d.ts @@ -15,6 +15,7 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Sm_Common from '../_types/sm._common' @@ -23,7 +24,7 @@ export interface Sm_GetPolicies_Request extends Global.Params { queryString?: string; size?: number; sortField?: string; - sortOrder?: 'asc' | 'desc'; + sortOrder?: Common.SortOrder; } export interface Sm_GetPolicies_Response extends ApiResponse { diff --git a/api/sm/getPolicies.js b/api/sm/getPolicies.js index 464f85cb7..c3312b1e1 100644 --- a/api/sm/getPolicies.js +++ b/api/sm/getPolicies.js @@ -29,7 +29,7 @@ const { normalizeArguments } = require('../utils'); * @param {string} [params.queryString] - The query string to filter the returned snapshot management policies. * @param {number} [params.size] - The number of snapshot management policies to return. * @param {string} [params.sortField] - The name of the field to sort the snapshot management policies by. - * @param {string} [params.sortOrder=asc] - The order to sort the snapshot management policies. + * @param {string} [params.sortOrder] - The order to sort the snapshot management policies. * * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} * @param {function} [callback] - Callback that handles errors and response diff --git a/api/snapshot/get.js b/api/snapshot/get.js index df1a54586..7998d74ec 100644 --- a/api/snapshot/get.js +++ b/api/snapshot/get.js @@ -28,7 +28,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u * @param {string} [params.cluster_manager_timeout] - The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units). * @param {boolean} [params.ignore_unavailable=false] - When `false`, the request returns an error for any snapshots that are unavailable. * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - * @param {boolean} [params.verbose] - When `true`, returns additional information about each snapshot such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot. + * @param {boolean} [params.verbose] - When `true`, returns additional information about each snapshot, such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot. When `false`, returns only snapshot names and contained indexes. This is useful when the snapshots belong to a cloud-based repository, where each blob read is a cost or performance concern. * @param {string} params.repository - A comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. * @param {string} params.snapshot - A comma-separated list of snapshot names to retrieve. Also accepts wildcard expressions. (`*`). - To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`. - To get information about any snapshots that are currently running, use `_current`. * diff --git a/api/sql/query.js b/api/sql/query.js index 7ab7f0a71..5187861a7 100644 --- a/api/sql/query.js +++ b/api/sql/query.js @@ -19,7 +19,7 @@ const { normalizeArguments } = require('../utils'); /** - * Executes SQL or PPL queries against OpenSearch indices. + * Executes SQL or PPL queries against OpenSearch indexes. *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.query} * * @memberOf API-Sql diff --git a/api/transforms/delete.d.ts b/api/transforms/delete.d.ts index b84218dd3..0e37405bf 100644 --- a/api/transforms/delete.d.ts +++ b/api/transforms/delete.d.ts @@ -16,8 +16,8 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' +import * as Core_Bulk from '../_types/_core.bulk' import * as Global from '../_types/_global' -import * as Transforms_Common from '../_types/transforms._common' export interface Transforms_Delete_Request extends Global.Params { id: Common.Id; @@ -27,5 +27,5 @@ export interface Transforms_Delete_Response extends ApiResponse { body: Transforms_Delete_ResponseBody; } -export type Transforms_Delete_ResponseBody = Transforms_Common.DeleteTransformsResponse +export type Transforms_Delete_ResponseBody = Core_Bulk.BulkResponseBase