@elastic/elasticsearch 8.10.0 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +2 -0
- package/README.md +9 -2
- package/catalog-info.yaml +4 -4
- package/lib/api/api/async_search.d.ts +4 -4
- package/lib/api/api/autoscaling.d.ts +4 -4
- package/lib/api/api/bulk.d.ts +1 -1
- package/lib/api/api/cat.d.ts +26 -26
- package/lib/api/api/ccr.d.ts +13 -13
- package/lib/api/api/clear_scroll.d.ts +1 -1
- package/lib/api/api/close_point_in_time.d.ts +1 -1
- package/lib/api/api/cluster.d.ts +16 -16
- package/lib/api/api/count.d.ts +1 -1
- package/lib/api/api/create.d.ts +1 -1
- package/lib/api/api/dangling_indices.d.ts +3 -3
- package/lib/api/api/delete.d.ts +1 -1
- package/lib/api/api/delete_by_query.d.ts +1 -1
- package/lib/api/api/delete_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/delete_script.d.ts +1 -1
- package/lib/api/api/enrich.d.ts +5 -5
- package/lib/api/api/eql.d.ts +4 -4
- package/lib/api/api/esql.d.ts +18 -0
- package/lib/api/api/esql.js +64 -0
- package/lib/api/api/esql.js.map +1 -0
- package/lib/api/api/exists.d.ts +1 -1
- package/lib/api/api/exists_source.d.ts +1 -1
- package/lib/api/api/explain.d.ts +1 -1
- package/lib/api/api/features.d.ts +2 -2
- package/lib/api/api/field_caps.d.ts +1 -1
- package/lib/api/api/fleet.d.ts +19 -1
- package/lib/api/api/fleet.js +51 -0
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +1 -1
- package/lib/api/api/get_script.d.ts +1 -1
- package/lib/api/api/get_script_context.d.ts +1 -1
- package/lib/api/api/get_script_languages.d.ts +1 -1
- package/lib/api/api/get_source.d.ts +1 -1
- package/lib/api/api/graph.d.ts +1 -1
- package/lib/api/api/health_report.d.ts +1 -1
- package/lib/api/api/ilm.d.ts +11 -11
- package/lib/api/api/index.d.ts +1 -1
- package/lib/api/api/indices.d.ts +62 -62
- package/lib/api/api/indices.js +1 -1
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +39 -0
- package/lib/api/api/inference.js +122 -0
- package/lib/api/api/inference.js.map +1 -0
- package/lib/api/api/info.d.ts +1 -1
- package/lib/api/api/ingest.d.ts +6 -6
- package/lib/api/api/knn_search.d.ts +1 -1
- package/lib/api/api/license.d.ts +7 -7
- package/lib/api/api/logstash.d.ts +6 -6
- package/lib/api/api/logstash.js +1 -0
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +1 -1
- package/lib/api/api/migration.d.ts +3 -3
- package/lib/api/api/ml.d.ts +73 -73
- package/lib/api/api/ml.js +2 -2
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +1 -1
- package/lib/api/api/msearch.d.ts +1 -1
- package/lib/api/api/msearch_template.d.ts +1 -1
- package/lib/api/api/mtermvectors.d.ts +1 -1
- package/lib/api/api/nodes.d.ts +7 -7
- package/lib/api/api/open_point_in_time.d.ts +1 -1
- package/lib/api/api/ping.d.ts +1 -1
- package/lib/api/api/put_script.d.ts +1 -1
- package/lib/api/api/query_ruleset.d.ts +4 -4
- package/lib/api/api/rank_eval.d.ts +1 -1
- package/lib/api/api/reindex.d.ts +1 -1
- package/lib/api/api/reindex_rethrottle.d.ts +1 -1
- package/lib/api/api/render_search_template.d.ts +1 -1
- package/lib/api/api/rollup.d.ts +8 -8
- package/lib/api/api/scripts_painless_execute.d.ts +1 -1
- package/lib/api/api/scroll.d.ts +1 -1
- package/lib/api/api/search.d.ts +1 -1
- package/lib/api/api/search_application.d.ts +9 -9
- package/lib/api/api/search_mvt.d.ts +1 -1
- package/lib/api/api/search_shards.d.ts +1 -1
- package/lib/api/api/search_template.d.ts +1 -1
- package/lib/api/api/searchable_snapshots.d.ts +4 -4
- package/lib/api/api/security.d.ts +71 -57
- package/lib/api/api/security.js +36 -2
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/slm.d.ts +9 -9
- package/lib/api/api/snapshot.d.ts +12 -12
- package/lib/api/api/sql.d.ts +6 -6
- package/lib/api/api/ssl.d.ts +1 -1
- package/lib/api/api/synonyms.d.ts +7 -7
- package/lib/api/api/tasks.d.ts +3 -3
- package/lib/api/api/terms_enum.d.ts +1 -1
- package/lib/api/api/termvectors.d.ts +1 -1
- package/lib/api/api/text_structure.d.ts +1 -1
- package/lib/api/api/transform.d.ts +11 -11
- package/lib/api/api/update.d.ts +1 -1
- package/lib/api/api/update_by_query.d.ts +1 -1
- package/lib/api/api/update_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/watcher.d.ts +13 -13
- package/lib/api/api/xpack.d.ts +2 -2
- package/lib/api/index.d.ts +8 -0
- package/lib/api/index.js +26 -2
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +143 -50
- package/lib/api/typesWithBodyKey.d.ts +150 -50
- package/lib/client.d.ts +2 -0
- package/lib/client.js +7 -2
- package/lib/client.js.map +1 -1
- package/lib/helpers.js +10 -5
- package/lib/helpers.js.map +1 -1
- package/package.json +6 -5
- package/.tool-versions +0 -1
|
@@ -616,7 +616,7 @@ export type MgetResponseItem<TDocument = unknown> = GetGetResult<TDocument> | Mg
|
|
|
616
616
|
export interface MsearchMultiSearchItem<TDocument = unknown> extends SearchResponseBody<TDocument> {
|
|
617
617
|
status?: integer;
|
|
618
618
|
}
|
|
619
|
-
export interface MsearchMultiSearchResult<TDocument = unknown
|
|
619
|
+
export interface MsearchMultiSearchResult<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> {
|
|
620
620
|
took: long;
|
|
621
621
|
responses: MsearchResponseItem<TDocument>[];
|
|
622
622
|
}
|
|
@@ -685,7 +685,7 @@ export interface MsearchRequest extends RequestBase {
|
|
|
685
685
|
body?: MsearchRequestItem[];
|
|
686
686
|
}
|
|
687
687
|
export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody;
|
|
688
|
-
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>;
|
|
688
|
+
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>;
|
|
689
689
|
export type MsearchResponseItem<TDocument = unknown> = MsearchMultiSearchItem<TDocument> | ErrorResponseBase;
|
|
690
690
|
export interface MsearchTemplateRequest extends RequestBase {
|
|
691
691
|
index?: Indices;
|
|
@@ -698,7 +698,7 @@ export interface MsearchTemplateRequest extends RequestBase {
|
|
|
698
698
|
body?: MsearchTemplateRequestItem[];
|
|
699
699
|
}
|
|
700
700
|
export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig;
|
|
701
|
-
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>;
|
|
701
|
+
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>;
|
|
702
702
|
export interface MsearchTemplateTemplateConfig {
|
|
703
703
|
explain?: boolean;
|
|
704
704
|
id?: Id;
|
|
@@ -1798,6 +1798,9 @@ export interface ClusterStatistics {
|
|
|
1798
1798
|
skipped: integer;
|
|
1799
1799
|
successful: integer;
|
|
1800
1800
|
total: integer;
|
|
1801
|
+
running: integer;
|
|
1802
|
+
partial: integer;
|
|
1803
|
+
failed: integer;
|
|
1801
1804
|
details?: Record<ClusterAlias, ClusterDetails>;
|
|
1802
1805
|
}
|
|
1803
1806
|
export interface CompletionStats {
|
|
@@ -1858,6 +1861,7 @@ export interface ErrorResponseBase {
|
|
|
1858
1861
|
error: ErrorCause;
|
|
1859
1862
|
status: integer;
|
|
1860
1863
|
}
|
|
1864
|
+
export type EsqlColumns = ArrayBuffer;
|
|
1861
1865
|
export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none';
|
|
1862
1866
|
export type ExpandWildcards = ExpandWildcard | ExpandWildcard[];
|
|
1863
1867
|
export type Field = string;
|
|
@@ -1996,6 +2000,7 @@ export interface KnnQuery {
|
|
|
1996
2000
|
num_candidates: long;
|
|
1997
2001
|
boost?: float;
|
|
1998
2002
|
filter?: QueryDslQueryContainer | QueryDslQueryContainer[];
|
|
2003
|
+
similarity?: float;
|
|
1999
2004
|
}
|
|
2000
2005
|
export interface LatLonGeoLocation {
|
|
2001
2006
|
lat: double;
|
|
@@ -2141,6 +2146,7 @@ export interface RrfRank {
|
|
|
2141
2146
|
rank_constant?: long;
|
|
2142
2147
|
window_size?: long;
|
|
2143
2148
|
}
|
|
2149
|
+
export type ScalarValue = long | double | string | boolean | null;
|
|
2144
2150
|
export interface ScoreSort {
|
|
2145
2151
|
order?: SortOrder;
|
|
2146
2152
|
}
|
|
@@ -3822,11 +3828,11 @@ export interface AnalysisNoriTokenizer extends AnalysisTokenizerBase {
|
|
|
3822
3828
|
export type AnalysisNormalizer = AnalysisLowercaseNormalizer | AnalysisCustomNormalizer;
|
|
3823
3829
|
export interface AnalysisPathHierarchyTokenizer extends AnalysisTokenizerBase {
|
|
3824
3830
|
type: 'path_hierarchy';
|
|
3825
|
-
buffer_size
|
|
3826
|
-
delimiter
|
|
3827
|
-
replacement
|
|
3828
|
-
reverse
|
|
3829
|
-
skip
|
|
3831
|
+
buffer_size?: SpecUtilsStringified<integer>;
|
|
3832
|
+
delimiter?: string;
|
|
3833
|
+
replacement?: string;
|
|
3834
|
+
reverse?: SpecUtilsStringified<boolean>;
|
|
3835
|
+
skip?: SpecUtilsStringified<integer>;
|
|
3830
3836
|
}
|
|
3831
3837
|
export interface AnalysisPatternAnalyzer {
|
|
3832
3838
|
type: 'pattern';
|
|
@@ -4180,7 +4186,7 @@ export interface MappingFieldMapping {
|
|
|
4180
4186
|
export interface MappingFieldNamesField {
|
|
4181
4187
|
enabled: boolean;
|
|
4182
4188
|
}
|
|
4183
|
-
export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'match_only_text';
|
|
4189
|
+
export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'sparse_vector' | 'match_only_text';
|
|
4184
4190
|
export interface MappingFlattenedProperty extends MappingPropertyBase {
|
|
4185
4191
|
boost?: double;
|
|
4186
4192
|
depth_limit?: integer;
|
|
@@ -4312,7 +4318,7 @@ export interface MappingPointProperty extends MappingDocValuesPropertyBase {
|
|
|
4312
4318
|
null_value?: string;
|
|
4313
4319
|
type: 'point';
|
|
4314
4320
|
}
|
|
4315
|
-
export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty;
|
|
4321
|
+
export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingSparseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty;
|
|
4316
4322
|
export interface MappingPropertyBase {
|
|
4317
4323
|
meta?: Record<string, string>;
|
|
4318
4324
|
properties?: Record<PropertyName, MappingProperty>;
|
|
@@ -4389,6 +4395,9 @@ export interface MappingSourceField {
|
|
|
4389
4395
|
mode?: MappingSourceFieldMode;
|
|
4390
4396
|
}
|
|
4391
4397
|
export type MappingSourceFieldMode = 'disabled' | 'stored' | 'synthetic';
|
|
4398
|
+
export interface MappingSparseVectorProperty extends MappingPropertyBase {
|
|
4399
|
+
type: 'sparse_vector';
|
|
4400
|
+
}
|
|
4392
4401
|
export interface MappingSuggestContext {
|
|
4393
4402
|
name: Name;
|
|
4394
4403
|
path?: Field;
|
|
@@ -4594,9 +4603,10 @@ export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase {
|
|
|
4594
4603
|
distance: Distance;
|
|
4595
4604
|
distance_type?: GeoDistanceType;
|
|
4596
4605
|
validation_method?: QueryDslGeoValidationMethod;
|
|
4606
|
+
ignore_unmapped?: boolean;
|
|
4597
4607
|
}
|
|
4598
4608
|
export type QueryDslGeoDistanceQuery = QueryDslGeoDistanceQueryKeys & {
|
|
4599
|
-
[property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | float | string;
|
|
4609
|
+
[property: string]: GeoLocation | Distance | GeoDistanceType | QueryDslGeoValidationMethod | boolean | float | string;
|
|
4600
4610
|
};
|
|
4601
4611
|
export type QueryDslGeoExecution = 'memory' | 'indexed';
|
|
4602
4612
|
export interface QueryDslGeoPolygonPoints {
|
|
@@ -7202,7 +7212,7 @@ export interface ClusterComponentTemplateSummary {
|
|
|
7202
7212
|
settings?: Record<IndexName, IndicesIndexSettings>;
|
|
7203
7213
|
mappings?: MappingTypeMapping;
|
|
7204
7214
|
aliases?: Record<string, IndicesAliasDefinition>;
|
|
7205
|
-
lifecycle?:
|
|
7215
|
+
lifecycle?: IndicesDataStreamLifecycleWithRollover;
|
|
7206
7216
|
}
|
|
7207
7217
|
export interface ClusterAllocationExplainAllocationDecision {
|
|
7208
7218
|
decider: string;
|
|
@@ -7947,6 +7957,19 @@ export interface EqlSearchRequest extends RequestBase {
|
|
|
7947
7957
|
}
|
|
7948
7958
|
export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEvent>;
|
|
7949
7959
|
export type EqlSearchResultPosition = 'tail' | 'head';
|
|
7960
|
+
export interface EsqlQueryRequest extends RequestBase {
|
|
7961
|
+
format?: string;
|
|
7962
|
+
delimiter?: string;
|
|
7963
|
+
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
|
7964
|
+
body?: {
|
|
7965
|
+
columnar?: boolean;
|
|
7966
|
+
filter?: QueryDslQueryContainer;
|
|
7967
|
+
locale?: string;
|
|
7968
|
+
params?: ScalarValue[];
|
|
7969
|
+
query: string;
|
|
7970
|
+
};
|
|
7971
|
+
}
|
|
7972
|
+
export type EsqlQueryResponse = EsqlColumns;
|
|
7950
7973
|
export interface FeaturesFeature {
|
|
7951
7974
|
name: string;
|
|
7952
7975
|
description: string;
|
|
@@ -8313,21 +8336,16 @@ export interface IndicesAliasDefinition {
|
|
|
8313
8336
|
export interface IndicesCacheQueries {
|
|
8314
8337
|
enabled: boolean;
|
|
8315
8338
|
}
|
|
8316
|
-
export interface IndicesDataLifecycle {
|
|
8317
|
-
data_retention?: Duration;
|
|
8318
|
-
}
|
|
8319
|
-
export interface IndicesDataLifecycleWithRollover {
|
|
8320
|
-
data_retention?: Duration;
|
|
8321
|
-
rollover?: IndicesDlmRolloverConditions;
|
|
8322
|
-
}
|
|
8323
8339
|
export interface IndicesDataStream {
|
|
8324
8340
|
_meta?: Metadata;
|
|
8325
8341
|
allow_custom_routing?: boolean;
|
|
8326
8342
|
generation: integer;
|
|
8327
8343
|
hidden: boolean;
|
|
8328
8344
|
ilm_policy?: Name;
|
|
8345
|
+
next_generation_managed_by: IndicesManagedBy;
|
|
8346
|
+
prefer_ilm: boolean;
|
|
8329
8347
|
indices: IndicesDataStreamIndex[];
|
|
8330
|
-
lifecycle?:
|
|
8348
|
+
lifecycle?: IndicesDataStreamLifecycleWithRollover;
|
|
8331
8349
|
name: DataStreamName;
|
|
8332
8350
|
replicated?: boolean;
|
|
8333
8351
|
status: HealthStatus;
|
|
@@ -8338,14 +8356,18 @@ export interface IndicesDataStream {
|
|
|
8338
8356
|
export interface IndicesDataStreamIndex {
|
|
8339
8357
|
index_name: IndexName;
|
|
8340
8358
|
index_uuid: Uuid;
|
|
8359
|
+
ilm_policy?: Name;
|
|
8360
|
+
managed_by: IndicesManagedBy;
|
|
8361
|
+
prefer_ilm: boolean;
|
|
8341
8362
|
}
|
|
8342
|
-
export interface
|
|
8343
|
-
|
|
8363
|
+
export interface IndicesDataStreamLifecycle {
|
|
8364
|
+
data_retention?: Duration;
|
|
8365
|
+
downsampling?: IndicesDataStreamLifecycleDownsampling;
|
|
8344
8366
|
}
|
|
8345
|
-
export interface
|
|
8346
|
-
|
|
8367
|
+
export interface IndicesDataStreamLifecycleDownsampling {
|
|
8368
|
+
rounds: IndicesDownsamplingRound[];
|
|
8347
8369
|
}
|
|
8348
|
-
export interface
|
|
8370
|
+
export interface IndicesDataStreamLifecycleRolloverConditions {
|
|
8349
8371
|
min_age?: Duration;
|
|
8350
8372
|
max_age?: string;
|
|
8351
8373
|
min_docs?: long;
|
|
@@ -8357,9 +8379,24 @@ export interface IndicesDlmRolloverConditions {
|
|
|
8357
8379
|
min_primary_shard_docs?: long;
|
|
8358
8380
|
max_primary_shard_docs?: long;
|
|
8359
8381
|
}
|
|
8382
|
+
export interface IndicesDataStreamLifecycleWithRollover {
|
|
8383
|
+
data_retention?: Duration;
|
|
8384
|
+
downsampling?: IndicesDataStreamLifecycleDownsampling;
|
|
8385
|
+
rollover?: IndicesDataStreamLifecycleRolloverConditions;
|
|
8386
|
+
}
|
|
8387
|
+
export interface IndicesDataStreamTimestampField {
|
|
8388
|
+
name: Field;
|
|
8389
|
+
}
|
|
8390
|
+
export interface IndicesDataStreamVisibility {
|
|
8391
|
+
hidden?: boolean;
|
|
8392
|
+
}
|
|
8360
8393
|
export interface IndicesDownsampleConfig {
|
|
8361
8394
|
fixed_interval: DurationLarge;
|
|
8362
8395
|
}
|
|
8396
|
+
export interface IndicesDownsamplingRound {
|
|
8397
|
+
after: Duration;
|
|
8398
|
+
config: IndicesDownsampleConfig;
|
|
8399
|
+
}
|
|
8363
8400
|
export interface IndicesFielddataFrequencyFilter {
|
|
8364
8401
|
max: double;
|
|
8365
8402
|
min: double;
|
|
@@ -8455,7 +8492,6 @@ export interface IndicesIndexSettingsKeys {
|
|
|
8455
8492
|
analysis?: IndicesIndexSettingsAnalysis;
|
|
8456
8493
|
settings?: IndicesIndexSettings;
|
|
8457
8494
|
time_series?: IndicesIndexSettingsTimeSeries;
|
|
8458
|
-
shards?: integer;
|
|
8459
8495
|
queries?: IndicesQueries;
|
|
8460
8496
|
similarity?: IndicesSettingsSimilarity;
|
|
8461
8497
|
mapping?: IndicesMappingLimitSettings;
|
|
@@ -8494,7 +8530,7 @@ export interface IndicesIndexState {
|
|
|
8494
8530
|
settings?: IndicesIndexSettings;
|
|
8495
8531
|
defaults?: IndicesIndexSettings;
|
|
8496
8532
|
data_stream?: DataStreamName;
|
|
8497
|
-
lifecycle?:
|
|
8533
|
+
lifecycle?: IndicesDataStreamLifecycle;
|
|
8498
8534
|
}
|
|
8499
8535
|
export interface IndicesIndexTemplate {
|
|
8500
8536
|
index_patterns: Names;
|
|
@@ -8514,7 +8550,7 @@ export interface IndicesIndexTemplateSummary {
|
|
|
8514
8550
|
aliases?: Record<IndexName, IndicesAlias>;
|
|
8515
8551
|
mappings?: MappingTypeMapping;
|
|
8516
8552
|
settings?: IndicesIndexSettings;
|
|
8517
|
-
lifecycle?:
|
|
8553
|
+
lifecycle?: IndicesDataStreamLifecycleWithRollover;
|
|
8518
8554
|
}
|
|
8519
8555
|
export interface IndicesIndexVersioning {
|
|
8520
8556
|
created?: VersionString;
|
|
@@ -8535,6 +8571,7 @@ export interface IndicesIndexingSlowlogSettings {
|
|
|
8535
8571
|
export interface IndicesIndexingSlowlogTresholds {
|
|
8536
8572
|
index?: IndicesSlowlogTresholdLevels;
|
|
8537
8573
|
}
|
|
8574
|
+
export type IndicesManagedBy = 'Index Lifecycle Management' | 'Data stream lifecycle' | 'Unmanaged';
|
|
8538
8575
|
export interface IndicesMappingLimitSettings {
|
|
8539
8576
|
coerce?: boolean;
|
|
8540
8577
|
total_fields?: IndicesMappingLimitSettingsTotalFields;
|
|
@@ -8942,14 +8979,14 @@ export interface IndicesExistsTemplateRequest extends RequestBase {
|
|
|
8942
8979
|
master_timeout?: Duration;
|
|
8943
8980
|
}
|
|
8944
8981
|
export type IndicesExistsTemplateResponse = boolean;
|
|
8945
|
-
export interface
|
|
8982
|
+
export interface IndicesExplainDataLifecycleDataStreamLifecycleExplain {
|
|
8946
8983
|
index: IndexName;
|
|
8947
|
-
|
|
8984
|
+
managed_by_lifecycle: boolean;
|
|
8948
8985
|
index_creation_date_millis?: EpochTime<UnitMillis>;
|
|
8949
8986
|
time_since_index_creation?: Duration;
|
|
8950
8987
|
rollover_date_millis?: EpochTime<UnitMillis>;
|
|
8951
8988
|
time_since_rollover?: Duration;
|
|
8952
|
-
lifecycle?:
|
|
8989
|
+
lifecycle?: IndicesDataStreamLifecycleWithRollover;
|
|
8953
8990
|
generation_time?: Duration;
|
|
8954
8991
|
error?: string;
|
|
8955
8992
|
}
|
|
@@ -8959,7 +8996,7 @@ export interface IndicesExplainDataLifecycleRequest extends RequestBase {
|
|
|
8959
8996
|
master_timeout?: Duration;
|
|
8960
8997
|
}
|
|
8961
8998
|
export interface IndicesExplainDataLifecycleResponse {
|
|
8962
|
-
indices: Record<IndexName,
|
|
8999
|
+
indices: Record<IndexName, IndicesExplainDataLifecycleDataStreamLifecycleExplain>;
|
|
8963
9000
|
}
|
|
8964
9001
|
export interface IndicesFieldUsageStatsFieldSummary {
|
|
8965
9002
|
any: uint;
|
|
@@ -9059,9 +9096,9 @@ export interface IndicesGetAliasRequest extends RequestBase {
|
|
|
9059
9096
|
local?: boolean;
|
|
9060
9097
|
}
|
|
9061
9098
|
export type IndicesGetAliasResponse = Record<IndexName, IndicesGetAliasIndexAliases>;
|
|
9062
|
-
export interface
|
|
9099
|
+
export interface IndicesGetDataLifecycleDataStreamWithLifecycle {
|
|
9063
9100
|
name: DataStreamName;
|
|
9064
|
-
lifecycle?:
|
|
9101
|
+
lifecycle?: IndicesDataStreamLifecycle;
|
|
9065
9102
|
}
|
|
9066
9103
|
export interface IndicesGetDataLifecycleRequest extends RequestBase {
|
|
9067
9104
|
name: DataStreamNames;
|
|
@@ -9069,7 +9106,7 @@ export interface IndicesGetDataLifecycleRequest extends RequestBase {
|
|
|
9069
9106
|
include_defaults?: boolean;
|
|
9070
9107
|
}
|
|
9071
9108
|
export interface IndicesGetDataLifecycleResponse {
|
|
9072
|
-
data_streams:
|
|
9109
|
+
data_streams: IndicesGetDataLifecycleDataStreamWithLifecycle[];
|
|
9073
9110
|
}
|
|
9074
9111
|
export interface IndicesGetDataStreamRequest extends RequestBase {
|
|
9075
9112
|
name?: DataStreamNames;
|
|
@@ -9197,6 +9234,7 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase {
|
|
|
9197
9234
|
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
|
9198
9235
|
body?: {
|
|
9199
9236
|
data_retention?: Duration;
|
|
9237
|
+
downsampling?: IndicesDataStreamLifecycleDownsampling;
|
|
9200
9238
|
};
|
|
9201
9239
|
}
|
|
9202
9240
|
export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase;
|
|
@@ -9204,7 +9242,7 @@ export interface IndicesPutIndexTemplateIndexTemplateMapping {
|
|
|
9204
9242
|
aliases?: Record<IndexName, IndicesAlias>;
|
|
9205
9243
|
mappings?: MappingTypeMapping;
|
|
9206
9244
|
settings?: IndicesIndexSettings;
|
|
9207
|
-
lifecycle?:
|
|
9245
|
+
lifecycle?: IndicesDataStreamLifecycle;
|
|
9208
9246
|
}
|
|
9209
9247
|
export interface IndicesPutIndexTemplateRequest extends RequestBase {
|
|
9210
9248
|
name: Name;
|
|
@@ -9824,6 +9862,59 @@ export interface IndicesValidateQueryResponse {
|
|
|
9824
9862
|
valid: boolean;
|
|
9825
9863
|
error?: string;
|
|
9826
9864
|
}
|
|
9865
|
+
export type InferenceDenseVector = float[];
|
|
9866
|
+
export interface InferenceInferenceResult {
|
|
9867
|
+
text_embedding?: InferenceTextEmbeddingResult[];
|
|
9868
|
+
sparse_embedding?: InferenceSparseEmbeddingResult[];
|
|
9869
|
+
}
|
|
9870
|
+
export interface InferenceModelConfig {
|
|
9871
|
+
service: string;
|
|
9872
|
+
service_settings: InferenceServiceSettings;
|
|
9873
|
+
task_settings: InferenceTaskSettings;
|
|
9874
|
+
}
|
|
9875
|
+
export interface InferenceModelConfigContainer extends InferenceModelConfig {
|
|
9876
|
+
model_id: string;
|
|
9877
|
+
task_type: InferenceTaskType;
|
|
9878
|
+
}
|
|
9879
|
+
export type InferenceServiceSettings = any;
|
|
9880
|
+
export interface InferenceSparseEmbeddingResult {
|
|
9881
|
+
embedding: InferenceSparseVector;
|
|
9882
|
+
}
|
|
9883
|
+
export type InferenceSparseVector = Record<string, float>;
|
|
9884
|
+
export type InferenceTaskSettings = any;
|
|
9885
|
+
export type InferenceTaskType = 'sparse_embedding' | 'text_embedding';
|
|
9886
|
+
export interface InferenceTextEmbeddingResult {
|
|
9887
|
+
embedding: InferenceDenseVector;
|
|
9888
|
+
}
|
|
9889
|
+
export interface InferenceDeleteModelRequest extends RequestBase {
|
|
9890
|
+
task_type: InferenceTaskType;
|
|
9891
|
+
model_id: Id;
|
|
9892
|
+
}
|
|
9893
|
+
export type InferenceDeleteModelResponse = AcknowledgedResponseBase;
|
|
9894
|
+
export interface InferenceGetModelRequest extends RequestBase {
|
|
9895
|
+
task_type: InferenceTaskType;
|
|
9896
|
+
model_id: Id;
|
|
9897
|
+
}
|
|
9898
|
+
export interface InferenceGetModelResponse {
|
|
9899
|
+
models: InferenceModelConfigContainer[];
|
|
9900
|
+
}
|
|
9901
|
+
export interface InferenceInferenceRequest extends RequestBase {
|
|
9902
|
+
task_type: InferenceTaskType;
|
|
9903
|
+
model_id: Id;
|
|
9904
|
+
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
|
9905
|
+
body?: {
|
|
9906
|
+
input: string | string[];
|
|
9907
|
+
task_settings?: InferenceTaskSettings;
|
|
9908
|
+
};
|
|
9909
|
+
}
|
|
9910
|
+
export type InferenceInferenceResponse = InferenceInferenceResult;
|
|
9911
|
+
export interface InferencePutModelRequest extends RequestBase {
|
|
9912
|
+
task_type: InferenceTaskType;
|
|
9913
|
+
model_id: Id;
|
|
9914
|
+
/** @deprecated The use of the 'body' key has been deprecated, use 'model_config' instead. */
|
|
9915
|
+
body?: InferenceModelConfig;
|
|
9916
|
+
}
|
|
9917
|
+
export type InferencePutModelResponse = InferenceModelConfigContainer;
|
|
9827
9918
|
export interface IngestAppendProcessor extends IngestProcessorBase {
|
|
9828
9919
|
field: Field;
|
|
9829
9920
|
value: any[];
|
|
@@ -9990,6 +10081,7 @@ export interface IngestPipeline {
|
|
|
9990
10081
|
on_failure?: IngestProcessorContainer[];
|
|
9991
10082
|
processors?: IngestProcessorContainer[];
|
|
9992
10083
|
version?: VersionNumber;
|
|
10084
|
+
_meta: Metadata;
|
|
9993
10085
|
}
|
|
9994
10086
|
export interface IngestPipelineConfig {
|
|
9995
10087
|
description?: string;
|
|
@@ -10028,6 +10120,7 @@ export interface IngestProcessorContainer {
|
|
|
10028
10120
|
lowercase?: IngestLowercaseProcessor;
|
|
10029
10121
|
remove?: IngestRemoveProcessor;
|
|
10030
10122
|
rename?: IngestRenameProcessor;
|
|
10123
|
+
reroute?: IngestRerouteProcessor;
|
|
10031
10124
|
script?: Script;
|
|
10032
10125
|
set?: IngestSetProcessor;
|
|
10033
10126
|
sort?: IngestSortProcessor;
|
|
@@ -10052,6 +10145,11 @@ export interface IngestRenameProcessor extends IngestProcessorBase {
|
|
|
10052
10145
|
ignore_missing?: boolean;
|
|
10053
10146
|
target_field: Field;
|
|
10054
10147
|
}
|
|
10148
|
+
export interface IngestRerouteProcessor extends IngestProcessorBase {
|
|
10149
|
+
destination?: string;
|
|
10150
|
+
dataset?: string | string[];
|
|
10151
|
+
namespace?: string | string[];
|
|
10152
|
+
}
|
|
10055
10153
|
export interface IngestSetProcessor extends IngestProcessorBase {
|
|
10056
10154
|
copy_from?: Field;
|
|
10057
10155
|
field: Field;
|
|
@@ -10303,7 +10401,7 @@ export interface LogstashDeletePipelineRequest extends RequestBase {
|
|
|
10303
10401
|
}
|
|
10304
10402
|
export type LogstashDeletePipelineResponse = boolean;
|
|
10305
10403
|
export interface LogstashGetPipelineRequest extends RequestBase {
|
|
10306
|
-
id
|
|
10404
|
+
id?: Ids;
|
|
10307
10405
|
}
|
|
10308
10406
|
export type LogstashGetPipelineResponse = Record<Id, LogstashPipeline>;
|
|
10309
10407
|
export interface LogstashPutPipelineRequest extends RequestBase {
|
|
@@ -12236,6 +12334,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
|
|
|
12236
12334
|
metadata?: any;
|
|
12237
12335
|
model_type?: MlTrainedModelType;
|
|
12238
12336
|
model_size_bytes?: long;
|
|
12337
|
+
platform_architecture?: string;
|
|
12239
12338
|
tags?: string[];
|
|
12240
12339
|
};
|
|
12241
12340
|
}
|
|
@@ -12294,6 +12393,7 @@ export interface MlPutTrainedModelVocabularyRequest extends RequestBase {
|
|
|
12294
12393
|
body?: {
|
|
12295
12394
|
vocabulary: string[];
|
|
12296
12395
|
merges?: string[];
|
|
12396
|
+
scores?: double[];
|
|
12297
12397
|
};
|
|
12298
12398
|
}
|
|
12299
12399
|
export type MlPutTrainedModelVocabularyResponse = AcknowledgedResponseBase;
|
|
@@ -12343,6 +12443,7 @@ export interface MlStartDatafeedResponse {
|
|
|
12343
12443
|
export interface MlStartTrainedModelDeploymentRequest extends RequestBase {
|
|
12344
12444
|
model_id: Id;
|
|
12345
12445
|
cache_size?: ByteSize;
|
|
12446
|
+
deployment_id?: string;
|
|
12346
12447
|
number_of_allocations?: integer;
|
|
12347
12448
|
priority?: MlTrainingPriority;
|
|
12348
12449
|
queue_capacity?: integer;
|
|
@@ -13720,11 +13821,9 @@ export interface SecurityCreatedStatus {
|
|
|
13720
13821
|
created: boolean;
|
|
13721
13822
|
}
|
|
13722
13823
|
export interface SecurityFieldRule {
|
|
13723
|
-
username?:
|
|
13824
|
+
username?: Names;
|
|
13724
13825
|
dn?: Names;
|
|
13725
13826
|
groups?: Names;
|
|
13726
|
-
metadata?: any;
|
|
13727
|
-
realm?: SecurityRealm;
|
|
13728
13827
|
}
|
|
13729
13828
|
export interface SecurityFieldSecurity {
|
|
13730
13829
|
except?: Fields;
|
|
@@ -13746,9 +13845,6 @@ export type SecurityIndicesPrivilegesQuery = string | QueryDslQueryContainer | S
|
|
|
13746
13845
|
export interface SecurityManageUserPrivileges {
|
|
13747
13846
|
applications: string[];
|
|
13748
13847
|
}
|
|
13749
|
-
export interface SecurityRealm {
|
|
13750
|
-
name: Name;
|
|
13751
|
-
}
|
|
13752
13848
|
export interface SecurityRealmInfo {
|
|
13753
13849
|
name: Name;
|
|
13754
13850
|
type: string;
|
|
@@ -13778,7 +13874,7 @@ export interface SecurityRoleMapping {
|
|
|
13778
13874
|
metadata: Metadata;
|
|
13779
13875
|
roles: string[];
|
|
13780
13876
|
rules: SecurityRoleMappingRule;
|
|
13781
|
-
role_templates?:
|
|
13877
|
+
role_templates?: SecurityRoleTemplate[];
|
|
13782
13878
|
}
|
|
13783
13879
|
export interface SecurityRoleMappingRule {
|
|
13784
13880
|
any?: SecurityRoleMappingRule[];
|
|
@@ -13786,6 +13882,10 @@ export interface SecurityRoleMappingRule {
|
|
|
13786
13882
|
field?: SecurityFieldRule;
|
|
13787
13883
|
except?: SecurityRoleMappingRule;
|
|
13788
13884
|
}
|
|
13885
|
+
export interface SecurityRoleTemplate {
|
|
13886
|
+
format?: SecurityTemplateFormat;
|
|
13887
|
+
template: Script;
|
|
13888
|
+
}
|
|
13789
13889
|
export type SecurityRoleTemplateInlineQuery = string | QueryDslQueryContainer;
|
|
13790
13890
|
export interface SecurityRoleTemplateInlineScript extends ScriptBase {
|
|
13791
13891
|
lang?: ScriptLanguage;
|
|
@@ -13796,6 +13896,7 @@ export interface SecurityRoleTemplateQuery {
|
|
|
13796
13896
|
template?: SecurityRoleTemplateScript;
|
|
13797
13897
|
}
|
|
13798
13898
|
export type SecurityRoleTemplateScript = SecurityRoleTemplateInlineScript | SecurityRoleTemplateInlineQuery | StoredScriptId;
|
|
13899
|
+
export type SecurityTemplateFormat = 'string' | 'json';
|
|
13799
13900
|
export interface SecurityTransientMetadataConfig {
|
|
13800
13901
|
enabled: boolean;
|
|
13801
13902
|
}
|
|
@@ -14041,6 +14142,7 @@ export interface SecurityGetApiKeyRequest extends RequestBase {
|
|
|
14041
14142
|
realm_name?: Name;
|
|
14042
14143
|
username?: Username;
|
|
14043
14144
|
with_limited_by?: boolean;
|
|
14145
|
+
active_only?: boolean;
|
|
14044
14146
|
}
|
|
14045
14147
|
export interface SecurityGetApiKeyResponse {
|
|
14046
14148
|
api_keys: SecurityApiKey[];
|
|
@@ -14067,14 +14169,9 @@ export interface SecurityGetRoleRole {
|
|
|
14067
14169
|
run_as: string[];
|
|
14068
14170
|
transient_metadata: SecurityTransientMetadataConfig;
|
|
14069
14171
|
applications: SecurityApplicationPrivileges[];
|
|
14070
|
-
role_templates?:
|
|
14172
|
+
role_templates?: SecurityRoleTemplate[];
|
|
14071
14173
|
global?: Record<string, Record<string, Record<string, string[]>>>;
|
|
14072
14174
|
}
|
|
14073
|
-
export interface SecurityGetRoleRoleTemplate {
|
|
14074
|
-
format?: SecurityGetRoleTemplateFormat;
|
|
14075
|
-
template: Script;
|
|
14076
|
-
}
|
|
14077
|
-
export type SecurityGetRoleTemplateFormat = 'string' | 'json';
|
|
14078
14175
|
export interface SecurityGetRoleMappingRequest extends RequestBase {
|
|
14079
14176
|
name?: Names;
|
|
14080
14177
|
}
|
|
@@ -14311,6 +14408,7 @@ export interface SecurityPutRoleMappingRequest extends RequestBase {
|
|
|
14311
14408
|
enabled?: boolean;
|
|
14312
14409
|
metadata?: Metadata;
|
|
14313
14410
|
roles?: string[];
|
|
14411
|
+
role_templates?: SecurityRoleTemplate[];
|
|
14314
14412
|
rules?: SecurityRoleMappingRule;
|
|
14315
14413
|
run_as?: string[];
|
|
14316
14414
|
};
|
|
@@ -14448,6 +14546,7 @@ export interface SecurityUpdateApiKeyRequest extends RequestBase {
|
|
|
14448
14546
|
body?: {
|
|
14449
14547
|
role_descriptors?: Record<string, SecurityRoleDescriptor>;
|
|
14450
14548
|
metadata?: Metadata;
|
|
14549
|
+
expiration?: Duration;
|
|
14451
14550
|
};
|
|
14452
14551
|
}
|
|
14453
14552
|
export interface SecurityUpdateApiKeyResponse {
|
|
@@ -15224,6 +15323,7 @@ export interface TransformTimeSync {
|
|
|
15224
15323
|
export interface TransformDeleteTransformRequest extends RequestBase {
|
|
15225
15324
|
transform_id: Id;
|
|
15226
15325
|
force?: boolean;
|
|
15326
|
+
delete_dest_index?: boolean;
|
|
15227
15327
|
timeout?: Duration;
|
|
15228
15328
|
}
|
|
15229
15329
|
export type TransformDeleteTransformResponse = AcknowledgedResponseBase;
|
package/lib/client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ConnectionOptions as TlsConnectionOptions } from 'tls';
|
|
|
4
4
|
import { URL } from 'url';
|
|
5
5
|
import { Transport, Serializer, Diagnostic, BaseConnectionPool } from '@elastic/transport';
|
|
6
6
|
import { HttpAgentOptions, UndiciAgentOptions, agentFn, nodeFilterFn, nodeSelectorFn, generateRequestIdFn, BasicAuth, ApiKeyAuth, BearerAuth, Context } from '@elastic/transport/lib/types';
|
|
7
|
+
import { RedactionOptions } from '@elastic/transport/lib/Transport';
|
|
7
8
|
import BaseConnection from '@elastic/transport/lib/connection/BaseConnection';
|
|
8
9
|
import SniffingTransport from './sniffingTransport';
|
|
9
10
|
import Helpers from './helpers';
|
|
@@ -56,6 +57,7 @@ export interface ClientOptions {
|
|
|
56
57
|
caFingerprint?: string;
|
|
57
58
|
maxResponseSize?: number;
|
|
58
59
|
maxCompressedResponseSize?: number;
|
|
60
|
+
redaction?: RedactionOptions;
|
|
59
61
|
}
|
|
60
62
|
export default class Client extends API {
|
|
61
63
|
diagnostic: Diagnostic;
|
package/lib/client.js
CHANGED
|
@@ -140,7 +140,11 @@ class Client extends api_1.default {
|
|
|
140
140
|
proxy: null,
|
|
141
141
|
enableMetaHeader: true,
|
|
142
142
|
maxResponseSize: null,
|
|
143
|
-
maxCompressedResponseSize: null
|
|
143
|
+
maxCompressedResponseSize: null,
|
|
144
|
+
redaction: {
|
|
145
|
+
type: 'replace',
|
|
146
|
+
additionalKeys: []
|
|
147
|
+
}
|
|
144
148
|
}, opts);
|
|
145
149
|
if (options.caFingerprint != null && isHttpConnection((_c = opts.node) !== null && _c !== void 0 ? _c : opts.nodes)) {
|
|
146
150
|
throw new transport_1.errors.ConfigurationError('You can\'t configure the caFingerprint with a http connection');
|
|
@@ -207,7 +211,8 @@ class Client extends api_1.default {
|
|
|
207
211
|
jsonContentType: 'application/vnd.elasticsearch+json; compatible-with=8',
|
|
208
212
|
ndjsonContentType: 'application/vnd.elasticsearch+x-ndjson; compatible-with=8',
|
|
209
213
|
accept: 'application/vnd.elasticsearch+json; compatible-with=8,text/plain'
|
|
210
|
-
}
|
|
214
|
+
},
|
|
215
|
+
redaction: options.redaction
|
|
211
216
|
});
|
|
212
217
|
this.helpers = new helpers_1.default({
|
|
213
218
|
client: this,
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAGH,6BAAyB;AACzB,4DAA2B;AAC3B,oDAAmB;AACnB,kDAS2B;
|
|
1
|
+
{"version":3,"file":"client.js","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M;QACL,MAAM,IAAI,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;QACzC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,EAAE;YAChE,OAAO,IAAI,CAAA;SACZ;QAED,OAAO,IAAI,CAAA;KACZ;IAED,SAAS,sBAAsB,CAAE,IAA2B;QAC1D,0BAA0B;QAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,SAAG,CAAC,IAAI,CAAC,CAAA;YAC5C,OAAO;gBACL,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC;gBACtC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC;aACvC,CAAA;SACF;aAAM,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,YAAY,SAAG,EAAE;YAClD,OAAO;gBACL,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;gBAC/C,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;aAChD,CAAA;SACF;aAAM;YACL,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;AACH,CAAC"}
|
package/lib/helpers.js
CHANGED
|
@@ -118,8 +118,10 @@ class Helpers {
|
|
|
118
118
|
await sleep(wait);
|
|
119
119
|
}
|
|
120
120
|
(0, assert_1.default)(response !== undefined, 'The response is undefined, please file a bug report');
|
|
121
|
+
const { redaction = { type: 'replace' } } = options;
|
|
122
|
+
const errorOptions = { redaction };
|
|
121
123
|
if (response.statusCode === 429) {
|
|
122
|
-
throw new ResponseError(response);
|
|
124
|
+
throw new ResponseError(response, errorOptions);
|
|
123
125
|
}
|
|
124
126
|
let scroll_id = response.body._scroll_id;
|
|
125
127
|
let stop = false;
|
|
@@ -152,7 +154,7 @@ class Helpers {
|
|
|
152
154
|
await sleep(wait);
|
|
153
155
|
}
|
|
154
156
|
if (response.statusCode === 429) {
|
|
155
|
-
throw new ResponseError(response);
|
|
157
|
+
throw new ResponseError(response, errorOptions);
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
if (!stop) {
|
|
@@ -193,6 +195,8 @@ class Helpers {
|
|
|
193
195
|
const client = this[kClient];
|
|
194
196
|
const { operations = 5, concurrency = 5, flushInterval = 500, retries = this[kMaxRetries], wait = 5000, ...msearchOptions } = options;
|
|
195
197
|
reqOptions.meta = true;
|
|
198
|
+
const { redaction = { type: 'replace' } } = reqOptions;
|
|
199
|
+
const errorOptions = { redaction };
|
|
196
200
|
let stopReading = false;
|
|
197
201
|
let stopError = null;
|
|
198
202
|
let timeoutRef = null;
|
|
@@ -392,7 +396,7 @@ class Helpers {
|
|
|
392
396
|
// @ts-expect-error
|
|
393
397
|
addDocumentsGetter(result);
|
|
394
398
|
if (response.status != null && response.status >= 400) {
|
|
395
|
-
callbacks[i](new ResponseError(result), result);
|
|
399
|
+
callbacks[i](new ResponseError(result, errorOptions), result);
|
|
396
400
|
}
|
|
397
401
|
else {
|
|
398
402
|
callbacks[i](null, result);
|
|
@@ -417,11 +421,12 @@ class Helpers {
|
|
|
417
421
|
* @return {object} The possible operations to run with the datasource.
|
|
418
422
|
*/
|
|
419
423
|
bulk(options, reqOptions = {}) {
|
|
420
|
-
var _d;
|
|
424
|
+
var _d, _e;
|
|
425
|
+
(0, assert_1.default)(!((_d = reqOptions.asStream) !== null && _d !== void 0 ? _d : false), 'bulk helper: the asStream request option is not supported');
|
|
421
426
|
const client = this[kClient];
|
|
422
427
|
const { serializer } = client;
|
|
423
428
|
if (this[kMetaHeader] !== null) {
|
|
424
|
-
reqOptions.headers = (
|
|
429
|
+
reqOptions.headers = (_e = reqOptions.headers) !== null && _e !== void 0 ? _e : {};
|
|
425
430
|
reqOptions.headers['x-elastic-client-meta'] = `${this[kMetaHeader]},h=bp`;
|
|
426
431
|
}
|
|
427
432
|
reqOptions.meta = true;
|