Socket
Socket
Sign inDemoInstall

@elastic/elasticsearch-canary

Package Overview
Dependencies
Maintainers
80
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/elasticsearch-canary - npm Package Compare versions

Comparing version 8.1.0-canary.2 to 8.1.0-canary.3

CHANGELOG.md

6

lib/api/api/bulk.d.ts

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

}
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>;
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>;
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptions): Promise<T.BulkResponse>;
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>;
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>;
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<T.BulkResponse>;
export {};

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

const acceptedPath = ['index'];
const acceptedBody = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'size', 'fields', 'result_position'];
const acceptedBody = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'size', 'fields', 'result_position', 'runtime_mappings'];
const querystring = {};

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

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

globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise<T.FleetGlobalCheckpointsResponse>;
msearch(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
msearch(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
msearch(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
search(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
search(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
search(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetMsearchResponse<TDocument>>;
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetMsearchResponse<TDocument>, unknown>>;
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptions): Promise<T.FleetMsearchResponse<TDocument>>;
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetSearchResponse<TDocument>>;
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetSearchResponse<TDocument>, unknown>>;
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise<T.FleetSearchResponse<TDocument>>;
}
export {};

@@ -49,11 +49,18 @@ "use strict";

async msearch(params, options) {
var _a;
const acceptedPath = ['index'];
const acceptedBody = ['searches'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
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];

@@ -76,10 +83,24 @@ }

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 querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @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 (acceptedPath.includes(key)) {
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];

@@ -86,0 +107,0 @@ }

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

getStatus(this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptions): Promise<T.IlmGetStatusResponse>;
migrateToDataTiers(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
migrateToDataTiers(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
migrateToDataTiers(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMigrateToDataTiersResponse>;
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMigrateToDataTiersResponse, unknown>>;
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): Promise<T.IlmMigrateToDataTiersResponse>;
moveToStep(this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMoveToStepResponse>;

@@ -27,0 +27,0 @@ moveToStep(this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMoveToStepResponse, unknown>>;

@@ -111,10 +111,25 @@ "use strict";

const acceptedPath = [];
const acceptedBody = ['legacy_template_to_delete', 'node_attribute'];
const querystring = {};
const body = undefined;
// @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;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
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];

@@ -121,0 +136,0 @@ }

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

existsTemplate(this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsTemplateResponse>;
fieldUsageStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
fieldUsageStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
fieldUsageStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesFieldUsageStatsResponse>;
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesFieldUsageStatsResponse, unknown>>;
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesFieldUsageStatsResponse>;
flush(this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesFlushResponse>;

@@ -69,0 +69,0 @@ flush(this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesFlushResponse, unknown>>;

@@ -426,3 +426,2 @@ "use strict";

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -433,2 +432,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -435,0 +435,0 @@ }

@@ -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,3 +116,2 @@ "use strict";

}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -119,0 +118,0 @@ if (acceptedBody.includes(key)) {

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

constructor(transport: Transport);
bulk<TSource = unknown>(this: That, params: T.MonitoringBulkRequest<TSource> | TB.MonitoringBulkRequest<TSource>, options?: TransportRequestOptionsWithOutMeta): Promise<T.MonitoringBulkResponse>;
bulk<TSource = unknown>(this: That, params: T.MonitoringBulkRequest<TSource> | TB.MonitoringBulkRequest<TSource>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MonitoringBulkResponse, unknown>>;
bulk<TSource = unknown>(this: That, params: T.MonitoringBulkRequest<TSource> | TB.MonitoringBulkRequest<TSource>, options?: TransportRequestOptions): Promise<T.MonitoringBulkResponse>;
bulk<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.MonitoringBulkRequest<TDocument, TPartialDocument> | TB.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.MonitoringBulkResponse>;
bulk<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.MonitoringBulkRequest<TDocument, TPartialDocument> | TB.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MonitoringBulkResponse, unknown>>;
bulk<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.MonitoringBulkRequest<TDocument, TPartialDocument> | TB.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<T.MonitoringBulkResponse>;
}
export {};

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

constructor(transport: Transport);
clearRepositoriesMeteringArchive(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
clearRepositoriesMeteringArchive(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
clearRepositoriesMeteringArchive(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
getRepositoriesMeteringInfo(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
getRepositoriesMeteringInfo(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
getRepositoriesMeteringInfo(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
clearRepositoriesMeteringArchive(this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.NodesClearRepositoriesMeteringArchiveResponse>;
clearRepositoriesMeteringArchive(this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.NodesClearRepositoriesMeteringArchiveResponse, unknown>>;
clearRepositoriesMeteringArchive(this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptions): Promise<T.NodesClearRepositoriesMeteringArchiveResponse>;
getRepositoriesMeteringInfo(this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.NodesGetRepositoriesMeteringInfoResponse>;
getRepositoriesMeteringInfo(this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.NodesGetRepositoriesMeteringInfoResponse, unknown>>;
getRepositoriesMeteringInfo(this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptions): Promise<T.NodesGetRepositoriesMeteringInfoResponse>;
hotThreads(this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.NodesHotThreadsResponse>;

@@ -18,0 +18,0 @@ hotThreads(this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.NodesHotThreadsResponse, unknown>>;

@@ -35,3 +35,2 @@ "use strict";

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -42,2 +41,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -54,3 +54,2 @@ }

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -61,2 +60,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -63,0 +63,0 @@ }

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

const acceptedPath = ['id'];
const acceptedBody = ['cron', 'groups', 'index_pattern', 'metrics', 'page_size', 'rollup_index'];
const acceptedBody = ['cron', 'groups', 'index_pattern', 'metrics', 'page_size', 'rollup_index', 'timeout', 'headers'];
const querystring = {};

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

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

const acceptedPath = ['index', 'field', 'zoom', 'x', 'y'];
const acceptedBody = ['aggs', 'exact_bounds', 'extent', 'fields', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort'];
const acceptedBody = ['aggs', 'exact_bounds', 'extent', 'fields', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort', 'track_total_hits'];
const querystring = {};

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

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

constructor(transport: Transport);
cacheStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
cacheStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
cacheStats(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
cacheStats(this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchableSnapshotsCacheStatsResponse>;
cacheStats(this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SearchableSnapshotsCacheStatsResponse, unknown>>;
cacheStats(this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptions): Promise<T.SearchableSnapshotsCacheStatsResponse>;
clearCache(this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchableSnapshotsClearCacheResponse>;

@@ -15,0 +15,0 @@ clearCache(this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SearchableSnapshotsClearCacheResponse, unknown>>;

@@ -41,2 +41,3 @@ "use strict";

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

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

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

enableUser(this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptions): Promise<T.SecurityEnableUserResponse>;
enrollKibana(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
enrollKibana(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
enrollKibana(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
enrollNode(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
enrollNode(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
enrollNode(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
enrollKibana(this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnrollKibanaResponse>;
enrollKibana(this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityEnrollKibanaResponse, unknown>>;
enrollKibana(this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptions): Promise<T.SecurityEnrollKibanaResponse>;
enrollNode(this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnrollNodeResponse>;
enrollNode(this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityEnrollNodeResponse, unknown>>;
enrollNode(this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptions): Promise<T.SecurityEnrollNodeResponse>;
getApiKey(this: That, params?: T.SecurityGetApiKeyRequest | TB.SecurityGetApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetApiKeyResponse>;

@@ -119,24 +119,24 @@ getApiKey(this: That, params?: T.SecurityGetApiKeyRequest | TB.SecurityGetApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityGetApiKeyResponse, unknown>>;

putUser(this: That, params: T.SecurityPutUserRequest | TB.SecurityPutUserRequest, options?: TransportRequestOptions): Promise<T.SecurityPutUserResponse>;
queryApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
queryApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
queryApiKeys(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlAuthenticate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlAuthenticate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlAuthenticate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlCompleteLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlCompleteLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlCompleteLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlInvalidate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlInvalidate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlInvalidate(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlLogout(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlPrepareAuthentication(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlPrepareAuthentication(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlPrepareAuthentication(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
samlServiceProviderMetadata(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
samlServiceProviderMetadata(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
samlServiceProviderMetadata(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
queryApiKeys(this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityQueryApiKeysResponse>;
queryApiKeys(this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityQueryApiKeysResponse, unknown>>;
queryApiKeys(this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptions): Promise<T.SecurityQueryApiKeysResponse>;
samlAuthenticate(this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlAuthenticateResponse>;
samlAuthenticate(this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlAuthenticateResponse, unknown>>;
samlAuthenticate(this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlAuthenticateResponse>;
samlCompleteLogout(this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlCompleteLogoutResponse>;
samlCompleteLogout(this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlCompleteLogoutResponse, unknown>>;
samlCompleteLogout(this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlCompleteLogoutResponse>;
samlInvalidate(this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlInvalidateResponse>;
samlInvalidate(this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlInvalidateResponse, unknown>>;
samlInvalidate(this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlInvalidateResponse>;
samlLogout(this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlLogoutResponse>;
samlLogout(this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlLogoutResponse, unknown>>;
samlLogout(this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlLogoutResponse>;
samlPrepareAuthentication(this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlPrepareAuthenticationResponse>;
samlPrepareAuthentication(this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlPrepareAuthenticationResponse, unknown>>;
samlPrepareAuthentication(this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlPrepareAuthenticationResponse>;
samlServiceProviderMetadata(this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlServiceProviderMetadataResponse>;
samlServiceProviderMetadata(this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySamlServiceProviderMetadataResponse, unknown>>;
samlServiceProviderMetadata(this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptions): Promise<T.SecuritySamlServiceProviderMetadataResponse>;
}
export {};

@@ -360,2 +360,3 @@ "use strict";

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -378,2 +379,3 @@ }

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -881,10 +883,25 @@ }

const acceptedPath = [];
const acceptedBody = ['query', 'from', 'sort', 'size', 'search_after'];
const querystring = {};
const body = undefined;
// @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;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
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];

@@ -899,10 +916,24 @@ }

const acceptedPath = [];
const acceptedBody = ['content', 'ids', 'realm'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @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 (acceptedPath.includes(key)) {
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];

@@ -917,10 +948,24 @@ }

const acceptedPath = [];
const acceptedBody = ['realm', 'ids', 'query_string', 'content'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @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 (acceptedPath.includes(key)) {
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];

@@ -935,10 +980,24 @@ }

const acceptedPath = [];
const acceptedBody = ['acs', 'query_string', 'realm'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @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 (acceptedPath.includes(key)) {
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];

@@ -953,10 +1012,24 @@ }

const acceptedPath = [];
const acceptedBody = ['token', 'refresh_token'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
// @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 (acceptedPath.includes(key)) {
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];

@@ -971,10 +1044,25 @@ }

const acceptedPath = [];
const acceptedBody = ['acs', 'realm', 'relay_state'];
const querystring = {};
const body = undefined;
// @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;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
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];

@@ -991,3 +1079,2 @@ }

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -998,2 +1085,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -1000,0 +1088,0 @@ }

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

clearCursor(this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptions): Promise<T.SqlClearCursorResponse>;
deleteAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
deleteAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
deleteAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
getAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
getAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
getAsync(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
getAsyncStatus(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
getAsyncStatus(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
getAsyncStatus(this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
deleteAsync(this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SqlDeleteAsyncResponse>;
deleteAsync(this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SqlDeleteAsyncResponse, unknown>>;
deleteAsync(this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptions): Promise<T.SqlDeleteAsyncResponse>;
getAsync(this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SqlGetAsyncResponse>;
getAsync(this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SqlGetAsyncResponse, unknown>>;
getAsync(this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptions): Promise<T.SqlGetAsyncResponse>;
getAsyncStatus(this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SqlGetAsyncStatusResponse>;
getAsyncStatus(this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SqlGetAsyncStatusResponse, unknown>>;
getAsyncStatus(this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptions): Promise<T.SqlGetAsyncStatusResponse>;
query(this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SqlQueryResponse>;

@@ -24,0 +24,0 @@ query(this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SqlQueryResponse, unknown>>;

@@ -66,3 +66,2 @@ "use strict";

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -73,2 +72,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -85,3 +85,2 @@ }

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -92,2 +91,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -104,3 +104,2 @@ }

const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {

@@ -111,2 +110,3 @@ if (acceptedPath.includes(key)) {

else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];

@@ -121,3 +121,3 @@ }

const acceptedPath = [];
const acceptedBody = ['columnar', 'cursor', 'fetch_size', 'filter', 'query', 'request_timeout', 'page_timeout', 'time_zone', 'field_multi_value_leniency'];
const acceptedBody = ['catalog', 'columnar', 'cursor', 'fetch_size', 'filter', 'query', 'request_timeout', 'page_timeout', 'time_zone', 'field_multi_value_leniency', 'runtime_mappings', 'wait_for_completion_timeout', 'params', 'keep_alive', 'keep_on_completion', 'index_using_frozen'];
const querystring = {};

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

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

const acceptedPath = ['transform_id'];
const acceptedBody = ['dest', 'description', 'frequency', 'source', 'settings', 'sync', 'retention_policy'];
const acceptedBody = ['dest', 'description', 'frequency', '_meta', 'source', 'settings', 'sync', 'retention_policy'];
const querystring = {};

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

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

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

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

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

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

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

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

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

@@ -194,0 +198,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;
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;
Object.defineProperty(exports, "__esModule", { value: true });

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

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

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

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

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

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

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

exports.default = API;
_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;
_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;
API.prototype.bulk = bulk_1.default;

@@ -425,2 +434,5 @@ 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: {

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

@@ -202,3 +202,8 @@ "use strict";

maxResponseSize: options.maxResponseSize,
maxCompressedResponseSize: options.maxCompressedResponseSize
maxCompressedResponseSize: options.maxCompressedResponseSize,
vendoredHeaders: {
jsonContentType: 'application/vnd.elasticsearch+json; compatible-with=8',
ndjsonContentType: 'application/vnd.elasticsearch+x-ndjson; compatible-with=8',
accept: 'application/vnd.elasticsearch+json; compatible-with=8,text/plain'
}
});

@@ -205,0 +210,0 @@ this.helpers = new helpers_1.default({

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

@@ -83,3 +83,3 @@ "main": "index.js",

"dependencies": {
"@elastic/transport": "^8.1.0-beta.1",
"@elastic/transport": "^8.0.2",
"tslib": "^2.3.0"

@@ -94,3 +94,3 @@ },

},
"commitHash": "b3c24659"
"commitHash": "63073e95"
}

@@ -5,12 +5,6 @@ <img align="right" width="auto" height="auto" src="https://www.elastic.co/static-res/images/elastic-logo-200.png">

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://clients-ci.elastic.co/buildStatus/icon?job=elastic%2Belasticsearch-js%2Bmaster)](https://clients-ci.elastic.co/view/Javascript/job/elastic+elasticsearch-js+master/) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://clients-ci.elastic.co/buildStatus/icon?job=elastic%2Belasticsearch-js%2Bmain)](https://clients-ci.elastic.co/view/Javascript/job/elastic+elasticsearch-js+main/) [![Node CI](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
The official Node.js client for Elasticsearch.
---
**Note:** In the past months we have worked on the new Elasticsearch Node.js client and you can use it by following the instructions below. If you're going to use the legacy one or report an issue, however, please check out [elastic/elasticsearch-js-legacy](https://github.com/elastic/elasticsearch-js-legacy).
---
## Features

@@ -55,2 +49,3 @@ - One-to-one mapping with REST API.

| `10.x` | `April 2021` | `7.12` (mid 2021) |
| `12.x` | `April 2022` | `8.2` (early 2022) |

@@ -64,3 +59,3 @@ ### Compatibility

| --------------------- |----------------|
| `master` | `master` |
| `8.x` | `8.x` |
| `7.x` | `7.x` |

@@ -86,7 +81,5 @@ | `6.x` | `6.x` |

- [API reference](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html)
- [Breaking changes coming from the old client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/breaking-changes.html)
- [Authentication](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-connecting.html#authentication)
- [Observability](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html)
- [Creating a child client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/child.html)
- [Extend the client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/extend.html)
- [Client helpers](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-helpers.html)

@@ -99,45 +92,3 @@ - [Typescript support](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html)

First of all, require the client and initialize it:
```js
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
```
You can use both the callback-style API and the promise-style API, both behave the same way.
```js
// promise API
const result = await client.search({
index: 'my-index',
body: {
query: {
match: { hello: 'world' }
}
}
})
// callback API
client.search({
index: 'my-index',
body: {
query: {
match: { hello: 'world' }
}
}
}, (err, result) => {
if (err) console.log(err)
})
```
The returned value of **every** API call is formed as follows:
```ts
{
body: object | boolean
statusCode: number
headers: object
warnings: [string]
meta: object
}
```
Let's see a complete example!
```js
'use strict'

@@ -152,4 +103,3 @@

index: 'game-of-thrones',
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
body: {
document: {
character: 'Ned Stark',

@@ -162,4 +112,3 @@ quote: 'Winter is coming.'

index: 'game-of-thrones',
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
body: {
document: {
character: 'Daenerys Targaryen',

@@ -172,4 +121,3 @@ quote: 'I am the blood of the dragon.'

index: 'game-of-thrones',
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
body: {
document: {
character: 'Tyrion Lannister',

@@ -185,13 +133,10 @@ quote: 'A mind needs books like a sword needs a whetstone.'

// Let's search!
const { body } = await client.search({
const result= await client.search({
index: 'game-of-thrones',
// type: '_doc', // uncomment this line if you are using Elasticsearch ≤ 6
body: {
query: {
match: { quote: 'winter' }
}
query: {
match: { quote: 'winter' }
}
})
console.log(body.hits.hits)
console.log(result.hits.hits)
}

@@ -229,9 +174,9 @@

client6.info(console.log)
client7.info(console.log)
client6.info().then(console.log, console.log)
client7.info().then(console.log, console.log)
```
Finally, if you want to install the client for the next version of Elasticsearch *(the one that lives in Elasticsearch’s master branch)*, you can use the following command:
Finally, if you want to install the client for the next version of Elasticsearch *(the one that lives in Elasticsearch’s main branch)*, you can use the following command:
```sh
npm install esmaster@github:elastic/elasticsearch-js
npm install esmain@github:elastic/elasticsearch-js
```

@@ -238,0 +183,0 @@

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 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 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 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 too big to display

Sorry, the diff of this file is not supported yet

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