Skip to content

Commit 177ac7f

Browse files
Auto-generated code for 8.13 (#2153)
1 parent 00b6dbb commit 177ac7f

File tree

4 files changed

+206
-71
lines changed

4 files changed

+206
-71
lines changed

docs/reference.asciidoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4234,7 +4234,7 @@ a new date field is added instead of string.
42344234
not used at all by Elasticsearch, but can be used to store
42354235
application-specific metadata.
42364236
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
4237-
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include:
4237+
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include:
42384238

42394239
- Field name
42404240
- Field data type
@@ -8249,7 +8249,7 @@ client.security.putRole({ name })
82498249
** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries.
82508250
** *`metadata` (Optional, Record<string, User-defined value>)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.
82518251
** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate.
8252-
** *`transient_metadata` (Optional, { enabled })*: Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.
8252+
** *`transient_metadata` (Optional, Record<string, User-defined value>)*: Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.
82538253
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
82548254

82558255
[discrete]
@@ -8685,16 +8685,14 @@ Creates a repository.
86858685
{ref}/modules-snapshots.html[Endpoint documentation]
86868686
[source,ts]
86878687
----
8688-
client.snapshot.createRepository({ repository, type, settings })
8688+
client.snapshot.createRepository({ repository })
86898689
----
86908690

86918691
[discrete]
86928692
==== Arguments
86938693

86948694
* *Request (object):*
86958695
** *`repository` (string)*: A repository name
8696-
** *`type` (string)*
8697-
** *`settings` ({ chunk_size, compress, concurrent_streams, location, read_only })*
86988696
** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
86998697
** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
87008698
** *`verify` (Optional, boolean)*: Whether to verify the repository after creation

src/api/api/snapshot.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,15 @@ export default class Snapshot {
154154
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateRepositoryResponse>
155155
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
156156
const acceptedPath: string[] = ['name']
157-
const acceptedBody: string[] = ['repository', 'type', 'settings']
157+
const acceptedBody: string[] = ['repository']
158158
const querystring: Record<string, any> = {}
159159
// @ts-expect-error
160-
const userBody: any = params?.body
161-
let body: Record<string, any> | string
162-
if (typeof userBody === 'string') {
163-
body = userBody
164-
} else {
165-
body = userBody != null ? { ...userBody } : undefined
166-
}
160+
let body: any = params.body ?? undefined
167161

168162
for (const key in params) {
169163
if (acceptedBody.includes(key)) {
170-
body = body ?? {}
171164
// @ts-expect-error
172-
body[key] = params[key]
165+
body = params[key]
173166
} else if (acceptedPath.includes(key)) {
174167
continue
175168
} else if (key !== 'body') {

src/api/types.ts

Lines changed: 99 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ export interface SearchInnerHits {
14491449
fields?: Fields
14501450
sort?: Sort
14511451
_source?: SearchSourceConfig
1452-
stored_field?: Fields
1452+
stored_fields?: Fields
14531453
track_scores?: boolean
14541454
version?: boolean
14551455
}
@@ -2264,7 +2264,7 @@ export interface InlineGetKeys<TDocument = unknown> {
22642264
_seq_no?: SequenceNumber
22652265
_primary_term?: long
22662266
_routing?: Routing
2267-
_source: TDocument
2267+
_source?: TDocument
22682268
}
22692269
export type InlineGet<TDocument = unknown> = InlineGetKeys<TDocument>
22702270
& { [property: string]: any }
@@ -4876,7 +4876,7 @@ export interface MappingDenseVectorIndexOptions {
48764876

48774877
export interface MappingDenseVectorProperty extends MappingPropertyBase {
48784878
type: 'dense_vector'
4879-
dims: integer
4879+
dims?: integer
48804880
similarity?: string
48814881
index?: boolean
48824882
index_options?: MappingDenseVectorIndexOptions
@@ -4977,6 +4977,9 @@ export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase {
49774977
ignore_malformed?: boolean
49784978
ignore_z_value?: boolean
49794979
null_value?: GeoLocation
4980+
index?: boolean
4981+
on_script_error?: MappingOnScriptError
4982+
script?: Script
49804983
type: 'geo_point'
49814984
}
49824985

@@ -5130,6 +5133,7 @@ export interface MappingRankFeatureProperty extends MappingPropertyBase {
51305133
}
51315134

51325135
export interface MappingRankFeaturesProperty extends MappingPropertyBase {
5136+
positive_score_impact?: boolean
51335137
type: 'rank_features'
51345138
}
51355139

@@ -9013,7 +9017,7 @@ export interface EnrichExecutePolicyRequest extends RequestBase {
90139017
}
90149018

90159019
export interface EnrichExecutePolicyResponse {
9016-
status: EnrichExecutePolicyExecuteEnrichPolicyStatus
9020+
status?: EnrichExecutePolicyExecuteEnrichPolicyStatus
90179021
task_id?: TaskId
90189022
}
90199023

@@ -10196,7 +10200,7 @@ export interface IndicesDataStreamsStatsDataStreamsStatsItem {
1019610200
data_stream: Name
1019710201
maximum_timestamp: EpochTime<UnitMillis>
1019810202
store_size?: ByteSize
10199-
store_size_bytes: integer
10203+
store_size_bytes: long
1020010204
}
1020110205

1020210206
export interface IndicesDataStreamsStatsRequest extends RequestBase {
@@ -10210,7 +10214,7 @@ export interface IndicesDataStreamsStatsResponse {
1021010214
data_stream_count: integer
1021110215
data_streams: IndicesDataStreamsStatsDataStreamsStatsItem[]
1021210216
total_store_sizes?: ByteSize
10213-
total_store_size_bytes: integer
10217+
total_store_size_bytes: long
1021410218
}
1021510219

1021610220
export interface IndicesDeleteRequest extends RequestBase {
@@ -15891,7 +15895,7 @@ export interface SecurityRoleDescriptor {
1589115895
applications?: SecurityApplicationPrivileges[]
1589215896
metadata?: Metadata
1589315897
run_as?: string[]
15894-
transient_metadata?: SecurityTransientMetadataConfig
15898+
transient_metadata?: Record<string, any>
1589515899
}
1589615900

1589715901
export interface SecurityRoleDescriptorRead {
@@ -15902,7 +15906,7 @@ export interface SecurityRoleDescriptorRead {
1590215906
applications?: SecurityApplicationPrivileges[]
1590315907
metadata?: Metadata
1590415908
run_as?: string[]
15905-
transient_metadata?: SecurityTransientMetadataConfig
15909+
transient_metadata?: Record<string, any>
1590615910
}
1590715911

1590815912
export interface SecurityRoleMapping {
@@ -15941,10 +15945,6 @@ export type SecurityRoleTemplateScript = SecurityRoleTemplateInlineScript | Secu
1594115945

1594215946
export type SecurityTemplateFormat = 'string' | 'json'
1594315947

15944-
export interface SecurityTransientMetadataConfig {
15945-
enabled: boolean
15946-
}
15947-
1594815948
export interface SecurityUser {
1594915949
email?: string | null
1595015950
full_name?: Name | null
@@ -16264,7 +16264,7 @@ export interface SecurityGetRoleRole {
1626416264
indices: SecurityIndicesPrivileges[]
1626516265
metadata: Metadata
1626616266
run_as: string[]
16267-
transient_metadata: SecurityTransientMetadataConfig
16267+
transient_metadata?: Record<string, any>
1626816268
applications: SecurityApplicationPrivileges[]
1626916269
role_templates?: SecurityRoleTemplate[]
1627016270
global?: Record<string, Record<string, Record<string, string[]>>>
@@ -16515,7 +16515,7 @@ export interface SecurityPutRoleRequest extends RequestBase {
1651516515
indices?: SecurityIndicesPrivileges[]
1651616516
metadata?: Metadata
1651716517
run_as?: string[]
16518-
transient_metadata?: SecurityTransientMetadataConfig
16518+
transient_metadata?: Record<string, any>
1651916519
}
1652016520

1652116521
export interface SecurityPutRoleResponse {
@@ -16873,11 +16873,37 @@ export interface SlmStopRequest extends RequestBase {
1687316873

1687416874
export type SlmStopResponse = AcknowledgedResponseBase
1687516875

16876+
export interface SnapshotAzureRepository extends SnapshotRepositoryBase {
16877+
type: 'azure'
16878+
settings: SnapshotAzureRepositorySettings
16879+
}
16880+
16881+
export interface SnapshotAzureRepositorySettings extends SnapshotRepositorySettingsBase {
16882+
client?: string
16883+
container?: string
16884+
base_path?: string
16885+
readonly?: boolean
16886+
location_mode?: string
16887+
}
16888+
1687616889
export interface SnapshotFileCountSnapshotStats {
1687716890
file_count: integer
1687816891
size_in_bytes: long
1687916892
}
1688016893

16894+
export interface SnapshotGcsRepository extends SnapshotRepositoryBase {
16895+
type: 'gcs'
16896+
settings: SnapshotGcsRepositorySettings
16897+
}
16898+
16899+
export interface SnapshotGcsRepositorySettings extends SnapshotRepositorySettingsBase {
16900+
bucket: string
16901+
client?: string
16902+
base_path?: string
16903+
readonly?: boolean
16904+
application_name?: string
16905+
}
16906+
1688116907
export interface SnapshotIndexDetails {
1688216908
shard_count: integer
1688316909
size?: ByteSize
@@ -16890,19 +16916,45 @@ export interface SnapshotInfoFeatureState {
1689016916
indices: Indices
1689116917
}
1689216918

16893-
export interface SnapshotRepository {
16894-
type: string
16919+
export interface SnapshotReadOnlyUrlRepository extends SnapshotRepositoryBase {
16920+
type: 'url'
16921+
settings: SnapshotReadOnlyUrlRepositorySettings
16922+
}
16923+
16924+
export interface SnapshotReadOnlyUrlRepositorySettings extends SnapshotRepositorySettingsBase {
16925+
http_max_retries?: integer
16926+
http_socket_timeout?: Duration
16927+
max_number_of_snapshots?: integer
16928+
url: string
16929+
}
16930+
16931+
export type SnapshotRepository = SnapshotAzureRepository | SnapshotGcsRepository | SnapshotS3Repository | SnapshotSharedFileSystemRepository | SnapshotReadOnlyUrlRepository | SnapshotSourceOnlyRepository
16932+
16933+
export interface SnapshotRepositoryBase {
1689516934
uuid?: Uuid
16896-
settings: SnapshotRepositorySettings
1689716935
}
1689816936

16899-
export interface SnapshotRepositorySettings {
16900-
chunk_size?: string
16901-
compress?: string | boolean
16902-
concurrent_streams?: string | integer
16903-
location: string
16904-
read_only?: string | boolean
16905-
readonly?: string | boolean
16937+
export interface SnapshotRepositorySettingsBase {
16938+
chunk_size?: ByteSize
16939+
compress?: boolean
16940+
max_restore_bytes_per_sec?: ByteSize
16941+
max_snapshot_bytes_per_sec?: ByteSize
16942+
}
16943+
16944+
export interface SnapshotS3Repository extends SnapshotRepositoryBase {
16945+
type: 's3'
16946+
settings: SnapshotS3RepositorySettings
16947+
}
16948+
16949+
export interface SnapshotS3RepositorySettings extends SnapshotRepositorySettingsBase {
16950+
bucket: string
16951+
client?: string
16952+
base_path?: string
16953+
readonly?: boolean
16954+
server_side_encryption?: boolean
16955+
buffer_size?: ByteSize
16956+
canned_acl?: string
16957+
storage_class?: string
1690616958
}
1690716959

1690816960
export interface SnapshotShardsStats {
@@ -16929,6 +16981,17 @@ export interface SnapshotShardsStatsSummaryItem {
1692916981
size_in_bytes: long
1693016982
}
1693116983

16984+
export interface SnapshotSharedFileSystemRepository extends SnapshotRepositoryBase {
16985+
type: 'fs'
16986+
settings: SnapshotSharedFileSystemRepositorySettings
16987+
}
16988+
16989+
export interface SnapshotSharedFileSystemRepositorySettings extends SnapshotRepositorySettingsBase {
16990+
location: string
16991+
max_number_of_snapshots?: integer
16992+
readonly?: boolean
16993+
}
16994+
1693216995
export interface SnapshotSnapshotIndexStats {
1693316996
shards: Record<string, SnapshotSnapshotShardsStatus>
1693416997
shards_stats: SnapshotShardsStats
@@ -16982,6 +17045,18 @@ export interface SnapshotSnapshotStats {
1698217045
total: SnapshotFileCountSnapshotStats
1698317046
}
1698417047

17048+
export interface SnapshotSourceOnlyRepository extends SnapshotRepositoryBase {
17049+
type: 'source'
17050+
settings: SnapshotSourceOnlyRepositorySettings
17051+
}
17052+
17053+
export interface SnapshotSourceOnlyRepositorySettings extends SnapshotRepositorySettingsBase {
17054+
delegate_type?: string
17055+
max_number_of_snapshots?: integer
17056+
read_only?: boolean
17057+
readonly?: boolean
17058+
}
17059+
1698517060
export interface SnapshotStatus {
1698617061
include_global_state: boolean
1698717062
indices: Record<string, SnapshotSnapshotIndexStats>
@@ -17043,8 +17118,6 @@ export interface SnapshotCreateRepositoryRequest extends RequestBase {
1704317118
timeout?: Duration
1704417119
verify?: boolean
1704517120
repository?: SnapshotRepository
17046-
type: string
17047-
settings: SnapshotRepositorySettings
1704817121
}
1704917122

1705017123
export type SnapshotCreateRepositoryResponse = AcknowledgedResponseBase

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy