@elastic/elasticsearch
Advanced tools
Comparing version 8.4.0 to 8.5.0
@@ -7,5 +7,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
} | ||
export default function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>; | ||
export default function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>; | ||
export default function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>; | ||
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>; | ||
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>; | ||
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>; | ||
export {}; |
@@ -23,3 +23,3 @@ "use strict"; | ||
const acceptedPath = ['index']; | ||
const acceptedBody = ['index_filter', 'runtime_mappings']; | ||
const acceptedBody = ['fields', 'index_filter', 'runtime_mappings']; | ||
const querystring = {}; | ||
@@ -35,2 +35,3 @@ // @ts-expect-error | ||
} | ||
params = params !== null && params !== void 0 ? params : {}; | ||
for (const key in params) { | ||
@@ -37,0 +38,0 @@ if (acceptedBody.includes(key)) { |
@@ -52,2 +52,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
diskUsage(this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptions): Promise<T.IndicesDiskUsageResponse>; | ||
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDownsampleResponse>; | ||
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDownsampleResponse, unknown>>; | ||
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptions): Promise<T.IndicesDownsampleResponse>; | ||
exists(this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsResponse>; | ||
@@ -54,0 +57,0 @@ exists(this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsResponse, unknown>>; |
@@ -346,2 +346,26 @@ "use strict"; | ||
} | ||
async downsample(params, options) { | ||
var _a; | ||
const acceptedPath = ['index', 'target_index']; | ||
const acceptedBody = ['config']; | ||
const querystring = {}; | ||
// @ts-expect-error | ||
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined; | ||
for (const key in params) { | ||
if (acceptedBody.includes(key)) { | ||
// @ts-expect-error | ||
body = params[key]; | ||
} | ||
else if (acceptedPath.includes(key)) { | ||
continue; | ||
} | ||
else if (key !== 'body') { | ||
// @ts-expect-error | ||
querystring[key] = params[key]; | ||
} | ||
} | ||
const method = 'POST'; | ||
const path = `/${encodeURIComponent(params.index.toString())}/_downsample/${encodeURIComponent(params.target_index.toString())}`; | ||
return await this.transport.request({ path, method, querystring, body }, options); | ||
} | ||
async exists(params, options) { | ||
@@ -348,0 +372,0 @@ const acceptedPath = ['index']; |
@@ -22,5 +22,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
getTrialStatus(this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): Promise<T.LicenseGetTrialStatusResponse>; | ||
post(this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostResponse>; | ||
post(this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostResponse, unknown>>; | ||
post(this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>; | ||
post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostResponse>; | ||
post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostResponse, unknown>>; | ||
post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>; | ||
postStartBasic(this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostStartBasicResponse>; | ||
@@ -27,0 +27,0 @@ postStartBasic(this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostStartBasicResponse, unknown>>; |
@@ -116,2 +116,3 @@ "use strict"; | ||
} | ||
params = params !== null && params !== void 0 ? params : {}; | ||
for (const key in params) { | ||
@@ -118,0 +119,0 @@ if (acceptedBody.includes(key)) { |
@@ -10,2 +10,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
constructor(transport: Transport); | ||
clearTrainedModelDeploymentCache(this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlClearTrainedModelDeploymentCacheResponse>; | ||
clearTrainedModelDeploymentCache(this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlClearTrainedModelDeploymentCacheResponse, unknown>>; | ||
clearTrainedModelDeploymentCache(this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptions): Promise<T.MlClearTrainedModelDeploymentCacheResponse>; | ||
closeJob(this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlCloseJobResponse>; | ||
@@ -12,0 +15,0 @@ closeJob(this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlCloseJobResponse, unknown>>; |
@@ -25,5 +25,2 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
putJob(this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptions): Promise<T.RollupPutJobResponse>; | ||
rollup(this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RollupRollupResponse>; | ||
rollup(this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.RollupRollupResponse, unknown>>; | ||
rollup(this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptions): Promise<T.RollupRollupResponse>; | ||
rollupSearch<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RollupRollupSearchResponse<TDocument, TAggregations>>; | ||
@@ -30,0 +27,0 @@ rollupSearch<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.RollupRollupSearchResponse<TDocument, TAggregations>, unknown>>; |
@@ -148,26 +148,2 @@ "use strict"; | ||
} | ||
async rollup(params, options) { | ||
var _a; | ||
const acceptedPath = ['index', 'rollup_index']; | ||
const acceptedBody = ['config']; | ||
const querystring = {}; | ||
// @ts-expect-error | ||
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined; | ||
for (const key in params) { | ||
if (acceptedBody.includes(key)) { | ||
// @ts-expect-error | ||
body = params[key]; | ||
} | ||
else if (acceptedPath.includes(key)) { | ||
continue; | ||
} | ||
else if (key !== 'body') { | ||
// @ts-expect-error | ||
querystring[key] = params[key]; | ||
} | ||
} | ||
const method = 'POST'; | ||
const path = `/${encodeURIComponent(params.index.toString())}/_rollup/${encodeURIComponent(params.rollup_index.toString())}`; | ||
return await this.transport.request({ path, method, querystring, body }, options); | ||
} | ||
async rollupSearch(params, options) { | ||
@@ -174,0 +150,0 @@ const acceptedPath = ['index']; |
@@ -16,2 +16,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport'; | ||
authenticate(this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptions): Promise<T.SecurityAuthenticateResponse>; | ||
bulkUpdateApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>; | ||
bulkUpdateApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>; | ||
bulkUpdateApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>; | ||
changePassword(this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityChangePasswordResponse>; | ||
@@ -18,0 +21,0 @@ changePassword(this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityChangePasswordResponse, unknown>>; |
@@ -80,2 +80,19 @@ "use strict"; | ||
} | ||
async bulkUpdateApiKeys(params, options) { | ||
const acceptedPath = []; | ||
const querystring = {}; | ||
const body = undefined; | ||
params = params !== null && params !== void 0 ? params : {}; | ||
for (const key in params) { | ||
if (acceptedPath.includes(key)) { | ||
continue; | ||
} | ||
else if (key !== 'body') { | ||
querystring[key] = params[key]; | ||
} | ||
} | ||
const method = 'POST'; | ||
const path = '/_security/api_key/_bulk_update'; | ||
return await this.transport.request({ path, method, querystring, body }, options); | ||
} | ||
async changePassword(params, options) { | ||
@@ -712,3 +729,3 @@ const acceptedPath = ['username']; | ||
const acceptedPath = []; | ||
const acceptedBody = ['api_key', 'grant_type', 'access_token', 'username', 'password']; | ||
const acceptedBody = ['api_key', 'grant_type', 'access_token', 'username', 'password', 'run_as']; | ||
const querystring = {}; | ||
@@ -715,0 +732,0 @@ // @ts-expect-error |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ConnectionOptions as TlsConnectionOptions } from 'tls'; | ||
@@ -3,0 +4,0 @@ import { URL } from 'url'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Readable } from 'stream'; | ||
@@ -3,0 +4,0 @@ import { TransportResult, TransportRequestOptions } from '@elastic/transport'; |
@@ -148,3 +148,2 @@ "use strict"; | ||
}, options); | ||
// @ts-expect-error | ||
response = r; | ||
@@ -151,0 +150,0 @@ (0, assert_1.default)(response !== undefined, 'The response is undefined, please file a bug report'); |
{ | ||
"name": "@elastic/elasticsearch", | ||
"version": "8.4.0", | ||
"versionCanary": "8.4.0-canary.2", | ||
"version": "8.5.0", | ||
"versionCanary": "8.5.0-canary.0", | ||
"description": "The official Elasticsearch client for Node.js", | ||
@@ -94,2 +94,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2301113
258
47576
0