Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elastic/elasticsearch

Package Overview
Dependencies
Maintainers
85
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/elasticsearch - npm Package Compare versions

Comparing version 8.2.1 to 8.4.0

5

lib/api/api/async_search.js

@@ -84,3 +84,3 @@ "use strict";

const acceptedPath = ['index'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const querystring = {};

@@ -101,3 +101,4 @@ // @ts-expect-error

// @ts-expect-error
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
// @ts-expect-error
querystring[key] = params[key];

@@ -104,0 +105,0 @@ }

2

lib/api/api/enrich.js

@@ -93,3 +93,3 @@ "use strict";

const acceptedPath = ['name'];
const acceptedBody = ['geo_match', 'match'];
const acceptedBody = ['geo_match', 'match', 'range'];
const querystring = {};

@@ -96,0 +96,0 @@ // @ts-expect-error

@@ -82,3 +82,3 @@ "use strict";

const acceptedPath = ['index'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const querystring = {};

@@ -85,0 +85,0 @@ // @ts-expect-error

@@ -103,5 +103,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';

getMemoryStats(this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptions): Promise<T.MlGetMemoryStatsResponse>;
getModelSnapshotUpgradeStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
getModelSnapshotUpgradeStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
getModelSnapshotUpgradeStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
getModelSnapshotUpgradeStats(this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetModelSnapshotUpgradeStatsResponse>;
getModelSnapshotUpgradeStats(this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlGetModelSnapshotUpgradeStatsResponse, unknown>>;
getModelSnapshotUpgradeStats(this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptions): Promise<T.MlGetModelSnapshotUpgradeStatsResponse>;
getModelSnapshots(this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetModelSnapshotsResponse>;

@@ -122,5 +122,5 @@ getModelSnapshots(this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlGetModelSnapshotsResponse, unknown>>;

getTrainedModelsStats(this: That, params?: T.MlGetTrainedModelsStatsRequest | TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): Promise<T.MlGetTrainedModelsStatsResponse>;
inferTrainedModelDeployment(this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlInferTrainedModelDeploymentResponse>;
inferTrainedModelDeployment(this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlInferTrainedModelDeploymentResponse, unknown>>;
inferTrainedModelDeployment(this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<T.MlInferTrainedModelDeploymentResponse>;
inferTrainedModel(this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlInferTrainedModelResponse>;
inferTrainedModel(this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlInferTrainedModelResponse, unknown>>;
inferTrainedModel(this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptions): Promise<T.MlInferTrainedModelResponse>;
info(this: That, params?: T.MlInfoRequest | TB.MlInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlInfoResponse>;

@@ -127,0 +127,0 @@ info(this: That, params?: T.MlInfoRequest | TB.MlInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlInfoResponse, unknown>>;

@@ -23,3 +23,3 @@ "use strict";

const acceptedPath = ['index'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const querystring = {};

@@ -40,3 +40,4 @@ // @ts-expect-error

// @ts-expect-error
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
// @ts-expect-error
querystring[key] = params[key];

@@ -43,0 +44,0 @@ }

@@ -112,2 +112,5 @@ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';

hasPrivileges(this: That, params?: T.SecurityHasPrivilegesRequest | TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptions): Promise<T.SecurityHasPrivilegesResponse>;
hasPrivilegesUserProfile(this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityHasPrivilegesUserProfileResponse>;
hasPrivilegesUserProfile(this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityHasPrivilegesUserProfileResponse, unknown>>;
hasPrivilegesUserProfile(this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityHasPrivilegesUserProfileResponse>;
invalidateApiKey(this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityInvalidateApiKeyResponse>;

@@ -164,2 +167,5 @@ invalidateApiKey(this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityInvalidateApiKeyResponse, unknown>>;

suggestUserProfiles(this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptions): Promise<T.SecuritySuggestUserProfilesResponse>;
updateApiKey(this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateApiKeyResponse>;
updateApiKey(this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateApiKeyResponse, unknown>>;
updateApiKey(this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityUpdateApiKeyResponse>;
updateUserProfileData(this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateUserProfileDataResponse>;

@@ -166,0 +172,0 @@ updateUserProfileData(this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateUserProfileDataResponse, unknown>>;

@@ -780,2 +780,33 @@ "use strict";

}
async hasPrivilegesUserProfile(params, options) {
const acceptedPath = [];
const acceptedBody = ['uids', 'privileges'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = '/_security/profile/_has_privileges';
return await this.transport.request({ path, method, querystring, body }, options);
}
async invalidateApiKey(params, options) {

@@ -1220,3 +1251,3 @@ const acceptedPath = [];

const acceptedPath = [];
const acceptedBody = ['name', 'size'];
const acceptedBody = ['name', 'size', 'data', 'hint'];
const querystring = {};

@@ -1251,5 +1282,36 @@ // @ts-expect-error

}
async updateApiKey(params, options) {
const acceptedPath = ['id'];
const acceptedBody = ['role_descriptors', 'metadata'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_security/api_key/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async updateUserProfileData(params, options) {
const acceptedPath = ['uid'];
const acceptedBody = ['access', 'data'];
const acceptedBody = ['labels', 'data'];
const querystring = {};

@@ -1256,0 +1318,0 @@ // @ts-expect-error

@@ -1,2 +0,1 @@

import InternalApi from './api/_internal';
import AsyncSearchApi from './api/async_search';

@@ -80,3 +79,2 @@ import AutoscalingApi from './api/autoscaling';

new (): API;
Internal: InternalApi;
asyncSearch: AsyncSearchApi;

@@ -159,3 +157,2 @@ autoscaling: AutoscalingApi;

}
declare const kInternal: unique symbol;
declare const kAsyncSearch: unique symbol;

@@ -195,3 +192,2 @@ declare const kAutoscaling: unique symbol;

export default class API {
[kInternal]: symbol | null;
[kAsyncSearch]: symbol | null;

@@ -198,0 +194,0 @@ [kAutoscaling]: symbol | null;

@@ -20,3 +20,3 @@ "use strict";

*/
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -31,3 +31,2 @@ const tslib_1 = require("tslib");

// and elastic/elastic-client-generator-js to regenerate this file again.
const _internal_1 = tslib_1.__importDefault(require("./api/_internal"));
const async_search_1 = tslib_1.__importDefault(require("./api/async_search"));

@@ -109,3 +108,2 @@ const autoscaling_1 = tslib_1.__importDefault(require("./api/autoscaling"));

const xpack_1 = tslib_1.__importDefault(require("./api/xpack"));
const kInternal = Symbol('Internal');
const kAsyncSearch = Symbol('AsyncSearch');

@@ -344,9 +342,2 @@ const kAutoscaling = Symbol('Autoscaling');

});
Object.defineProperty(this, _9, {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this[kInternal] = null;
this[kAsyncSearch] = null;

@@ -388,3 +379,3 @@ this[kAutoscaling] = null;

exports.default = API;
_a = kInternal, _b = kAsyncSearch, _c = kAutoscaling, _d = kCat, _e = kCcr, _f = kCluster, _g = kDanglingIndices, _h = kEnrich, _j = kEql, _k = kFeatures, _l = kFleet, _m = kGraph, _o = kIlm, _p = kIndices, _q = kIngest, _r = kLicense, _s = kLogstash, _t = kMigration, _u = kMl, _v = kMonitoring, _w = kNodes, _x = kRollup, _y = kSearchableSnapshots, _z = kSecurity, _0 = kShutdown, _1 = kSlm, _2 = kSnapshot, _3 = kSql, _4 = kSsl, _5 = kTasks, _6 = kTextStructure, _7 = kTransform, _8 = kWatcher, _9 = kXpack;
_a = kAsyncSearch, _b = kAutoscaling, _c = kCat, _d = kCcr, _e = kCluster, _f = kDanglingIndices, _g = kEnrich, _h = kEql, _j = kFeatures, _k = kFleet, _l = kGraph, _m = kIlm, _o = kIndices, _p = kIngest, _q = kLicense, _r = kLogstash, _s = kMigration, _t = kMl, _u = kMonitoring, _v = kNodes, _w = kRollup, _x = kSearchableSnapshots, _y = kSecurity, _z = kShutdown, _0 = kSlm, _1 = kSnapshot, _2 = kSql, _3 = kSsl, _4 = kTasks, _5 = kTextStructure, _6 = kTransform, _7 = kWatcher, _8 = kXpack;
API.prototype.bulk = bulk_1.default;

@@ -434,5 +425,2 @@ API.prototype.clearScroll = clear_scroll_1.default;

Object.defineProperties(API.prototype, {
Internal: {
get() { return this[kInternal] === null ? (this[kInternal] = new _internal_1.default(this.transport)) : this[kInternal]; }
},
asyncSearch: {

@@ -439,0 +427,0 @@ get() { return this[kAsyncSearch] === null ? (this[kAsyncSearch] = new async_search_1.default(this.transport)) : this[kAsyncSearch]; }

/// <reference types="node" />
/// <reference types="node" />
import { ConnectionOptions as TlsConnectionOptions } from 'tls';

@@ -4,0 +3,0 @@ import { URL } from 'url';

/// <reference types="node" />
/// <reference types="node" />
import { Readable } from 'stream';

@@ -4,0 +3,0 @@ import { TransportResult, TransportRequestOptions } from '@elastic/transport';

{
"name": "@elastic/elasticsearch",
"version": "8.2.1",
"versionCanary": "8.2.1-canary.0",
"version": "8.4.0",
"versionCanary": "8.4.0-canary.2",
"description": "The official Elasticsearch client for Node.js",

@@ -6,0 +6,0 @@ "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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc