From 7469e85d021f4d2b2ccd84c19a0d32b9efd707ff Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 7 Mar 2024 06:06:25 +0000 Subject: [PATCH] Auto-generated API code --- docs/reference.asciidoc | 2 +- src/api/types.ts | 125 +++++++++++++++++++++++++++------- src/api/typesWithBodyKey.ts | 131 +++++++++++++++++++++++++++--------- 3 files changed, 201 insertions(+), 57 deletions(-) diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 0454390..3e4f06d 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -2540,7 +2540,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)*: Mapping for a field. For new fields, this mapping can include: +** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include: - Field name - Field data type diff --git a/src/api/types.ts b/src/api/types.ts index 950db22..4a17f2f 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1437,7 +1437,7 @@ export interface SearchInnerHits { fields?: Fields sort?: Sort _source?: SearchSourceConfig - stored_field?: Fields + stored_fields?: Fields track_scores?: boolean version?: boolean } @@ -2251,7 +2251,7 @@ export interface InlineGetKeys { _seq_no?: SequenceNumber _primary_term?: long _routing?: Routing - _source: TDocument + _source?: TDocument } export type InlineGet = InlineGetKeys & { [property: string]: any } @@ -4859,7 +4859,7 @@ export interface MappingDenseVectorIndexOptions { export interface MappingDenseVectorProperty extends MappingPropertyBase { type: 'dense_vector' - dims: integer + dims?: integer similarity?: string index?: boolean index_options?: MappingDenseVectorIndexOptions @@ -4960,6 +4960,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' } @@ -5109,6 +5112,7 @@ export interface MappingRankFeatureProperty extends MappingPropertyBase { } export interface MappingRankFeaturesProperty extends MappingPropertyBase { + positive_score_impact?: boolean type: 'rank_features' } @@ -8972,7 +8976,7 @@ export interface EnrichExecutePolicyRequest extends RequestBase { } export interface EnrichExecutePolicyResponse { - status: EnrichExecutePolicyExecuteEnrichPolicyStatus + status?: EnrichExecutePolicyExecuteEnrichPolicyStatus task_id?: TaskId } @@ -10147,7 +10151,7 @@ export interface IndicesDataStreamsStatsDataStreamsStatsItem { data_stream: Name maximum_timestamp: EpochTime store_size?: ByteSize - store_size_bytes: integer + store_size_bytes: long } export interface IndicesDataStreamsStatsRequest extends RequestBase { @@ -10161,7 +10165,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 { @@ -15804,7 +15808,7 @@ export interface SecurityRoleDescriptor { applications?: SecurityApplicationPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } export interface SecurityRoleDescriptorRead { @@ -15815,7 +15819,7 @@ export interface SecurityRoleDescriptorRead { applications?: SecurityApplicationPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } export interface SecurityRoleMapping { @@ -15854,10 +15858,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 @@ -16171,7 +16171,7 @@ export interface SecurityGetRoleRole { indices: SecurityIndicesPrivileges[] metadata: Metadata run_as: string[] - transient_metadata: SecurityTransientMetadataConfig + transient_metadata?: Record applications: SecurityApplicationPrivileges[] role_templates?: SecurityRoleTemplate[] } @@ -16420,7 +16420,7 @@ export interface SecurityPutRoleRequest extends RequestBase { indices?: SecurityIndicesPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } export interface SecurityPutRoleResponse { @@ -16777,11 +16777,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 @@ -16794,19 +16820,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 { @@ -16833,6 +16885,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 shards_stats: SnapshotShardsStats @@ -16884,6 +16947,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 @@ -16944,8 +17019,6 @@ export interface SnapshotCreateRepositoryRequest extends RequestBase { timeout?: Duration verify?: boolean repository?: SnapshotRepository - type: string - settings: SnapshotRepositorySettings } export type SnapshotCreateRepositoryResponse = AcknowledgedResponseBase diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 63dad24..795a3ff 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -1492,7 +1492,7 @@ export interface SearchInnerHits { fields?: Fields sort?: Sort _source?: SearchSourceConfig - stored_field?: Fields + stored_fields?: Fields track_scores?: boolean version?: boolean } @@ -2324,7 +2324,7 @@ export interface InlineGetKeys { _seq_no?: SequenceNumber _primary_term?: long _routing?: Routing - _source: TDocument + _source?: TDocument } export type InlineGet = InlineGetKeys & { [property: string]: any } @@ -4932,7 +4932,7 @@ export interface MappingDenseVectorIndexOptions { export interface MappingDenseVectorProperty extends MappingPropertyBase { type: 'dense_vector' - dims: integer + dims?: integer similarity?: string index?: boolean index_options?: MappingDenseVectorIndexOptions @@ -5033,6 +5033,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' } @@ -5182,6 +5185,7 @@ export interface MappingRankFeatureProperty extends MappingPropertyBase { } export interface MappingRankFeaturesProperty extends MappingPropertyBase { + positive_score_impact?: boolean type: 'rank_features' } @@ -9073,7 +9077,7 @@ export interface EnrichExecutePolicyRequest extends RequestBase { } export interface EnrichExecutePolicyResponse { - status: EnrichExecutePolicyExecuteEnrichPolicyStatus + status?: EnrichExecutePolicyExecuteEnrichPolicyStatus task_id?: TaskId } @@ -10282,7 +10286,7 @@ export interface IndicesDataStreamsStatsDataStreamsStatsItem { data_stream: Name maximum_timestamp: EpochTime store_size?: ByteSize - store_size_bytes: integer + store_size_bytes: long } export interface IndicesDataStreamsStatsRequest extends RequestBase { @@ -10296,7 +10300,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 { @@ -16122,7 +16126,7 @@ export interface SecurityRoleDescriptor { applications?: SecurityApplicationPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } export interface SecurityRoleDescriptorRead { @@ -16133,7 +16137,7 @@ export interface SecurityRoleDescriptorRead { applications?: SecurityApplicationPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } export interface SecurityRoleMapping { @@ -16172,10 +16176,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 @@ -16498,7 +16498,7 @@ export interface SecurityGetRoleRole { indices: SecurityIndicesPrivileges[] metadata: Metadata run_as: string[] - transient_metadata: SecurityTransientMetadataConfig + transient_metadata?: Record applications: SecurityApplicationPrivileges[] role_templates?: SecurityRoleTemplate[] } @@ -16768,7 +16768,7 @@ export interface SecurityPutRoleRequest extends RequestBase { indices?: SecurityIndicesPrivileges[] metadata?: Metadata run_as?: string[] - transient_metadata?: SecurityTransientMetadataConfig + transient_metadata?: Record } } @@ -17166,11 +17166,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 @@ -17183,19 +17209,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 { @@ -17222,6 +17274,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 shards_stats: SnapshotShardsStats @@ -17273,6 +17336,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 @@ -17338,12 +17413,8 @@ export interface SnapshotCreateRepositoryRequest extends RequestBase { master_timeout?: Duration timeout?: Duration verify?: boolean - /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ - body?: { - repository?: SnapshotRepository - type: string - settings: SnapshotRepositorySettings - } + /** @deprecated The use of the 'body' key has been deprecated, use 'repository' instead. */ + body?: SnapshotRepository } export type SnapshotCreateRepositoryResponse = AcknowledgedResponseBase