Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generated code for 8.13 #2153

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4234,7 +4234,7 @@ a new date field is added instead of string.
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
** *`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:
** *`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:

- Field name
- Field data type
Expand Down Expand Up @@ -8249,7 +8249,7 @@ client.security.putRole({ name })
** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries.
** *`metadata` (Optional, Record<string, User-defined value>)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.
** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate.
** *`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.
** *`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.
** *`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.

[discrete]
Expand Down Expand Up @@ -8685,16 +8685,14 @@ Creates a repository.
{ref}/modules-snapshots.html[Endpoint documentation]
[source,ts]
----
client.snapshot.createRepository({ repository, type, settings })
client.snapshot.createRepository({ repository })
----

[discrete]
==== Arguments

* *Request (object):*
** *`repository` (string)*: A repository name
** *`type` (string)*
** *`settings` ({ chunk_size, compress, concurrent_streams, location, read_only })*
** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
** *`verify` (Optional, boolean)*: Whether to verify the repository after creation
Expand Down
13 changes: 3 additions & 10 deletions src/api/api/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,15 @@ export default class Snapshot {
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateRepositoryResponse>
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['repository', 'type', 'settings']
const acceptedBody: string[] = ['repository']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
let body: any = params.body ?? undefined

for (const key in params) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
body = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
Expand Down
125 changes: 99 additions & 26 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ export interface SearchInnerHits {
fields?: Fields
sort?: Sort
_source?: SearchSourceConfig
stored_field?: Fields
stored_fields?: Fields
track_scores?: boolean
version?: boolean
}
Expand Down Expand Up @@ -2264,7 +2264,7 @@ export interface InlineGetKeys<TDocument = unknown> {
_seq_no?: SequenceNumber
_primary_term?: long
_routing?: Routing
_source: TDocument
_source?: TDocument
}
export type InlineGet<TDocument = unknown> = InlineGetKeys<TDocument>
& { [property: string]: any }
Expand Down Expand Up @@ -4876,7 +4876,7 @@ export interface MappingDenseVectorIndexOptions {

export interface MappingDenseVectorProperty extends MappingPropertyBase {
type: 'dense_vector'
dims: integer
dims?: integer
similarity?: string
index?: boolean
index_options?: MappingDenseVectorIndexOptions
Expand Down Expand Up @@ -4977,6 +4977,9 @@ export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase {
ignore_malformed?: boolean
ignore_z_value?: boolean
null_value?: GeoLocation
index?: boolean
on_script_error?: MappingOnScriptError
script?: Script
type: 'geo_point'
}

Expand Down Expand Up @@ -5130,6 +5133,7 @@ export interface MappingRankFeatureProperty extends MappingPropertyBase {
}

export interface MappingRankFeaturesProperty extends MappingPropertyBase {
positive_score_impact?: boolean
type: 'rank_features'
}

Expand Down Expand Up @@ -9013,7 +9017,7 @@ export interface EnrichExecutePolicyRequest extends RequestBase {
}

export interface EnrichExecutePolicyResponse {
status: EnrichExecutePolicyExecuteEnrichPolicyStatus
status?: EnrichExecutePolicyExecuteEnrichPolicyStatus
task_id?: TaskId
}

Expand Down Expand Up @@ -10196,7 +10200,7 @@ export interface IndicesDataStreamsStatsDataStreamsStatsItem {
data_stream: Name
maximum_timestamp: EpochTime<UnitMillis>
store_size?: ByteSize
store_size_bytes: integer
store_size_bytes: long
}

export interface IndicesDataStreamsStatsRequest extends RequestBase {
Expand All @@ -10210,7 +10214,7 @@ export interface IndicesDataStreamsStatsResponse {
data_stream_count: integer
data_streams: IndicesDataStreamsStatsDataStreamsStatsItem[]
total_store_sizes?: ByteSize
total_store_size_bytes: integer
total_store_size_bytes: long
}

export interface IndicesDeleteRequest extends RequestBase {
Expand Down Expand Up @@ -15891,7 +15895,7 @@ export interface SecurityRoleDescriptor {
applications?: SecurityApplicationPrivileges[]
metadata?: Metadata
run_as?: string[]
transient_metadata?: SecurityTransientMetadataConfig
transient_metadata?: Record<string, any>
}

export interface SecurityRoleDescriptorRead {
Expand All @@ -15902,7 +15906,7 @@ export interface SecurityRoleDescriptorRead {
applications?: SecurityApplicationPrivileges[]
metadata?: Metadata
run_as?: string[]
transient_metadata?: SecurityTransientMetadataConfig
transient_metadata?: Record<string, any>
}

export interface SecurityRoleMapping {
Expand Down Expand Up @@ -15941,10 +15945,6 @@ export type SecurityRoleTemplateScript = SecurityRoleTemplateInlineScript | Secu

export type SecurityTemplateFormat = 'string' | 'json'

export interface SecurityTransientMetadataConfig {
enabled: boolean
}

export interface SecurityUser {
email?: string | null
full_name?: Name | null
Expand Down Expand Up @@ -16264,7 +16264,7 @@ export interface SecurityGetRoleRole {
indices: SecurityIndicesPrivileges[]
metadata: Metadata
run_as: string[]
transient_metadata: SecurityTransientMetadataConfig
transient_metadata?: Record<string, any>
applications: SecurityApplicationPrivileges[]
role_templates?: SecurityRoleTemplate[]
global?: Record<string, Record<string, Record<string, string[]>>>
Expand Down Expand Up @@ -16515,7 +16515,7 @@ export interface SecurityPutRoleRequest extends RequestBase {
indices?: SecurityIndicesPrivileges[]
metadata?: Metadata
run_as?: string[]
transient_metadata?: SecurityTransientMetadataConfig
transient_metadata?: Record<string, any>
}

export interface SecurityPutRoleResponse {
Expand Down Expand Up @@ -16873,11 +16873,37 @@ export interface SlmStopRequest extends RequestBase {

export type SlmStopResponse = AcknowledgedResponseBase

export interface SnapshotAzureRepository extends SnapshotRepositoryBase {
type: 'azure'
settings: SnapshotAzureRepositorySettings
}

export interface SnapshotAzureRepositorySettings extends SnapshotRepositorySettingsBase {
client?: string
container?: string
base_path?: string
readonly?: boolean
location_mode?: string
}

export interface SnapshotFileCountSnapshotStats {
file_count: integer
size_in_bytes: long
}

export interface SnapshotGcsRepository extends SnapshotRepositoryBase {
type: 'gcs'
settings: SnapshotGcsRepositorySettings
}

export interface SnapshotGcsRepositorySettings extends SnapshotRepositorySettingsBase {
bucket: string
client?: string
base_path?: string
readonly?: boolean
application_name?: string
}

export interface SnapshotIndexDetails {
shard_count: integer
size?: ByteSize
Expand All @@ -16890,19 +16916,45 @@ export interface SnapshotInfoFeatureState {
indices: Indices
}

export interface SnapshotRepository {
type: string
export interface SnapshotReadOnlyUrlRepository extends SnapshotRepositoryBase {
type: 'url'
settings: SnapshotReadOnlyUrlRepositorySettings
}

export interface SnapshotReadOnlyUrlRepositorySettings extends SnapshotRepositorySettingsBase {
http_max_retries?: integer
http_socket_timeout?: Duration
max_number_of_snapshots?: integer
url: string
}

export type SnapshotRepository = SnapshotAzureRepository | SnapshotGcsRepository | SnapshotS3Repository | SnapshotSharedFileSystemRepository | SnapshotReadOnlyUrlRepository | SnapshotSourceOnlyRepository

export interface SnapshotRepositoryBase {
uuid?: Uuid
settings: SnapshotRepositorySettings
}

export interface SnapshotRepositorySettings {
chunk_size?: string
compress?: string | boolean
concurrent_streams?: string | integer
location: string
read_only?: string | boolean
readonly?: string | boolean
export interface SnapshotRepositorySettingsBase {
chunk_size?: ByteSize
compress?: boolean
max_restore_bytes_per_sec?: ByteSize
max_snapshot_bytes_per_sec?: ByteSize
}

export interface SnapshotS3Repository extends SnapshotRepositoryBase {
type: 's3'
settings: SnapshotS3RepositorySettings
}

export interface SnapshotS3RepositorySettings extends SnapshotRepositorySettingsBase {
bucket: string
client?: string
base_path?: string
readonly?: boolean
server_side_encryption?: boolean
buffer_size?: ByteSize
canned_acl?: string
storage_class?: string
}

export interface SnapshotShardsStats {
Expand All @@ -16929,6 +16981,17 @@ export interface SnapshotShardsStatsSummaryItem {
size_in_bytes: long
}

export interface SnapshotSharedFileSystemRepository extends SnapshotRepositoryBase {
type: 'fs'
settings: SnapshotSharedFileSystemRepositorySettings
}

export interface SnapshotSharedFileSystemRepositorySettings extends SnapshotRepositorySettingsBase {
location: string
max_number_of_snapshots?: integer
readonly?: boolean
}

export interface SnapshotSnapshotIndexStats {
shards: Record<string, SnapshotSnapshotShardsStatus>
shards_stats: SnapshotShardsStats
Expand Down Expand Up @@ -16982,6 +17045,18 @@ export interface SnapshotSnapshotStats {
total: SnapshotFileCountSnapshotStats
}

export interface SnapshotSourceOnlyRepository extends SnapshotRepositoryBase {
type: 'source'
settings: SnapshotSourceOnlyRepositorySettings
}

export interface SnapshotSourceOnlyRepositorySettings extends SnapshotRepositorySettingsBase {
delegate_type?: string
max_number_of_snapshots?: integer
read_only?: boolean
readonly?: boolean
}

export interface SnapshotStatus {
include_global_state: boolean
indices: Record<string, SnapshotSnapshotIndexStats>
Expand Down Expand Up @@ -17043,8 +17118,6 @@ export interface SnapshotCreateRepositoryRequest extends RequestBase {
timeout?: Duration
verify?: boolean
repository?: SnapshotRepository
type: string
settings: SnapshotRepositorySettings
}

export type SnapshotCreateRepositoryResponse = AcknowledgedResponseBase
Expand Down
Loading
Loading