diff --git a/api/OpenSearchApi.d.ts b/api/OpenSearchApi.d.ts index b735dafc8..ade3c01fb 100644 --- a/api/OpenSearchApi.d.ts +++ b/api/OpenSearchApi.d.ts @@ -580,6 +580,13 @@ export default class OpenSearchAPI { }; + insights: { + topQueries (params: API.Insights_TopQueries_Request, options?: TransportRequestOptions): TransportRequestPromise; + topQueries (params: API.Insights_TopQueries_Request, callback: callbackFn): TransportRequestCallback; + topQueries (params: API.Insights_TopQueries_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + ism: { addPolicy (params?: API.Ism_AddPolicy_Request, options?: TransportRequestOptions): TransportRequestPromise; addPolicy (callback: callbackFn): TransportRequestCallback; @@ -1400,6 +1407,26 @@ export default class OpenSearchAPI { }; + wlm: { + getQueryGroup (params?: API.Wlm_GetQueryGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + getQueryGroup (callback: callbackFn): TransportRequestCallback; + getQueryGroup (params: API.Wlm_GetQueryGroup_Request, callback: callbackFn): TransportRequestCallback; + getQueryGroup (params: API.Wlm_GetQueryGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createQueryGroup (params: API.Wlm_CreateQueryGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + createQueryGroup (params: API.Wlm_CreateQueryGroup_Request, callback: callbackFn): TransportRequestCallback; + createQueryGroup (params: API.Wlm_CreateQueryGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteQueryGroup (params: API.Wlm_DeleteQueryGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteQueryGroup (params: API.Wlm_DeleteQueryGroup_Request, callback: callbackFn): TransportRequestCallback; + deleteQueryGroup (params: API.Wlm_DeleteQueryGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateQueryGroup (params: API.Wlm_UpdateQueryGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateQueryGroup (params: API.Wlm_UpdateQueryGroup_Request, callback: callbackFn): TransportRequestCallback; + updateQueryGroup (params: API.Wlm_UpdateQueryGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + http: { connect (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; @@ -1454,6 +1481,10 @@ export default class OpenSearchAPI { bulk (params: API.Bulk_Request, callback: callbackFn): TransportRequestCallback; bulk (params: API.Bulk_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + bulkStream (params: API.BulkStream_Request, options?: TransportRequestOptions): TransportRequestPromise; + bulkStream (params: API.BulkStream_Request, callback: callbackFn): TransportRequestCallback; + bulkStream (params: API.BulkStream_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + count (params?: API.Count_Request, options?: TransportRequestOptions): TransportRequestPromise; count (callback: callbackFn): TransportRequestCallback; count (params: API.Count_Request, callback: callbackFn): TransportRequestCallback; diff --git a/api/OpenSearchApi.js b/api/OpenSearchApi.js index 272ddbbbf..4ca4e5f7e 100644 --- a/api/OpenSearchApi.js +++ b/api/OpenSearchApi.js @@ -31,6 +31,7 @@ class OpenSearchAPI { http: new(require('./http/_api'))(this), indices: new(require('./indices/_api'))(this), ingest: new(require('./ingest/_api'))(this), + insights: new(require('./insights/_api'))(this), ism: new(require('./ism/_api'))(this), knn: new(require('./knn/_api'))(this), ml: new(require('./ml/_api'))(this), @@ -47,11 +48,13 @@ class OpenSearchAPI { sql: new(require('./sql/_api'))(this), tasks: new(require('./tasks/_api'))(this), transforms: new(require('./transforms/_api'))(this), + wlm: new(require('./wlm/_api'))(this), } // Setup Root API Functions /** @namespace API-Core */ this.bulk = require('./_core/bulk').bind(this) + this.bulkStream = require('./_core/bulkStream').bind(this) this.clearScroll = require('./_core/clearScroll').bind(this) this.count = require('./_core/count').bind(this) this.create = require('./_core/create').bind(this) @@ -94,6 +97,8 @@ class OpenSearchAPI { this.updateByQuery = require('./_core/updateByQuery').bind(this) this.updateByQueryRethrottle = require('./_core/updateByQueryRethrottle').bind(this) + // Deprecated: Use bulkStream instead. + this.bulk_stream = require('./_core/bulkStream').bind(this) // Deprecated: Use clearScroll instead. this.clear_scroll = require('./_core/clearScroll').bind(this) // Deprecated: Use createPit instead. @@ -153,6 +158,7 @@ class OpenSearchAPI { http: { get() { return this[kApiModules].http } }, indices: { get() { return this[kApiModules].indices } }, ingest: { get() { return this[kApiModules].ingest } }, + insights: { get() { return this[kApiModules].insights } }, ism: { get() { return this[kApiModules].ism } }, knn: { get() { return this[kApiModules].knn } }, ml: { get() { return this[kApiModules].ml } }, @@ -169,6 +175,7 @@ class OpenSearchAPI { sql: { get() { return this[kApiModules].sql } }, tasks: { get() { return this[kApiModules].tasks } }, transforms: { get() { return this[kApiModules].transforms } }, + wlm: { get() { return this[kApiModules].wlm } }, // Deprecated: Use asynchronousSearch instead. asynchronous_search: { get() { return this[kApiModules].asynchronousSearch } }, diff --git a/api/_core/bulk.d.ts b/api/_core/bulk.d.ts index c98ba8c92..500268e59 100644 --- a/api/_core/bulk.d.ts +++ b/api/_core/bulk.d.ts @@ -20,7 +20,7 @@ import * as Core_Bulk from '../_types/_core.bulk' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Bulk_Request extends Global.Params { +export type Bulk_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -29,7 +29,7 @@ export interface Bulk_Request extends Global.Params { pipeline?: string; refresh?: Common.Refresh; require_alias?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; timeout?: Common.Duration; type?: string; wait_for_active_shards?: Common.WaitForActiveShards; @@ -37,11 +37,11 @@ export interface Bulk_Request extends Global.Params { export type Bulk_RequestBody = Core_Bulk.OperationContainer | Core_Bulk.UpdateAction | Record[] -export interface Bulk_Response extends ApiResponse { +export type Bulk_Response = ApiResponse & { body: Bulk_ResponseBody; } -export interface Bulk_ResponseBody { +export type Bulk_ResponseBody = { errors: boolean; ingest_took?: number; items: Record[]; diff --git a/api/_core/bulkStream.d.ts b/api/_core/bulkStream.d.ts new file mode 100644 index 000000000..68c8c8a78 --- /dev/null +++ b/api/_core/bulkStream.d.ts @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' +import * as Core_Bulk from '../_types/_core.bulk' +import * as Core_Search from '../_types/_core.search' +import * as Global from '../_types/_global' + +export type BulkStream_Request = Global.Params & { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + batch_interval?: Common.Duration; + batch_size?: Common.BatchSize; + body: BulkStream_RequestBody; + index?: Common.IndexName; + pipeline?: string; + refresh?: Common.Refresh; + require_alias?: boolean; + routing?: Common.RoutingInQueryString; + timeout?: Common.Duration; + type?: string; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export type BulkStream_RequestBody = Core_Bulk.OperationContainer | Core_Bulk.UpdateAction | Record[] + +export type BulkStream_Response = ApiResponse & { + body: BulkStream_ResponseBody; +} + +export type BulkStream_ResponseBody = { + errors: boolean; + ingest_took?: number; + items: Record[]; + took: number; +} + diff --git a/api/_core/bulkStream.js b/api/_core/bulkStream.js new file mode 100644 index 000000000..f9a00e346 --- /dev/null +++ b/api/_core/bulkStream.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to perform multiple index/update/delete operations using request response streaming. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk-streaming/ - bulk_stream} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - `true` or `false` to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.batch_interval] - Specifies for how long bulk operations should be accumulated into a batch before sending the batch to data nodes. + * @param {number} [params.batch_size] - Specifies how many bulk operations should be accumulated into a batch before sending the batch to data nodes. + * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. + * @param {string} [params.refresh] - If `true`, OpenSearch refreshes 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` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. + * @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @param {string} [params.type] - Default document type for items which don't provide one. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} [params.index] - Name of the data stream, index, or index alias to perform bulk actions on. + * @param {array} params.body - The operation definition and data (action-data pairs), separated by newlines + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function bulkStreamFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_bulk/stream'].filter(c => c).join('').replace('//', '/'); + const method = index == null ? 'POST' : 'PUT'; + + return this.transport.request({ method, path, querystring, bulkBody: body }, options, callback); +} + +module.exports = bulkStreamFunc; diff --git a/api/_core/clearScroll.d.ts b/api/_core/clearScroll.d.ts index 154dc980e..417515b5c 100644 --- a/api/_core/clearScroll.d.ts +++ b/api/_core/clearScroll.d.ts @@ -18,20 +18,20 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface ClearScroll_Request extends Global.Params { +export type ClearScroll_Request = Global.Params & { body?: ClearScroll_RequestBody; scroll_id?: Common.ScrollIds; } -export interface ClearScroll_RequestBody { +export type ClearScroll_RequestBody = { scroll_id?: Common.ScrollIds; } -export interface ClearScroll_Response extends ApiResponse { +export type ClearScroll_Response = ApiResponse & { body: ClearScroll_ResponseBody; } -export interface ClearScroll_ResponseBody { +export type ClearScroll_ResponseBody = { num_freed: number; succeeded: boolean; } diff --git a/api/_core/count.d.ts b/api/_core/count.d.ts index 0fae9dfcf..66274d219 100644 --- a/api/_core/count.d.ts +++ b/api/_core/count.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' -export interface Count_Request extends Global.Params { +export type Count_Request = Global.Params & { allow_no_indices?: boolean; analyze_wildcard?: boolean; analyzer?: string; @@ -34,19 +34,19 @@ export interface Count_Request extends Global.Params { min_score?: number; preference?: string; q?: string; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; terminate_after?: number; } -export interface Count_RequestBody { +export type Count_RequestBody = { query?: Common_QueryDsl.QueryContainer; } -export interface Count_Response extends ApiResponse { +export type Count_Response = ApiResponse & { body: Count_ResponseBody; } -export interface Count_ResponseBody { +export type Count_ResponseBody = { _shards: Common.ShardStatistics; count: number; terminated_early?: boolean; diff --git a/api/_core/create.d.ts b/api/_core/create.d.ts index f9ba49b75..ad1199813 100644 --- a/api/_core/create.d.ts +++ b/api/_core/create.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Create_Request extends Global.Params { +export type Create_Request = Global.Params & { body: Create_RequestBody; id: Common.Id; index: Common.IndexName; pipeline?: string; refresh?: Common.Refresh; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; timeout?: Common.Duration; version?: Common.VersionNumber; version_type?: Common.VersionType; @@ -33,7 +33,7 @@ export interface Create_Request extends Global.Params { export type Create_RequestBody = Record -export interface Create_Response extends ApiResponse { +export type Create_Response = ApiResponse & { body: Create_ResponseBody; } diff --git a/api/_core/createPit.d.ts b/api/_core/createPit.d.ts index b91431475..ad3932561 100644 --- a/api/_core/createPit.d.ts +++ b/api/_core/createPit.d.ts @@ -19,20 +19,20 @@ import * as Common from '../_types/_common' import * as Core_Common from '../_types/_core._common' import * as Global from '../_types/_global' -export interface CreatePit_Request extends Global.Params { +export type CreatePit_Request = Global.Params & { allow_partial_pit_creation?: boolean; expand_wildcards?: Common.ExpandWildcards; index: string[]; keep_alive?: Common.Duration; preference?: string; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; } -export interface CreatePit_Response extends ApiResponse { +export type CreatePit_Response = ApiResponse & { body: CreatePit_ResponseBody; } -export interface CreatePit_ResponseBody { +export type CreatePit_ResponseBody = { _shards?: Core_Common.ShardStatistics; creation_time?: number; pit_id?: string; diff --git a/api/_core/delete.d.ts b/api/_core/delete.d.ts index f63c75380..f920b67ee 100644 --- a/api/_core/delete.d.ts +++ b/api/_core/delete.d.ts @@ -18,20 +18,20 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Delete_Request extends Global.Params { +export type Delete_Request = Global.Params & { id: Common.Id; if_primary_term?: number; if_seq_no?: Common.SequenceNumber; index: Common.IndexName; refresh?: Common.Refresh; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; timeout?: Common.Duration; version?: Common.VersionNumber; version_type?: Common.VersionType; wait_for_active_shards?: Common.WaitForActiveShards; } -export interface Delete_Response extends ApiResponse { +export type Delete_Response = ApiResponse & { body: Delete_ResponseBody; } diff --git a/api/_core/deleteAllPits.d.ts b/api/_core/deleteAllPits.d.ts index 5da0ae7bb..7be2eec16 100644 --- a/api/_core/deleteAllPits.d.ts +++ b/api/_core/deleteAllPits.d.ts @@ -20,11 +20,11 @@ import * as Global from '../_types/_global' export type DeleteAllPits_Request = Global.Params & Record -export interface DeleteAllPits_Response extends ApiResponse { +export type DeleteAllPits_Response = ApiResponse & { body: DeleteAllPits_ResponseBody; } -export interface DeleteAllPits_ResponseBody { +export type DeleteAllPits_ResponseBody = { pits?: Core_Common.PitsDetailsDeleteAll[]; } diff --git a/api/_core/deleteByQuery.d.ts b/api/_core/deleteByQuery.d.ts index 68fb26ed8..640a09b3b 100644 --- a/api/_core/deleteByQuery.d.ts +++ b/api/_core/deleteByQuery.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' -export interface DeleteByQuery_Request extends Global.Params { +export type DeleteByQuery_Request = Global.Params & { _source?: string[]; _source_excludes?: string[]; _source_includes?: string[]; @@ -41,7 +41,7 @@ export interface DeleteByQuery_Request extends Global.Params { refresh?: boolean; request_cache?: boolean; requests_per_second?: number; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; scroll?: Common.Duration; scroll_size?: number; search_timeout?: Common.Duration; @@ -57,13 +57,13 @@ export interface DeleteByQuery_Request extends Global.Params { wait_for_completion?: boolean; } -export interface DeleteByQuery_RequestBody { +export type DeleteByQuery_RequestBody = { max_docs?: number; query?: Common_QueryDsl.QueryContainer; slice?: Common.SlicedScroll; } -export interface DeleteByQuery_Response extends ApiResponse { +export type DeleteByQuery_Response = ApiResponse & { body: DeleteByQuery_ResponseBody; } diff --git a/api/_core/deleteByQueryRethrottle.d.ts b/api/_core/deleteByQueryRethrottle.d.ts index 97da7a082..d68793886 100644 --- a/api/_core/deleteByQueryRethrottle.d.ts +++ b/api/_core/deleteByQueryRethrottle.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Tasks_Common from '../_types/tasks._common' -export interface DeleteByQueryRethrottle_Request extends Global.Params { +export type DeleteByQueryRethrottle_Request = Global.Params & { requests_per_second?: number; task_id: Common.TaskId; } -export interface DeleteByQueryRethrottle_Response extends ApiResponse { +export type DeleteByQueryRethrottle_Response = ApiResponse & { body: DeleteByQueryRethrottle_ResponseBody; } diff --git a/api/_core/deletePit.d.ts b/api/_core/deletePit.d.ts index e6c5aaab8..1da2e537f 100644 --- a/api/_core/deletePit.d.ts +++ b/api/_core/deletePit.d.ts @@ -18,19 +18,19 @@ import { ApiResponse } from '../../lib/Transport' import * as Core_Common from '../_types/_core._common' import * as Global from '../_types/_global' -export interface DeletePit_Request extends Global.Params { +export type DeletePit_Request = Global.Params & { body?: DeletePit_RequestBody; } -export interface DeletePit_RequestBody { +export type DeletePit_RequestBody = { pit_id: string[]; } -export interface DeletePit_Response extends ApiResponse { +export type DeletePit_Response = ApiResponse & { body: DeletePit_ResponseBody; } -export interface DeletePit_ResponseBody { +export type DeletePit_ResponseBody = { pits?: Core_Common.DeletedPit[]; } diff --git a/api/_core/deleteScript.d.ts b/api/_core/deleteScript.d.ts index 53fd9c3be..54e2ae427 100644 --- a/api/_core/deleteScript.d.ts +++ b/api/_core/deleteScript.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface DeleteScript_Request extends Global.Params { +export type DeleteScript_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id: Common.Id; master_timeout?: Common.Duration; timeout?: Common.Duration; } -export interface DeleteScript_Response extends ApiResponse { +export type DeleteScript_Response = ApiResponse & { body: DeleteScript_ResponseBody; } diff --git a/api/_core/exists.d.ts b/api/_core/exists.d.ts index fb3d7e4cf..d100b7816 100644 --- a/api/_core/exists.d.ts +++ b/api/_core/exists.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Exists_Request extends Global.Params { +export type Exists_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -28,13 +28,13 @@ export interface Exists_Request extends Global.Params { preference?: string; realtime?: boolean; refresh?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; stored_fields?: Common.Fields; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface Exists_Response extends ApiResponse { +export type Exists_Response = ApiResponse & { body: Exists_ResponseBody; } diff --git a/api/_core/existsSource.d.ts b/api/_core/existsSource.d.ts index 2bbf27fa1..8a102215e 100644 --- a/api/_core/existsSource.d.ts +++ b/api/_core/existsSource.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface ExistsSource_Request extends Global.Params { +export type ExistsSource_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -28,12 +28,12 @@ export interface ExistsSource_Request extends Global.Params { preference?: string; realtime?: boolean; refresh?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface ExistsSource_Response extends ApiResponse { +export type ExistsSource_Response = ApiResponse & { body: ExistsSource_ResponseBody; } diff --git a/api/_core/explain.d.ts b/api/_core/explain.d.ts index a0f8fed74..e0e9798a4 100644 --- a/api/_core/explain.d.ts +++ b/api/_core/explain.d.ts @@ -21,7 +21,7 @@ import * as Core_Explain from '../_types/_core.explain' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Explain_Request extends Global.Params { +export type Explain_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -35,19 +35,19 @@ export interface Explain_Request extends Global.Params { lenient?: boolean; preference?: string; q?: string; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; stored_fields?: Common.Fields; } -export interface Explain_RequestBody { +export type Explain_RequestBody = { query?: Common_QueryDsl.QueryContainer; } -export interface Explain_Response extends ApiResponse { +export type Explain_Response = ApiResponse & { body: Explain_ResponseBody; } -export interface Explain_ResponseBody { +export type Explain_ResponseBody = { _id: Common.Id; _index: Common.IndexName; explanation?: Core_Explain.ExplanationDetail; diff --git a/api/_core/fieldCaps.d.ts b/api/_core/fieldCaps.d.ts index 6bb3f3f38..f0dd3ba1d 100644 --- a/api/_core/fieldCaps.d.ts +++ b/api/_core/fieldCaps.d.ts @@ -16,12 +16,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' -import * as Common_Mapping from '../_types/_common.mapping' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Core_FieldCaps from '../_types/_core.field_caps' import * as Global from '../_types/_global' -export interface FieldCaps_Request extends Global.Params { +export type FieldCaps_Request = Global.Params & { allow_no_indices?: boolean; body?: FieldCaps_RequestBody; expand_wildcards?: Common.ExpandWildcards; @@ -31,17 +30,16 @@ export interface FieldCaps_Request extends Global.Params { index?: Common.Indices; } -export interface FieldCaps_RequestBody { +export type FieldCaps_RequestBody = { fields?: Common.Fields; index_filter?: Common_QueryDsl.QueryContainer; - runtime_mappings?: Common_Mapping.RuntimeFields; } -export interface FieldCaps_Response extends ApiResponse { +export type FieldCaps_Response = ApiResponse & { body: FieldCaps_ResponseBody; } -export interface FieldCaps_ResponseBody { +export type FieldCaps_ResponseBody = { fields: Record>; indices: Common.Indices; } diff --git a/api/_core/get.d.ts b/api/_core/get.d.ts index 330d00d53..59d1e85eb 100644 --- a/api/_core/get.d.ts +++ b/api/_core/get.d.ts @@ -20,7 +20,7 @@ import * as Core_Get from '../_types/_core.get' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Get_Request extends Global.Params { +export type Get_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -29,13 +29,13 @@ export interface Get_Request extends Global.Params { preference?: string; realtime?: boolean; refresh?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; stored_fields?: Common.Fields; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface Get_Response extends ApiResponse { +export type Get_Response = ApiResponse & { body: Get_ResponseBody; } diff --git a/api/_core/getAllPits.d.ts b/api/_core/getAllPits.d.ts index 0584cc767..67f15d18a 100644 --- a/api/_core/getAllPits.d.ts +++ b/api/_core/getAllPits.d.ts @@ -20,11 +20,11 @@ import * as Global from '../_types/_global' export type GetAllPits_Request = Global.Params & Record -export interface GetAllPits_Response extends ApiResponse { +export type GetAllPits_Response = ApiResponse & { body: GetAllPits_ResponseBody; } -export interface GetAllPits_ResponseBody { +export type GetAllPits_ResponseBody = { pits?: Core_Common.PitDetail[]; } diff --git a/api/_core/getScript.d.ts b/api/_core/getScript.d.ts index 1e58698e9..651a8e246 100644 --- a/api/_core/getScript.d.ts +++ b/api/_core/getScript.d.ts @@ -18,17 +18,17 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface GetScript_Request extends Global.Params { +export type GetScript_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id: Common.Id; master_timeout?: Common.Duration; } -export interface GetScript_Response extends ApiResponse { +export type GetScript_Response = ApiResponse & { body: GetScript_ResponseBody; } -export interface GetScript_ResponseBody { +export type GetScript_ResponseBody = { _id: Common.Id; found: boolean; script?: Common.StoredScript; diff --git a/api/_core/getScriptContext.d.ts b/api/_core/getScriptContext.d.ts index 216b57e3c..c9c1f7eff 100644 --- a/api/_core/getScriptContext.d.ts +++ b/api/_core/getScriptContext.d.ts @@ -20,11 +20,11 @@ import * as Global from '../_types/_global' export type GetScriptContext_Request = Global.Params & Record -export interface GetScriptContext_Response extends ApiResponse { +export type GetScriptContext_Response = ApiResponse & { body: GetScriptContext_ResponseBody; } -export interface GetScriptContext_ResponseBody { +export type GetScriptContext_ResponseBody = { contexts: Core_GetScriptContext.Context[]; } diff --git a/api/_core/getScriptLanguages.d.ts b/api/_core/getScriptLanguages.d.ts index 9dd187dab..54739ed66 100644 --- a/api/_core/getScriptLanguages.d.ts +++ b/api/_core/getScriptLanguages.d.ts @@ -20,11 +20,11 @@ import * as Global from '../_types/_global' export type GetScriptLanguages_Request = Global.Params & Record -export interface GetScriptLanguages_Response extends ApiResponse { +export type GetScriptLanguages_Response = ApiResponse & { body: GetScriptLanguages_ResponseBody; } -export interface GetScriptLanguages_ResponseBody { +export type GetScriptLanguages_ResponseBody = { language_contexts: Core_GetScriptLanguages.LanguageContext[]; types_allowed: string[]; } diff --git a/api/_core/getSource.d.ts b/api/_core/getSource.d.ts index 14a5cedbc..9abf805ac 100644 --- a/api/_core/getSource.d.ts +++ b/api/_core/getSource.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface GetSource_Request extends Global.Params { +export type GetSource_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -28,12 +28,12 @@ export interface GetSource_Request extends Global.Params { preference?: string; realtime?: boolean; refresh?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface GetSource_Response extends ApiResponse { +export type GetSource_Response = ApiResponse & { body: GetSource_ResponseBody; } diff --git a/api/_core/index.d.ts b/api/_core/index.d.ts index 7c2774b24..c64d9f39d 100644 --- a/api/_core/index.d.ts +++ b/api/_core/index.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Index_Request extends Global.Params { +export type Index_Request = Global.Params & { body: Index_RequestBody; id?: Common.Id; if_primary_term?: number; @@ -28,7 +28,7 @@ export interface Index_Request extends Global.Params { pipeline?: string; refresh?: Common.Refresh; require_alias?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; timeout?: Common.Duration; version?: Common.VersionNumber; version_type?: Common.VersionType; @@ -37,7 +37,7 @@ export interface Index_Request extends Global.Params { export type Index_RequestBody = Record -export interface Index_Response extends ApiResponse { +export type Index_Response = ApiResponse & { body: Index_ResponseBody; } diff --git a/api/_core/info.d.ts b/api/_core/info.d.ts index 692a08671..ee28f54f1 100644 --- a/api/_core/info.d.ts +++ b/api/_core/info.d.ts @@ -20,11 +20,11 @@ import * as Global from '../_types/_global' export type Info_Request = Global.Params & Record -export interface Info_Response extends ApiResponse { +export type Info_Response = ApiResponse & { body: Info_ResponseBody; } -export interface Info_ResponseBody { +export type Info_ResponseBody = { cluster_name: Common.Name; cluster_uuid: Common.Uuid; name: Common.Name; diff --git a/api/_core/mget.d.ts b/api/_core/mget.d.ts index 522b28586..bbfa7fb98 100644 --- a/api/_core/mget.d.ts +++ b/api/_core/mget.d.ts @@ -20,7 +20,7 @@ import * as Core_Mget from '../_types/_core.mget' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Mget_Request extends Global.Params { +export type Mget_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -29,20 +29,20 @@ export interface Mget_Request extends Global.Params { preference?: string; realtime?: boolean; refresh?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; stored_fields?: Common.Fields; } -export interface Mget_RequestBody { +export type Mget_RequestBody = { docs?: Core_Mget.Operation[]; ids?: Common.Ids; } -export interface Mget_Response extends ApiResponse { +export type Mget_Response = ApiResponse & { body: Mget_ResponseBody; } -export interface Mget_ResponseBody { +export type Mget_ResponseBody = { docs: Core_Mget.ResponseItem[]; } diff --git a/api/_core/msearch.d.ts b/api/_core/msearch.d.ts index 159a0eede..eb29b56f1 100644 --- a/api/_core/msearch.d.ts +++ b/api/_core/msearch.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Msearch from '../_types/_core.msearch' import * as Global from '../_types/_global' -export interface Msearch_Request extends Global.Params { +export type Msearch_Request = Global.Params & { body: Msearch_RequestBody; ccs_minimize_roundtrips?: boolean; index?: Common.Indices; @@ -33,7 +33,7 @@ export interface Msearch_Request extends Global.Params { export type Msearch_RequestBody = Core_Msearch.RequestItem[] -export interface Msearch_Response extends ApiResponse { +export type Msearch_Response = ApiResponse & { body: Msearch_ResponseBody; } diff --git a/api/_core/msearchTemplate.d.ts b/api/_core/msearchTemplate.d.ts index 665ecc10f..88e303fe6 100644 --- a/api/_core/msearchTemplate.d.ts +++ b/api/_core/msearchTemplate.d.ts @@ -20,7 +20,7 @@ import * as Core_Msearch from '../_types/_core.msearch' import * as Core_MsearchTemplate from '../_types/_core.msearch_template' import * as Global from '../_types/_global' -export interface MsearchTemplate_Request extends Global.Params { +export type MsearchTemplate_Request = Global.Params & { body: MsearchTemplate_RequestBody; ccs_minimize_roundtrips?: boolean; index?: Common.Indices; @@ -32,7 +32,7 @@ export interface MsearchTemplate_Request extends Global.Params { export type MsearchTemplate_RequestBody = Core_MsearchTemplate.RequestItem[] -export interface MsearchTemplate_Response extends ApiResponse { +export type MsearchTemplate_Response = ApiResponse & { body: MsearchTemplate_ResponseBody; } diff --git a/api/_core/mtermvectors.d.ts b/api/_core/mtermvectors.d.ts index cb6649161..600e23653 100644 --- a/api/_core/mtermvectors.d.ts +++ b/api/_core/mtermvectors.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Mtermvectors from '../_types/_core.mtermvectors' import * as Global from '../_types/_global' -export interface Mtermvectors_Request extends Global.Params { +export type Mtermvectors_Request = Global.Params & { body?: Mtermvectors_RequestBody; field_statistics?: boolean; fields?: Common.Fields; @@ -30,22 +30,22 @@ export interface Mtermvectors_Request extends Global.Params { positions?: boolean; preference?: string; realtime?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; term_statistics?: boolean; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface Mtermvectors_RequestBody { +export type Mtermvectors_RequestBody = { docs?: Core_Mtermvectors.Operation[]; ids?: Common.Id[]; } -export interface Mtermvectors_Response extends ApiResponse { +export type Mtermvectors_Response = ApiResponse & { body: Mtermvectors_ResponseBody; } -export interface Mtermvectors_ResponseBody { +export type Mtermvectors_ResponseBody = { docs: Core_Mtermvectors.TermVectorsResult[]; } diff --git a/api/_core/ping.d.ts b/api/_core/ping.d.ts index 821efdce7..f665e9b08 100644 --- a/api/_core/ping.d.ts +++ b/api/_core/ping.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' export type Ping_Request = Global.Params & Record -export interface Ping_Response extends ApiResponse { +export type Ping_Response = ApiResponse & { body: Ping_ResponseBody; } diff --git a/api/_core/putScript.d.ts b/api/_core/putScript.d.ts index df2eb81ce..061f187ac 100644 --- a/api/_core/putScript.d.ts +++ b/api/_core/putScript.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface PutScript_Request extends Global.Params { +export type PutScript_Request = Global.Params & { body: PutScript_RequestBody; cluster_manager_timeout?: Common.Duration; context?: Common.Name; @@ -27,11 +27,11 @@ export interface PutScript_Request extends Global.Params { timeout?: Common.Duration; } -export interface PutScript_RequestBody { +export type PutScript_RequestBody = { script: Common.StoredScript; } -export interface PutScript_Response extends ApiResponse { +export type PutScript_Response = ApiResponse & { body: PutScript_ResponseBody; } diff --git a/api/_core/rankEval.d.ts b/api/_core/rankEval.d.ts index 561bca9ca..34a303dbd 100644 --- a/api/_core/rankEval.d.ts +++ b/api/_core/rankEval.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_RankEval from '../_types/_core.rank_eval' import * as Global from '../_types/_global' -export interface RankEval_Request extends Global.Params { +export type RankEval_Request = Global.Params & { allow_no_indices?: boolean; body: RankEval_RequestBody; expand_wildcards?: Common.ExpandWildcards; @@ -28,16 +28,16 @@ export interface RankEval_Request extends Global.Params { search_type?: Common.SearchType; } -export interface RankEval_RequestBody { +export type RankEval_RequestBody = { metric?: Core_RankEval.RankEvalMetric; requests: Core_RankEval.RankEvalRequestItem[]; } -export interface RankEval_Response extends ApiResponse { +export type RankEval_Response = ApiResponse & { body: RankEval_ResponseBody; } -export interface RankEval_ResponseBody { +export type RankEval_ResponseBody = { details: Record; failures: Record>; metric_score: number; diff --git a/api/_core/reindex.d.ts b/api/_core/reindex.d.ts index bfc2c7dfa..2d9cc8bbc 100644 --- a/api/_core/reindex.d.ts +++ b/api/_core/reindex.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Reindex from '../_types/_core.reindex' import * as Global from '../_types/_global' -export interface Reindex_Request extends Global.Params { +export type Reindex_Request = Global.Params & { body: Reindex_RequestBody; max_docs?: number; refresh?: boolean; @@ -31,7 +31,7 @@ export interface Reindex_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Reindex_RequestBody { +export type Reindex_RequestBody = { conflicts?: Common.Conflicts; dest: Core_Reindex.Destination; max_docs?: number; @@ -40,7 +40,7 @@ export interface Reindex_RequestBody { source: Core_Reindex.Source; } -export interface Reindex_Response extends ApiResponse { +export type Reindex_Response = ApiResponse & { body: Reindex_ResponseBody; } diff --git a/api/_core/reindexRethrottle.d.ts b/api/_core/reindexRethrottle.d.ts index da2938e60..fe76b61a5 100644 --- a/api/_core/reindexRethrottle.d.ts +++ b/api/_core/reindexRethrottle.d.ts @@ -19,16 +19,16 @@ import * as Common from '../_types/_common' import * as Core_ReindexRethrottle from '../_types/_core.reindex_rethrottle' import * as Global from '../_types/_global' -export interface ReindexRethrottle_Request extends Global.Params { +export type ReindexRethrottle_Request = Global.Params & { requests_per_second?: number; task_id: Common.Id; } -export interface ReindexRethrottle_Response extends ApiResponse { +export type ReindexRethrottle_Response = ApiResponse & { body: ReindexRethrottle_ResponseBody; } -export interface ReindexRethrottle_ResponseBody { +export type ReindexRethrottle_ResponseBody = { nodes: Record; } diff --git a/api/_core/renderSearchTemplate.d.ts b/api/_core/renderSearchTemplate.d.ts index 6b1c4cd1f..b9707247f 100644 --- a/api/_core/renderSearchTemplate.d.ts +++ b/api/_core/renderSearchTemplate.d.ts @@ -18,22 +18,22 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface RenderSearchTemplate_Request extends Global.Params { +export type RenderSearchTemplate_Request = Global.Params & { body?: RenderSearchTemplate_RequestBody; id?: Common.Id; } -export interface RenderSearchTemplate_RequestBody { +export type RenderSearchTemplate_RequestBody = { file?: string; params?: Record>; source?: string; } -export interface RenderSearchTemplate_Response extends ApiResponse { +export type RenderSearchTemplate_Response = ApiResponse & { body: RenderSearchTemplate_ResponseBody; } -export interface RenderSearchTemplate_ResponseBody { +export type RenderSearchTemplate_ResponseBody = { template_output: Record>; } diff --git a/api/_core/scriptsPainlessExecute.d.ts b/api/_core/scriptsPainlessExecute.d.ts index a6658732d..b7912773a 100644 --- a/api/_core/scriptsPainlessExecute.d.ts +++ b/api/_core/scriptsPainlessExecute.d.ts @@ -19,21 +19,21 @@ import * as Common from '../_types/_common' import * as Core_ScriptsPainlessExecute from '../_types/_core.scripts_painless_execute' import * as Global from '../_types/_global' -export interface ScriptsPainlessExecute_Request extends Global.Params { +export type ScriptsPainlessExecute_Request = Global.Params & { body?: ScriptsPainlessExecute_RequestBody; } -export interface ScriptsPainlessExecute_RequestBody { +export type ScriptsPainlessExecute_RequestBody = { context?: string; context_setup?: Core_ScriptsPainlessExecute.PainlessContextSetup; script?: Common.InlineScript; } -export interface ScriptsPainlessExecute_Response extends ApiResponse { +export type ScriptsPainlessExecute_Response = ApiResponse & { body: ScriptsPainlessExecute_ResponseBody; } -export interface ScriptsPainlessExecute_ResponseBody { +export type ScriptsPainlessExecute_ResponseBody = { result: Record; } diff --git a/api/_core/scroll.d.ts b/api/_core/scroll.d.ts index b5fb2cdf9..11d84d3cc 100644 --- a/api/_core/scroll.d.ts +++ b/api/_core/scroll.d.ts @@ -19,19 +19,19 @@ import * as Common from '../_types/_common' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Scroll_Request extends Global.Params { +export type Scroll_Request = Global.Params & { body?: Scroll_RequestBody; rest_total_hits_as_int?: boolean; scroll?: Common.Duration; scroll_id?: Common.ScrollId; } -export interface Scroll_RequestBody { +export type Scroll_RequestBody = { scroll?: Common.Duration; scroll_id: Common.ScrollId; } -export interface Scroll_Response extends ApiResponse { +export type Scroll_Response = ApiResponse & { body: Scroll_ResponseBody; } diff --git a/api/_core/search.d.ts b/api/_core/search.d.ts index de44dc581..bd37c1ccf 100644 --- a/api/_core/search.d.ts +++ b/api/_core/search.d.ts @@ -17,12 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Common_Aggregations from '../_types/_common.aggregations' -import * as Common_Mapping from '../_types/_common.mapping' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface Search_Request extends Global.Params { +export type Search_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -52,7 +51,7 @@ export interface Search_Request extends Global.Params { q?: string; request_cache?: boolean; rest_total_hits_as_int?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; scroll?: Common.Duration; search_pipeline?: string; search_type?: Common.SearchType; @@ -73,7 +72,7 @@ export interface Search_Request extends Global.Params { version?: boolean; } -export interface Search_RequestBody { +export type Search_RequestBody = { _source?: Core_Search.SourceConfig; aggregations?: Record; collapse?: Core_Search.FieldCollapse; @@ -91,7 +90,6 @@ export interface Search_RequestBody { query?: Common_QueryDsl.QueryContainer; rank?: Common.RankContainer; rescore?: Core_Search.Rescore | Core_Search.Rescore[]; - runtime_mappings?: Common_Mapping.RuntimeFields; script_fields?: Record; search_after?: Common.SortResults; seq_no_primary_term?: boolean; @@ -108,7 +106,7 @@ export interface Search_RequestBody { version?: boolean; } -export interface Search_Response extends ApiResponse { +export type Search_Response = ApiResponse & { body: Search_ResponseBody; } diff --git a/api/_core/searchShards.d.ts b/api/_core/searchShards.d.ts index ee46a3630..7e55b505f 100644 --- a/api/_core/searchShards.d.ts +++ b/api/_core/searchShards.d.ts @@ -19,21 +19,21 @@ import * as Common from '../_types/_common' import * as Core_SearchShards from '../_types/_core.search_shards' import * as Global from '../_types/_global' -export interface SearchShards_Request extends Global.Params { +export type SearchShards_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; index?: Common.Indices; local?: boolean; preference?: string; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; } -export interface SearchShards_Response extends ApiResponse { +export type SearchShards_Response = ApiResponse & { body: SearchShards_ResponseBody; } -export interface SearchShards_ResponseBody { +export type SearchShards_ResponseBody = { indices: Record; nodes: Record; shards: Common.NodeShard[][]; diff --git a/api/_core/searchTemplate.d.ts b/api/_core/searchTemplate.d.ts index ba4f15643..e35f2bab8 100644 --- a/api/_core/searchTemplate.d.ts +++ b/api/_core/searchTemplate.d.ts @@ -20,7 +20,7 @@ import * as Common_Aggregations from '../_types/_common.aggregations' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -export interface SearchTemplate_Request extends Global.Params { +export type SearchTemplate_Request = Global.Params & { allow_no_indices?: boolean; body: SearchTemplate_RequestBody; ccs_minimize_roundtrips?: boolean; @@ -32,13 +32,13 @@ export interface SearchTemplate_Request extends Global.Params { preference?: string; profile?: boolean; rest_total_hits_as_int?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; scroll?: Common.Duration; search_type?: Common.SearchType; typed_keys?: boolean; } -export interface SearchTemplate_RequestBody { +export type SearchTemplate_RequestBody = { explain?: boolean; id?: Common.Id; params?: Record>; @@ -46,11 +46,11 @@ export interface SearchTemplate_RequestBody { source?: string; } -export interface SearchTemplate_Response extends ApiResponse { +export type SearchTemplate_Response = ApiResponse & { body: SearchTemplate_ResponseBody; } -export interface SearchTemplate_ResponseBody { +export type SearchTemplate_ResponseBody = { _clusters?: Common.ClusterStatistics; _scroll_id?: Common.ScrollId; _shards: Common.ShardStatistics; diff --git a/api/_core/termvectors.d.ts b/api/_core/termvectors.d.ts index b3b3ef07b..92210e28b 100644 --- a/api/_core/termvectors.d.ts +++ b/api/_core/termvectors.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Core_Termvectors from '../_types/_core.termvectors' import * as Global from '../_types/_global' -export interface Termvectors_Request extends Global.Params { +export type Termvectors_Request = Global.Params & { body?: Termvectors_RequestBody; field_statistics?: boolean; fields?: Common.Fields; @@ -30,23 +30,23 @@ export interface Termvectors_Request extends Global.Params { positions?: boolean; preference?: string; realtime?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; term_statistics?: boolean; version?: Common.VersionNumber; version_type?: Common.VersionType; } -export interface Termvectors_RequestBody { +export type Termvectors_RequestBody = { doc?: Record; filter?: Core_Termvectors.Filter; per_field_analyzer?: Record; } -export interface Termvectors_Response extends ApiResponse { +export type Termvectors_Response = ApiResponse & { body: Termvectors_ResponseBody; } -export interface Termvectors_ResponseBody { +export type Termvectors_ResponseBody = { _id: Common.Id; _index: Common.IndexName; _version: Common.VersionNumber; diff --git a/api/_core/update.d.ts b/api/_core/update.d.ts index 58529f821..75a4517ac 100644 --- a/api/_core/update.d.ts +++ b/api/_core/update.d.ts @@ -20,7 +20,7 @@ import * as Core_Search from '../_types/_core.search' import * as Core_Update from '../_types/_core.update' import * as Global from '../_types/_global' -export interface Update_Request extends Global.Params { +export type Update_Request = Global.Params & { _source?: Core_Search.SourceConfigParam; _source_excludes?: Common.Fields; _source_includes?: Common.Fields; @@ -33,12 +33,12 @@ export interface Update_Request extends Global.Params { refresh?: Common.Refresh; require_alias?: boolean; retry_on_conflict?: number; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; timeout?: Common.Duration; wait_for_active_shards?: Common.WaitForActiveShards; } -export interface Update_RequestBody { +export type Update_RequestBody = { _source?: Core_Search.SourceConfig; detect_noop?: boolean; doc?: Record; @@ -48,7 +48,7 @@ export interface Update_RequestBody { upsert?: Record; } -export interface Update_Response extends ApiResponse { +export type Update_Response = ApiResponse & { body: Update_ResponseBody; } diff --git a/api/_core/updateByQuery.d.ts b/api/_core/updateByQuery.d.ts index 9636a87e2..63e1738bb 100644 --- a/api/_core/updateByQuery.d.ts +++ b/api/_core/updateByQuery.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' -export interface UpdateByQuery_Request extends Global.Params { +export type UpdateByQuery_Request = Global.Params & { _source?: string[]; _source_excludes?: string[]; _source_includes?: string[]; @@ -42,7 +42,7 @@ export interface UpdateByQuery_Request extends Global.Params { refresh?: boolean; request_cache?: boolean; requests_per_second?: number; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; scroll?: Common.Duration; scroll_size?: number; search_timeout?: Common.Duration; @@ -58,7 +58,7 @@ export interface UpdateByQuery_Request extends Global.Params { wait_for_completion?: boolean; } -export interface UpdateByQuery_RequestBody { +export type UpdateByQuery_RequestBody = { conflicts?: Common.Conflicts; max_docs?: number; query?: Common_QueryDsl.QueryContainer; @@ -66,7 +66,7 @@ export interface UpdateByQuery_RequestBody { slice?: Common.SlicedScroll; } -export interface UpdateByQuery_Response extends ApiResponse { +export type UpdateByQuery_Response = ApiResponse & { body: UpdateByQuery_ResponseBody; } diff --git a/api/_core/updateByQueryRethrottle.d.ts b/api/_core/updateByQueryRethrottle.d.ts index b6021c188..4777c602d 100644 --- a/api/_core/updateByQueryRethrottle.d.ts +++ b/api/_core/updateByQueryRethrottle.d.ts @@ -19,16 +19,16 @@ import * as Common from '../_types/_common' import * as Core_UpdateByQueryRethrottle from '../_types/_core.update_by_query_rethrottle' import * as Global from '../_types/_global' -export interface UpdateByQueryRethrottle_Request extends Global.Params { +export type UpdateByQueryRethrottle_Request = Global.Params & { requests_per_second?: number; task_id: Common.Id; } -export interface UpdateByQueryRethrottle_Response extends ApiResponse { +export type UpdateByQueryRethrottle_Response = ApiResponse & { body: UpdateByQueryRethrottle_ResponseBody; } -export interface UpdateByQueryRethrottle_ResponseBody { +export type UpdateByQueryRethrottle_ResponseBody = { nodes: Record; } diff --git a/api/_types/_common.aggregations.d.ts b/api/_types/_common.aggregations.d.ts index 2242f3366..1b3e05a37 100644 --- a/api/_types/_common.aggregations.d.ts +++ b/api/_types/_common.aggregations.d.ts @@ -20,28 +20,28 @@ import * as Core_Search from './_core.search' export type AdjacencyMatrixAggregate = MultiBucketAggregateBaseAdjacencyMatrixBucket & Record -export interface AdjacencyMatrixAggregation extends BucketAggregationBase { +export type AdjacencyMatrixAggregation = BucketAggregationBase & { filters?: Record; } -export interface AdjacencyMatrixBucket extends MultiBucketBase { +export type AdjacencyMatrixBucket = MultiBucketBase & { key: string; } export type Aggregate = CardinalityAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | PercentilesBucketAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MaxAggregate | SumAggregate | AvgAggregate | WeightedAvgAggregate | ValueCountAggregate | SimpleValueAggregate | DerivativeAggregate | BucketMetricValueAggregate | StatsAggregate | StatsBucketAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | GeoBoundsAggregate | GeoCentroidAggregate | HistogramAggregate | DateHistogramAggregate | AutoDateHistogramAggregate | VariableWidthHistogramAggregate | StringTermsAggregate | LongTermsAggregate | DoubleTermsAggregate | UnmappedTermsAggregate | LongRareTermsAggregate | StringRareTermsAggregate | UnmappedRareTermsAggregate | MultiTermsAggregate | MissingAggregate | NestedAggregate | ReverseNestedAggregate | GlobalAggregate | FilterAggregate | ChildrenAggregate | ParentAggregate | SamplerAggregate | UnmappedSamplerAggregate | GeoHashGridAggregate | GeoTileGridAggregate | GeoHexGridAggregate | RangeAggregate | DateRangeAggregate | GeoDistanceAggregate | IpRangeAggregate | IpPrefixAggregate | FiltersAggregate | AdjacencyMatrixAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | UnmappedSignificantTermsAggregate | CompositeAggregate | FrequentItemSetsAggregate | ScriptedMetricAggregate | TopHitsAggregate | InferenceAggregate | StringStatsAggregate | BoxPlotAggregate | TopMetricsAggregate | TTestAggregate | RateAggregate | CumulativeCardinalityAggregate | MatrixStatsAggregate | GeoLineAggregate -export interface AggregateBase { +export type AggregateBase = { meta?: Common.Metadata; } export type AggregateOrder = Record | Record[] -export interface Aggregation { +export type Aggregation = { meta?: Common.Metadata; name?: string; } -export interface AggregationContainer { +export type AggregationContainer = { adjacency_matrix?: AdjacencyMatrixAggregation; aggregations?: Record; auto_date_histogram?: AutoDateHistogramAggregation; @@ -122,23 +122,23 @@ export interface AggregationContainer { weighted_avg?: WeightedAverageAggregation; } -export interface AggregationRange { +export type AggregationRange = { from?: undefined | number | string; key?: string; to?: undefined | number | string; } -export interface ArrayPercentilesItem { +export type ArrayPercentilesItem = { key: string; value: undefined | number | string; value_as_string?: string; } -export interface AutoDateHistogramAggregate extends MultiBucketAggregateBaseDateHistogramBucket { +export type AutoDateHistogramAggregate = MultiBucketAggregateBaseDateHistogramBucket & { interval: Common.DurationLarge; } -export interface AutoDateHistogramAggregation extends BucketAggregationBase { +export type AutoDateHistogramAggregation = BucketAggregationBase & { buckets?: number; field?: Common.Field; format?: string; @@ -156,7 +156,7 @@ export type AverageBucketAggregation = PipelineAggregationBase & Record -export interface BoxPlotAggregate extends AggregateBase { +export type BoxPlotAggregate = AggregateBase & { lower: number; lower_as_string?: string; max: number; @@ -173,41 +173,41 @@ export interface BoxPlotAggregate extends AggregateBase { upper_as_string?: string; } -export interface BoxplotAggregation extends MetricAggregationBase { +export type BoxplotAggregation = MetricAggregationBase & { compression?: number; } export type BucketAggregationBase = Aggregation & Record -export interface BucketCorrelationAggregation extends BucketPathAggregation { +export type BucketCorrelationAggregation = BucketPathAggregation & { function: BucketCorrelationFunction; } -export interface BucketCorrelationFunction { +export type BucketCorrelationFunction = { count_correlation: BucketCorrelationFunctionCountCorrelation; } -export interface BucketCorrelationFunctionCountCorrelation { +export type BucketCorrelationFunctionCountCorrelation = { indicator: BucketCorrelationFunctionCountCorrelationIndicator; } -export interface BucketCorrelationFunctionCountCorrelationIndicator { +export type BucketCorrelationFunctionCountCorrelationIndicator = { doc_count: number; expectations: number[]; fractions?: number[]; } -export interface BucketKsAggregation extends BucketPathAggregation { +export type BucketKsAggregation = BucketPathAggregation & { alternative?: string[]; fractions?: number[]; sampling_method?: string; } -export interface BucketMetricValueAggregate extends SingleMetricAggregateBase { +export type BucketMetricValueAggregate = SingleMetricAggregateBase & { keys: string[]; } -export interface BucketPathAggregation extends Aggregation { +export type BucketPathAggregation = Aggregation & { buckets_path?: BucketsPath; } @@ -215,7 +215,7 @@ export type BucketsAdjacencyMatrixBucket = Record export type BucketsCompositeBucket = Record | CompositeBucket[] -export interface BucketScriptAggregation extends PipelineAggregationBase { +export type BucketScriptAggregation = PipelineAggregationBase & { script?: Common.Script; } @@ -223,7 +223,7 @@ export type BucketsDateHistogramBucket = Record | D export type BucketsDoubleTermsBucket = Record | DoubleTermsBucket[] -export interface BucketSelectorAggregation extends PipelineAggregationBase { +export type BucketSelectorAggregation = PipelineAggregationBase & { script?: Common.Script; } @@ -249,7 +249,7 @@ export type BucketsLongTermsBucket = Record | LongTerms export type BucketsMultiTermsBucket = Record | MultiTermsBucket[] -export interface BucketSortAggregation extends Aggregation { +export type BucketSortAggregation = Aggregation & { from?: number; gap_policy?: GapPolicy; size?: number; @@ -276,11 +276,11 @@ export type BucketsVoid = Record | Common.Void[] export type CalendarInterval = 'day' | 'hour' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year' -export interface CardinalityAggregate extends AggregateBase { +export type CardinalityAggregate = AggregateBase & { value: number; } -export interface CardinalityAggregation extends MetricAggregationBase { +export type CardinalityAggregation = MetricAggregationBase & { execution_hint?: CardinalityExecutionMode; precision_threshold?: number; rehash?: boolean; @@ -288,7 +288,7 @@ export interface CardinalityAggregation extends MetricAggregationBase { export type CardinalityExecutionMode = 'direct' | 'global_ordinals' | 'save_memory_heuristic' | 'save_time_heuristic' | 'segment_ordinals' -export interface CategorizeTextAggregation extends Aggregation { +export type CategorizeTextAggregation = Aggregation & { categorization_analyzer?: CategorizeTextAnalyzer; categorization_filters?: string[]; field: Common.Field; @@ -305,16 +305,16 @@ export type CategorizeTextAnalyzer = string | CustomCategorizeTextAnalyzer export type ChildrenAggregate = SingleBucketAggregateBase & Record -export interface ChildrenAggregation extends BucketAggregationBase { +export type ChildrenAggregation = BucketAggregationBase & { type?: Common.RelationName; } -export interface ChiSquareHeuristic { +export type ChiSquareHeuristic = { background_is_superset: boolean; include_negatives: boolean; } -export interface ClassificationInferenceOptions { +export type ClassificationInferenceOptions = { num_top_classes?: number; num_top_feature_importance_values?: number; prediction_field_type?: string; @@ -322,19 +322,19 @@ export interface ClassificationInferenceOptions { top_classes_results_field?: string; } -export interface CompositeAggregate extends MultiBucketAggregateBaseCompositeBucket { +export type CompositeAggregate = MultiBucketAggregateBaseCompositeBucket & { after_key?: CompositeAggregateKey; } export type CompositeAggregateKey = Record -export interface CompositeAggregation extends BucketAggregationBase { +export type CompositeAggregation = BucketAggregationBase & { after?: CompositeAggregateKey; size?: number; sources?: Record[]; } -export interface CompositeAggregationBase { +export type CompositeAggregationBase = { field?: Common.Field; missing_bucket?: boolean; missing_order?: MissingOrder; @@ -343,18 +343,18 @@ export interface CompositeAggregationBase { value_type?: ValueType; } -export interface CompositeAggregationSource { +export type CompositeAggregationSource = { date_histogram?: CompositeDateHistogramAggregation; geotile_grid?: CompositeGeoTileGridAggregation; histogram?: CompositeHistogramAggregation; terms?: CompositeTermsAggregation; } -export interface CompositeBucket extends MultiBucketBase { +export type CompositeBucket = MultiBucketBase & { key: CompositeAggregateKey; } -export interface CompositeDateHistogramAggregation extends CompositeAggregationBase { +export type CompositeDateHistogramAggregation = CompositeAggregationBase & { calendar_interval?: Common.DurationLarge; fixed_interval?: Common.DurationLarge; format?: string; @@ -362,18 +362,18 @@ export interface CompositeDateHistogramAggregation extends CompositeAggregationB time_zone?: Common.TimeZone; } -export interface CompositeGeoTileGridAggregation extends CompositeAggregationBase { +export type CompositeGeoTileGridAggregation = CompositeAggregationBase & { bounds?: Common.GeoBounds; precision?: number; } -export interface CompositeHistogramAggregation extends CompositeAggregationBase { +export type CompositeHistogramAggregation = CompositeAggregationBase & { interval: number; } export type CompositeTermsAggregation = CompositeAggregationBase & Record -export interface CumulativeCardinalityAggregate extends AggregateBase { +export type CumulativeCardinalityAggregate = AggregateBase & { value: number; value_as_string?: string; } @@ -382,7 +382,7 @@ export type CumulativeCardinalityAggregation = PipelineAggregationBase & Record< export type CumulativeSumAggregation = PipelineAggregationBase & Record -export interface CustomCategorizeTextAnalyzer { +export type CustomCategorizeTextAnalyzer = { char_filter?: string[]; filter?: string[]; tokenizer?: string; @@ -390,7 +390,7 @@ export interface CustomCategorizeTextAnalyzer { export type DateHistogramAggregate = MultiBucketAggregateBaseDateHistogramBucket & Record -export interface DateHistogramAggregation extends BucketAggregationBase { +export type DateHistogramAggregation = BucketAggregationBase & { calendar_interval?: CalendarInterval; extended_bounds?: ExtendedBoundsFieldDateMath; field?: Common.Field; @@ -408,14 +408,14 @@ export interface DateHistogramAggregation extends BucketAggregationBase { time_zone?: Common.TimeZone; } -export interface DateHistogramBucket extends MultiBucketBase { +export type DateHistogramBucket = MultiBucketBase & { key: Common.EpochTimeUnitMillis; key_as_string?: string; } export type DateRangeAggregate = RangeAggregate & Record -export interface DateRangeAggregation extends BucketAggregationBase { +export type DateRangeAggregation = BucketAggregationBase & { field?: Common.Field; format?: string; keyed?: boolean; @@ -424,20 +424,20 @@ export interface DateRangeAggregation extends BucketAggregationBase { time_zone?: Common.TimeZone; } -export interface DateRangeExpression { +export type DateRangeExpression = { from?: FieldDateMath; key?: string; to?: FieldDateMath; } -export interface DerivativeAggregate extends SingleMetricAggregateBase { +export type DerivativeAggregate = SingleMetricAggregateBase & { normalized_value?: number; normalized_value_as_string?: string; } export type DerivativeAggregation = PipelineAggregationBase & Record -export interface DiversifiedSamplerAggregation extends BucketAggregationBase { +export type DiversifiedSamplerAggregation = BucketAggregationBase & { execution_hint?: SamplerAggregationExecutionHint; field?: Common.Field; max_docs_per_value?: number; @@ -447,31 +447,31 @@ export interface DiversifiedSamplerAggregation extends BucketAggregationBase { export type DoubleTermsAggregate = TermsAggregateBaseDoubleTermsBucket & Record -export interface DoubleTermsBucket extends TermsBucketBase { +export type DoubleTermsBucket = TermsBucketBase & { key: number; key_as_string?: string; } -export interface EwmaModelSettings { +export type EwmaModelSettings = { alpha?: number; } -export interface EwmaMovingAverageAggregation extends MovingAverageAggregationBase { +export type EwmaMovingAverageAggregation = MovingAverageAggregationBase & { model: 'ewma'; settings: EwmaModelSettings; } -export interface ExtendedBoundsdouble { +export type ExtendedBoundsdouble = { max: number; min: number; } -export interface ExtendedBoundsFieldDateMath { +export type ExtendedBoundsFieldDateMath = { max: FieldDateMath; min: FieldDateMath; } -export interface ExtendedStatsAggregate extends StatsAggregate { +export type ExtendedStatsAggregate = StatsAggregate & { std_deviation: undefined | number | string; std_deviation_as_string?: string; std_deviation_bounds?: StandardDeviationBounds; @@ -488,13 +488,13 @@ export interface ExtendedStatsAggregate extends StatsAggregate { variance_sampling_as_string?: string; } -export interface ExtendedStatsAggregation extends FormatMetricAggregationBase { +export type ExtendedStatsAggregation = FormatMetricAggregationBase & { sigma?: number; } export type ExtendedStatsBucketAggregate = ExtendedStatsAggregate & Record -export interface ExtendedStatsBucketAggregation extends PipelineAggregationBase { +export type ExtendedStatsBucketAggregation = PipelineAggregationBase & { sigma?: number; } @@ -504,7 +504,7 @@ export type FilterAggregate = SingleBucketAggregateBase & Record export type FiltersAggregate = MultiBucketAggregateBaseFiltersBucket & Record -export interface FiltersAggregation extends BucketAggregationBase { +export type FiltersAggregation = BucketAggregationBase & { filters?: BucketsQueryContainer; keyed?: boolean; other_bucket?: boolean; @@ -513,17 +513,17 @@ export interface FiltersAggregation extends BucketAggregationBase { export type FiltersBucket = MultiBucketBase & Record -export interface FormatMetricAggregationBase extends MetricAggregationBase { +export type FormatMetricAggregationBase = MetricAggregationBase & { format?: string; } -export interface FormattableMetricAggregation extends MetricAggregationBase { +export type FormattableMetricAggregation = MetricAggregationBase & { format?: string; } export type FrequentItemSetsAggregate = MultiBucketAggregateBaseFrequentItemSetsBucket & Record -export interface FrequentItemSetsAggregation { +export type FrequentItemSetsAggregation = { fields: FrequentItemSetsField[]; filter?: Common_QueryDsl.QueryContainer; minimum_set_size?: number; @@ -531,12 +531,12 @@ export interface FrequentItemSetsAggregation { size?: number; } -export interface FrequentItemSetsBucket extends MultiBucketBase { +export type FrequentItemSetsBucket = MultiBucketBase & { key: Record; support: number; } -export interface FrequentItemSetsField { +export type FrequentItemSetsField = { exclude?: TermsExclude; field: Common.Field; include?: TermsInclude; @@ -544,27 +544,27 @@ export interface FrequentItemSetsField { export type GapPolicy = 'insert_zeros' | 'keep_values' | 'skip' -export interface GeoBoundsAggregate extends AggregateBase { +export type GeoBoundsAggregate = AggregateBase & { bounds?: Common.GeoBounds; } -export interface GeoBoundsAggregation extends MetricAggregationBase { +export type GeoBoundsAggregation = MetricAggregationBase & { wrap_longitude?: boolean; } -export interface GeoCentroidAggregate extends AggregateBase { +export type GeoCentroidAggregate = AggregateBase & { count: number; location?: Common.GeoLocation; } -export interface GeoCentroidAggregation extends MetricAggregationBase { +export type GeoCentroidAggregation = MetricAggregationBase & { count?: number; location?: Common.GeoLocation; } export type GeoDistanceAggregate = RangeAggregate & Record -export interface GeoDistanceAggregation extends BucketAggregationBase { +export type GeoDistanceAggregation = BucketAggregationBase & { distance_type?: Common.GeoDistanceType; field?: Common.Field; origin?: Common.GeoLocation; @@ -574,7 +574,7 @@ export interface GeoDistanceAggregation extends BucketAggregationBase { export type GeoHashGridAggregate = MultiBucketAggregateBaseGeoHashGridBucket & Record -export interface GeoHashGridAggregation extends BucketAggregationBase { +export type GeoHashGridAggregation = BucketAggregationBase & { bounds?: Common.GeoBounds; field?: Common.Field; precision?: Common.GeoHashPrecision; @@ -582,13 +582,13 @@ export interface GeoHashGridAggregation extends BucketAggregationBase { size?: number; } -export interface GeoHashGridBucket extends MultiBucketBase { +export type GeoHashGridBucket = MultiBucketBase & { key: Common.GeoHash; } export type GeoHexGridAggregate = MultiBucketAggregateBaseGeoHexGridBucket & Record -export interface GeohexGridAggregation extends BucketAggregationBase { +export type GeohexGridAggregation = BucketAggregationBase & { bounds?: Common.GeoBounds; field: Common.Field; precision?: number; @@ -596,17 +596,17 @@ export interface GeohexGridAggregation extends BucketAggregationBase { size?: number; } -export interface GeoHexGridBucket extends MultiBucketBase { +export type GeoHexGridBucket = MultiBucketBase & { key: Common.GeoHexCell; } -export interface GeoLineAggregate extends AggregateBase { +export type GeoLineAggregate = AggregateBase & { geometry: Common.GeoLine; properties: Record; type: string; } -export interface GeoLineAggregation { +export type GeoLineAggregation = { include_sort?: boolean; point: GeoLinePoint; size?: number; @@ -614,17 +614,17 @@ export interface GeoLineAggregation { sort_order?: Common.SortOrder; } -export interface GeoLinePoint { +export type GeoLinePoint = { field: Common.Field; } -export interface GeoLineSort { +export type GeoLineSort = { field: Common.Field; } export type GeoTileGridAggregate = MultiBucketAggregateBaseGeoTileGridBucket & Record -export interface GeoTileGridAggregation extends BucketAggregationBase { +export type GeoTileGridAggregation = BucketAggregationBase & { bounds?: Common.GeoBounds; field?: Common.Field; precision?: Common.GeoTilePrecision; @@ -632,7 +632,7 @@ export interface GeoTileGridAggregation extends BucketAggregationBase { size?: number; } -export interface GeoTileGridBucket extends MultiBucketBase { +export type GeoTileGridBucket = MultiBucketBase & { key: Common.GeoTile; } @@ -640,11 +640,11 @@ export type GlobalAggregate = SingleBucketAggregateBase & Record export type GlobalAggregation = BucketAggregationBase & Record -export interface GoogleNormalizedDistanceHeuristic { +export type GoogleNormalizedDistanceHeuristic = { background_is_superset?: boolean; } -export interface HdrMethod { +export type HdrMethod = { number_of_significant_value_digits?: number; } @@ -654,7 +654,7 @@ export type HdrPercentilesAggregate = PercentilesAggregateBase & Record -export interface HistogramAggregation extends BucketAggregationBase { +export type HistogramAggregation = BucketAggregationBase & { extended_bounds?: ExtendedBoundsdouble; field?: Common.Field; format?: string; @@ -668,22 +668,22 @@ export interface HistogramAggregation extends BucketAggregationBase { script?: Common.Script; } -export interface HistogramBucket extends MultiBucketBase { +export type HistogramBucket = MultiBucketBase & { key: number; key_as_string?: string; } -export interface HoltLinearModelSettings { +export type HoltLinearModelSettings = { alpha?: number; beta?: number; } -export interface HoltMovingAverageAggregation extends MovingAverageAggregationBase { +export type HoltMovingAverageAggregation = MovingAverageAggregationBase & { model: 'holt'; settings: HoltLinearModelSettings; } -export interface HoltWintersModelSettings { +export type HoltWintersModelSettings = { alpha?: number; beta?: number; gamma?: number; @@ -692,42 +692,42 @@ export interface HoltWintersModelSettings { type?: HoltWintersType; } -export interface HoltWintersMovingAverageAggregation extends MovingAverageAggregationBase { +export type HoltWintersMovingAverageAggregation = MovingAverageAggregationBase & { model: 'holt_winters'; settings: HoltWintersModelSettings; } export type HoltWintersType = 'add' | 'mult' -export interface InferenceAggregate extends AggregateBase { +export type InferenceAggregate = AggregateBase & { feature_importance?: InferenceFeatureImportance[]; top_classes?: InferenceTopClassEntry[]; value?: Common.FieldValue; warning?: string; } -export interface InferenceAggregation extends PipelineAggregationBase { +export type InferenceAggregation = PipelineAggregationBase & { inference_config?: InferenceConfigContainer; model_id: Common.Name; } -export interface InferenceClassImportance { +export type InferenceClassImportance = { class_name: string; importance: number; } -export interface InferenceConfigContainer { +export type InferenceConfigContainer = { classification?: ClassificationInferenceOptions; regression?: RegressionInferenceOptions; } -export interface InferenceFeatureImportance { +export type InferenceFeatureImportance = { classes?: InferenceClassImportance[]; feature_name: string; importance?: number; } -export interface InferenceTopClassEntry { +export type InferenceTopClassEntry = { class_name: Common.FieldValue; class_probability: number; class_score: number; @@ -735,7 +735,7 @@ export interface InferenceTopClassEntry { export type IpPrefixAggregate = MultiBucketAggregateBaseIpPrefixBucket & Record -export interface IpPrefixAggregation extends BucketAggregationBase { +export type IpPrefixAggregation = BucketAggregationBase & { append_prefix_length?: boolean; field: Common.Field; is_ipv6?: boolean; @@ -744,7 +744,7 @@ export interface IpPrefixAggregation extends BucketAggregationBase { prefix_length: number; } -export interface IpPrefixBucket extends MultiBucketBase { +export type IpPrefixBucket = MultiBucketBase & { is_ipv6: boolean; key: string; netmask?: string; @@ -753,18 +753,18 @@ export interface IpPrefixBucket extends MultiBucketBase { export type IpRangeAggregate = MultiBucketAggregateBaseIpRangeBucket & Record -export interface IpRangeAggregation extends BucketAggregationBase { +export type IpRangeAggregation = BucketAggregationBase & { field?: Common.Field; ranges?: IpRangeAggregationRange[]; } -export interface IpRangeAggregationRange { +export type IpRangeAggregationRange = { from?: undefined | string; mask?: string; to?: undefined | string; } -export interface IpRangeBucket extends MultiBucketBase { +export type IpRangeBucket = MultiBucketBase & { from?: string; key?: string; to?: string; @@ -772,40 +772,40 @@ export interface IpRangeBucket extends MultiBucketBase { export type KeyedPercentiles = Record -export interface LinearMovingAverageAggregation extends MovingAverageAggregationBase { +export type LinearMovingAverageAggregation = MovingAverageAggregationBase & { model: 'linear'; settings: Common.EmptyObject; } export type LongRareTermsAggregate = MultiBucketAggregateBaseLongRareTermsBucket & Record -export interface LongRareTermsBucket extends MultiBucketBase { +export type LongRareTermsBucket = MultiBucketBase & { key: number; key_as_string?: string; } export type LongTermsAggregate = TermsAggregateBaseLongTermsBucket & Record -export interface LongTermsBucket extends TermsBucketBase { +export type LongTermsBucket = TermsBucketBase & { key: number; key_as_string?: string; } -export interface MatrixAggregation extends Aggregation { +export type MatrixAggregation = Aggregation & { fields?: Common.Fields; missing?: Record; } -export interface MatrixStatsAggregate extends AggregateBase { +export type MatrixStatsAggregate = AggregateBase & { doc_count: number; fields?: MatrixStatsFields[]; } -export interface MatrixStatsAggregation extends MatrixAggregation { +export type MatrixStatsAggregation = MatrixAggregation & { mode?: Common.SortMode; } -export interface MatrixStatsFields { +export type MatrixStatsFields = { correlation: Record; count: number; covariance: Record; @@ -824,11 +824,11 @@ export type MaxBucketAggregation = PipelineAggregationBase & Record export type MedianAbsoluteDeviationAggregate = SingleMetricAggregateBase & Record -export interface MedianAbsoluteDeviationAggregation extends FormatMetricAggregationBase { +export type MedianAbsoluteDeviationAggregation = FormatMetricAggregationBase & { compression?: number; } -export interface MetricAggregationBase { +export type MetricAggregationBase = { field?: Common.Field; missing?: Missing; script?: Common.Script; @@ -846,7 +846,7 @@ export type Missing = string | number | number | boolean export type MissingAggregate = SingleBucketAggregateBase & Record -export interface MissingAggregation extends BucketAggregationBase { +export type MissingAggregation = BucketAggregationBase & { field?: Common.Field; missing?: Missing; } @@ -855,124 +855,124 @@ export type MissingOrder = 'default' | 'first' | 'last' export type MovingAverageAggregation = LinearMovingAverageAggregation | SimpleMovingAverageAggregation | EwmaMovingAverageAggregation | HoltMovingAverageAggregation | HoltWintersMovingAverageAggregation -export interface MovingAverageAggregationBase extends PipelineAggregationBase { +export type MovingAverageAggregationBase = PipelineAggregationBase & { minimize?: boolean; predict?: number; window?: number; } -export interface MovingFunctionAggregation extends PipelineAggregationBase { +export type MovingFunctionAggregation = PipelineAggregationBase & { script?: string; shift?: number; window?: number; } -export interface MovingPercentilesAggregation extends PipelineAggregationBase { +export type MovingPercentilesAggregation = PipelineAggregationBase & { keyed?: boolean; shift?: number; window?: number; } -export interface MultiBucketAggregateBaseAdjacencyMatrixBucket extends AggregateBase { +export type MultiBucketAggregateBaseAdjacencyMatrixBucket = AggregateBase & { buckets: BucketsAdjacencyMatrixBucket; } -export interface MultiBucketAggregateBaseCompositeBucket extends AggregateBase { +export type MultiBucketAggregateBaseCompositeBucket = AggregateBase & { buckets: BucketsCompositeBucket; } -export interface MultiBucketAggregateBaseDateHistogramBucket extends AggregateBase { +export type MultiBucketAggregateBaseDateHistogramBucket = AggregateBase & { buckets: BucketsDateHistogramBucket; } -export interface MultiBucketAggregateBaseDoubleTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseDoubleTermsBucket = AggregateBase & { buckets: BucketsDoubleTermsBucket; } -export interface MultiBucketAggregateBaseFiltersBucket extends AggregateBase { +export type MultiBucketAggregateBaseFiltersBucket = AggregateBase & { buckets: BucketsFiltersBucket; } -export interface MultiBucketAggregateBaseFrequentItemSetsBucket extends AggregateBase { +export type MultiBucketAggregateBaseFrequentItemSetsBucket = AggregateBase & { buckets: BucketsFrequentItemSetsBucket; } -export interface MultiBucketAggregateBaseGeoHashGridBucket extends AggregateBase { +export type MultiBucketAggregateBaseGeoHashGridBucket = AggregateBase & { buckets: BucketsGeoHashGridBucket; } -export interface MultiBucketAggregateBaseGeoHexGridBucket extends AggregateBase { +export type MultiBucketAggregateBaseGeoHexGridBucket = AggregateBase & { buckets: BucketsGeoHexGridBucket; } -export interface MultiBucketAggregateBaseGeoTileGridBucket extends AggregateBase { +export type MultiBucketAggregateBaseGeoTileGridBucket = AggregateBase & { buckets: BucketsGeoTileGridBucket; } -export interface MultiBucketAggregateBaseHistogramBucket extends AggregateBase { +export type MultiBucketAggregateBaseHistogramBucket = AggregateBase & { buckets: BucketsHistogramBucket; } -export interface MultiBucketAggregateBaseIpPrefixBucket extends AggregateBase { +export type MultiBucketAggregateBaseIpPrefixBucket = AggregateBase & { buckets: BucketsIpPrefixBucket; } -export interface MultiBucketAggregateBaseIpRangeBucket extends AggregateBase { +export type MultiBucketAggregateBaseIpRangeBucket = AggregateBase & { buckets: BucketsIpRangeBucket; } -export interface MultiBucketAggregateBaseLongRareTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseLongRareTermsBucket = AggregateBase & { buckets: BucketsLongRareTermsBucket; } -export interface MultiBucketAggregateBaseLongTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseLongTermsBucket = AggregateBase & { buckets: BucketsLongTermsBucket; } -export interface MultiBucketAggregateBaseMultiTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseMultiTermsBucket = AggregateBase & { buckets: BucketsMultiTermsBucket; } -export interface MultiBucketAggregateBaseRangeBucket extends AggregateBase { +export type MultiBucketAggregateBaseRangeBucket = AggregateBase & { buckets: BucketsRangeBucket; } -export interface MultiBucketAggregateBaseSignificantLongTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseSignificantLongTermsBucket = AggregateBase & { buckets: BucketsSignificantLongTermsBucket; } -export interface MultiBucketAggregateBaseSignificantStringTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseSignificantStringTermsBucket = AggregateBase & { buckets: BucketsSignificantStringTermsBucket; } -export interface MultiBucketAggregateBaseStringRareTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseStringRareTermsBucket = AggregateBase & { buckets: BucketsStringRareTermsBucket; } -export interface MultiBucketAggregateBaseStringTermsBucket extends AggregateBase { +export type MultiBucketAggregateBaseStringTermsBucket = AggregateBase & { buckets: BucketsStringTermsBucket; } -export interface MultiBucketAggregateBaseVariableWidthHistogramBucket extends AggregateBase { +export type MultiBucketAggregateBaseVariableWidthHistogramBucket = AggregateBase & { buckets: BucketsVariableWidthHistogramBucket; } -export interface MultiBucketAggregateBaseVoid extends AggregateBase { +export type MultiBucketAggregateBaseVoid = AggregateBase & { buckets: BucketsVoid; } -export interface MultiBucketBase { +export type MultiBucketBase = { doc_count: number; } -export interface MultiTermLookup { +export type MultiTermLookup = { field: Common.Field; missing?: Missing; } export type MultiTermsAggregate = TermsAggregateBaseMultiTermsBucket & Record -export interface MultiTermsAggregation extends BucketAggregationBase { +export type MultiTermsAggregation = BucketAggregationBase & { collect_mode?: TermsAggregationCollectMode; min_doc_count?: number; order?: AggregateOrder; @@ -983,24 +983,26 @@ export interface MultiTermsAggregation extends BucketAggregationBase { terms: MultiTermLookup[]; } -export interface MultiTermsBucket extends MultiBucketBase { +export type MultiTermsBucket = MultiBucketBase & { doc_count_error_upper_bound?: number; key: Common.FieldValue[]; key_as_string?: string; } -export interface MutualInformationHeuristic { +export type MutualInformationHeuristic = { background_is_superset?: boolean; include_negatives?: boolean; } -export type NestedAggregate = SingleBucketAggregateBase & Record +export type NestedAggregate = AggregateBase & { + doc_count?: number; +} -export interface NestedAggregation extends BucketAggregationBase { +export type NestedAggregation = BucketAggregationBase & { path?: Common.Field; } -export interface NormalizeAggregation extends PipelineAggregationBase { +export type NormalizeAggregation = PipelineAggregationBase & { method?: NormalizeMethod; } @@ -1008,13 +1010,13 @@ export type NormalizeMethod = 'mean' | 'percent_of_sum' | 'rescale_0_1' | 'resca export type ParentAggregate = SingleBucketAggregateBase & Record -export interface ParentAggregation extends BucketAggregationBase { +export type ParentAggregation = BucketAggregationBase & { type?: Common.RelationName; } export type PercentageScoreHeuristic = Record -export interface PercentileRanksAggregation extends FormatMetricAggregationBase { +export type PercentileRanksAggregation = FormatMetricAggregationBase & { hdr?: HdrMethod; keyed?: boolean; tdigest?: TDigest; @@ -1023,11 +1025,11 @@ export interface PercentileRanksAggregation extends FormatMetricAggregationBase export type Percentiles = KeyedPercentiles | ArrayPercentilesItem[] -export interface PercentilesAggregateBase extends AggregateBase { +export type PercentilesAggregateBase = AggregateBase & { values: Percentiles; } -export interface PercentilesAggregation extends FormatMetricAggregationBase { +export type PercentilesAggregation = FormatMetricAggregationBase & { hdr?: HdrMethod; keyed?: boolean; percents?: number[]; @@ -1036,18 +1038,18 @@ export interface PercentilesAggregation extends FormatMetricAggregationBase { export type PercentilesBucketAggregate = PercentilesAggregateBase & Record -export interface PercentilesBucketAggregation extends PipelineAggregationBase { +export type PercentilesBucketAggregation = PipelineAggregationBase & { percents?: number[]; } -export interface PipelineAggregationBase extends BucketPathAggregation { +export type PipelineAggregationBase = BucketPathAggregation & { format?: string; gap_policy?: GapPolicy; } export type RangeAggregate = MultiBucketAggregateBaseRangeBucket & Record -export interface RangeAggregation extends BucketAggregationBase { +export type RangeAggregation = BucketAggregationBase & { field?: Common.Field; format?: string; keyed?: boolean; @@ -1056,7 +1058,7 @@ export interface RangeAggregation extends BucketAggregationBase { script?: Common.Script; } -export interface RangeBucket extends MultiBucketBase { +export type RangeBucket = MultiBucketBase & { from?: number; from_as_string?: string; key?: string; @@ -1064,7 +1066,7 @@ export interface RangeBucket extends MultiBucketBase { to_as_string?: string; } -export interface RareTermsAggregation extends BucketAggregationBase { +export type RareTermsAggregation = BucketAggregationBase & { exclude?: TermsExclude; field?: Common.Field; include?: TermsInclude; @@ -1074,46 +1076,46 @@ export interface RareTermsAggregation extends BucketAggregationBase { value_type?: string; } -export interface RateAggregate extends AggregateBase { +export type RateAggregate = AggregateBase & { value: number; value_as_string?: string; } -export interface RateAggregation extends FormatMetricAggregationBase { +export type RateAggregation = FormatMetricAggregationBase & { mode?: RateMode; unit?: CalendarInterval; } export type RateMode = 'sum' | 'value_count' -export interface RegressionInferenceOptions { +export type RegressionInferenceOptions = { num_top_feature_importance_values?: number; results_field?: Common.Field; } export type ReverseNestedAggregate = SingleBucketAggregateBase & Record -export interface ReverseNestedAggregation extends BucketAggregationBase { +export type ReverseNestedAggregation = BucketAggregationBase & { path?: Common.Field; } export type SamplerAggregate = SingleBucketAggregateBase & Record -export interface SamplerAggregation extends BucketAggregationBase { +export type SamplerAggregation = BucketAggregationBase & { shard_size?: number; } export type SamplerAggregationExecutionHint = 'bytes_hash' | 'global_ordinals' | 'map' -export interface ScriptedHeuristic { +export type ScriptedHeuristic = { script: Common.Script; } -export interface ScriptedMetricAggregate extends AggregateBase { +export type ScriptedMetricAggregate = AggregateBase & { value: Record; } -export interface ScriptedMetricAggregation extends MetricAggregationBase { +export type ScriptedMetricAggregation = MetricAggregationBase & { combine_script?: Common.Script; init_script?: Common.Script; map_script?: Common.Script; @@ -1121,39 +1123,39 @@ export interface ScriptedMetricAggregation extends MetricAggregationBase { reduce_script?: Common.Script; } -export interface SerialDifferencingAggregation extends PipelineAggregationBase { +export type SerialDifferencingAggregation = PipelineAggregationBase & { lag?: number; } export type SignificantLongTermsAggregate = SignificantTermsAggregateBaseSignificantLongTermsBucket & Record -export interface SignificantLongTermsBucket extends SignificantTermsBucketBase { +export type SignificantLongTermsBucket = SignificantTermsBucketBase & { key: number; key_as_string?: string; } export type SignificantStringTermsAggregate = SignificantTermsAggregateBaseSignificantStringTermsBucket & Record -export interface SignificantStringTermsBucket extends SignificantTermsBucketBase { +export type SignificantStringTermsBucket = SignificantTermsBucketBase & { key: string; } -export interface SignificantTermsAggregateBaseSignificantLongTermsBucket extends MultiBucketAggregateBaseSignificantLongTermsBucket { +export type SignificantTermsAggregateBaseSignificantLongTermsBucket = MultiBucketAggregateBaseSignificantLongTermsBucket & { bg_count?: number; doc_count?: number; } -export interface SignificantTermsAggregateBaseSignificantStringTermsBucket extends MultiBucketAggregateBaseSignificantStringTermsBucket { +export type SignificantTermsAggregateBaseSignificantStringTermsBucket = MultiBucketAggregateBaseSignificantStringTermsBucket & { bg_count?: number; doc_count?: number; } -export interface SignificantTermsAggregateBaseVoid extends MultiBucketAggregateBaseVoid { +export type SignificantTermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & { bg_count?: number; doc_count?: number; } -export interface SignificantTermsAggregation extends BucketAggregationBase { +export type SignificantTermsAggregation = BucketAggregationBase & { background_filter?: Common_QueryDsl.QueryContainer; chi_square?: ChiSquareHeuristic; exclude?: TermsExclude; @@ -1171,12 +1173,12 @@ export interface SignificantTermsAggregation extends BucketAggregationBase { size?: number; } -export interface SignificantTermsBucketBase extends MultiBucketBase { +export type SignificantTermsBucketBase = MultiBucketBase & { bg_count: number; score: number; } -export interface SignificantTextAggregation extends BucketAggregationBase { +export type SignificantTextAggregation = BucketAggregationBase & { background_filter?: Common_QueryDsl.QueryContainer; chi_square?: ChiSquareHeuristic; exclude?: TermsExclude; @@ -1196,23 +1198,23 @@ export interface SignificantTextAggregation extends BucketAggregationBase { source_fields?: Common.Fields; } -export interface SimpleMovingAverageAggregation extends MovingAverageAggregationBase { +export type SimpleMovingAverageAggregation = MovingAverageAggregationBase & { model: 'simple'; settings: Common.EmptyObject; } export type SimpleValueAggregate = SingleMetricAggregateBase & Record -export interface SingleBucketAggregateBase extends AggregateBase { +export type SingleBucketAggregateBase = AggregateBase & { doc_count: number; } -export interface SingleMetricAggregateBase extends AggregateBase { +export type SingleMetricAggregateBase = AggregateBase & { value: undefined | number | string; value_as_string?: string; } -export interface StandardDeviationBounds { +export type StandardDeviationBounds = { lower: undefined | number | string; lower_population: undefined | number | string; lower_sampling: undefined | number | string; @@ -1221,7 +1223,7 @@ export interface StandardDeviationBounds { upper_sampling: undefined | number | string; } -export interface StandardDeviationBoundsAsString { +export type StandardDeviationBoundsAsString = { lower: string; lower_population: string; lower_sampling: string; @@ -1230,7 +1232,7 @@ export interface StandardDeviationBoundsAsString { upper_sampling: string; } -export interface StatsAggregate extends AggregateBase { +export type StatsAggregate = AggregateBase & { avg: undefined | number | string; avg_as_string?: string; count: number; @@ -1250,11 +1252,11 @@ export type StatsBucketAggregation = PipelineAggregationBase & Record -export interface StringRareTermsBucket extends MultiBucketBase { +export type StringRareTermsBucket = MultiBucketBase & { key: string; } -export interface StringStatsAggregate extends AggregateBase { +export type StringStatsAggregate = AggregateBase & { avg_length: undefined | number | string; avg_length_as_string?: string; count: number; @@ -1266,13 +1268,13 @@ export interface StringStatsAggregate extends AggregateBase { min_length_as_string?: string; } -export interface StringStatsAggregation extends MetricAggregationBase { +export type StringStatsAggregation = MetricAggregationBase & { show_distribution?: boolean; } export type StringTermsAggregate = TermsAggregateBaseStringTermsBucket & Record -export interface StringTermsBucket extends TermsBucketBase { +export type StringTermsBucket = TermsBucketBase & { key: Common.FieldValue; } @@ -1282,7 +1284,7 @@ export type SumAggregation = FormatMetricAggregationBase & Record export type SumBucketAggregation = PipelineAggregationBase & Record -export interface TDigest { +export type TDigest = { compression?: number; } @@ -1290,32 +1292,32 @@ export type TDigestPercentileRanksAggregate = PercentilesAggregateBase & Record< export type TDigestPercentilesAggregate = PercentilesAggregateBase & Record -export interface TermsAggregateBaseDoubleTermsBucket extends MultiBucketAggregateBaseDoubleTermsBucket { +export type TermsAggregateBaseDoubleTermsBucket = MultiBucketAggregateBaseDoubleTermsBucket & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export interface TermsAggregateBaseLongTermsBucket extends MultiBucketAggregateBaseLongTermsBucket { +export type TermsAggregateBaseLongTermsBucket = MultiBucketAggregateBaseLongTermsBucket & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export interface TermsAggregateBaseMultiTermsBucket extends MultiBucketAggregateBaseMultiTermsBucket { +export type TermsAggregateBaseMultiTermsBucket = MultiBucketAggregateBaseMultiTermsBucket & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export interface TermsAggregateBaseStringTermsBucket extends MultiBucketAggregateBaseStringTermsBucket { +export type TermsAggregateBaseStringTermsBucket = MultiBucketAggregateBaseStringTermsBucket & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export interface TermsAggregateBaseVoid extends MultiBucketAggregateBaseVoid { +export type TermsAggregateBaseVoid = MultiBucketAggregateBaseVoid & { doc_count_error_upper_bound?: number; sum_other_doc_count?: number; } -export interface TermsAggregation extends BucketAggregationBase { +export type TermsAggregation = BucketAggregationBase & { collect_mode?: TermsAggregationCollectMode; exclude?: TermsExclude; execution_hint?: TermsAggregationExecutionHint; @@ -1338,7 +1340,7 @@ export type TermsAggregationCollectMode = 'breadth_first' | 'depth_first' export type TermsAggregationExecutionHint = 'global_ordinals' | 'global_ordinals_hash' | 'global_ordinals_low_cardinality' | 'map' -export interface TermsBucketBase extends MultiBucketBase { +export type TermsBucketBase = MultiBucketBase & { doc_count_error?: number; } @@ -1346,22 +1348,22 @@ export type TermsExclude = string | string[] export type TermsInclude = string | string[] | TermsPartition -export interface TermsPartition { +export type TermsPartition = { num_partitions: number; partition: number; } -export interface TestPopulation { +export type TestPopulation = { field: Common.Field; filter?: Common_QueryDsl.QueryContainer; script?: Common.Script; } -export interface TopHitsAggregate extends AggregateBase { +export type TopHitsAggregate = AggregateBase & { hits: Core_Search.HitsMetadata; } -export interface TopHitsAggregation extends MetricAggregationBase { +export type TopHitsAggregation = MetricAggregationBase & { _source?: Core_Search.SourceConfig; docvalue_fields?: Common.Fields; explain?: boolean; @@ -1376,31 +1378,31 @@ export interface TopHitsAggregation extends MetricAggregationBase { version?: boolean; } -export interface TopMetrics { +export type TopMetrics = { metrics: Record; sort: Common.FieldValue[]; } -export interface TopMetricsAggregate extends AggregateBase { +export type TopMetricsAggregate = AggregateBase & { top: TopMetrics[]; } -export interface TopMetricsAggregation extends MetricAggregationBase { +export type TopMetricsAggregation = MetricAggregationBase & { metrics?: TopMetricsValue | TopMetricsValue[]; size?: number; sort?: Common.Sort; } -export interface TopMetricsValue { +export type TopMetricsValue = { field: Common.Field; } -export interface TTestAggregate extends AggregateBase { +export type TTestAggregate = AggregateBase & { value: undefined | number | string; value_as_string?: string; } -export interface TTestAggregation extends Aggregation { +export type TTestAggregation = Aggregation & { a?: TestPopulation; b?: TestPopulation; type?: TTestType; @@ -1424,14 +1426,14 @@ export type ValueType = 'boolean' | 'date' | 'date_nanos' | 'double' | 'geo_poin export type VariableWidthHistogramAggregate = MultiBucketAggregateBaseVariableWidthHistogramBucket & Record -export interface VariableWidthHistogramAggregation { +export type VariableWidthHistogramAggregation = { buckets?: number; field?: Common.Field; initial_buffer?: number; shard_size?: number; } -export interface VariableWidthHistogramBucket extends MultiBucketBase { +export type VariableWidthHistogramBucket = MultiBucketBase & { key: number; key_as_string?: string; max: number; @@ -1440,14 +1442,14 @@ export interface VariableWidthHistogramBucket extends MultiBucketBase { min_as_string?: string; } -export interface WeightedAverageAggregation extends Aggregation { +export type WeightedAverageAggregation = Aggregation & { format?: string; value?: WeightedAverageValue; value_type?: ValueType; weight?: WeightedAverageValue; } -export interface WeightedAverageValue { +export type WeightedAverageValue = { field?: Common.Field; missing?: number; script?: Common.Script; diff --git a/api/_types/_common.analysis.d.ts b/api/_types/_common.analysis.d.ts index 3151a7b55..83f74f701 100644 --- a/api/_types/_common.analysis.d.ts +++ b/api/_types/_common.analysis.d.ts @@ -16,28 +16,34 @@ import * as Common from './_common' -export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer +export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer | SmartcnAnalyzer | CjkAnalyzer -export interface AsciiFoldingTokenFilter extends TokenFilterBase { +export type AsciiFoldingTokenFilter = TokenFilterBase & { preserve_original?: Common.Stringifiedboolean; type: 'asciifolding'; } export type CharFilter = string | CharFilterDefinition -export interface CharFilterBase { +export type CharFilterBase = { version?: Common.VersionString; } export type CharFilterDefinition = HtmlStripCharFilter | MappingCharFilter | PatternReplaceCharFilter | IcuNormalizationCharFilter | KuromojiIterationMarkCharFilter -export interface CharGroupTokenizer extends TokenizerBase { +export type CharGroupTokenizer = TokenizerBase & { max_token_length?: number; tokenize_on_chars: string[]; type: 'char_group'; } -export interface CommonGramsTokenFilter extends TokenFilterBase { +export type CjkAnalyzer = { + stopwords?: StopWords; + stopwords_path?: string; + type?: 'cjk'; +} + +export type CommonGramsTokenFilter = TokenFilterBase & { common_words?: string[]; common_words_path?: string; ignore_case?: boolean; @@ -45,7 +51,7 @@ export interface CommonGramsTokenFilter extends TokenFilterBase { type: 'common_grams'; } -export interface CompoundWordTokenFilterBase extends TokenFilterBase { +export type CompoundWordTokenFilterBase = TokenFilterBase & { hyphenation_patterns_path?: string; max_subword_size?: number; min_subword_size?: number; @@ -55,13 +61,13 @@ export interface CompoundWordTokenFilterBase extends TokenFilterBase { word_list_path?: string; } -export interface ConditionTokenFilter extends TokenFilterBase { +export type ConditionTokenFilter = TokenFilterBase & { filter: string[]; script: Common.Script; type: 'condition'; } -export interface CustomAnalyzer { +export type CustomAnalyzer = { char_filter?: string[]; filter?: string[]; position_increment_gap?: number; @@ -70,7 +76,7 @@ export interface CustomAnalyzer { type: 'custom'; } -export interface CustomNormalizer { +export type CustomNormalizer = { char_filter?: string[]; filter?: string[]; type: 'custom'; @@ -78,24 +84,24 @@ export interface CustomNormalizer { export type DelimitedPayloadEncoding = 'float' | 'identity' | 'int' -export interface DelimitedPayloadTokenFilter extends TokenFilterBase { +export type DelimitedPayloadTokenFilter = TokenFilterBase & { delimiter?: string; encoding?: DelimitedPayloadEncoding; type: 'delimited_payload'; } -export interface DictionaryDecompounderTokenFilter extends CompoundWordTokenFilterBase { +export type DictionaryDecompounderTokenFilter = CompoundWordTokenFilterBase & { type: 'dictionary_decompounder'; } -export interface DutchAnalyzer { +export type DutchAnalyzer = { stopwords?: StopWords; type: 'dutch'; } export type EdgeNGramSide = 'back' | 'front' -export interface EdgeNGramTokenFilter extends TokenFilterBase { +export type EdgeNGramTokenFilter = TokenFilterBase & { max_gram?: number; min_gram?: number; preserve_original?: Common.Stringifiedboolean; @@ -103,7 +109,7 @@ export interface EdgeNGramTokenFilter extends TokenFilterBase { type: 'edge_ngram'; } -export interface EdgeNGramTokenizer extends TokenizerBase { +export type EdgeNGramTokenizer = TokenizerBase & { custom_token_chars?: string; max_gram: number; min_gram: number; @@ -111,14 +117,14 @@ export interface EdgeNGramTokenizer extends TokenizerBase { type: 'edge_ngram'; } -export interface ElisionTokenFilter extends TokenFilterBase { +export type ElisionTokenFilter = TokenFilterBase & { articles?: string[]; articles_case?: Common.Stringifiedboolean; articles_path?: string; type: 'elision'; } -export interface FingerprintAnalyzer { +export type FingerprintAnalyzer = { max_output_size: number; preserve_original: boolean; separator: string; @@ -128,17 +134,17 @@ export interface FingerprintAnalyzer { version?: Common.VersionString; } -export interface FingerprintTokenFilter extends TokenFilterBase { +export type FingerprintTokenFilter = TokenFilterBase & { max_output_size?: number; separator?: string; type: 'fingerprint'; } -export interface HtmlStripCharFilter extends CharFilterBase { +export type HtmlStripCharFilter = CharFilterBase & { type: 'html_strip'; } -export interface HunspellTokenFilter extends TokenFilterBase { +export type HunspellTokenFilter = TokenFilterBase & { dedup?: boolean; dictionary?: string; locale: string; @@ -146,11 +152,11 @@ export interface HunspellTokenFilter extends TokenFilterBase { type: 'hunspell'; } -export interface HyphenationDecompounderTokenFilter extends CompoundWordTokenFilterBase { +export type HyphenationDecompounderTokenFilter = CompoundWordTokenFilterBase & { type: 'hyphenation_decompounder'; } -export interface IcuAnalyzer { +export type IcuAnalyzer = { method: IcuNormalizationType; mode: IcuNormalizationMode; type: 'icu_analyzer'; @@ -160,11 +166,11 @@ export type IcuCollationAlternate = 'non-ignorable' | 'shifted' export type IcuCollationCaseFirst = 'lower' | 'upper' -export type IcuCollationDecomposition = 'identical' | 'no' +export type IcuCollationDecomposition = 'canonical' | 'no' export type IcuCollationStrength = 'identical' | 'primary' | 'quaternary' | 'secondary' | 'tertiary' -export interface IcuCollationTokenFilter extends TokenFilterBase { +export type IcuCollationTokenFilter = TokenFilterBase & { alternate?: IcuCollationAlternate; caseFirst?: IcuCollationCaseFirst; caseLevel?: boolean; @@ -180,12 +186,12 @@ export interface IcuCollationTokenFilter extends TokenFilterBase { variant?: string; } -export interface IcuFoldingTokenFilter extends TokenFilterBase { +export type IcuFoldingTokenFilter = TokenFilterBase & { type: 'icu_folding'; unicode_set_filter: string; } -export interface IcuNormalizationCharFilter extends CharFilterBase { +export type IcuNormalizationCharFilter = CharFilterBase & { mode?: IcuNormalizationMode; name?: IcuNormalizationType; type: 'icu_normalizer'; @@ -193,21 +199,21 @@ export interface IcuNormalizationCharFilter extends CharFilterBase { export type IcuNormalizationMode = 'compose' | 'decompose' -export interface IcuNormalizationTokenFilter extends TokenFilterBase { +export type IcuNormalizationTokenFilter = TokenFilterBase & { name: IcuNormalizationType; type: 'icu_normalizer'; } export type IcuNormalizationType = 'nfc' | 'nfkc' | 'nfkc_cf' -export interface IcuTokenizer extends TokenizerBase { +export type IcuTokenizer = TokenizerBase & { rule_files: string; type: 'icu_tokenizer'; } export type IcuTransformDirection = 'forward' | 'reverse' -export interface IcuTransformTokenFilter extends TokenFilterBase { +export type IcuTransformTokenFilter = TokenFilterBase & { dir?: IcuTransformDirection; id: string; type: 'icu_transform'; @@ -215,25 +221,25 @@ export interface IcuTransformTokenFilter extends TokenFilterBase { export type KeepTypesMode = 'exclude' | 'include' -export interface KeepTypesTokenFilter extends TokenFilterBase { +export type KeepTypesTokenFilter = TokenFilterBase & { mode?: KeepTypesMode; type: 'keep_types'; types?: string[]; } -export interface KeepWordsTokenFilter extends TokenFilterBase { +export type KeepWordsTokenFilter = TokenFilterBase & { keep_words?: string[]; keep_words_case?: boolean; keep_words_path?: string; type: 'keep'; } -export interface KeywordAnalyzer { +export type KeywordAnalyzer = { type: 'keyword'; version?: Common.VersionString; } -export interface KeywordMarkerTokenFilter extends TokenFilterBase { +export type KeywordMarkerTokenFilter = TokenFilterBase & { ignore_case?: boolean; keywords?: string[]; keywords_path?: string; @@ -241,45 +247,45 @@ export interface KeywordMarkerTokenFilter extends TokenFilterBase { type: 'keyword_marker'; } -export interface KeywordTokenizer extends TokenizerBase { +export type KeywordTokenizer = TokenizerBase & { buffer_size: number; type: 'keyword'; } -export interface KStemTokenFilter extends TokenFilterBase { +export type KStemTokenFilter = TokenFilterBase & { type: 'kstem'; } -export interface KuromojiAnalyzer { +export type KuromojiAnalyzer = { mode: KuromojiTokenizationMode; type: 'kuromoji'; user_dictionary?: string; } -export interface KuromojiIterationMarkCharFilter extends CharFilterBase { +export type KuromojiIterationMarkCharFilter = CharFilterBase & { normalize_kana: boolean; normalize_kanji: boolean; type: 'kuromoji_iteration_mark'; } -export interface KuromojiPartOfSpeechTokenFilter extends TokenFilterBase { +export type KuromojiPartOfSpeechTokenFilter = TokenFilterBase & { stoptags: string[]; type: 'kuromoji_part_of_speech'; } -export interface KuromojiReadingFormTokenFilter extends TokenFilterBase { +export type KuromojiReadingFormTokenFilter = TokenFilterBase & { type: 'kuromoji_readingform'; use_romaji: boolean; } -export interface KuromojiStemmerTokenFilter extends TokenFilterBase { +export type KuromojiStemmerTokenFilter = TokenFilterBase & { minimum_length: number; type: 'kuromoji_stemmer'; } export type KuromojiTokenizationMode = 'extended' | 'normal' | 'search' -export interface KuromojiTokenizer extends TokenizerBase { +export type KuromojiTokenizer = TokenizerBase & { discard_compound_token?: boolean; discard_punctuation?: boolean; mode: KuromojiTokenizationMode; @@ -292,7 +298,7 @@ export interface KuromojiTokenizer extends TokenizerBase { export type Language = 'Arabic' | 'Armenian' | 'Basque' | 'Brazilian' | 'Bulgarian' | 'Catalan' | 'Chinese' | 'Cjk' | 'Czech' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'Galician' | 'German' | 'Greek' | 'Hindi' | 'Hungarian' | 'Indonesian' | 'Irish' | 'Italian' | 'Latvian' | 'Norwegian' | 'Persian' | 'Portuguese' | 'Romanian' | 'Russian' | 'Sorani' | 'Spanish' | 'Swedish' | 'Thai' | 'Turkish' -export interface LanguageAnalyzer { +export type LanguageAnalyzer = { language: Language; stem_exclusion: string[]; stopwords?: StopWords; @@ -301,55 +307,55 @@ export interface LanguageAnalyzer { version?: Common.VersionString; } -export interface LengthTokenFilter extends TokenFilterBase { +export type LengthTokenFilter = TokenFilterBase & { max?: number; min?: number; type: 'length'; } -export interface LetterTokenizer extends TokenizerBase { +export type LetterTokenizer = TokenizerBase & { type: 'letter'; } -export interface LimitTokenCountTokenFilter extends TokenFilterBase { +export type LimitTokenCountTokenFilter = TokenFilterBase & { consume_all_tokens?: boolean; max_token_count?: Common.Stringifiedinteger; type: 'limit'; } -export interface LowercaseNormalizer { +export type LowercaseNormalizer = { type: 'lowercase'; } -export interface LowercaseTokenFilter extends TokenFilterBase { +export type LowercaseTokenFilter = TokenFilterBase & { language?: string; type: 'lowercase'; } -export interface LowercaseTokenizer extends TokenizerBase { +export type LowercaseTokenizer = TokenizerBase & { type: 'lowercase'; } -export interface MappingCharFilter extends CharFilterBase { +export type MappingCharFilter = CharFilterBase & { mappings?: string[]; mappings_path?: string; type: 'mapping'; } -export interface MultiplexerTokenFilter extends TokenFilterBase { +export type MultiplexerTokenFilter = TokenFilterBase & { filters: string[]; preserve_original?: Common.Stringifiedboolean; type: 'multiplexer'; } -export interface NGramTokenFilter extends TokenFilterBase { +export type NGramTokenFilter = TokenFilterBase & { max_gram?: number; min_gram?: number; preserve_original?: Common.Stringifiedboolean; type: 'ngram'; } -export interface NGramTokenizer extends TokenizerBase { +export type NGramTokenizer = TokenizerBase & { custom_token_chars?: string; max_gram: number; min_gram: number; @@ -357,7 +363,7 @@ export interface NGramTokenizer extends TokenizerBase { type: 'ngram'; } -export interface NoriAnalyzer { +export type NoriAnalyzer = { decompound_mode?: NoriDecompoundMode; stoptags?: string[]; type: 'nori'; @@ -367,12 +373,12 @@ export interface NoriAnalyzer { export type NoriDecompoundMode = 'discard' | 'mixed' | 'none' -export interface NoriPartOfSpeechTokenFilter extends TokenFilterBase { +export type NoriPartOfSpeechTokenFilter = TokenFilterBase & { stoptags?: string[]; type: 'nori_part_of_speech'; } -export interface NoriTokenizer extends TokenizerBase { +export type NoriTokenizer = TokenizerBase & { decompound_mode?: NoriDecompoundMode; discard_punctuation?: boolean; type: 'nori_tokenizer'; @@ -382,7 +388,7 @@ export interface NoriTokenizer extends TokenizerBase { export type Normalizer = LowercaseNormalizer | CustomNormalizer -export interface PathHierarchyTokenizer extends TokenizerBase { +export type PathHierarchyTokenizer = TokenizerBase & { buffer_size: Common.Stringifiedinteger; delimiter: string; replacement?: string; @@ -391,7 +397,7 @@ export interface PathHierarchyTokenizer extends TokenizerBase { type: 'path_hierarchy'; } -export interface PatternAnalyzer { +export type PatternAnalyzer = { flags?: string; lowercase?: boolean; pattern: string; @@ -400,20 +406,20 @@ export interface PatternAnalyzer { version?: Common.VersionString; } -export interface PatternCaptureTokenFilter extends TokenFilterBase { +export type PatternCaptureTokenFilter = TokenFilterBase & { patterns: string[]; preserve_original?: Common.Stringifiedboolean; type: 'pattern_capture'; } -export interface PatternReplaceCharFilter extends CharFilterBase { +export type PatternReplaceCharFilter = CharFilterBase & { flags?: string; pattern: string; replacement?: string; type: 'pattern_replace'; } -export interface PatternReplaceTokenFilter extends TokenFilterBase { +export type PatternReplaceTokenFilter = TokenFilterBase & { all?: boolean; flags?: string; pattern: string; @@ -421,13 +427,17 @@ export interface PatternReplaceTokenFilter extends TokenFilterBase { type: 'pattern_replace'; } -export interface PatternTokenizer extends TokenizerBase { +export type PatternTokenizer = TokenizerBase & { flags?: string; group?: number; pattern?: string; type: 'pattern'; } +export type PersianStemTokenFilter = TokenFilterBase & { + type: 'persian_stem'; +} + export type PhoneticEncoder = 'beider_morse' | 'caverphone1' | 'caverphone2' | 'cologne' | 'daitch_mokotoff' | 'double_metaphone' | 'haasephonetik' | 'koelnerphonetik' | 'metaphone' | 'nysiis' | 'refined_soundex' | 'soundex' export type PhoneticLanguage = 'any' | 'common' | 'cyrillic' | 'english' | 'french' | 'german' | 'hebrew' | 'hungarian' | 'polish' | 'romanian' | 'russian' | 'spanish' @@ -436,7 +446,7 @@ export type PhoneticNameType = 'ashkenazi' | 'generic' | 'sephardic' export type PhoneticRuleType = 'approx' | 'exact' -export interface PhoneticTokenFilter extends TokenFilterBase { +export type PhoneticTokenFilter = TokenFilterBase & { encoder: PhoneticEncoder; languageset: PhoneticLanguage[]; max_code_len?: number; @@ -446,24 +456,24 @@ export interface PhoneticTokenFilter extends TokenFilterBase { type: 'phonetic'; } -export interface PorterStemTokenFilter extends TokenFilterBase { +export type PorterStemTokenFilter = TokenFilterBase & { type: 'porter_stem'; } -export interface PredicateTokenFilter extends TokenFilterBase { +export type PredicateTokenFilter = TokenFilterBase & { script: Common.Script; type: 'predicate_token_filter'; } -export interface RemoveDuplicatesTokenFilter extends TokenFilterBase { +export type RemoveDuplicatesTokenFilter = TokenFilterBase & { type: 'remove_duplicates'; } -export interface ReverseTokenFilter extends TokenFilterBase { +export type ReverseTokenFilter = TokenFilterBase & { type: 'reverse'; } -export interface ShingleTokenFilter extends TokenFilterBase { +export type ShingleTokenFilter = TokenFilterBase & { filler_token?: string; max_shingle_size?: number | string; min_shingle_size?: number | string; @@ -473,12 +483,24 @@ export interface ShingleTokenFilter extends TokenFilterBase { type: 'shingle'; } -export interface SimpleAnalyzer { +export type SimpleAnalyzer = { type: 'simple'; version?: Common.VersionString; } -export interface SnowballAnalyzer { +export type SmartcnAnalyzer = { + type?: 'smartcn'; +} + +export type SmartcnStopTokenFilter = TokenFilterBase & { + type: 'smartcn_stop'; +} + +export type SmartcnTokenizer = TokenizerBase & { + type: 'smartcn_tokenizer'; +} + +export type SnowballAnalyzer = { language: SnowballLanguage; stopwords?: StopWords; type: 'snowball'; @@ -487,41 +509,41 @@ export interface SnowballAnalyzer { export type SnowballLanguage = 'Armenian' | 'Basque' | 'Catalan' | 'Danish' | 'Dutch' | 'English' | 'Finnish' | 'French' | 'German' | 'German2' | 'Hungarian' | 'Italian' | 'Kp' | 'Lovins' | 'Norwegian' | 'Porter' | 'Portuguese' | 'Romanian' | 'Russian' | 'Spanish' | 'Swedish' | 'Turkish' -export interface SnowballTokenFilter extends TokenFilterBase { +export type SnowballTokenFilter = TokenFilterBase & { language: SnowballLanguage; type: 'snowball'; } -export interface StandardAnalyzer { +export type StandardAnalyzer = { max_token_length?: number; stopwords?: StopWords; type: 'standard'; } -export interface StandardTokenizer extends TokenizerBase { +export type StandardTokenizer = TokenizerBase & { max_token_length?: number; type: 'standard'; } -export interface StemmerOverrideTokenFilter extends TokenFilterBase { +export type StemmerOverrideTokenFilter = TokenFilterBase & { rules?: string[]; rules_path?: string; type: 'stemmer_override'; } -export interface StemmerTokenFilter extends TokenFilterBase { +export type StemmerTokenFilter = TokenFilterBase & { language?: string; type: 'stemmer'; } -export interface StopAnalyzer { +export type StopAnalyzer = { stopwords?: StopWords; stopwords_path?: string; type: 'stop'; version?: Common.VersionString; } -export interface StopTokenFilter extends TokenFilterBase { +export type StopTokenFilter = TokenFilterBase & { ignore_case?: boolean; remove_trailing?: boolean; stopwords?: StopWords; @@ -533,7 +555,7 @@ export type StopWords = string | string[] export type SynonymFormat = 'solr' | 'wordnet' -export interface SynonymGraphTokenFilter extends TokenFilterBase { +export type SynonymGraphTokenFilter = TokenFilterBase & { expand?: boolean; format?: SynonymFormat; lenient?: boolean; @@ -544,7 +566,7 @@ export interface SynonymGraphTokenFilter extends TokenFilterBase { updateable?: boolean; } -export interface SynonymTokenFilter extends TokenFilterBase { +export type SynonymTokenFilter = TokenFilterBase & { expand?: boolean; format?: SynonymFormat; lenient?: boolean; @@ -559,54 +581,54 @@ export type TokenChar = 'custom' | 'digit' | 'letter' | 'punctuation' | 'symbol' export type TokenFilter = string | TokenFilterDefinition -export interface TokenFilterBase { +export type TokenFilterBase = { version?: Common.VersionString; } -export type TokenFilterDefinition = AsciiFoldingTokenFilter | CommonGramsTokenFilter | ConditionTokenFilter | DelimitedPayloadTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | FingerprintTokenFilter | HunspellTokenFilter | HyphenationDecompounderTokenFilter | KeepTypesTokenFilter | KeepWordsTokenFilter | KeywordMarkerTokenFilter | KStemTokenFilter | LengthTokenFilter | LimitTokenCountTokenFilter | LowercaseTokenFilter | MultiplexerTokenFilter | NGramTokenFilter | NoriPartOfSpeechTokenFilter | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PorterStemTokenFilter | PredicateTokenFilter | RemoveDuplicatesTokenFilter | ReverseTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerOverrideTokenFilter | StemmerTokenFilter | StopTokenFilter | SynonymGraphTokenFilter | SynonymTokenFilter | TrimTokenFilter | TruncateTokenFilter | UniqueTokenFilter | UppercaseTokenFilter | WordDelimiterGraphTokenFilter | WordDelimiterTokenFilter | KuromojiStemmerTokenFilter | KuromojiReadingFormTokenFilter | KuromojiPartOfSpeechTokenFilter | IcuTokenizer | IcuCollationTokenFilter | IcuFoldingTokenFilter | IcuNormalizationTokenFilter | IcuTransformTokenFilter | PhoneticTokenFilter | DictionaryDecompounderTokenFilter +export type TokenFilterDefinition = AsciiFoldingTokenFilter | CommonGramsTokenFilter | ConditionTokenFilter | DelimitedPayloadTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | FingerprintTokenFilter | HunspellTokenFilter | HyphenationDecompounderTokenFilter | KeepTypesTokenFilter | KeepWordsTokenFilter | KeywordMarkerTokenFilter | KStemTokenFilter | LengthTokenFilter | LimitTokenCountTokenFilter | LowercaseTokenFilter | MultiplexerTokenFilter | NGramTokenFilter | NoriPartOfSpeechTokenFilter | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PersianStemTokenFilter | PorterStemTokenFilter | PredicateTokenFilter | RemoveDuplicatesTokenFilter | ReverseTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerOverrideTokenFilter | StemmerTokenFilter | StopTokenFilter | SynonymGraphTokenFilter | SynonymTokenFilter | TrimTokenFilter | TruncateTokenFilter | UniqueTokenFilter | UppercaseTokenFilter | WordDelimiterGraphTokenFilter | WordDelimiterTokenFilter | KuromojiStemmerTokenFilter | KuromojiReadingFormTokenFilter | KuromojiPartOfSpeechTokenFilter | IcuTokenizer | IcuCollationTokenFilter | IcuFoldingTokenFilter | IcuNormalizationTokenFilter | IcuTransformTokenFilter | PhoneticTokenFilter | DictionaryDecompounderTokenFilter | SmartcnStopTokenFilter export type Tokenizer = string | TokenizerDefinition -export interface TokenizerBase { +export type TokenizerBase = { version?: Common.VersionString; } -export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | IcuTokenizer +export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | IcuTokenizer | SmartcnTokenizer -export interface TrimTokenFilter extends TokenFilterBase { +export type TrimTokenFilter = TokenFilterBase & { type: 'trim'; } -export interface TruncateTokenFilter extends TokenFilterBase { +export type TruncateTokenFilter = TokenFilterBase & { length?: number; type: 'truncate'; } -export interface UaxEmailUrlTokenizer extends TokenizerBase { +export type UaxEmailUrlTokenizer = TokenizerBase & { max_token_length?: number; type: 'uax_url_email'; } -export interface UniqueTokenFilter extends TokenFilterBase { +export type UniqueTokenFilter = TokenFilterBase & { only_on_same_position?: boolean; type: 'unique'; } -export interface UppercaseTokenFilter extends TokenFilterBase { +export type UppercaseTokenFilter = TokenFilterBase & { type: 'uppercase'; } -export interface WhitespaceAnalyzer { +export type WhitespaceAnalyzer = { type: 'whitespace'; version?: Common.VersionString; } -export interface WhitespaceTokenizer extends TokenizerBase { +export type WhitespaceTokenizer = TokenizerBase & { max_token_length?: number; type: 'whitespace'; } -export interface WordDelimiterGraphTokenFilter extends TokenFilterBase { +export type WordDelimiterGraphTokenFilter = TokenFilterBase & { adjust_offsets?: boolean; catenate_all?: boolean; catenate_numbers?: boolean; @@ -625,7 +647,7 @@ export interface WordDelimiterGraphTokenFilter extends TokenFilterBase { type_table_path?: string; } -export interface WordDelimiterTokenFilter extends TokenFilterBase { +export type WordDelimiterTokenFilter = TokenFilterBase & { catenate_all?: boolean; catenate_numbers?: boolean; catenate_words?: boolean; diff --git a/api/_types/_common.d.ts b/api/_types/_common.d.ts index 829920c24..e9256d354 100644 --- a/api/_types/_common.d.ts +++ b/api/_types/_common.d.ts @@ -18,13 +18,13 @@ import * as Cluster_AllocationExplain from './cluster.allocation_explain' import * as Common_QueryDsl from './_common.query_dsl' import * as Indices_Stats from './indices.stats' -export interface AcknowledgedResponseBase { +export type AcknowledgedResponseBase = { acknowledged: boolean; } export type ActionStatusOptions = 'failure' | 'simulated' | 'success' | 'throttled' -export interface BaseNode { +export type BaseNode = { attributes?: Record; host?: Host; ip?: Ip; @@ -33,15 +33,19 @@ export interface BaseNode { transport_address?: TransportAddress; } +export type BatchSize = number + +export type BuiltinScriptLanguage = 'expression' | 'java' | 'mustache' | 'painless' + export type BulkByScrollFailure = BulkItemResponseFailure | ScrollableHitSourceSearchFailure -export interface BulkByScrollResponseBase extends BulkByScrollTaskStatus { +export type BulkByScrollResponseBase = BulkByScrollTaskStatus & { failures: BulkByScrollFailure[]; timed_out: boolean; took: number; } -export interface BulkByScrollTaskStatus { +export type BulkByScrollTaskStatus = { batches: number; canceled?: string; created?: number; @@ -62,7 +66,7 @@ export interface BulkByScrollTaskStatus { export type BulkByScrollTaskStatusOrException = BulkByScrollTaskStatus | ErrorCause -export interface BulkItemResponseFailure { +export type BulkItemResponseFailure = { cause: ErrorCause; id?: Id; index: IndexName; @@ -75,7 +79,7 @@ export type ByteCount = number export type ByteUnit = 'b' | 'g' | 'gb' | 'k' | 'kb' | 'm' | 'mb' | 'p' | 'pb' | 't' | 'tb' -export interface ClusterDetails { +export type ClusterDetails = { _shards?: ShardStatistics; failures?: ShardFailure[]; indices: string; @@ -86,7 +90,7 @@ export interface ClusterDetails { export type ClusterSearchStatus = 'failed' | 'partial' | 'running' | 'skipped' | 'successful' -export interface ClusterStatistics { +export type ClusterStatistics = { details?: Record; failed: number; partial: number; @@ -96,7 +100,7 @@ export interface ClusterStatistics { total: number; } -export interface CompletionStats { +export type CompletionStats = { fields?: Record; size?: HumanReadableByteCount; size_in_bytes: ByteCount; @@ -104,7 +108,7 @@ export interface CompletionStats { export type Conflicts = 'abort' | 'proceed' -export interface CoordsGeoBounds { +export type CoordsGeoBounds = { bottom: number; left: number; right: number; @@ -131,12 +135,12 @@ export type Distance = string export type DistanceUnit = 'cm' | 'ft' | 'in' | 'km' | 'm' | 'mi' | 'mm' | 'nmi' | 'yd' -export interface DocStats { +export type DocStats = { count: number; deleted?: number; } -export interface DocStatus { +export type DocStatus = { '1xx'?: number; '2xx'?: number; '3xx'?: number; @@ -158,7 +162,7 @@ export type EpochTimeUnitMillis = UnitMillis export type EpochTimeUnitSeconds = UnitSeconds -export interface ErrorCause { +export type ErrorCause = { caused_by?: ErrorCause; reason?: string; root_cause?: ErrorCause[]; @@ -168,7 +172,7 @@ export interface ErrorCause { [key: string]: any | Record; } -export interface ErrorResponseBase { +export type ErrorResponseBase = { error: ErrorCause; status: number; } @@ -179,21 +183,21 @@ export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] export type Field = string -export interface FielddataStats { +export type FielddataStats = { evictions?: number; fields?: Record; memory_size?: HumanReadableByteCount; memory_size_in_bytes: ByteCount; } -export interface FieldMemoryUsage { +export type FieldMemoryUsage = { memory_size?: HumanReadableByteCount; memory_size_in_bytes: ByteCount; } export type Fields = Field | Field[] -export interface FieldSizeUsage { +export type FieldSizeUsage = { size?: HumanReadableByteCount; size_in_bytes: ByteCount; } @@ -202,7 +206,7 @@ export type FieldValue = boolean | undefined | number | Record | st export type FieldWithOrder = Record -export interface FlushStats { +export type FlushStats = { periodic: number; total: number; total_time?: Duration; @@ -213,7 +217,7 @@ export type Fuzziness = string | number export type GeoBounds = CoordsGeoBounds | TopLeftBottomRightGeoBounds | TopRightBottomLeftGeoBounds | WktGeoBounds -export interface GeoDistanceSort { +export type GeoDistanceSort = { distance_type?: GeoDistanceType; ignore_unmapped?: boolean; mode?: SortMode; @@ -225,7 +229,7 @@ export type GeoDistanceType = 'arc' | 'plane' export type GeoHash = string -export interface GeoHashLocation { +export type GeoHashLocation = { geohash: GeoHash; } @@ -233,7 +237,7 @@ export type GeoHashPrecision = number | string export type GeoHexCell = string -export interface GeoLine { +export type GeoLine = { coordinates: number[][]; type: string; } @@ -246,7 +250,7 @@ export type GeoTile = string export type GeoTilePrecision = number -export interface GetStats { +export type GetStats = { current: number; exists_time?: Duration; exists_time_in_millis: DurationValueUnitMillis; @@ -265,7 +269,7 @@ export type HealthStatusCapitalized = 'GREEN' | 'RED' | 'YELLOW' export type Host = string -export interface HourAndMinute { +export type HourAndMinute = { hour: number[]; minute: number[]; } @@ -284,7 +288,7 @@ export type Ids = Id | Id[] export type IndexAlias = string -export interface IndexingStats { +export type IndexingStats = { delete_current: number; delete_time?: Duration; delete_time_in_millis: DurationValueUnitMillis; @@ -306,11 +310,11 @@ export type IndexName = string export type Indices = IndexName | IndexName[] -export interface IndicesResponseBase extends AcknowledgedResponseBase { +export type IndicesResponseBase = AcknowledgedResponseBase & { _shards?: ShardStatistics; } -export interface InlineGet { +export type InlineGet = { _primary_term?: number; _routing?: Routing; _seq_no?: SequenceNumber; @@ -319,7 +323,7 @@ export interface InlineGet { found: boolean; } -export interface InlineGetDictUserDefined { +export type InlineGetDictUserDefined = { _primary_term?: number; _routing?: Routing; _seq_no?: SequenceNumber; @@ -328,15 +332,15 @@ export interface InlineGetDictUserDefined { found: boolean; } -export interface InlineScript extends ScriptBase { +export type InlineScript = string | (ScriptBase & { lang?: ScriptLanguage; options?: Record; source: string; -} +}) export type Ip = string -export interface KnnField { +export type KnnField = { boost?: number; filter?: Common_QueryDsl.QueryContainer | Common_QueryDsl.QueryContainer[]; k?: number; @@ -347,14 +351,14 @@ export interface KnnField { vector: QueryVector; } -export interface LatLonGeoLocation { +export type LatLonGeoLocation = { lat: number; lon: number; } export type Level = 'cluster' | 'indices' | 'shards' -export interface MergesStats { +export type MergesStats = { current: number; current_docs: number; current_size?: HumanReadableByteCount; @@ -384,14 +388,14 @@ export type Name = string export type Names = Name | Name[] -export interface NestedSortValue { +export type NestedSortValue = { filter?: Common_QueryDsl.QueryContainer; max_children?: number; nested?: NestedSortValue; path: Field; } -export interface NodeAttributes { +export type NodeAttributes = { attributes: Record; ephemeral_id: Id; external_id?: string; @@ -411,7 +415,7 @@ export type NodeRole = 'client' | 'coordinating_only' | 'data' | 'data_cold' | ' export type NodeRoles = NodeRole[] -export interface NodeShard { +export type NodeShard = { allocation_id?: Record; index: IndexName; node?: NodeName; @@ -424,16 +428,14 @@ export interface NodeShard { unassigned_info?: Cluster_AllocationExplain.UnassignedInformation; } -export interface NodeStatistics { +export type NodeStatistics = { failed: number; failures?: ErrorCause[]; successful: number; total: number; } -export type Normalization = 'h1' | 'h2' | 'h3' | 'no' | 'z' - -export interface OpenSearchVersionInfo { +export type OpenSearchVersionInfo = { build_date: DateTime; build_flavor?: string; build_hash: string; @@ -454,7 +456,7 @@ export type PercentageNumber = number export type PercentageString = string -export interface PhaseTook { +export type PhaseTook = { can_match: uint; dfs_pre_query: uint; dfs_query: uint; @@ -467,7 +469,7 @@ export type PipelineName = string export type PipeSeparatedFlagsSimpleQueryStringFlag = Common_QueryDsl.SimpleQueryStringFlag | string -export interface PluginStats { +export type PluginStats = { classname: string; custom_foldername?: undefined | string; description: string; @@ -480,7 +482,7 @@ export interface PluginStats { version: VersionString; } -export interface QueryCacheStats { +export type QueryCacheStats = { cache_count: number; cache_size: number; evictions: number; @@ -495,11 +497,11 @@ export type QueryVector = number[] export type RankBase = Record -export interface RankContainer { +export type RankContainer = { rrf?: RrfRank; } -export interface RecoveryStats { +export type RecoveryStats = { current_as_source: number; current_as_target: number; throttle_time?: Duration; @@ -508,7 +510,7 @@ export interface RecoveryStats { export type Refresh = 'false' | 'true' | 'wait_for' -export interface RefreshStats { +export type RefreshStats = { external_total: number; external_total_time?: Duration; external_total_time_in_millis: DurationValueUnitMillis; @@ -520,31 +522,31 @@ export interface RefreshStats { export type RelationName = string -export interface RelocationFailureInfo { +export type RelocationFailureInfo = { failed_attempts: number; } -export interface RemoteStoreDownloadStats { +export type RemoteStoreDownloadStats = { total_download_size: RemoteStoreUploadDownloadStats; total_time_spent?: Duration; total_time_spent_in_millis: DurationValueUnitMillis; } -export interface RemoteStoreStats { +export type RemoteStoreStats = { download: RemoteStoreDownloadStats; upload: RemoteStoreUploadStats; } -export interface RemoteStoreTranslogStats { +export type RemoteStoreTranslogStats = { upload: RemoteStoreTranslogUploadStats; } -export interface RemoteStoreTranslogUploadStats { +export type RemoteStoreTranslogUploadStats = { total_upload_size: RemoteStoreTranslogUploadTotalUploadSizeStats; total_uploads: RemoteStoreTranslogUploadTotalUploadsStats; } -export interface RemoteStoreTranslogUploadTotalUploadSizeStats { +export type RemoteStoreTranslogUploadTotalUploadSizeStats = { failed?: HumanReadableByteCount; failed_bytes: ByteCount; started?: HumanReadableByteCount; @@ -553,13 +555,13 @@ export interface RemoteStoreTranslogUploadTotalUploadSizeStats { succeeded_bytes: ByteCount; } -export interface RemoteStoreTranslogUploadTotalUploadsStats { +export type RemoteStoreTranslogUploadTotalUploadsStats = { failed: number; started: number; succeeded: number; } -export interface RemoteStoreUploadDownloadStats { +export type RemoteStoreUploadDownloadStats = { failed?: HumanReadableByteCount; failed_bytes: ByteCount; started?: HumanReadableByteCount; @@ -568,18 +570,18 @@ export interface RemoteStoreUploadDownloadStats { succeeded_bytes: ByteCount; } -export interface RemoteStoreUploadPressureStats { +export type RemoteStoreUploadPressureStats = { total_rejections: number; } -export interface RemoteStoreUploadRefreshSizeLagStats { +export type RemoteStoreUploadRefreshSizeLagStats = { max?: HumanReadableByteCount; max_bytes: ByteCount; total?: HumanReadableByteCount; total_bytes: ByteCount; } -export interface RemoteStoreUploadStats { +export type RemoteStoreUploadStats = { max_refresh_time_lag?: Duration; max_refresh_time_lag_in_millis: DurationValueUnitMillis; pressure: RemoteStoreUploadPressureStats; @@ -589,7 +591,7 @@ export interface RemoteStoreUploadStats { total_upload_size: RemoteStoreUploadDownloadStats; } -export interface RequestCacheStats { +export type RequestCacheStats = { evictions: number; hit_count: number; memory_size?: HumanReadableByteCount; @@ -597,47 +599,51 @@ export interface RequestCacheStats { miss_count: number; } -export interface RequestStats { +export type RequestStats = { current?: number; time?: Duration; time_in_millis?: DurationValueUnitMillis; total?: number; } +export type ResourceType = 'index_or_alias' + export type Result = 'created' | 'deleted' | 'noop' | 'not_found' | 'updated' -export interface Retries { +export type Retries = { bulk: number; search: number; } -export type Routing = string | string[] +export type Routing = string + +export type RoutingInQueryString = string | string[] -export interface RrfRank extends RankBase { +export type RrfRank = RankBase & { rank_constant?: number; window_size?: number; } export type ScheduleTimeOfDay = string | HourAndMinute -export interface ScoreSort { +export type ScoreSort = { order?: SortOrder; } export type Script = InlineScript | StoredScriptId -export interface ScriptBase { +export type ScriptBase = { params?: Record; } -export interface ScriptField { +export type ScriptField = { ignore_failure?: boolean; script: Script; } -export type ScriptLanguage = 'expression' | 'java' | 'mustache' | 'painless' +export type ScriptLanguage = BuiltinScriptLanguage | string -export interface ScriptSort { +export type ScriptSort = { mode?: SortMode; nested?: NestedSortValue; order?: SortOrder; @@ -647,7 +653,7 @@ export interface ScriptSort { export type ScriptSortType = 'number' | 'string' | 'version' -export interface ScrollableHitSourceSearchFailure { +export type ScrollableHitSourceSearchFailure = { index?: IndexName; node?: string; reason: ErrorCause; @@ -659,7 +665,7 @@ export type ScrollId = string export type ScrollIds = ScrollId | ScrollId[] -export interface SearchStats { +export type SearchStats = { concurrent_avg_slice_count?: number; concurrent_query_current?: number; concurrent_query_time?: Duration; @@ -693,13 +699,13 @@ export interface SearchStats { export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch' -export interface SegmentReplicationStats { +export type SegmentReplicationStats = { max_bytes_behind: ByteCount; max_replication_lag: ByteCount; total_bytes_behind: ByteCount; } -export interface SegmentsStats { +export type SegmentsStats = { count: number; doc_values_memory?: HumanReadableByteCount; doc_values_memory_in_bytes: ByteCount; @@ -730,7 +736,7 @@ export interface SegmentsStats { export type SequenceNumber = number -export interface ShardFailure { +export type ShardFailure = { index?: IndexName; node?: string; reason: ErrorCause; @@ -738,11 +744,11 @@ export interface ShardFailure { status?: string; } -export interface ShardsOperationResponseBase { +export type ShardsOperationResponseBase = { _shards: ShardStatistics; } -export interface ShardStatistics { +export type ShardStatistics = { failed: uint; failures?: ShardFailure[]; skipped?: uint; @@ -752,7 +758,7 @@ export interface ShardStatistics { export type short = number -export interface SlicedScroll { +export type SlicedScroll = { field?: Field; id: Id; max: number; @@ -768,7 +774,7 @@ export type SortCombinations = Field | FieldWithOrder | SortOptions export type SortMode = 'avg' | 'max' | 'median' | 'min' | 'sum' -export interface SortOptions { +export type SortOptions = { _doc?: ScoreSort; _geo_distance?: GeoDistanceSort; _score?: ScoreSort; @@ -779,17 +785,17 @@ export type SortOrder = 'asc' | 'desc' export type SortResults = FieldValue[] -export interface StoredScript { +export type StoredScript = { lang: ScriptLanguage; options?: Record; source: string; } -export interface StoredScriptId extends ScriptBase { +export type StoredScriptId = ScriptBase & { id: Id; } -export interface StoreStats { +export type StoreStats = { reserved?: HumanReadableByteCount; reserved_in_bytes: ByteCount; size?: HumanReadableByteCount; @@ -808,7 +814,7 @@ export type StringifiedVersionNumber = VersionNumber | string export type SuggestMode = 'always' | 'missing' | 'popular' -export interface TaskFailure { +export type TaskFailure = { node_id: NodeId; reason: ErrorCause; status: string; @@ -817,23 +823,25 @@ export interface TaskFailure { export type TaskId = string | number +export type TermFrequencyNormalization = 'h1' | 'h2' | 'h3' | 'no' | 'z' + export type TimeOfDay = string export type TimeUnit = 'd' | 'h' | 'm' | 'micros' | 'ms' | 'nanos' | 's' export type TimeZone = string -export interface TopLeftBottomRightGeoBounds { +export type TopLeftBottomRightGeoBounds = { bottom_right: GeoLocation; top_left: GeoLocation; } -export interface TopRightBottomLeftGeoBounds { +export type TopRightBottomLeftGeoBounds = { bottom_left: GeoLocation; top_right: GeoLocation; } -export interface TranslogStats { +export type TranslogStats = { earliest_last_modified_age: number; operations: number; remote_store?: RemoteStoreTranslogStats; @@ -876,18 +884,18 @@ export type WaitForActiveShards = number | WaitForActiveShardOptions export type WaitForEvents = 'high' | 'immediate' | 'languid' | 'low' | 'normal' | 'urgent' -export interface WarmerStats { +export type WarmerStats = { current: number; total: number; total_time?: Duration; total_time_in_millis: DurationValueUnitMillis; } -export interface WktGeoBounds { +export type WktGeoBounds = { wkt: string; } -export interface WriteResponseBase { +export type WriteResponseBase = { _id: Id; _index: IndexName; _primary_term: number; @@ -899,7 +907,7 @@ export interface WriteResponseBase { result: Result; } -export interface XyCartesianCoordinates { +export type XyCartesianCoordinates = { x: number; y: number; } diff --git a/api/_types/_common.mapping.d.ts b/api/_types/_common.mapping.d.ts index 539e759a6..62becebfb 100644 --- a/api/_types/_common.mapping.d.ts +++ b/api/_types/_common.mapping.d.ts @@ -17,14 +17,14 @@ import * as Common from './_common' import * as Indices_Common from './indices._common' -export interface AggregateMetricDoubleProperty extends PropertyBase { +export type AggregateMetricDoubleProperty = PropertyBase & { default_metric: string; metrics: string[]; time_series_metric?: TimeSeriesMetricType; type: 'aggregate_metric_double'; } -export interface AllField { +export type AllField = { analyzer: string; enabled: boolean; omit_norms: boolean; @@ -37,11 +37,11 @@ export interface AllField { store_term_vectors: boolean; } -export interface BinaryProperty extends DocValuesPropertyBase { +export type BinaryProperty = DocValuesPropertyBase & { type: 'binary'; } -export interface BooleanProperty extends DocValuesPropertyBase { +export type BooleanProperty = DocValuesPropertyBase & { boost?: number; fielddata?: Indices_Common.NumericFielddata; index?: boolean; @@ -49,12 +49,12 @@ export interface BooleanProperty extends DocValuesPropertyBase { type: 'boolean'; } -export interface ByteNumberProperty extends NumberPropertyBase { +export type ByteNumberProperty = NumberPropertyBase & { null_value?: Common.byte; type: 'byte'; } -export interface CompletionProperty extends DocValuesPropertyBase { +export type CompletionProperty = DocValuesPropertyBase & { analyzer?: string; contexts?: SuggestContext[]; max_input_length?: number; @@ -64,22 +64,22 @@ export interface CompletionProperty extends DocValuesPropertyBase { type: 'completion'; } -export interface ConstantKeywordProperty extends PropertyBase { +export type ConstantKeywordProperty = PropertyBase & { type: 'constant_keyword'; - value?: Record; + value?: any; } -export interface CorePropertyBase extends PropertyBase { +export type CorePropertyBase = PropertyBase & { copy_to?: Common.Fields; similarity?: string; store?: boolean; } -export interface DataStreamTimestamp { +export type DataStreamTimestamp = { enabled: boolean; } -export interface DateNanosProperty extends DocValuesPropertyBase { +export type DateNanosProperty = DocValuesPropertyBase & { boost?: number; format?: string; ignore_malformed?: boolean; @@ -89,7 +89,7 @@ export interface DateNanosProperty extends DocValuesPropertyBase { type: 'date_nanos'; } -export interface DateProperty extends DocValuesPropertyBase { +export type DateProperty = DocValuesPropertyBase & { boost?: number; fielddata?: Indices_Common.NumericFielddata; format?: string; @@ -101,18 +101,18 @@ export interface DateProperty extends DocValuesPropertyBase { type: 'date'; } -export interface DateRangeProperty extends RangePropertyBase { +export type DateRangeProperty = RangePropertyBase & { format?: string; type: 'date_range'; } -export interface DenseVectorIndexOptions { +export type DenseVectorIndexOptions = { ef_construction: number; m: number; type: string; } -export interface DenseVectorProperty extends PropertyBase { +export type DenseVectorProperty = PropertyBase & { dims: number; index?: boolean; index_options?: DenseVectorIndexOptions; @@ -120,48 +120,22 @@ export interface DenseVectorProperty extends PropertyBase { type: 'dense_vector'; } -export interface DocValuesPropertyBase extends CorePropertyBase { +export type DocValuesPropertyBase = CorePropertyBase & { doc_values?: boolean; } -export interface DoubleNumberProperty extends NumberPropertyBase { +export type DoubleNumberProperty = NumberPropertyBase & { null_value?: number; type: 'double'; } -export interface DoubleRangeProperty extends RangePropertyBase { +export type DoubleRangeProperty = RangePropertyBase & { type: 'double_range'; } export type DynamicMapping = 'false' | 'strict' | 'strict_allow_templates' | 'true' -export interface DynamicProperty extends DocValuesPropertyBase { - analyzer?: string; - boost?: number; - coerce?: boolean; - eager_global_ordinals?: boolean; - enabled?: boolean; - format?: string; - ignore_malformed?: boolean; - index?: boolean; - index_options?: IndexOptions; - index_phrases?: boolean; - index_prefixes?: TextIndexPrefixes; - locale?: string; - norms?: boolean; - null_value?: Common.FieldValue; - on_script_error?: OnScriptError; - position_increment_gap?: number; - precision_step?: number; - script?: Common.Script; - search_analyzer?: string; - search_quote_analyzer?: string; - term_vector?: TermVectorOption; - time_series_metric?: TimeSeriesMetricType; - type: '{dynamic_property}'; -} - -export interface DynamicTemplate { +export type DynamicTemplate = { mapping?: Property; match?: string; match_mapping_type?: string; @@ -171,21 +145,21 @@ export interface DynamicTemplate { unmatch?: string; } -export interface FieldAliasProperty extends PropertyBase { +export type FieldAliasProperty = PropertyBase & { path?: Common.Field; type: 'alias'; } -export interface FieldMapping { +export type FieldMapping = { full_name: string; mapping: Record; } -export interface FieldNamesField { +export type FieldNamesField = { enabled: boolean; } -export interface FlattenedProperty extends PropertyBase { +export type FlattenedProperty = PropertyBase & { boost?: number; depth_limit?: number; doc_values?: boolean; @@ -198,25 +172,25 @@ export interface FlattenedProperty extends PropertyBase { type: 'flattened'; } -export interface FloatNumberProperty extends NumberPropertyBase { +export type FloatNumberProperty = NumberPropertyBase & { null_value?: number; type: 'float'; } -export interface FloatRangeProperty extends RangePropertyBase { +export type FloatRangeProperty = RangePropertyBase & { type: 'float_range'; } -export type GeoOrientation = 'left' | 'right' +export type GeoOrientation = 'LEFT' | 'clockwise' | 'cw' | 'left' | 'RIGHT' | 'ccw' | 'counterclockwise' | 'right' -export interface GeoPointProperty extends DocValuesPropertyBase { +export type GeoPointProperty = DocValuesPropertyBase & { ignore_malformed?: boolean; ignore_z_value?: boolean; null_value?: Common.GeoLocation; type: 'geo_point'; } -export interface GeoShapeProperty extends DocValuesPropertyBase { +export type GeoShapeProperty = DocValuesPropertyBase & { coerce?: boolean; distance_error_pct?: number; ignore_malformed?: boolean; @@ -228,32 +202,32 @@ export interface GeoShapeProperty extends DocValuesPropertyBase { export type GeoStrategy = 'recursive' | 'term' -export interface HalfFloatNumberProperty extends NumberPropertyBase { +export type HalfFloatNumberProperty = NumberPropertyBase & { null_value?: number; type: 'half_float'; } -export interface HistogramProperty extends PropertyBase { +export type HistogramProperty = PropertyBase & { ignore_malformed?: boolean; type: 'histogram'; } -export interface IndexField { +export type IndexField = { enabled: boolean; } export type IndexOptions = 'docs' | 'freqs' | 'offsets' | 'positions' -export interface IntegerNumberProperty extends NumberPropertyBase { +export type IntegerNumberProperty = NumberPropertyBase & { null_value?: number; type: 'integer'; } -export interface IntegerRangeProperty extends RangePropertyBase { +export type IntegerRangeProperty = RangePropertyBase & { type: 'integer_range'; } -export interface IpProperty extends DocValuesPropertyBase { +export type IpProperty = DocValuesPropertyBase & { boost?: number; ignore_malformed?: boolean; index?: boolean; @@ -264,17 +238,17 @@ export interface IpProperty extends DocValuesPropertyBase { type: 'ip'; } -export interface IpRangeProperty extends RangePropertyBase { +export type IpRangeProperty = RangePropertyBase & { type: 'ip_range'; } -export interface JoinProperty extends PropertyBase { +export type JoinProperty = PropertyBase & { eager_global_ordinals?: boolean; relations?: Record; type: 'join'; } -export interface KeywordProperty extends DocValuesPropertyBase { +export type KeywordProperty = DocValuesPropertyBase & { boost?: number; eager_global_ordinals?: boolean; index?: boolean; @@ -287,36 +261,35 @@ export interface KeywordProperty extends DocValuesPropertyBase { type: 'keyword'; } -export interface KnnVectorMethod { +export type KnnVectorMethod = { engine?: string; name: string; - parameters?: Record>; + parameters?: { +}; space_type?: string; } -export interface KnnVectorProperty extends KnnVectorPropertyBase { - type: 'knn_vector'; -} - -export interface KnnVectorPropertyBase { +export type KnnVectorProperty = DocValuesPropertyBase & { compression_level?: string; data_type?: string; dimension: number; method?: KnnVectorMethod; mode?: string; + model_id?: string; space_type?: string; + type: 'knn_vector'; } -export interface LongNumberProperty extends NumberPropertyBase { +export type LongNumberProperty = NumberPropertyBase & { null_value?: number; type: 'long'; } -export interface LongRangeProperty extends RangePropertyBase { +export type LongRangeProperty = RangePropertyBase & { type: 'long_range'; } -export interface MatchOnlyTextProperty { +export type MatchOnlyTextProperty = { copy_to?: Common.Fields; fields?: Record; meta?: Record; @@ -325,18 +298,18 @@ export interface MatchOnlyTextProperty { export type MatchType = 'regex' | 'simple' -export interface Murmur3HashProperty extends DocValuesPropertyBase { +export type Murmur3HashProperty = DocValuesPropertyBase & { type: 'murmur3'; } -export interface NestedProperty extends CorePropertyBase { +export type NestedProperty = CorePropertyBase & { enabled?: boolean; include_in_parent?: boolean; include_in_root?: boolean; type: 'nested'; } -export interface NumberPropertyBase extends DocValuesPropertyBase { +export type NumberPropertyBase = DocValuesPropertyBase & { boost?: number; coerce?: boolean; ignore_malformed?: boolean; @@ -347,20 +320,20 @@ export interface NumberPropertyBase extends DocValuesPropertyBase { time_series_metric?: TimeSeriesMetricType; } -export interface ObjectProperty extends CorePropertyBase { +export type ObjectProperty = CorePropertyBase & { enabled?: boolean; type?: 'object'; } export type OnScriptError = 'continue' | 'fail' -export interface PercolatorProperty extends PropertyBase { +export type PercolatorProperty = PropertyBase & { type: 'percolator'; } -export type Property = BinaryProperty | BooleanProperty | DynamicProperty | JoinProperty | KeywordProperty | MatchOnlyTextProperty | PercolatorProperty | RankFeatureProperty | RankFeaturesProperty | SearchAsYouTypeProperty | TextProperty | VersionProperty | WildcardProperty | DateNanosProperty | DateProperty | AggregateMetricDoubleProperty | DenseVectorProperty | SparseVectorProperty | FlattenedProperty | NestedProperty | ObjectProperty | CompletionProperty | ConstantKeywordProperty | FieldAliasProperty | HistogramProperty | IpProperty | Murmur3HashProperty | TokenCountProperty | GeoPointProperty | GeoShapeProperty | XyPointProperty | XyShapeProperty | ByteNumberProperty | DoubleNumberProperty | FloatNumberProperty | HalfFloatNumberProperty | IntegerNumberProperty | LongNumberProperty | ScaledFloatNumberProperty | ShortNumberProperty | UnsignedLongNumberProperty | DateRangeProperty | DoubleRangeProperty | FloatRangeProperty | IntegerRangeProperty | IpRangeProperty | LongRangeProperty | KnnVectorProperty +export type Property = BinaryProperty | BooleanProperty | JoinProperty | KeywordProperty | MatchOnlyTextProperty | PercolatorProperty | RankFeatureProperty | RankFeaturesProperty | SearchAsYouTypeProperty | TextProperty | VersionProperty | WildcardProperty | DateNanosProperty | DateProperty | AggregateMetricDoubleProperty | DenseVectorProperty | SparseVectorProperty | FlattenedProperty | NestedProperty | ObjectProperty | CompletionProperty | ConstantKeywordProperty | FieldAliasProperty | HistogramProperty | IpProperty | Murmur3HashProperty | TokenCountProperty | GeoPointProperty | GeoShapeProperty | XyPointProperty | XyShapeProperty | ByteNumberProperty | DoubleNumberProperty | FloatNumberProperty | HalfFloatNumberProperty | IntegerNumberProperty | LongNumberProperty | ScaledFloatNumberProperty | ShortNumberProperty | UnsignedLongNumberProperty | DateRangeProperty | DoubleRangeProperty | FloatRangeProperty | IntegerRangeProperty | IpRangeProperty | LongRangeProperty | KnnVectorProperty -export interface PropertyBase { +export type PropertyBase = { dynamic?: DynamicMapping; fields?: Record; ignore_above?: number; @@ -368,51 +341,32 @@ export interface PropertyBase { properties?: Record; } -export interface RangePropertyBase extends DocValuesPropertyBase { +export type RangePropertyBase = DocValuesPropertyBase & { boost?: number; coerce?: boolean; index?: boolean; } -export interface RankFeatureProperty extends PropertyBase { +export type RankFeatureProperty = PropertyBase & { positive_score_impact?: boolean; type: 'rank_feature'; } -export interface RankFeaturesProperty extends PropertyBase { +export type RankFeaturesProperty = PropertyBase & { type: 'rank_features'; } -export interface RoutingField { +export type RoutingField = { required: boolean; } -export interface RuntimeField { - fetch_fields?: RuntimeFieldFetchFields[]; - format?: string; - input_field?: Common.Field; - script?: Common.Script; - target_field?: Common.Field; - target_index?: Common.IndexName; - type: RuntimeFieldType; -} - -export interface RuntimeFieldFetchFields { - field: Common.Field; - format?: string; -} - -export type RuntimeFields = Record - -export type RuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long' | 'lookup' - -export interface ScaledFloatNumberProperty extends NumberPropertyBase { +export type ScaledFloatNumberProperty = NumberPropertyBase & { null_value?: number; scaling_factor?: number; type: 'scaled_float'; } -export interface SearchAsYouTypeProperty extends CorePropertyBase { +export type SearchAsYouTypeProperty = CorePropertyBase & { analyzer?: string; index?: boolean; index_options?: IndexOptions; @@ -424,16 +378,16 @@ export interface SearchAsYouTypeProperty extends CorePropertyBase { type: 'search_as_you_type'; } -export interface ShortNumberProperty extends NumberPropertyBase { +export type ShortNumberProperty = NumberPropertyBase & { null_value?: Common.short; type: 'short'; } -export interface SizeField { +export type SizeField = { enabled: boolean; } -export interface SourceField { +export type SourceField = { compress?: boolean; compress_threshold?: string; enabled?: boolean; @@ -444,11 +398,11 @@ export interface SourceField { export type SourceFieldMode = 'disabled' | 'stored' | 'synthetic' -export interface SparseVectorProperty extends PropertyBase { +export type SparseVectorProperty = PropertyBase & { type: 'sparse_vector'; } -export interface SuggestContext { +export type SuggestContext = { name: Common.Name; path?: Common.Field; precision?: number | string; @@ -457,12 +411,12 @@ export interface SuggestContext { export type TermVectorOption = 'no' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' | 'with_positions_payloads' | 'yes' -export interface TextIndexPrefixes { +export type TextIndexPrefixes = { max_chars: number; min_chars: number; } -export interface TextProperty extends CorePropertyBase { +export type TextProperty = CorePropertyBase & { analyzer?: string; boost?: number; eager_global_ordinals?: boolean; @@ -482,7 +436,7 @@ export interface TextProperty extends CorePropertyBase { export type TimeSeriesMetricType = 'counter' | 'gauge' | 'histogram' | 'position' | 'summary' -export interface TokenCountProperty extends DocValuesPropertyBase { +export type TokenCountProperty = DocValuesPropertyBase & { analyzer?: string; boost?: number; enable_position_increments?: boolean; @@ -491,7 +445,7 @@ export interface TokenCountProperty extends DocValuesPropertyBase { type: 'token_count'; } -export interface TypeMapping { +export type TypeMapping = { _data_stream_timestamp?: DataStreamTimestamp; _field_names?: FieldNamesField; _meta?: Common.Metadata; @@ -507,31 +461,30 @@ export interface TypeMapping { index_field?: IndexField; numeric_detection?: boolean; properties?: Record; - runtime?: Record; } -export interface UnsignedLongNumberProperty extends NumberPropertyBase { +export type UnsignedLongNumberProperty = NumberPropertyBase & { null_value?: Common.ulong; type: 'unsigned_long'; } -export interface VersionProperty extends DocValuesPropertyBase { +export type VersionProperty = DocValuesPropertyBase & { type: 'version'; } -export interface WildcardProperty extends DocValuesPropertyBase { +export type WildcardProperty = DocValuesPropertyBase & { null_value?: string; type: 'wildcard'; } -export interface XyPointProperty extends DocValuesPropertyBase { +export type XyPointProperty = DocValuesPropertyBase & { ignore_malformed?: boolean; ignore_z_value?: boolean; null_value?: Common.XyLocation; type: 'xy_point'; } -export interface XyShapeProperty extends DocValuesPropertyBase { +export type XyShapeProperty = DocValuesPropertyBase & { coerce?: boolean; ignore_malformed?: boolean; ignore_z_value?: boolean; diff --git a/api/_types/_common.query_dsl.d.ts b/api/_types/_common.query_dsl.d.ts index 9d9e4d37e..7e5a4425c 100644 --- a/api/_types/_common.query_dsl.d.ts +++ b/api/_types/_common.query_dsl.d.ts @@ -18,7 +18,8 @@ import * as Common from './_common' import * as Common_Analysis from './_common.analysis' import * as Core_Search from './_core.search' -export interface BoolQuery extends QueryBase { +export type BoolQuery = QueryBase & { + adjust_pure_negative?: boolean; filter?: QueryContainer | QueryContainer[]; minimum_should_match?: Common.MinimumShouldMatch; must?: QueryContainer | QueryContainer[]; @@ -26,7 +27,7 @@ export interface BoolQuery extends QueryBase { should?: QueryContainer | QueryContainer[]; } -export interface BoostingQuery extends QueryBase { +export type BoostingQuery = QueryBase & { negative: QueryContainer; negative_boost: number; positive: QueryContainer; @@ -36,7 +37,7 @@ export type ChildScoreMode = 'avg' | 'max' | 'min' | 'none' | 'sum' export type CombinedFieldsOperator = 'and' | 'or' -export interface CombinedFieldsQuery extends QueryBase { +export type CombinedFieldsQuery = QueryBase & { auto_generate_synonyms_phrase_query?: boolean; fields: Common.Field[]; minimum_should_match?: Common.MinimumShouldMatch; @@ -47,7 +48,7 @@ export interface CombinedFieldsQuery extends QueryBase { export type CombinedFieldsZeroTerms = 'all' | 'none' -export interface CommonTermsQuery extends QueryBase { +export type CommonTermsQuery = QueryBase & { analyzer?: string; cutoff_frequency?: number; high_freq_operator?: Operator; @@ -56,7 +57,7 @@ export interface CommonTermsQuery extends QueryBase { query: string; } -export interface ConstantScoreQuery extends QueryBase { +export type ConstantScoreQuery = QueryBase & { filter: QueryContainer; } @@ -64,7 +65,7 @@ export type DateDecayFunction = DecayFunctionBase & Record export type DateDistanceFeatureQuery = DistanceFeatureQueryBaseDateMathDuration & Record -export interface DateRangeQuery extends RangeQueryBase { +export type DateRangeQuery = RangeQueryBase & { format?: Common.DateFormat; from?: Common.DateMath | undefined; gt?: Common.DateMath; @@ -77,34 +78,34 @@ export interface DateRangeQuery extends RangeQueryBase { export type DecayFunction = DateDecayFunction | NumericDecayFunction | GeoDecayFunction -export interface DecayFunctionBase { +export type DecayFunctionBase = { multi_value_mode?: MultiValueMode; } -export interface DisMaxQuery extends QueryBase { +export type DisMaxQuery = QueryBase & { queries: QueryContainer[]; tie_breaker?: number; } export type DistanceFeatureQuery = GeoDistanceFeatureQuery | DateDistanceFeatureQuery -export interface DistanceFeatureQueryBaseDateMathDuration extends QueryBase { +export type DistanceFeatureQueryBaseDateMathDuration = QueryBase & { field: Common.Field; origin: Common.DateMath; pivot: Common.Duration; } -export interface DistanceFeatureQueryBaseGeoLocationDistance extends QueryBase { +export type DistanceFeatureQueryBaseGeoLocationDistance = QueryBase & { field: Common.Field; origin: Common.GeoLocation; pivot: Common.Distance; } -export interface ExistsQuery extends QueryBase { +export type ExistsQuery = QueryBase & { field: Common.Field; } -export interface FieldAndFormat { +export type FieldAndFormat = { field: Common.Field; format?: string; include_unmapped?: boolean; @@ -112,7 +113,7 @@ export interface FieldAndFormat { export type FieldValueFactorModifier = 'ln' | 'ln1p' | 'ln2p' | 'log' | 'log1p' | 'log2p' | 'none' | 'reciprocal' | 'sqrt' | 'square' -export interface FieldValueFactorScoreFunction { +export type FieldValueFactorScoreFunction = { factor?: number; field: Common.Field; missing?: number; @@ -121,7 +122,7 @@ export interface FieldValueFactorScoreFunction { export type FunctionBoostMode = 'avg' | 'max' | 'min' | 'multiply' | 'replace' | 'sum' -export interface FunctionScoreContainer { +export type FunctionScoreContainer = { exp?: DecayFunction; field_value_factor?: FieldValueFactorScoreFunction; filter?: QueryContainer; @@ -134,7 +135,7 @@ export interface FunctionScoreContainer { export type FunctionScoreMode = 'avg' | 'first' | 'max' | 'min' | 'multiply' | 'sum' -export interface FunctionScoreQuery extends QueryBase { +export type FunctionScoreQuery = QueryBase & { boost_mode?: FunctionBoostMode; functions?: FunctionScoreContainer[]; max_boost?: number; @@ -143,7 +144,7 @@ export interface FunctionScoreQuery extends QueryBase { score_mode?: FunctionScoreMode; } -export interface FuzzyQuery extends QueryBase { +export type FuzzyQuery = QueryBase & { fuzziness?: Common.Fuzziness; max_expansions?: number; prefix_length?: number; @@ -152,7 +153,7 @@ export interface FuzzyQuery extends QueryBase { value: string | number | boolean; } -export interface GeoBoundingBoxQuery extends QueryBase { +export type GeoBoundingBoxQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; type?: GeoExecution; validation_method?: GeoValidationMethod; @@ -163,7 +164,7 @@ export type GeoDecayFunction = DecayFunctionBase & Record export type GeoDistanceFeatureQuery = DistanceFeatureQueryBaseGeoLocationDistance & Record -export interface GeoDistanceQuery extends QueryBase { +export type GeoDistanceQuery = QueryBase & { distance: Common.Distance; distance_type?: Common.GeoDistanceType; ignore_unmapped?: IgnoreUnmapped; @@ -173,29 +174,29 @@ export interface GeoDistanceQuery extends QueryBase { export type GeoExecution = 'indexed' | 'memory' -export interface GeoPolygonQuery extends QueryBase { +export type GeoPolygonQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; validation_method?: GeoValidationMethod; } -export interface GeoShape { +export type GeoShape = { coordinates?: any[]; type?: string; } -export interface GeoShapeField { +export type GeoShapeField = { relation?: Common.GeoShapeRelation; shape: GeoShape; } -export interface GeoShapeQuery extends QueryBase { +export type GeoShapeQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; [key: string]: any | GeoShapeField; } export type GeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict' -export interface HasChildQuery extends QueryBase { +export type HasChildQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; inner_hits?: Core_Search.InnerHits; max_children?: number; @@ -205,7 +206,7 @@ export interface HasChildQuery extends QueryBase { type: Common.RelationName; } -export interface HasParentQuery extends QueryBase { +export type HasParentQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; inner_hits?: Core_Search.InnerHits; parent_type: Common.RelationName; @@ -213,25 +214,25 @@ export interface HasParentQuery extends QueryBase { score?: boolean; } -export interface IdsQuery extends QueryBase { +export type IdsQuery = QueryBase & { values?: Common.Ids; } export type IgnoreUnmapped = boolean -export interface IntervalsAllOf { +export type IntervalsAllOf = { filter?: IntervalsFilter; intervals: IntervalsContainer[]; max_gaps?: number; ordered?: boolean; } -export interface IntervalsAnyOf { +export type IntervalsAnyOf = { filter?: IntervalsFilter; intervals: IntervalsContainer[]; } -export interface IntervalsContainer { +export type IntervalsContainer = { all_of?: IntervalsAllOf; any_of?: IntervalsAnyOf; fuzzy?: IntervalsFuzzy; @@ -240,7 +241,7 @@ export interface IntervalsContainer { wildcard?: IntervalsWildcard; } -export interface IntervalsFilter { +export type IntervalsFilter = { after?: IntervalsContainer; before?: IntervalsContainer; contained_by?: IntervalsContainer; @@ -252,7 +253,7 @@ export interface IntervalsFilter { script?: Common.Script; } -export interface IntervalsFuzzy { +export type IntervalsFuzzy = { analyzer?: string; fuzziness?: Common.Fuzziness; prefix_length?: number; @@ -261,7 +262,7 @@ export interface IntervalsFuzzy { use_field?: Common.Field; } -export interface IntervalsMatch { +export type IntervalsMatch = { analyzer?: string; filter?: IntervalsFilter; max_gaps?: number; @@ -270,13 +271,13 @@ export interface IntervalsMatch { use_field?: Common.Field; } -export interface IntervalsPrefix { +export type IntervalsPrefix = { analyzer?: string; prefix: string; use_field?: Common.Field; } -export interface IntervalsQuery extends QueryBase { +export type IntervalsQuery = QueryBase & { all_of?: IntervalsAllOf; any_of?: IntervalsAnyOf; fuzzy?: IntervalsFuzzy; @@ -285,7 +286,7 @@ export interface IntervalsQuery extends QueryBase { wildcard?: IntervalsWildcard; } -export interface IntervalsWildcard { +export type IntervalsWildcard = { analyzer?: string; pattern: string; use_field?: Common.Field; @@ -295,7 +296,7 @@ export type KnnQuery = Record export type Like = string | LikeDocument -export interface LikeDocument { +export type LikeDocument = { _id?: Common.Id; _index?: Common.IndexName; doc?: Record; @@ -308,7 +309,7 @@ export interface LikeDocument { export type MatchAllQuery = QueryBase -export interface MatchBoolPrefixQuery extends QueryBase { +export type MatchBoolPrefixQuery = QueryBase & { analyzer?: string; fuzziness?: Common.Fuzziness; fuzzy_rewrite?: Common.MultiTermQueryRewrite; @@ -322,7 +323,7 @@ export interface MatchBoolPrefixQuery extends QueryBase { export type MatchNoneQuery = QueryBase & Record -export interface MatchPhrasePrefixQuery extends QueryBase { +export type MatchPhrasePrefixQuery = QueryBase & { analyzer?: string; max_expansions?: number; query: string; @@ -330,14 +331,14 @@ export interface MatchPhrasePrefixQuery extends QueryBase { zero_terms_query?: ZeroTermsQuery; } -export interface MatchPhraseQuery extends QueryBase { +export type MatchPhraseQuery = QueryBase & { analyzer?: string; query: string; slop?: number; zero_terms_query?: ZeroTermsQuery; } -export interface MatchQuery extends QueryBase { +export type MatchQuery = QueryBase & { analyzer?: string; auto_generate_synonyms_phrase_query?: boolean; cutoff_frequency?: number; @@ -353,7 +354,7 @@ export interface MatchQuery extends QueryBase { zero_terms_query?: ZeroTermsQuery; } -export interface MoreLikeThisQuery extends QueryBase { +export type MoreLikeThisQuery = QueryBase & { analyzer?: string; boost_terms?: number; fail_on_unsupported_field?: boolean; @@ -375,7 +376,7 @@ export interface MoreLikeThisQuery extends QueryBase { version_type?: Common.VersionType; } -export interface MultiMatchQuery extends QueryBase { +export type MultiMatchQuery = QueryBase & { analyzer?: string; auto_generate_synonyms_phrase_query?: boolean; cutoff_frequency?: number; @@ -397,7 +398,7 @@ export interface MultiMatchQuery extends QueryBase { export type MultiValueMode = 'avg' | 'max' | 'min' | 'sum' -export interface NestedQuery extends QueryBase { +export type NestedQuery = QueryBase & { ignore_unmapped?: IgnoreUnmapped; inner_hits?: Core_Search.InnerHits; path: Common.Field; @@ -407,7 +408,7 @@ export interface NestedQuery extends QueryBase { export type NeuralQuery = QueryBase & Record -export interface NeuralQueryVectorField { +export type NeuralQueryVectorField = { filter?: QueryContainer; k?: number; max_distance?: number; @@ -417,7 +418,7 @@ export interface NeuralQueryVectorField { query_text?: string; } -export interface NumberRangeQuery extends RangeQueryBase { +export type NumberRangeQuery = RangeQueryBase & { from?: undefined | number | string; gt?: number; gte?: number; @@ -430,13 +431,13 @@ export type NumericDecayFunction = DecayFunctionBase & Record export type Operator = 'and' | 'or' -export interface ParentIdQuery extends QueryBase { +export type ParentIdQuery = QueryBase & { id?: Common.Id; ignore_unmapped?: IgnoreUnmapped; type?: Common.RelationName; } -export interface PercolateQuery extends QueryBase { +export type PercolateQuery = QueryBase & { document?: Record; documents?: Record[]; field: Common.Field; @@ -448,25 +449,25 @@ export interface PercolateQuery extends QueryBase { version?: Common.VersionNumber; } -export interface PinnedDoc { +export type PinnedDoc = { _id: Common.Id; _index: Common.IndexName; } export type PinnedQuery = QueryBase & Record -export interface PrefixQuery extends QueryBase { +export type PrefixQuery = QueryBase & { case_insensitive?: boolean; rewrite?: Common.MultiTermQueryRewrite; value: string; } -export interface QueryBase { +export type QueryBase = { _name?: string; boost?: number; } -export interface QueryContainer { +export type QueryContainer = { bool?: BoolQuery; boosting?: BoostingQuery; combined_fields?: CombinedFieldsQuery; @@ -528,7 +529,7 @@ export interface QueryContainer { xy_shape?: XyShapeQuery; } -export interface QueryStringQuery extends QueryBase { +export type QueryStringQuery = QueryBase & { allow_leading_wildcard?: boolean; analyze_wildcard?: boolean; analyzer?: string; @@ -556,14 +557,14 @@ export interface QueryStringQuery extends QueryBase { type?: TextQueryType; } -export interface RandomScoreFunction { +export type RandomScoreFunction = { field?: Common.Field; seed?: number | string; } export type RangeQuery = DateRangeQuery | NumberRangeQuery -export interface RangeQueryBase extends QueryBase { +export type RangeQueryBase = QueryBase & { relation?: RangeRelation; } @@ -573,20 +574,20 @@ export type RankFeatureFunction = Record export type RankFeatureFunctionLinear = RankFeatureFunction & Record -export interface RankFeatureFunctionLogarithm extends RankFeatureFunction { +export type RankFeatureFunctionLogarithm = RankFeatureFunction & { scaling_factor: number; } -export interface RankFeatureFunctionSaturation extends RankFeatureFunction { +export type RankFeatureFunctionSaturation = RankFeatureFunction & { pivot?: number; } -export interface RankFeatureFunctionSigmoid extends RankFeatureFunction { +export type RankFeatureFunctionSigmoid = RankFeatureFunction & { exponent: number; pivot: number; } -export interface RankFeatureQuery extends QueryBase { +export type RankFeatureQuery = QueryBase & { field: Common.Field; linear?: RankFeatureFunctionLinear; log?: RankFeatureFunctionLogarithm; @@ -594,7 +595,7 @@ export interface RankFeatureQuery extends QueryBase { sigmoid?: RankFeatureFunctionSigmoid; } -export interface RegexpQuery extends QueryBase { +export type RegexpQuery = QueryBase & { case_insensitive?: boolean; flags?: string; max_determinized_states?: number; @@ -602,21 +603,21 @@ export interface RegexpQuery extends QueryBase { value: string; } -export interface RuleQuery extends QueryBase { +export type RuleQuery = QueryBase & { match_criteria: Record; organic: QueryContainer; ruleset_id: Common.Id; } -export interface ScriptQuery extends QueryBase { +export type ScriptQuery = QueryBase & { script: Common.Script; } -export interface ScriptScoreFunction { +export type ScriptScoreFunction = { script: Common.Script; } -export interface ScriptScoreQuery extends QueryBase { +export type ScriptScoreQuery = QueryBase & { min_score?: number; query: QueryContainer; script: Common.Script; @@ -626,7 +627,7 @@ export type SimpleQueryStringFlag = 'ALL' | 'AND' | 'ESCAPE' | 'FUZZY' | 'NEAR' export type SimpleQueryStringFlags = Common.PipeSeparatedFlagsSimpleQueryStringFlag -export interface SimpleQueryStringQuery extends QueryBase { +export type SimpleQueryStringQuery = QueryBase & { analyze_wildcard?: boolean; analyzer?: string; auto_generate_synonyms_phrase_query?: boolean; @@ -642,34 +643,34 @@ export interface SimpleQueryStringQuery extends QueryBase { quote_field_suffix?: string; } -export interface SpanContainingQuery extends QueryBase { +export type SpanContainingQuery = QueryBase & { big: SpanQuery; little: SpanQuery; } -export interface SpanFieldMaskingQuery extends QueryBase { +export type SpanFieldMaskingQuery = QueryBase & { field: Common.Field; query: SpanQuery; } -export interface SpanFirstQuery extends QueryBase { +export type SpanFirstQuery = QueryBase & { end: number; match: SpanQuery; } export type SpanGapQuery = Record -export interface SpanMultiTermQuery extends QueryBase { +export type SpanMultiTermQuery = QueryBase & { match: QueryContainer; } -export interface SpanNearQuery extends QueryBase { +export type SpanNearQuery = QueryBase & { clauses: SpanQuery[]; in_order?: boolean; slop?: number; } -export interface SpanNotQuery extends QueryBase { +export type SpanNotQuery = QueryBase & { dist?: number; exclude: SpanQuery; include: SpanQuery; @@ -677,11 +678,11 @@ export interface SpanNotQuery extends QueryBase { pre?: number; } -export interface SpanOrQuery extends QueryBase { +export type SpanOrQuery = QueryBase & { clauses: SpanQuery[]; } -export interface SpanQuery { +export type SpanQuery = { field_masking_span?: SpanFieldMaskingQuery; span_containing?: SpanContainingQuery; span_first?: SpanFirstQuery; @@ -694,39 +695,39 @@ export interface SpanQuery { span_within?: SpanWithinQuery; } -export interface SpanTermQuery extends QueryBase { +export type SpanTermQuery = QueryBase & { value: string; } -export interface SpanWithinQuery extends QueryBase { +export type SpanWithinQuery = QueryBase & { big: SpanQuery; little: SpanQuery; } -export interface TermQuery extends QueryBase { +export type TermQuery = QueryBase & { case_insensitive?: boolean; value: Common.FieldValue; } -export interface TermsLookupField { +export type TermsLookupField = { id?: Common.Id; index?: Common.IndexName; path?: Common.Field; routing?: Common.Routing; } -export interface TermsQueryField { +export type TermsQueryField = { boost?: number; [key: string]: any | TermsLookupField | string[]; } -export interface TermsSetQuery extends QueryBase { +export type TermsSetQuery = QueryBase & { minimum_should_match_field?: Common.Field; minimum_should_match_script?: Common.Script; terms: string[]; } -export interface TextExpansionQuery extends QueryBase { +export type TextExpansionQuery = QueryBase & { model_id: string; model_text: string; pruning_config?: TokenPruningConfig; @@ -734,38 +735,38 @@ export interface TextExpansionQuery extends QueryBase { export type TextQueryType = 'best_fields' | 'bool_prefix' | 'cross_fields' | 'most_fields' | 'phrase' | 'phrase_prefix' -export interface TokenPruningConfig { +export type TokenPruningConfig = { only_score_pruned_tokens?: boolean; tokens_freq_ratio_threshold?: number; tokens_weight_threshold?: number; } -export interface TypeQuery extends QueryBase { +export type TypeQuery = QueryBase & { value: string; } -export interface WeightedTokensQuery extends QueryBase { +export type WeightedTokensQuery = QueryBase & { pruning_config?: TokenPruningConfig; tokens: Record; } -export interface WildcardQuery extends QueryBase { +export type WildcardQuery = QueryBase & { case_insensitive?: boolean; rewrite?: Common.MultiTermQueryRewrite; value?: string; wildcard?: string; } -export interface WrapperQuery extends QueryBase { +export type WrapperQuery = QueryBase & { query: string; } -export interface XyShape { +export type XyShape = { coordinates?: any[]; type?: string; } -export interface XyShapeField { +export type XyShapeField = { relation?: Common.GeoShapeRelation; shape: XyShape; } diff --git a/api/_types/_core._common.d.ts b/api/_types/_core._common.d.ts index 5905675e0..bc3f88d17 100644 --- a/api/_types/_core._common.d.ts +++ b/api/_types/_core._common.d.ts @@ -15,23 +15,23 @@ */ -export interface DeletedPit { +export type DeletedPit = { pit_id?: string; successful?: boolean; } -export interface PitDetail { +export type PitDetail = { creation_time?: number; keep_alive?: number; pit_id?: string; } -export interface PitsDetailsDeleteAll { +export type PitsDetailsDeleteAll = { pit_id?: string; successful?: boolean; } -export interface ShardStatistics { +export type ShardStatistics = { failed?: number; skipped?: number; successful?: number; diff --git a/api/_types/_core.bulk.d.ts b/api/_types/_core.bulk.d.ts index 6d2caad42..2f136b2d6 100644 --- a/api/_types/_core.bulk.d.ts +++ b/api/_types/_core.bulk.d.ts @@ -23,7 +23,7 @@ export type DeleteOperation = OperationBase export type IndexOperation = WriteOperation -export interface OperationBase { +export type OperationBase = { _id?: Common.Id; _index?: Common.IndexName; if_primary_term?: number; @@ -33,14 +33,14 @@ export interface OperationBase { version_type?: Common.VersionType; } -export interface OperationContainer { +export type OperationContainer = { create?: CreateOperation; delete?: DeleteOperation; index?: IndexOperation; update?: UpdateOperation; } -export interface ResponseItem { +export type ResponseItem = { _id?: undefined | string; _index: string; _primary_term?: number; @@ -55,7 +55,7 @@ export interface ResponseItem { status: number; } -export interface UpdateAction { +export type UpdateAction = { _source?: Core_Search.SourceConfig; detect_noop?: boolean; doc?: Record; @@ -65,12 +65,12 @@ export interface UpdateAction { upsert?: Record; } -export interface UpdateOperation extends OperationBase { +export type UpdateOperation = OperationBase & { require_alias?: boolean; retry_on_conflict?: number; } -export interface WriteOperation extends OperationBase { +export type WriteOperation = OperationBase & { dynamic_templates?: Record; pipeline?: string; require_alias?: boolean; diff --git a/api/_types/_core.explain.d.ts b/api/_types/_core.explain.d.ts index b1639ca6c..57d6e4f5e 100644 --- a/api/_types/_core.explain.d.ts +++ b/api/_types/_core.explain.d.ts @@ -15,15 +15,15 @@ */ -export interface Explanation { +export type Explanation = { description: string; details: ExplanationDetail[]; - value: number; + value: number | number | number | number; } -export interface ExplanationDetail { +export type ExplanationDetail = { description: string; details?: ExplanationDetail[]; - value: number; + value: number | number | number | number; } diff --git a/api/_types/_core.field_caps.d.ts b/api/_types/_core.field_caps.d.ts index 8ccbb8928..1257b762a 100644 --- a/api/_types/_core.field_caps.d.ts +++ b/api/_types/_core.field_caps.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Common_Mapping from './_common.mapping' -export interface FieldCapability { +export type FieldCapability = { aggregatable: boolean; indices?: Common.Indices; meta?: Common.Metadata; diff --git a/api/_types/_core.get.d.ts b/api/_types/_core.get.d.ts index 221c7e1ac..1ba5ab906 100644 --- a/api/_types/_core.get.d.ts +++ b/api/_types/_core.get.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface GetResult { +export type GetResult = { _id: Common.Id; _index: Common.IndexName; _primary_term?: number; diff --git a/api/_types/_core.get_script_context.d.ts b/api/_types/_core.get_script_context.d.ts index a7af06aa3..ab2fe527d 100644 --- a/api/_types/_core.get_script_context.d.ts +++ b/api/_types/_core.get_script_context.d.ts @@ -16,18 +16,18 @@ import * as Common from './_common' -export interface Context { +export type Context = { methods: ContextMethod[]; name: Common.Name; } -export interface ContextMethod { +export type ContextMethod = { name: Common.Name; params: ContextMethodParam[]; return_type: string; } -export interface ContextMethodParam { +export type ContextMethodParam = { name: Common.Name; type: string; } diff --git a/api/_types/_core.get_script_languages.d.ts b/api/_types/_core.get_script_languages.d.ts index 4641bac6f..58af9ce3c 100644 --- a/api/_types/_core.get_script_languages.d.ts +++ b/api/_types/_core.get_script_languages.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface LanguageContext { +export type LanguageContext = { contexts: string[]; language: Common.ScriptLanguage; } diff --git a/api/_types/_core.mget.d.ts b/api/_types/_core.mget.d.ts index 005cb2a80..e202d5f1c 100644 --- a/api/_types/_core.mget.d.ts +++ b/api/_types/_core.mget.d.ts @@ -18,13 +18,13 @@ import * as Common from './_common' import * as Core_Get from './_core.get' import * as Core_Search from './_core.search' -export interface MultiGetError { +export type MultiGetError = { _id: Common.Id; _index: Common.IndexName; error: Common.ErrorCause; } -export interface Operation { +export type Operation = { _id: Common.Id; _index?: Common.IndexName; _source?: Core_Search.SourceConfig; diff --git a/api/_types/_core.msearch.d.ts b/api/_types/_core.msearch.d.ts index 5817c3d79..7e1562161 100644 --- a/api/_types/_core.msearch.d.ts +++ b/api/_types/_core.msearch.d.ts @@ -16,11 +16,10 @@ import * as Common from './_common' import * as Common_Aggregations from './_common.aggregations' -import * as Common_Mapping from './_common.mapping' import * as Common_QueryDsl from './_common.query_dsl' import * as Core_Search from './_core.search' -export interface MultisearchBody { +export type MultisearchBody = { _source?: Core_Search.SourceConfig; aggregations?: Record; collapse?: Core_Search.FieldCollapse; @@ -38,7 +37,6 @@ export interface MultisearchBody { profile?: boolean; query?: Common_QueryDsl.QueryContainer; rescore?: Core_Search.Rescore | Core_Search.Rescore[]; - runtime_mappings?: Common_Mapping.RuntimeFields; script_fields?: Record; search_after?: Common.SortResults; seq_no_primary_term?: boolean; @@ -54,7 +52,7 @@ export interface MultisearchBody { version?: boolean; } -export interface MultisearchHeader { +export type MultisearchHeader = { allow_no_indices?: boolean; allow_partial_search_results?: boolean; ccs_minimize_roundtrips?: boolean; @@ -68,11 +66,11 @@ export interface MultisearchHeader { search_type?: Common.SearchType; } -export interface MultiSearchItem extends Core_Search.ResponseBody { +export type MultiSearchItem = Core_Search.ResponseBody & { status?: number; } -export interface MultiSearchResult { +export type MultiSearchResult = { responses: ResponseItem[]; took: number; } diff --git a/api/_types/_core.msearch_template.d.ts b/api/_types/_core.msearch_template.d.ts index 0405d9055..31fdafff2 100644 --- a/api/_types/_core.msearch_template.d.ts +++ b/api/_types/_core.msearch_template.d.ts @@ -19,7 +19,7 @@ import * as Core_Msearch from './_core.msearch' export type RequestItem = Core_Msearch.MultisearchHeader | TemplateConfig -export interface TemplateConfig { +export type TemplateConfig = { explain?: boolean; id?: Common.Id; params?: Record>; diff --git a/api/_types/_core.mtermvectors.d.ts b/api/_types/_core.mtermvectors.d.ts index 89a392775..3e4c5806b 100644 --- a/api/_types/_core.mtermvectors.d.ts +++ b/api/_types/_core.mtermvectors.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Core_Termvectors from './_core.termvectors' -export interface Operation { +export type Operation = { _id: Common.Id; _index?: Common.IndexName; doc?: Record; @@ -33,7 +33,7 @@ export interface Operation { version_type?: Common.VersionType; } -export interface TermVectorsResult { +export type TermVectorsResult = { _id: Common.Id; _index: Common.IndexName; _version?: Common.VersionNumber; diff --git a/api/_types/_core.rank_eval.d.ts b/api/_types/_core.rank_eval.d.ts index 60c277f0c..643dbf6af 100644 --- a/api/_types/_core.rank_eval.d.ts +++ b/api/_types/_core.rank_eval.d.ts @@ -17,24 +17,24 @@ import * as Common from './_common' import * as Common_QueryDsl from './_common.query_dsl' -export interface DocumentRating { +export type DocumentRating = { _id: Common.Id; _index: Common.IndexName; rating: number; } -export interface RankEvalHit { +export type RankEvalHit = { _id: Common.Id; _index: Common.IndexName; _score: number; } -export interface RankEvalHitItem { +export type RankEvalHitItem = { hit: RankEvalHit; rating?: undefined | number | string; } -export interface RankEvalMetric { +export type RankEvalMetric = { dcg?: RankEvalMetricDiscountedCumulativeGain; expected_reciprocal_rank?: RankEvalMetricExpectedReciprocalRank; mean_reciprocal_rank?: RankEvalMetricMeanReciprocalRank; @@ -42,43 +42,43 @@ export interface RankEvalMetric { recall?: RankEvalMetricRecall; } -export interface RankEvalMetricBase { +export type RankEvalMetricBase = { k?: number; } -export interface RankEvalMetricDetail { +export type RankEvalMetricDetail = { hits: RankEvalHitItem[]; metric_details: Record>>; metric_score: number; unrated_docs: UnratedDocument[]; } -export interface RankEvalMetricDiscountedCumulativeGain extends RankEvalMetricBase { +export type RankEvalMetricDiscountedCumulativeGain = RankEvalMetricBase & { normalize?: boolean; } -export interface RankEvalMetricExpectedReciprocalRank extends RankEvalMetricBase { +export type RankEvalMetricExpectedReciprocalRank = RankEvalMetricBase & { maximum_relevance: number; } export type RankEvalMetricMeanReciprocalRank = RankEvalMetricRatingThreshold & Record -export interface RankEvalMetricPrecision extends RankEvalMetricRatingThreshold { +export type RankEvalMetricPrecision = RankEvalMetricRatingThreshold & { ignore_unlabeled?: boolean; } -export interface RankEvalMetricRatingThreshold extends RankEvalMetricBase { +export type RankEvalMetricRatingThreshold = RankEvalMetricBase & { relevant_rating_threshold?: number; } export type RankEvalMetricRecall = RankEvalMetricRatingThreshold & Record -export interface RankEvalQuery { +export type RankEvalQuery = { query: Common_QueryDsl.QueryContainer; size?: number; } -export interface RankEvalRequestItem { +export type RankEvalRequestItem = { id: Common.Id; params?: Record>; ratings: DocumentRating[]; @@ -86,7 +86,7 @@ export interface RankEvalRequestItem { template_id?: Common.Id; } -export interface UnratedDocument { +export type UnratedDocument = { _id: Common.Id; _index: Common.IndexName; } diff --git a/api/_types/_core.reindex.d.ts b/api/_types/_core.reindex.d.ts index c5e60fa9a..35ac9b999 100644 --- a/api/_types/_core.reindex.d.ts +++ b/api/_types/_core.reindex.d.ts @@ -15,10 +15,9 @@ */ import * as Common from './_common' -import * as Common_Mapping from './_common.mapping' import * as Common_QueryDsl from './_common.query_dsl' -export interface Destination { +export type Destination = { index: Common.IndexName; op_type?: Common.OpType; pipeline?: string; @@ -26,7 +25,7 @@ export interface Destination { version_type?: Common.VersionType; } -export interface RemoteSource { +export type RemoteSource = { connect_timeout?: Common.Duration; headers?: Record; host: Common.Host; @@ -35,12 +34,11 @@ export interface RemoteSource { username?: Common.Username; } -export interface Source { +export type Source = { _source?: Common.Fields; index: Common.Indices; query?: Common_QueryDsl.QueryContainer; remote?: RemoteSource; - runtime_mappings?: Common_Mapping.RuntimeFields; size?: number; slice?: Common.SlicedScroll; sort?: Common.Sort; diff --git a/api/_types/_core.reindex_rethrottle.d.ts b/api/_types/_core.reindex_rethrottle.d.ts index 4fdd88a41..954a30ada 100644 --- a/api/_types/_core.reindex_rethrottle.d.ts +++ b/api/_types/_core.reindex_rethrottle.d.ts @@ -16,11 +16,11 @@ import * as Common from './_common' -export interface ReindexNode extends Common.BaseNode { +export type ReindexNode = Common.BaseNode & { tasks: Record; } -export interface ReindexStatus { +export type ReindexStatus = { batches: number; created: number; deleted: number; @@ -36,7 +36,7 @@ export interface ReindexStatus { version_conflicts: number; } -export interface ReindexTask { +export type ReindexTask = { action: string; cancellable: boolean; description: string; diff --git a/api/_types/_core.scripts_painless_execute.d.ts b/api/_types/_core.scripts_painless_execute.d.ts index 23a8cb3df..627a446ec 100644 --- a/api/_types/_core.scripts_painless_execute.d.ts +++ b/api/_types/_core.scripts_painless_execute.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Common_QueryDsl from './_common.query_dsl' -export interface PainlessContextSetup { +export type PainlessContextSetup = { document: Record; index: Common.IndexName; query: Common_QueryDsl.QueryContainer; diff --git a/api/_types/_core.search.d.ts b/api/_types/_core.search.d.ts index 19257340f..507ea69e4 100644 --- a/api/_types/_core.search.d.ts +++ b/api/_types/_core.search.d.ts @@ -20,7 +20,7 @@ import * as Common_Analysis from './_common.analysis' import * as Common_QueryDsl from './_common.query_dsl' import * as Core_Explain from './_core.explain' -export interface AggregationBreakdown { +export type AggregationBreakdown = { build_aggregation: number; build_aggregation_count: number; build_leaf_collector: number; @@ -35,7 +35,7 @@ export interface AggregationBreakdown { reduce_count: number; } -export interface AggregationProfile { +export type AggregationProfile = { breakdown: AggregationBreakdown; children?: AggregationProfile[]; debug?: AggregationProfileDebug; @@ -44,7 +44,7 @@ export interface AggregationProfile { type: string; } -export interface AggregationProfileDebug { +export type AggregationProfileDebug = { built_buckets?: number; chars_fetched?: number; collect_analyzed_count?: number; @@ -75,7 +75,7 @@ export interface AggregationProfileDebug { values_fetched?: number; } -export interface AggregationProfileDelegateDebugFilter { +export type AggregationProfileDelegateDebugFilter = { query?: string; results_from_metadata?: number; segments_counted_in_constant_time?: number; @@ -84,18 +84,20 @@ export interface AggregationProfileDelegateDebugFilter { export type BoundaryScanner = 'chars' | 'sentence' | 'word' -export interface Collector { +export type BuiltinHighlighterType = 'fvh' | 'plain' | 'unified' + +export type Collector = { children?: Collector[]; name: string; reason: string; time_in_nanos: Common.DurationValueUnitNanos; } -export interface CompletionSuggest extends SuggestBase { +export type CompletionSuggest = SuggestBase & { options: CompletionSuggestOption | CompletionSuggestOption[]; } -export interface CompletionSuggestOption { +export type CompletionSuggestOption = { _id?: string; _index?: Common.IndexName; _routing?: Common.Routing; @@ -110,7 +112,7 @@ export interface CompletionSuggestOption { export type Context = string | Common.GeoLocation -export interface FetchProfile { +export type FetchProfile = { breakdown: FetchProfileBreakdown; children?: FetchProfile[]; debug?: FetchProfileDebug; @@ -119,7 +121,7 @@ export interface FetchProfile { type: string; } -export interface FetchProfileBreakdown { +export type FetchProfileBreakdown = { load_source?: number; load_source_count?: number; load_stored_fields?: number; @@ -130,24 +132,23 @@ export interface FetchProfileBreakdown { process_count?: number; } -export interface FetchProfileDebug { +export type FetchProfileDebug = { fast_path?: number; stored_fields?: string[]; } -export interface FieldCollapse { - collapse?: FieldCollapse; +export type FieldCollapse = { field: Common.Field; inner_hits?: InnerHits | InnerHits[]; max_concurrent_group_searches?: number; } -export interface Highlight extends HighlightBase { +export type Highlight = HighlightBase & { encoder?: HighlighterEncoder; fields: Record; } -export interface HighlightBase { +export type HighlightBase = { boundary_chars?: string; boundary_max_scan?: number; boundary_scanner?: BoundaryScanner; @@ -179,15 +180,15 @@ export type HighlighterOrder = 'score' export type HighlighterTagsSchema = 'styled' -export type HighlighterType = 'fvh' | 'plain' | 'unified' +export type HighlighterType = BuiltinHighlighterType | string -export interface HighlightField extends HighlightBase { +export type HighlightField = HighlightBase & { analyzer?: Common_Analysis.Analyzer; fragment_offset?: number; matched_fields?: Common.Fields; } -export interface Hit { +export type Hit = { _explanation?: Core_Explain.Explanation; _id: Common.Id; _ignored?: string[]; @@ -210,13 +211,13 @@ export interface Hit { sort?: Common.SortResults; } -export interface HitsMetadata { +export type HitsMetadata = { hits: Hit[]; max_score?: undefined | number | string; total?: TotalHits | number; } -export interface InnerHits { +export type InnerHits = { _source?: SourceConfig; collapse?: FieldCollapse; docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; @@ -235,37 +236,37 @@ export interface InnerHits { version?: boolean; } -export interface InnerHitsResult { +export type InnerHitsResult = { hits: HitsMetadata; } -export interface NestedIdentity { +export type NestedIdentity = { _nested?: NestedIdentity; field: Common.Field; offset: number; } -export interface PhraseSuggest extends SuggestBase { +export type PhraseSuggest = SuggestBase & { options: PhraseSuggestOption | PhraseSuggestOption[]; } -export interface PhraseSuggestOption { +export type PhraseSuggestOption = { collate_match?: boolean; highlighted?: string; score: number; text: string; } -export interface PointInTimeReference { +export type PointInTimeReference = { id: Common.Id; keep_alive?: Common.Duration; } -export interface Profile { +export type Profile = { shards: ShardProfile[]; } -export interface QueryBreakdown { +export type QueryBreakdown = { advance: number; advance_count: number; build_scorer: number; @@ -286,7 +287,7 @@ export interface QueryBreakdown { shallow_advance_count: number; } -export interface QueryProfile { +export type QueryProfile = { breakdown: QueryBreakdown; children?: QueryProfile[]; description: string; @@ -294,19 +295,19 @@ export interface QueryProfile { type: string; } -export interface Rescore { +export type Rescore = { query: RescoreQuery; window_size?: number; } -export interface RescoreQuery { +export type RescoreQuery = { query_weight?: number; rescore_query: Common_QueryDsl.QueryContainer; rescore_query_weight?: number; score_mode?: ScoreMode; } -export interface ResponseBody { +export type ResponseBody = { _clusters?: Common.ClusterStatistics; _scroll_id?: Common.ScrollId; _shards: Common.ShardStatistics; @@ -326,13 +327,13 @@ export interface ResponseBody { export type ScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' -export interface SearchProfile { +export type SearchProfile = { collector: Collector[]; query: QueryProfile[]; rewrite_time: number; } -export interface ShardProfile { +export type ShardProfile = { aggregations: AggregationProfile[]; fetch?: FetchProfile; id: string; @@ -343,28 +344,28 @@ export type SourceConfig = boolean | Common.Field[] | SourceFilter export type SourceConfigParam = boolean | Common.Fields -export interface SourceFilter { +export type SourceFilter = { excludes?: Common.Fields; includes?: Common.Fields; } export type Suggest = CompletionSuggest | PhraseSuggest | TermSuggest -export interface SuggestBase { +export type SuggestBase = { length: number; offset: number; text: string; } -export interface Suggester { +export type Suggester = { text?: string; } -export interface TermSuggest extends SuggestBase { +export type TermSuggest = SuggestBase & { options: TermSuggestOption | TermSuggestOption[]; } -export interface TermSuggestOption { +export type TermSuggestOption = { collate_match?: boolean; freq: number; highlighted?: string; @@ -372,7 +373,7 @@ export interface TermSuggestOption { text: string; } -export interface TotalHits { +export type TotalHits = { relation: TotalHitsRelation; value: number; } diff --git a/api/_types/_core.search_shards.d.ts b/api/_types/_core.search_shards.d.ts index 14dd4f715..c662f2942 100644 --- a/api/_types/_core.search_shards.d.ts +++ b/api/_types/_core.search_shards.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Common_QueryDsl from './_common.query_dsl' -export interface ShardStoreIndex { +export type ShardStoreIndex = { aliases?: Common.Name[]; filter?: Common_QueryDsl.QueryContainer; } diff --git a/api/_types/_core.termvectors.d.ts b/api/_types/_core.termvectors.d.ts index 9f2f9ae41..25ff8a60d 100644 --- a/api/_types/_core.termvectors.d.ts +++ b/api/_types/_core.termvectors.d.ts @@ -15,13 +15,13 @@ */ -export interface FieldStatistics { +export type FieldStatistics = { doc_count: number; sum_doc_freq: number; sum_ttf: number; } -export interface Filter { +export type Filter = { max_doc_freq?: number; max_num_terms?: number; max_term_freq?: number; @@ -31,7 +31,7 @@ export interface Filter { min_word_length?: number; } -export interface Term { +export type Term = { doc_freq?: number; score?: number; term_freq: number; @@ -39,12 +39,12 @@ export interface Term { ttf?: number; } -export interface TermVector { +export type TermVector = { field_statistics: FieldStatistics; terms: Record; } -export interface Token { +export type Token = { end_offset?: number; payload?: string; position: number; diff --git a/api/_types/_core.update.d.ts b/api/_types/_core.update.d.ts index 14a0c64bf..59abcaed8 100644 --- a/api/_types/_core.update.d.ts +++ b/api/_types/_core.update.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface UpdateWriteResponseBase extends Common.WriteResponseBase { +export type UpdateWriteResponseBase = Common.WriteResponseBase & { get?: Common.InlineGet; } diff --git a/api/_types/_core.update_by_query_rethrottle.d.ts b/api/_types/_core.update_by_query_rethrottle.d.ts index 632f5dfa8..08d163abd 100644 --- a/api/_types/_core.update_by_query_rethrottle.d.ts +++ b/api/_types/_core.update_by_query_rethrottle.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Tasks_Common from './tasks._common' -export interface UpdateByQueryRethrottleNode extends Common.BaseNode { +export type UpdateByQueryRethrottleNode = Common.BaseNode & { tasks: Record; } diff --git a/api/_types/_global.d.ts b/api/_types/_global.d.ts index e0c3c4417..c6f9ca867 100644 --- a/api/_types/_global.d.ts +++ b/api/_types/_global.d.ts @@ -15,7 +15,7 @@ */ -export interface Params { +export type Params = { error_trace?: boolean; filter_path?: string | string[]; human?: boolean; diff --git a/api/_types/asynchronous_search._common.d.ts b/api/_types/asynchronous_search._common.d.ts index fb97bb907..b3ee30330 100644 --- a/api/_types/asynchronous_search._common.d.ts +++ b/api/_types/asynchronous_search._common.d.ts @@ -16,11 +16,10 @@ import * as Common from './_common' import * as Common_Aggregations from './_common.aggregations' -import * as Common_Mapping from './_common.mapping' import * as Common_QueryDsl from './_common.query_dsl' import * as Core_Search from './_core.search' -export interface AsynchronousSearchStats { +export type AsynchronousSearchStats = { cancelled?: number; initialized?: number; persist_failed?: number; @@ -32,11 +31,11 @@ export interface AsynchronousSearchStats { submitted?: number; } -export interface NodesStats { +export type NodesStats = { asynchronous_search_stats?: AsynchronousSearchStats; } -export interface ResponseBody { +export type ResponseBody = { expiration_time_in_millis?: number; id?: string; response?: Core_Search.ResponseBody; @@ -45,7 +44,7 @@ export interface ResponseBody { took?: number; } -export interface Search { +export type Search = { _source?: Core_Search.SourceConfig; aggregations?: Record; collapse?: Core_Search.FieldCollapse; @@ -62,7 +61,6 @@ export interface Search { profile?: boolean; query?: Common_QueryDsl.QueryContainer; rank?: Common.RankContainer; - runtime_mappings?: Common_Mapping.RuntimeFields; script_fields?: Record; search_after?: Common.SortResults; seq_no_primary_term?: boolean; @@ -79,7 +77,7 @@ export interface Search { version?: boolean; } -export interface StatsResponse { +export type StatsResponse = { _nodes?: Common.NodeStatistics; cluster_name?: string; nodes?: Record; diff --git a/api/_types/cat._common.d.ts b/api/_types/cat._common.d.ts index debe5fcf3..b811a75fc 100644 --- a/api/_types/cat._common.d.ts +++ b/api/_types/cat._common.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface CatPitSegmentsRecord { +export type CatPitSegmentsRecord = { committed?: string; compound?: string; 'docs.count'?: string; @@ -33,7 +33,7 @@ export interface CatPitSegmentsRecord { version?: string; } -export interface CatSegmentReplicationRecord { +export type CatSegmentReplicationRecord = { bytes?: string; bytes_behind?: string; bytes_fetched?: string; diff --git a/api/_types/cat.aliases.d.ts b/api/_types/cat.aliases.d.ts index 9d69d35b4..cb6cfb1ea 100644 --- a/api/_types/cat.aliases.d.ts +++ b/api/_types/cat.aliases.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface AliasesRecord { +export type AliasesRecord = { alias?: string; filter?: string; index?: Common.IndexName; diff --git a/api/_types/cat.allocation.d.ts b/api/_types/cat.allocation.d.ts index 0aaa51ea2..917aff035 100644 --- a/api/_types/cat.allocation.d.ts +++ b/api/_types/cat.allocation.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface AllocationRecord { +export type AllocationRecord = { 'disk.avail'?: undefined | string; 'disk.indices'?: undefined | string; 'disk.percent'?: Common.PercentageString | undefined; diff --git a/api/_types/cat.cluster_manager.d.ts b/api/_types/cat.cluster_manager.d.ts index 19f1f830e..884cb5894 100644 --- a/api/_types/cat.cluster_manager.d.ts +++ b/api/_types/cat.cluster_manager.d.ts @@ -15,7 +15,7 @@ */ -export interface ClusterManagerRecord { +export type ClusterManagerRecord = { host?: string; id?: string; ip?: string; diff --git a/api/_types/cat.count.d.ts b/api/_types/cat.count.d.ts index c3b2a0637..b32a63a04 100644 --- a/api/_types/cat.count.d.ts +++ b/api/_types/cat.count.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface CountRecord { +export type CountRecord = { count?: string; epoch?: Common.StringifiedEpochTimeUnitSeconds; timestamp?: Common.TimeOfDay; diff --git a/api/_types/cat.fielddata.d.ts b/api/_types/cat.fielddata.d.ts index b3f3e7741..90faaafcd 100644 --- a/api/_types/cat.fielddata.d.ts +++ b/api/_types/cat.fielddata.d.ts @@ -15,7 +15,7 @@ */ -export interface FielddataRecord { +export type FielddataRecord = { field?: string; host?: string; id?: string; diff --git a/api/_types/cat.health.d.ts b/api/_types/cat.health.d.ts index e48fb1a4c..0819d2bb2 100644 --- a/api/_types/cat.health.d.ts +++ b/api/_types/cat.health.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface HealthRecord { +export type HealthRecord = { active_shards_percent?: Common.PercentageString; cluster?: string; discovered_cluster_manager?: string; diff --git a/api/_types/cat.indices.d.ts b/api/_types/cat.indices.d.ts index 88b0b7631..431221aa8 100644 --- a/api/_types/cat.indices.d.ts +++ b/api/_types/cat.indices.d.ts @@ -15,7 +15,7 @@ */ -export interface IndicesRecord { +export type IndicesRecord = { 'completion.size'?: undefined | string; 'creation.date'?: string; 'creation.date.string'?: string; diff --git a/api/_types/cat.master.d.ts b/api/_types/cat.master.d.ts index c88eb332e..a0cfee9af 100644 --- a/api/_types/cat.master.d.ts +++ b/api/_types/cat.master.d.ts @@ -15,7 +15,7 @@ */ -export interface MasterRecord { +export type MasterRecord = { host?: string; id?: string; ip?: string; diff --git a/api/_types/cat.nodeattrs.d.ts b/api/_types/cat.nodeattrs.d.ts index 52b2a3613..257c9f073 100644 --- a/api/_types/cat.nodeattrs.d.ts +++ b/api/_types/cat.nodeattrs.d.ts @@ -15,7 +15,7 @@ */ -export interface NodeAttributesRecord { +export type NodeAttributesRecord = { attr?: string; host?: string; id?: string; diff --git a/api/_types/cat.nodes.d.ts b/api/_types/cat.nodes.d.ts index 680ee6877..114d04993 100644 --- a/api/_types/cat.nodes.d.ts +++ b/api/_types/cat.nodes.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface NodesRecord { +export type NodesRecord = { build?: string; 'bulk.avg_size_in_bytes'?: string; 'bulk.avg_time'?: string; diff --git a/api/_types/cat.pending_tasks.d.ts b/api/_types/cat.pending_tasks.d.ts index 96726b194..f8263c5b4 100644 --- a/api/_types/cat.pending_tasks.d.ts +++ b/api/_types/cat.pending_tasks.d.ts @@ -15,7 +15,7 @@ */ -export interface PendingTasksRecord { +export type PendingTasksRecord = { insertOrder?: string; priority?: string; source?: string; diff --git a/api/_types/cat.plugins.d.ts b/api/_types/cat.plugins.d.ts index 860b21d91..ec4467836 100644 --- a/api/_types/cat.plugins.d.ts +++ b/api/_types/cat.plugins.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface PluginsRecord { +export type PluginsRecord = { component?: string; description?: string; id?: Common.NodeId; diff --git a/api/_types/cat.recovery.d.ts b/api/_types/cat.recovery.d.ts index 4c69c80a5..5993f7afb 100644 --- a/api/_types/cat.recovery.d.ts +++ b/api/_types/cat.recovery.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface RecoveryRecord { +export type RecoveryRecord = { bytes?: string; bytes_percent?: Common.PercentageString; bytes_recovered?: string; diff --git a/api/_types/cat.repositories.d.ts b/api/_types/cat.repositories.d.ts index 54d114e59..5bc9020e5 100644 --- a/api/_types/cat.repositories.d.ts +++ b/api/_types/cat.repositories.d.ts @@ -15,7 +15,7 @@ */ -export interface RepositoriesRecord { +export type RepositoriesRecord = { id?: string; type?: string; } diff --git a/api/_types/cat.segments.d.ts b/api/_types/cat.segments.d.ts index 12fd767b0..2e1b1a263 100644 --- a/api/_types/cat.segments.d.ts +++ b/api/_types/cat.segments.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface SegmentsRecord { +export type SegmentsRecord = { committed?: string; compound?: string; 'docs.count'?: string; diff --git a/api/_types/cat.shards.d.ts b/api/_types/cat.shards.d.ts index 3dd820baa..638c6d943 100644 --- a/api/_types/cat.shards.d.ts +++ b/api/_types/cat.shards.d.ts @@ -15,7 +15,7 @@ */ -export interface ShardsRecord { +export type ShardsRecord = { 'bulk.avg_size_in_bytes'?: undefined | string; 'bulk.avg_time'?: undefined | string; 'bulk.total_operations'?: undefined | string; diff --git a/api/_types/cat.snapshots.d.ts b/api/_types/cat.snapshots.d.ts index 76260d4ae..c22093910 100644 --- a/api/_types/cat.snapshots.d.ts +++ b/api/_types/cat.snapshots.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface SnapshotsRecord { +export type SnapshotsRecord = { duration?: Common.Duration; end_epoch?: Common.StringifiedEpochTimeUnitSeconds; end_time?: Common.TimeOfDay; diff --git a/api/_types/cat.tasks.d.ts b/api/_types/cat.tasks.d.ts index d21bf6825..8786f0568 100644 --- a/api/_types/cat.tasks.d.ts +++ b/api/_types/cat.tasks.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface TasksRecord { +export type TasksRecord = { action?: string; description?: string; id?: Common.Id; diff --git a/api/_types/cat.templates.d.ts b/api/_types/cat.templates.d.ts index f1b459b4c..3deb3181c 100644 --- a/api/_types/cat.templates.d.ts +++ b/api/_types/cat.templates.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface TemplatesRecord { +export type TemplatesRecord = { composed_of?: string; index_patterns?: string; name?: Common.Name; diff --git a/api/_types/cat.thread_pool.d.ts b/api/_types/cat.thread_pool.d.ts index 62e99f254..37a74b1dc 100644 --- a/api/_types/cat.thread_pool.d.ts +++ b/api/_types/cat.thread_pool.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface ThreadPoolRecord { +export type ThreadPoolRecord = { active?: string; completed?: string; core?: undefined | string; diff --git a/api/_types/cluster._common.d.ts b/api/_types/cluster._common.d.ts index d641d2aab..224868ee6 100644 --- a/api/_types/cluster._common.d.ts +++ b/api/_types/cluster._common.d.ts @@ -18,21 +18,20 @@ import * as Common from './_common' import * as Common_Mapping from './_common.mapping' import * as Indices_Common from './indices._common' -export interface ComponentTemplate { +export type ComponentTemplate = { component_template: ComponentTemplateNode; name: Common.Name; } -export interface ComponentTemplateNode { +export type ComponentTemplateNode = { _meta?: Common.Metadata; template: ComponentTemplateSummary; version?: Common.VersionNumber; } -export interface ComponentTemplateSummary { +export type ComponentTemplateSummary = { _meta?: Common.Metadata; aliases?: Record; - lifecycle?: Indices_Common.DataStreamLifecycleWithRollover; mappings?: Common_Mapping.TypeMapping; settings?: Record; version?: Common.VersionNumber; diff --git a/api/_types/cluster.allocation_explain.d.ts b/api/_types/cluster.allocation_explain.d.ts index 3c9a77bc8..31555a22e 100644 --- a/api/_types/cluster.allocation_explain.d.ts +++ b/api/_types/cluster.allocation_explain.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface AllocationDecision { +export type AllocationDecision = { decider: string; decision: AllocationExplainDecision; explanation: string; @@ -24,7 +24,7 @@ export interface AllocationDecision { export type AllocationExplainDecision = 'ALWAYS' | 'NO' | 'THROTTLE' | 'YES' -export interface AllocationStore { +export type AllocationStore = { allocation_id: string; found: boolean; in_sync: boolean; @@ -33,7 +33,7 @@ export interface AllocationStore { store_exception: string; } -export interface ClusterInfo { +export type ClusterInfo = { nodes: Record; reserved_sizes: ReservedSize[]; shard_data_set_sizes?: Record; @@ -41,7 +41,7 @@ export interface ClusterInfo { shard_sizes: Record; } -export interface CurrentNode { +export type CurrentNode = { attributes: Record; id: Common.Id; name: Common.Name; @@ -51,7 +51,7 @@ export interface CurrentNode { export type Decision = 'allocation_delayed' | 'awaiting_info' | 'no' | 'no_attempt' | 'no_valid_shard_copy' | 'throttled' | 'worse_balance' | 'yes' -export interface DiskUsage { +export type DiskUsage = { free?: Common.HumanReadableByteCount; free_bytes: Common.ByteCount; free_disk_percent: Common.PercentageNumber; @@ -63,7 +63,7 @@ export interface DiskUsage { used_disk_percent: Common.PercentageNumber; } -export interface NodeAllocationExplanation { +export type NodeAllocationExplanation = { deciders: AllocationDecision[]; node_attributes: Record; node_decision: Decision; @@ -74,20 +74,20 @@ export interface NodeAllocationExplanation { weight_ranking: number; } -export interface NodeDiskUsage { +export type NodeDiskUsage = { least_available: DiskUsage; most_available: DiskUsage; node_name: Common.Name; } -export interface ReservedSize { +export type ReservedSize = { node_id: Common.Id; path: string; shards: string[]; total: number; } -export interface UnassignedInformation { +export type UnassignedInformation = { allocation_status?: string; at: Common.DateTime; delayed?: boolean; diff --git a/api/_types/cluster.health.d.ts b/api/_types/cluster.health.d.ts index a2c6418b5..6e8a1e0d7 100644 --- a/api/_types/cluster.health.d.ts +++ b/api/_types/cluster.health.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface AwarenessAttributeStats { +export type AwarenessAttributeStats = { active_shards?: number; data_nodes?: number; initializing_shards?: number; @@ -25,7 +25,7 @@ export interface AwarenessAttributeStats { weight?: number; } -export interface HealthResponseBody { +export type HealthResponseBody = { active_primary_shards: number; active_shards: number; active_shards_percent?: Common.PercentageString; @@ -49,7 +49,7 @@ export interface HealthResponseBody { unassigned_shards: number; } -export interface IndexHealthStats { +export type IndexHealthStats = { active_primary_shards: number; active_shards: number; initializing_shards: number; @@ -63,7 +63,7 @@ export interface IndexHealthStats { export type Level = 'awareness_attributes' | 'cluster' | 'indices' | 'shards' -export interface ShardHealthStats { +export type ShardHealthStats = { active_shards: number; initializing_shards: number; primary_active: boolean; diff --git a/api/_types/cluster.pending_tasks.d.ts b/api/_types/cluster.pending_tasks.d.ts index 4c939c379..bb4bf6337 100644 --- a/api/_types/cluster.pending_tasks.d.ts +++ b/api/_types/cluster.pending_tasks.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface PendingTask { +export type PendingTask = { executing: boolean; insert_order: number; priority: string; diff --git a/api/_types/cluster.remote_info.d.ts b/api/_types/cluster.remote_info.d.ts index 2df0d1f4f..8d9fddc9d 100644 --- a/api/_types/cluster.remote_info.d.ts +++ b/api/_types/cluster.remote_info.d.ts @@ -18,7 +18,7 @@ import * as Common from './_common' export type ClusterRemoteInfo = ClusterRemoteSniffInfo | ClusterRemoteProxyInfo -export interface ClusterRemoteProxyInfo { +export type ClusterRemoteProxyInfo = { connected: boolean; initial_connect_timeout: Common.Duration; max_proxy_socket_connections: number; @@ -29,7 +29,7 @@ export interface ClusterRemoteProxyInfo { skip_unavailable: boolean; } -export interface ClusterRemoteSniffInfo { +export type ClusterRemoteSniffInfo = { connected: boolean; initial_connect_timeout: Common.Duration; max_connections_per_cluster: number; diff --git a/api/_types/cluster.reroute.d.ts b/api/_types/cluster.reroute.d.ts index d498c9a82..f23bf49cc 100644 --- a/api/_types/cluster.reroute.d.ts +++ b/api/_types/cluster.reroute.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface Command { +export type Command = { allocate_empty_primary?: CommandAllocatePrimaryAction; allocate_replica?: CommandAllocateReplicaAction; allocate_stale_primary?: CommandAllocatePrimaryAction; @@ -24,27 +24,27 @@ export interface Command { move?: CommandMoveAction; } -export interface CommandAllocatePrimaryAction { +export type CommandAllocatePrimaryAction = { accept_data_loss: boolean; index: Common.IndexName; node: string; shard: number; } -export interface CommandAllocateReplicaAction { +export type CommandAllocateReplicaAction = { index: Common.IndexName; node: string; shard: number; } -export interface CommandCancelAction { +export type CommandCancelAction = { allow_primary?: boolean; index: Common.IndexName; node: string; shard: number; } -export interface CommandMoveAction { +export type CommandMoveAction = { from_node: string; index: Common.IndexName; shard: number; @@ -53,19 +53,19 @@ export interface CommandMoveAction { export type Metric = '_all' | 'blocks' | 'cluster_manager_node' | 'master_node' | 'metadata' | 'nodes' | 'routing_nodes' | 'routing_table' | 'version' -export interface RerouteDecision { +export type RerouteDecision = { decider: string; decision: string; explanation: string; } -export interface RerouteExplanation { +export type RerouteExplanation = { command: string; decisions: RerouteDecision[]; parameters: RerouteParameters; } -export interface RerouteParameters { +export type RerouteParameters = { allow_primary: boolean; from_node?: Common.NodeName; index: Common.IndexName; diff --git a/api/_types/cluster.stats.d.ts b/api/_types/cluster.stats.d.ts index 581324b84..34596e3f6 100644 --- a/api/_types/cluster.stats.d.ts +++ b/api/_types/cluster.stats.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Nodes_Common from './nodes._common' -export interface CharFilterTypes { +export type CharFilterTypes = { analyzer_types: FieldTypes[]; built_in_analyzers: FieldTypes[]; built_in_char_filters: FieldTypes[]; @@ -28,7 +28,7 @@ export interface CharFilterTypes { tokenizer_types: FieldTypes[]; } -export interface ClusterFileSystem { +export type ClusterFileSystem = { available?: Common.HumanReadableByteCount; available_in_bytes: Common.ByteCount; cache_reserved?: Common.HumanReadableByteCount; @@ -39,7 +39,7 @@ export interface ClusterFileSystem { total_in_bytes: Common.ByteCount; } -export interface ClusterIndices { +export type ClusterIndices = { analysis: CharFilterTypes; completion: Common.CompletionStats; count: number; @@ -53,25 +53,25 @@ export interface ClusterIndices { versions?: IndicesVersions[]; } -export interface ClusterIndicesShards { +export type ClusterIndicesShards = { index?: ClusterIndicesShardsIndex; primaries?: number; replication?: number; total?: number; } -export interface ClusterIndicesShardsIndex { +export type ClusterIndicesShardsIndex = { primaries: ClusterShardMetrics; replication: ClusterShardMetrics; shards: ClusterShardMetrics; } -export interface ClusterIngest { +export type ClusterIngest = { number_of_pipelines: number; processor_stats: Record; } -export interface ClusterJvm { +export type ClusterJvm = { max_uptime?: Common.Duration; max_uptime_in_millis: Common.DurationValueUnitMillis; mem: ClusterJvmMemory; @@ -79,14 +79,14 @@ export interface ClusterJvm { versions: ClusterJvmVersion[]; } -export interface ClusterJvmMemory { +export type ClusterJvmMemory = { heap_max?: Common.HumanReadableByteCount; heap_max_in_bytes: Common.ByteCount; heap_used?: Common.HumanReadableByteCount; heap_used_in_bytes: Common.ByteCount; } -export interface ClusterJvmVersion { +export type ClusterJvmVersion = { bundled_jdk: boolean; count: number; using_bundled_jdk: boolean; @@ -96,12 +96,12 @@ export interface ClusterJvmVersion { vm_version: Common.VersionString; } -export interface ClusterNetworkTypes { +export type ClusterNetworkTypes = { http_types: Record; transport_types: Record; } -export interface ClusterNodeCount { +export type ClusterNodeCount = { cluster_manager?: number; coordinating_only: number; data: number; @@ -120,7 +120,7 @@ export interface ClusterNodeCount { voting_only?: number; } -export interface ClusterNodes { +export type ClusterNodes = { count: ClusterNodeCount; discovery_types: Record; fs: ClusterFileSystem; @@ -135,7 +135,7 @@ export interface ClusterNodes { versions: Common.VersionString[]; } -export interface ClusterOperatingSystem { +export type ClusterOperatingSystem = { allocated_processors: number; architectures?: ClusterOperatingSystemArchitecture[]; available_processors: number; @@ -144,37 +144,37 @@ export interface ClusterOperatingSystem { pretty_names: ClusterOperatingSystemPrettyName[]; } -export interface ClusterOperatingSystemArchitecture { +export type ClusterOperatingSystemArchitecture = { arch: string; count: number; } -export interface ClusterOperatingSystemName { +export type ClusterOperatingSystemName = { count: number; name: Common.Name; } -export interface ClusterOperatingSystemPrettyName { +export type ClusterOperatingSystemPrettyName = { count: number; pretty_name: Common.Name; } -export interface ClusterProcess { +export type ClusterProcess = { cpu: ClusterProcessCpu; open_file_descriptors: ClusterProcessOpenFileDescriptors; } -export interface ClusterProcessCpu { +export type ClusterProcessCpu = { percent: Common.PercentageNumber; } -export interface ClusterProcessOpenFileDescriptors { +export type ClusterProcessOpenFileDescriptors = { avg: number; max: number; min: number; } -export interface ClusterProcessor { +export type ClusterProcessor = { count: number; current: number; failed: number; @@ -182,13 +182,13 @@ export interface ClusterProcessor { time_in_millis: Common.DurationValueUnitMillis; } -export interface ClusterShardMetrics { +export type ClusterShardMetrics = { avg: number; max: number; min: number; } -export interface FieldTypes { +export type FieldTypes = { count: number; index_count: number; indexed_vector_count?: number; @@ -198,26 +198,25 @@ export interface FieldTypes { script_count?: number; } -export interface FieldTypesMappings { +export type FieldTypesMappings = { field_types: FieldTypes[]; - runtime_field_types?: RuntimeFieldTypes[]; total_deduplicated_field_count?: number; total_deduplicated_mapping_size?: Common.HumanReadableByteCount; total_deduplicated_mapping_size_in_bytes?: Common.ByteCount; total_field_count?: number; } -export interface IndexingPressure { +export type IndexingPressure = { memory: IndexingPressureMemory; } -export interface IndexingPressureMemory { +export type IndexingPressureMemory = { current: IndexingPressureMemorySummary; limit_in_bytes: Common.ByteCount; total: IndexingPressureMemorySummary; } -export interface IndexingPressureMemorySummary { +export type IndexingPressureMemorySummary = { all_in_bytes: Common.ByteCount; combined_coordinating_and_primary_in_bytes: Common.ByteCount; coordinating_in_bytes: Common.ByteCount; @@ -228,20 +227,20 @@ export interface IndexingPressureMemorySummary { replica_rejections?: number; } -export interface IndicesVersions { +export type IndicesVersions = { index_count: number; primary_shard_count: number; total_primary_bytes: Common.ByteCount; version: Common.VersionString; } -export interface NodePackagingType { +export type NodePackagingType = { count: number; flavor?: string; type: string; } -export interface OperatingSystemMemoryInfo { +export type OperatingSystemMemoryInfo = { adjusted_total_in_bytes?: Common.ByteCount; free?: Common.HumanReadableByteCount; free_in_bytes: Common.ByteCount; @@ -253,24 +252,7 @@ export interface OperatingSystemMemoryInfo { used_percent: Common.PercentageNumber; } -export interface RuntimeFieldTypes { - chars_max: number; - chars_total: number; - count: number; - doc_max: number; - doc_total: number; - index_count: number; - lang: string[]; - lines_max: number; - lines_total: number; - name: Common.Name; - scriptless_count: number; - shadowed_count: number; - source_max: number; - source_total: number; -} - -export interface StatsResponseBase extends Nodes_Common.NodesResponseBase { +export type StatsResponseBase = Nodes_Common.NodesResponseBase & { cluster_name: Common.Name; cluster_uuid: Common.Uuid; indices: ClusterIndices; diff --git a/api/_types/cluster.weighted_routing.d.ts b/api/_types/cluster.weighted_routing.d.ts index 0daccbaa5..5aa3f0263 100644 --- a/api/_types/cluster.weighted_routing.d.ts +++ b/api/_types/cluster.weighted_routing.d.ts @@ -16,15 +16,15 @@ import * as Common from './_common' -export interface Weights extends WeightsBase { +export type Weights = WeightsBase & { weights?: Record; } -export interface WeightsBase { +export type WeightsBase = { _version?: Common.VersionNumber; } -export interface WeightsResponse extends Weights { +export type WeightsResponse = Weights & { discovered_cluster_manager?: boolean; } diff --git a/api/_types/dangling_indices.list_dangling_indices.d.ts b/api/_types/dangling_indices.list_dangling_indices.d.ts index ca2d9203e..03ae5dfb7 100644 --- a/api/_types/dangling_indices.list_dangling_indices.d.ts +++ b/api/_types/dangling_indices.list_dangling_indices.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface DanglingIndex { +export type DanglingIndex = { creation_date?: Common.DateTime; creation_date_millis: Common.EpochTimeUnitMillis; index_name: string; diff --git a/api/_types/flow_framework.common.d.ts b/api/_types/flow_framework.common.d.ts index b579469aa..16576ccb3 100644 --- a/api/_types/flow_framework.common.d.ts +++ b/api/_types/flow_framework.common.d.ts @@ -19,7 +19,7 @@ export type All = boolean export type AllowDelete = string -export interface FlowFrameworkCreate { +export type FlowFrameworkCreate = { description?: string; name: string; use_case?: string; @@ -27,7 +27,7 @@ export interface FlowFrameworkCreate { workflows?: Record; } -export interface FlowFrameworkDeleteResponse { +export type FlowFrameworkDeleteResponse = { _id?: string; _index?: string; _primary_term?: number; @@ -37,7 +37,7 @@ export interface FlowFrameworkDeleteResponse { result?: 'deleted' | 'not_found'; } -export interface FlowFrameworkGetResponse { +export type FlowFrameworkGetResponse = { created_time?: number; description?: string; last_updated_time?: number; @@ -47,7 +47,7 @@ export interface FlowFrameworkGetResponse { workflows?: Record; } -export interface FlowFrameworkUpdate { +export type FlowFrameworkUpdate = { description?: string; name?: string; use_case?: string; @@ -55,13 +55,13 @@ export interface FlowFrameworkUpdate { workflows?: Record; } -export interface hits { +export type hits = { hits?: itemsObject[]; max_score?: number; total?: total; } -export interface itemsObject { +export type itemsObject = { _id?: string; _index?: string; _primary_term?: number; @@ -73,37 +73,37 @@ export interface itemsObject { export type Provision = boolean -export interface query { +export type query = { match?: Record; match_all?: Record; } export type Reprovision = boolean -export interface SearchStateResponse { +export type SearchStateResponse = { provisioning_progress?: string; state?: string; user?: user; workflow_id?: string; } -export interface SearchWorkflowRequest { +export type SearchWorkflowRequest = { query?: query; } -export interface shards { +export type shards = { failed?: number; successful?: number; total?: number; } -export interface StateHits { +export type StateHits = { hits?: StateItems[]; max_score?: number; total?: total; } -export interface StateItems { +export type StateItems = { _id?: string; _index?: string; _primary_term?: number; @@ -113,7 +113,7 @@ export interface StateItems { _version?: number; } -export interface total { +export type total = { relation?: string; value?: number; } @@ -122,7 +122,7 @@ export type UpdateFields = boolean export type UseCase = string -export interface user { +export type user = { backend_roles?: string[]; custom_attribute_names?: string[]; name?: string; @@ -134,35 +134,35 @@ export type UserProvidedSubstitutionExpressions = Record export type Validation = string -export interface version { +export type version = { compatibility?: string[]; template?: string; } export type WorkflowID = string -export interface WorkflowSearchResponse { +export type WorkflowSearchResponse = { _shards?: shards; hits?: hits; timed_out?: boolean; took?: number; } -export interface WorkflowSearchStateResponse { +export type WorkflowSearchStateResponse = { _shards?: shards; hits?: StateHits; timed_out?: boolean; took?: number; } -export interface WorkFlowStatusDefaultResponse { +export type WorkFlowStatusDefaultResponse = { error?: string; resources_created?: string[]; state?: string; workflow_id?: string; } -export interface WorkFlowStatusFullResponse { +export type WorkFlowStatusFullResponse = { error?: string; provision_end_time?: string; provision_start_time?: string; @@ -174,7 +174,7 @@ export interface WorkFlowStatusFullResponse { workflow_id?: string; } -export interface WorkflowStep { +export type WorkflowStep = { inputs?: string[]; outputs?: string[]; required_plugins?: string[]; diff --git a/api/_types/flow_framework.errors.d.ts b/api/_types/flow_framework.errors.d.ts index b8096f5f8..5eda51732 100644 --- a/api/_types/flow_framework.errors.d.ts +++ b/api/_types/flow_framework.errors.d.ts @@ -15,22 +15,22 @@ */ -export interface BadRequestError { +export type BadRequestError = { error?: string; status?: number; } export type ConflictError = Record -export interface DeprovisioningError { +export type DeprovisioningError = { error: string; } -export interface DeprovisioningForbiddenError { +export type DeprovisioningForbiddenError = { error: string; } -export interface DuplicateKeyError { +export type DuplicateKeyError = { error?: string; status?: number; } @@ -39,7 +39,7 @@ export type FlowFrameworkAPIDisabledError = Record export type InvalidParameterError = Record -export interface InvalidRequestBodyFieldError { +export type InvalidRequestBodyFieldError = { error?: string; status?: number; } @@ -52,17 +52,17 @@ export type MissingParameterError = Record export type ParameterConflictError = Record -export interface RequestBodyParsingFailedError { +export type RequestBodyParsingFailedError = { error?: string; status?: number; } -export interface RequestTimeoutError { +export type RequestTimeoutError = { error?: string; status?: number; } -export interface TemplateNameRequiredError { +export type TemplateNameRequiredError = { error?: string; } diff --git a/api/_types/indices._common.d.ts b/api/_types/indices._common.d.ts index 23f5b3229..42a5c0091 100644 --- a/api/_types/indices._common.d.ts +++ b/api/_types/indices._common.d.ts @@ -19,7 +19,7 @@ import * as Common_Analysis from './_common.analysis' import * as Common_Mapping from './_common.mapping' import * as Common_QueryDsl from './_common.query_dsl' -export interface Alias { +export type Alias = { filter?: Common_QueryDsl.QueryContainer; index_routing?: Common.Routing; is_hidden?: boolean; @@ -28,7 +28,7 @@ export interface Alias { search_routing?: Common.Routing; } -export interface AliasDefinition { +export type AliasDefinition = { filter?: Common_QueryDsl.QueryContainer; index_routing?: string; is_hidden?: boolean; @@ -37,18 +37,13 @@ export interface AliasDefinition { search_routing?: string; } -export interface CacheQueries { - enabled: boolean; -} - -export interface DataStream { +export type DataStream = { _meta?: Common.Metadata; allow_custom_routing?: boolean; generation: number; hidden?: boolean; ilm_policy?: Common.Name; indices: DataStreamIndex[]; - lifecycle?: DataStreamLifecycleWithRollover; name: Common.DataStreamName; next_generation_managed_by?: ManagedBy; prefer_ilm?: boolean; @@ -59,7 +54,7 @@ export interface DataStream { timestamp_field: DataStreamTimestampField; } -export interface DataStreamIndex { +export type DataStreamIndex = { ilm_policy?: Common.Name; index_name: Common.IndexName; index_uuid: Common.Uuid; @@ -67,48 +62,11 @@ export interface DataStreamIndex { prefer_ilm?: boolean; } -export interface DataStreamLifecycle { - data_retention?: Common.Duration; - downsampling?: DataStreamLifecycleDownsampling; -} - -export interface DataStreamLifecycleDownsampling { - rounds: DownsamplingRound[]; -} - -export interface DataStreamLifecycleRolloverConditions { - max_age?: string; - max_docs?: number; - max_primary_shard_docs?: number; - max_primary_shard_size?: Common.HumanReadableByteCount; - max_size?: Common.HumanReadableByteCount; - min_age?: Common.Duration; - min_docs?: number; - min_primary_shard_docs?: number; - min_primary_shard_size?: Common.HumanReadableByteCount; - min_size?: Common.HumanReadableByteCount; -} - -export interface DataStreamLifecycleWithRollover { - data_retention?: Common.Duration; - downsampling?: DataStreamLifecycleDownsampling; - rollover?: DataStreamLifecycleRolloverConditions; -} - -export interface DataStreamTimestampField { +export type DataStreamTimestampField = { name: Common.Field; } -export interface DownsampleConfig { - fixed_interval: Common.DurationLarge; -} - -export interface DownsamplingRound { - after: Common.Duration; - config: DownsampleConfig; -} - -export interface FielddataFrequencyFilter { +export type FielddataFrequencyFilter = { max: number; min: number; min_segment_size: number; @@ -116,66 +74,77 @@ export interface FielddataFrequencyFilter { export type IndexCheckOnStartup = 'checksum' | 'false' | 'true' -export interface IndexingPressure { +export type IndexErrorCause = { + index?: Common.IndexName; + index_uuid?: Common.Uuid; + reason?: string; + 'resource.id'?: Common.IndexName; + 'resource.type'?: Common.ResourceType; + root_cause?: IndexErrorCause[]; + type: string; + [key: string]: any | Record; +} + +export type IndexingPressure = { memory: IndexingPressureMemory; } -export interface IndexingPressureMemory { - limit?: number; +export type IndexingPressureMemory = { + limit?: string | number; } -export interface IndexingSlowlogSettings { +export type IndexingSlowlog = { level?: string; reformat?: boolean; source?: number; threshold?: IndexingSlowlogThresholds; } -export interface IndexingSlowlogThresholds { +export type IndexingSlowlogThresholds = { index?: SlowlogThresholdLevels; } -export interface IndexRouting { +export type IndexRouting = { allocation?: IndexRoutingAllocation; rebalance?: IndexRoutingRebalance; } -export interface IndexRoutingAllocation { +export type IndexRoutingAllocation = { disk?: IndexRoutingAllocationDisk; enable?: IndexRoutingAllocationOptions; include?: IndexRoutingAllocationInclude; initial_recovery?: IndexRoutingAllocationInitialRecovery; } -export interface IndexRoutingAllocationDisk { - threshold_enabled?: boolean | string; +export type IndexRoutingAllocationDisk = { + threshold_enabled?: Common.Stringifiedboolean; } -export interface IndexRoutingAllocationInclude { +export type IndexRoutingAllocationInclude = { _id?: Common.Id; _tier_preference?: string; } -export interface IndexRoutingAllocationInitialRecovery { +export type IndexRoutingAllocationInitialRecovery = { _id?: Common.Id; } export type IndexRoutingAllocationOptions = 'all' | 'new_primaries' | 'none' | 'primaries' -export interface IndexRoutingRebalance { +export type IndexRoutingRebalance = { enable: IndexRoutingRebalanceOptions; } export type IndexRoutingRebalanceOptions = 'all' | 'none' | 'primaries' | 'replicas' -export interface IndexSegmentSort { +export type IndexSegmentSort = { field?: Common.Fields; missing?: SegmentSortMissing | SegmentSortMissing[]; mode?: SegmentSortMode | SegmentSortMode[]; order?: SegmentSortOrder | SegmentSortOrder[]; } -export interface IndexSettingBlocks { +export type IndexSettingBlocks = { metadata?: Common.Stringifiedboolean; read?: Common.Stringifiedboolean; read_only?: Common.Stringifiedboolean; @@ -183,11 +152,17 @@ export interface IndexSettingBlocks { write?: Common.Stringifiedboolean; } -export interface IndexSettings { +export type IndexSettings = { analysis?: IndexSettingsAnalysis; - analyze?: SettingsAnalyze; + analyze?: IndexSettingsAnalyze; + 'analyze.max_token_count'?: Common.Stringifiedinteger; auto_expand_replicas?: string; blocks?: IndexSettingBlocks; + 'blocks.metadata'?: Common.Stringifiedboolean; + 'blocks.read'?: Common.Stringifiedboolean; + 'blocks.read_only'?: Common.Stringifiedboolean; + 'blocks.read_only_allow_delete'?: Common.Stringifiedboolean; + 'blocks.write'?: Common.Stringifiedboolean; check_on_startup?: IndexCheckOnStartup; codec?: string; creation_date?: Common.StringifiedEpochTimeUnitMillis; @@ -196,14 +171,18 @@ export interface IndexSettings { final_pipeline?: Common.PipelineName; format?: string | number; gc_deletes?: Common.Duration; - hidden?: boolean | string; - highlight?: SettingsHighlight; + hidden?: Common.Stringifiedboolean; + highlight?: IndexSettingsHighlight; + 'highlight.max_analyzed_offset'?: number; index?: IndexSettings; + indexing?: IndexSettingsIndexing; indexing_pressure?: IndexingPressure; - 'indexing.slowlog'?: IndexingSlowlogSettings; + knn?: boolean; + 'knn.algo_param.ef_search'?: number; lifecycle?: IndexSettingsLifecycle; + 'lifecycle.name'?: Common.Name; load_fixed_bitset_filters_eagerly?: boolean; - mapping?: MappingLimitSettings; + mapping?: IndexSettingsMapping; max_docvalue_fields_search?: number; max_inner_result_window?: number; max_ngram_diff?: number; @@ -215,34 +194,41 @@ export interface IndexSettings { max_shingle_diff?: number; max_slices_per_scroll?: number; max_terms_count?: number; - merge?: Merge; + merge?: IndexSettingsMerge; + 'merge.scheduler.max_thread_count'?: Common.Stringifiedinteger; mode?: string; number_of_replicas?: number | string; number_of_routing_shards?: number; number_of_shards?: number | string; priority?: number | string; provided_name?: Common.Name; - queries?: Queries; - query_string?: SettingsQueryString; + queries?: IndexSettingsQueries; + query_string?: IndexSettingsQueryString; + 'query_string.lenient'?: Common.Stringifiedboolean; refresh_interval?: Common.Duration; routing?: IndexRouting; routing_partition_size?: Common.Stringifiedinteger; routing_path?: string | string[]; - search?: SettingsSearch; + search?: IndexSettingsSearch; + 'search.idle.after'?: Common.Duration; settings?: IndexSettings; - similarity?: SettingsSimilarity; + similarity?: IndexSettingsSimilarity; soft_deletes?: SoftDeletes; + 'soft_deletes.retention_lease.period'?: Common.Duration; sort?: IndexSegmentSort; - store?: Storage; + store?: IndexSettingsStore; time_series?: IndexSettingsTimeSeries; top_metrics_max_size?: number; translog?: Translog; + 'translog.durability'?: TranslogDurability; + 'translog.flush_threshold_size'?: Common.HumanReadableByteCount; uuid?: Common.Uuid; - verified_before_close?: boolean | string; + verified_before_close?: Common.Stringifiedboolean; version?: IndexVersioning; + [key: string]: any | Record; } -export interface IndexSettingsAnalysis { +export type IndexSettingsAnalysis = { analyzer?: Record; char_filter?: Record; filter?: Record; @@ -250,232 +236,237 @@ export interface IndexSettingsAnalysis { tokenizer?: Record; } -export interface IndexSettingsLifecycle { - indexing_complete?: Common.Stringifiedboolean; - name: Common.Name; - origination_date?: number; - parse_origination_date?: boolean; - rollover_alias?: string; - step?: IndexSettingsLifecycleStep; -} - -export interface IndexSettingsLifecycleStep { - wait_time_threshold?: Common.Duration; -} - -export interface IndexSettingsTimeSeries { - end_time?: Common.DateTime; - start_time?: Common.DateTime; -} - -export interface IndexState { - aliases?: Record; - data_stream?: Common.DataStreamName; - defaults?: IndexSettings; - lifecycle?: DataStreamLifecycle; - mappings?: Common_Mapping.TypeMapping; - settings?: IndexSettings; +export type IndexSettingsAnalyze = { + max_token_count?: Common.Stringifiedinteger; } -export interface IndexTemplate { - _meta?: Common.Metadata; - allow_auto_create?: boolean; - composed_of?: Common.Name[]; - data_stream?: IndexTemplateDataStreamConfiguration; - index_patterns: Common.Names; - priority?: number; - template?: IndexTemplateSummary; - version?: Common.VersionNumber; +export type IndexSettingsHighlight = { + max_analyzed_offset?: number; } -export interface IndexTemplateDataStreamConfiguration { - allow_custom_routing?: boolean; - hidden?: boolean; - timestamp_field?: DataStreamTimestampField; +export type IndexSettingsIndexing = { + slowlog?: IndexingSlowlog; } -export interface IndexTemplateSummary { - aliases?: Record; - lifecycle?: DataStreamLifecycleWithRollover; - mappings?: Common_Mapping.TypeMapping; - settings?: IndexSettings; +export type IndexSettingsLifecycle = { + indexing_complete?: Common.Stringifiedboolean; + name: Common.Name; + origination_date?: Common.StringifiedEpochTimeUnitMillis; + parse_origination_date?: boolean; + rollover_alias?: string; + step?: IndexSettingsLifecycleStep; } -export interface IndexVersioning { - created?: Common.VersionString; - created_string?: string; +export type IndexSettingsLifecycleStep = { + wait_time_threshold?: Common.Duration; } -export type ManagedBy = 'Data stream lifecycle' | 'Index Lifecycle Management' | 'Unmanaged' - -export interface MappingLimitSettings { +export type IndexSettingsMapping = { coerce?: boolean; - depth?: MappingLimitSettingsDepth; - dimension_fields?: MappingLimitSettingsDimensionFields; - field_name_length?: MappingLimitSettingsFieldNameLength; + depth?: IndexSettingsMappingLimitDepth; + dimension_fields?: IndexSettingsMappingLimitDimensionFields; + field_name_length?: IndexSettingsMappingLimitFieldNameLength; ignore_malformed?: boolean; - nested_fields?: MappingLimitSettingsNestedFields; - nested_objects?: MappingLimitSettingsNestedObjects; - total_fields?: MappingLimitSettingsTotalFields; + nested_fields?: IndexSettingsMappingLimitNestedFields; + nested_objects?: IndexSettingsMappingLimitNestedObjects; + total_fields?: IndexSettingsMappingLimitTotalFields; } -export interface MappingLimitSettingsDepth { +export type IndexSettingsMappingLimitDepth = { limit?: number; } -export interface MappingLimitSettingsDimensionFields { +export type IndexSettingsMappingLimitDimensionFields = { limit?: number; } -export interface MappingLimitSettingsFieldNameLength { +export type IndexSettingsMappingLimitFieldNameLength = { limit?: number; } -export interface MappingLimitSettingsNestedFields { +export type IndexSettingsMappingLimitNestedFields = { limit?: number; } -export interface MappingLimitSettingsNestedObjects { +export type IndexSettingsMappingLimitNestedObjects = { limit?: number; } -export interface MappingLimitSettingsTotalFields { +export type IndexSettingsMappingLimitTotalFields = { limit?: number; } -export interface Merge { - scheduler?: MergeScheduler; +export type IndexSettingsMerge = { + scheduler?: IndexSettingsMergeScheduler; } -export interface MergeScheduler { +export type IndexSettingsMergeScheduler = { max_merge_count?: Common.Stringifiedinteger; max_thread_count?: Common.Stringifiedinteger; } -export interface NumericFielddata { - format: NumericFielddataFormat; -} - -export type NumericFielddataFormat = 'array' | 'disabled' - -export interface Queries { - cache?: CacheQueries; -} - -export interface RetentionLease { - period: Common.Duration; -} - -export interface SearchIdle { - after?: Common.Duration; -} - -export type SegmentSortMissing = '_first' | '_last' - -export type SegmentSortMode = 'max' | 'min' - -export type SegmentSortOrder = 'asc' | 'desc' - -export interface SettingsAnalyze { - max_token_count?: Common.Stringifiedinteger; +export type IndexSettingsQueries = { + cache?: IndexSettingsQueriesCache; } -export interface SettingsHighlight { - max_analyzed_offset?: number; +export type IndexSettingsQueriesCache = { + enabled: boolean; } -export interface SettingsQueryString { - lenient: Common.Stringifiedboolean; +export type IndexSettingsQueryString = { + lenient?: Common.Stringifiedboolean; } -export interface SettingsSearch { +export type IndexSettingsSearch = { idle?: SearchIdle; - slowlog?: SlowlogSettings; + slowlog?: SearchSlowlog; } -export interface SettingsSimilarity { - bm25?: SettingsSimilarityBm25; - dfi?: SettingsSimilarityDfi; - dfr?: SettingsSimilarityDfr; - ib?: SettingsSimilarityIb; - lmd?: SettingsSimilarityLmd; - lmj?: SettingsSimilarityLmj; - scripted_tfidf?: SettingsSimilarityScriptedTfidf; +export type IndexSettingsSimilarity = { + bm25?: IndexSettingsSimilarityBm25; + dfi?: IndexSettingsSimilarityDfi; + dfr?: IndexSettingsSimilarityDfr; + ib?: IndexSettingsSimilarityIb; + lmd?: IndexSettingsSimilarityLmd; + lmj?: IndexSettingsSimilarityLmj; + scripted_tfidf?: IndexSettingsSimilarityScriptedTfidf; } -export interface SettingsSimilarityBm25 { +export type IndexSettingsSimilarityBm25 = { b: number; discount_overlaps: boolean; k1: number; type: 'BM25'; } -export interface SettingsSimilarityDfi { +export type IndexSettingsSimilarityDfi = { independence_measure: Common.DFIIndependenceMeasure; type: 'DFI'; } -export interface SettingsSimilarityDfr { +export type IndexSettingsSimilarityDfr = { after_effect: Common.DFRAfterEffect; basic_model: Common.DFRBasicModel; - normalization: Common.Normalization; + normalization: Common.TermFrequencyNormalization; type: 'DFR'; } -export interface SettingsSimilarityIb { +export type IndexSettingsSimilarityIb = { distribution: Common.IBDistribution; lambda: Common.IBLambda; - normalization: Common.Normalization; + normalization: Common.TermFrequencyNormalization; type: 'IB'; } -export interface SettingsSimilarityLmd { +export type IndexSettingsSimilarityLmd = { mu: number; type: 'LMDirichlet'; } -export interface SettingsSimilarityLmj { +export type IndexSettingsSimilarityLmj = { lambda: number; type: 'LMJelinekMercer'; } -export interface SettingsSimilarityScriptedTfidf { +export type IndexSettingsSimilarityScriptedTfidf = { script: Common.Script; type: 'scripted'; } -export interface SlowlogSettings { +export type IndexSettingsStore = { + allow_mmap?: boolean; + type: StorageType; +} + +export type IndexSettingsTimeSeries = { + end_time?: Common.DateTime; + start_time?: Common.DateTime; +} + +export type IndexState = { + aliases?: Record; + data_stream?: Common.DataStreamName; + defaults?: IndexSettings; + mappings?: Common_Mapping.TypeMapping; + settings?: IndexSettings; +} + +export type IndexTemplate = { + _meta?: Common.Metadata; + allow_auto_create?: boolean; + composed_of?: Common.Name[]; + data_stream?: IndexTemplateDataStreamConfiguration; + index_patterns: Common.Names; + priority?: number; + template?: IndexTemplateSummary; + version?: Common.VersionNumber; +} + +export type IndexTemplateDataStreamConfiguration = { + allow_custom_routing?: boolean; + hidden?: boolean; + timestamp_field?: DataStreamTimestampField; +} + +export type IndexTemplateSummary = { + aliases?: Record; + mappings?: Common_Mapping.TypeMapping; + settings?: IndexSettings; +} + +export type IndexVersioning = { + created?: Common.VersionString; + created_string?: string; +} + +export type ManagedBy = 'Data stream lifecycle' | 'Index Lifecycle Management' | 'Unmanaged' + +export type NumericFielddata = { + format: NumericFielddataFormat; +} + +export type NumericFielddataFormat = 'array' | 'disabled' + +export type RetentionLease = { + period: Common.Duration; +} + +export type SearchIdle = { + after?: Common.Duration; +} + +export type SearchSlowlog = { level?: string; reformat?: boolean; - source?: number; - threshold?: SlowlogThresholds; + threshold?: SearchSlowlogThresholds; +} + +export type SearchSlowlogThresholds = { + fetch?: SlowlogThresholdLevels; + query?: SlowlogThresholdLevels; } -export interface SlowlogThresholdLevels { +export type SegmentSortMissing = '_first' | '_last' + +export type SegmentSortMode = 'max' | 'min' + +export type SegmentSortOrder = 'asc' | 'desc' + +export type SlowlogThresholdLevels = { debug?: Common.Duration; info?: Common.Duration; trace?: Common.Duration; warn?: Common.Duration; } -export interface SlowlogThresholds { - fetch?: SlowlogThresholdLevels; - query?: SlowlogThresholdLevels; -} - -export interface SoftDeletes { +export type SoftDeletes = { enabled?: boolean; retention_lease?: RetentionLease; } -export interface Storage { - allow_mmap?: boolean; - type: StorageType; -} - export type StorageType = 'fs' | 'hybridfs' | 'mmapfs' | 'niofs' -export interface TemplateMapping { +export type TemplateMapping = { aliases: Record; index_patterns: Common.Name[]; mappings: Common_Mapping.TypeMapping; @@ -484,16 +475,16 @@ export interface TemplateMapping { version?: Common.VersionNumber; } -export interface Translog { +export type Translog = { durability?: TranslogDurability; flush_threshold_size?: Common.HumanReadableByteCount; retention?: TranslogRetention; sync_interval?: Common.Duration; } -export type TranslogDurability = 'async' | 'request' +export type TranslogDurability = 'ASYNC' | 'REQUEST' | 'async' | 'request' -export interface TranslogRetention { +export type TranslogRetention = { age?: Common.Duration; size?: Common.HumanReadableByteCount; } diff --git a/api/_types/indices.add_block.d.ts b/api/_types/indices.add_block.d.ts index ba6701302..ce7a04f02 100644 --- a/api/_types/indices.add_block.d.ts +++ b/api/_types/indices.add_block.d.ts @@ -18,7 +18,7 @@ import * as Common from './_common' export type IndicesBlockOptions = 'metadata' | 'read' | 'read_only' | 'write' -export interface IndicesBlockStatus { +export type IndicesBlockStatus = { blocked: boolean; name: Common.IndexName; } diff --git a/api/_types/indices.analyze.d.ts b/api/_types/indices.analyze.d.ts index 905bd2f4e..962b6a998 100644 --- a/api/_types/indices.analyze.d.ts +++ b/api/_types/indices.analyze.d.ts @@ -15,7 +15,7 @@ */ -export interface AnalyzeDetail { +export type AnalyzeDetail = { analyzer?: AnalyzerDetail; charfilters?: CharFilterDetail[]; custom_analyzer: boolean; @@ -23,12 +23,12 @@ export interface AnalyzeDetail { tokenizer?: TokenDetail; } -export interface AnalyzerDetail { +export type AnalyzerDetail = { name: string; tokens: ExplainAnalyzeToken[]; } -export interface AnalyzeToken { +export type AnalyzeToken = { end_offset: number; position: number; positionLength?: number; @@ -37,12 +37,12 @@ export interface AnalyzeToken { type: string; } -export interface CharFilterDetail { +export type CharFilterDetail = { filtered_text: string[]; name: string; } -export interface ExplainAnalyzeToken { +export type ExplainAnalyzeToken = { bytes: string; end_offset: number; keyword?: boolean; @@ -56,7 +56,7 @@ export interface ExplainAnalyzeToken { export type TextToAnalyze = string | string[] -export interface TokenDetail { +export type TokenDetail = { name: string; tokens: ExplainAnalyzeToken[]; } diff --git a/api/_types/indices.close.d.ts b/api/_types/indices.close.d.ts index 21182757e..553d841b6 100644 --- a/api/_types/indices.close.d.ts +++ b/api/_types/indices.close.d.ts @@ -16,12 +16,12 @@ import * as Common from './_common' -export interface CloseIndexResult { +export type CloseIndexResult = { closed: boolean; shards?: Record; } -export interface CloseShardResult { +export type CloseShardResult = { failures: Common.ShardFailure[]; } diff --git a/api/_types/indices.data_streams_stats.d.ts b/api/_types/indices.data_streams_stats.d.ts index 611def92d..5fed9a19e 100644 --- a/api/_types/indices.data_streams_stats.d.ts +++ b/api/_types/indices.data_streams_stats.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface DataStreamsStatsItem { +export type DataStreamsStatsItem = { backing_indices: number; data_stream: Common.Name; maximum_timestamp: Common.EpochTimeUnitMillis; diff --git a/api/_types/indices.get_alias.d.ts b/api/_types/indices.get_alias.d.ts index 41239bf51..e864f9d2e 100644 --- a/api/_types/indices.get_alias.d.ts +++ b/api/_types/indices.get_alias.d.ts @@ -16,7 +16,7 @@ import * as Indices_Common from './indices._common' -export interface IndexAliases { +export type IndexAliases = { aliases: Record; } diff --git a/api/_types/indices.get_field_mapping.d.ts b/api/_types/indices.get_field_mapping.d.ts index 12be03517..2dc876975 100644 --- a/api/_types/indices.get_field_mapping.d.ts +++ b/api/_types/indices.get_field_mapping.d.ts @@ -16,7 +16,7 @@ import * as Common_Mapping from './_common.mapping' -export interface TypeFieldMappings { +export type TypeFieldMappings = { mappings: Record; } diff --git a/api/_types/indices.get_index_template.d.ts b/api/_types/indices.get_index_template.d.ts index 350724666..53bfbb9fb 100644 --- a/api/_types/indices.get_index_template.d.ts +++ b/api/_types/indices.get_index_template.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Indices_Common from './indices._common' -export interface IndexTemplateItem { +export type IndexTemplateItem = { index_template: Indices_Common.IndexTemplate; name: Common.Name; } diff --git a/api/_types/indices.get_mapping.d.ts b/api/_types/indices.get_mapping.d.ts index 6ef944930..75d1c305e 100644 --- a/api/_types/indices.get_mapping.d.ts +++ b/api/_types/indices.get_mapping.d.ts @@ -16,7 +16,7 @@ import * as Common_Mapping from './_common.mapping' -export interface IndexMappingRecord { +export type IndexMappingRecord = { item?: Common_Mapping.TypeMapping; mappings: Common_Mapping.TypeMapping; } diff --git a/api/_types/indices.put_index_template.d.ts b/api/_types/indices.put_index_template.d.ts index 0c3b02871..1dae0cbfe 100644 --- a/api/_types/indices.put_index_template.d.ts +++ b/api/_types/indices.put_index_template.d.ts @@ -17,9 +17,8 @@ import * as Common_Mapping from './_common.mapping' import * as Indices_Common from './indices._common' -export interface IndexTemplateMapping { +export type IndexTemplateMapping = { aliases?: Record; - lifecycle?: Indices_Common.DataStreamLifecycle; mappings?: Common_Mapping.TypeMapping; settings?: Indices_Common.IndexSettings; } diff --git a/api/_types/indices.recovery.d.ts b/api/_types/indices.recovery.d.ts index a38ba5c06..01523d982 100644 --- a/api/_types/indices.recovery.d.ts +++ b/api/_types/indices.recovery.d.ts @@ -16,13 +16,13 @@ import * as Common from './_common' -export interface FileDetails { +export type FileDetails = { length: number; name: string; recovered: number; } -export interface RecoveryBytes { +export type RecoveryBytes = { percent: Common.PercentageString; recovered?: Common.HumanReadableByteCount; recovered_from_snapshot?: Common.HumanReadableByteCount; @@ -34,7 +34,7 @@ export interface RecoveryBytes { total_in_bytes: Common.ByteCount; } -export interface RecoveryFiles { +export type RecoveryFiles = { details?: FileDetails[]; percent: Common.PercentageString; recovered: number; @@ -42,7 +42,7 @@ export interface RecoveryFiles { total: number; } -export interface RecoveryIndexStatus { +export type RecoveryIndexStatus = { bytes?: RecoveryBytes; files: RecoveryFiles; size: RecoveryBytes; @@ -54,33 +54,37 @@ export interface RecoveryIndexStatus { total_time_in_millis: Common.DurationValueUnitMillis; } -export interface RecoveryOrigin { +export type RecoveryOrigin = { bootstrap_new_history_uuid?: boolean; host?: Common.Host; hostname?: string; id?: Common.Id; index?: Common.IndexName; ip?: Common.Ip; + isSearchableSnapshot?: boolean; name?: Common.Name; + remoteStoreIndexShallowCopy?: boolean; repository?: Common.Name; restoreUUID?: Common.Uuid; snapshot?: Common.Name; + sourceRemoteStoreRepository?: undefined | string; + sourceRemoteTranslogRepository?: undefined | string; transport_address?: Common.TransportAddress; version?: Common.VersionString; } -export interface RecoveryStartStatus { +export type RecoveryStartStatus = { check_index_time?: Common.Duration; check_index_time_in_millis: Common.DurationValueUnitMillis; total_time?: Common.Duration; total_time_in_millis: Common.DurationValueUnitMillis; } -export interface RecoveryStatus { +export type RecoveryStatus = { shards: ShardRecovery[]; } -export interface ShardRecovery { +export type ShardRecovery = { id: number; index: RecoveryIndexStatus; primary: boolean; @@ -99,7 +103,7 @@ export interface ShardRecovery { verify_index: VerifyIndex; } -export interface TranslogStatus { +export type TranslogStatus = { percent: Common.PercentageString; recovered: number; total: number; @@ -108,7 +112,7 @@ export interface TranslogStatus { total_time_in_millis: Common.DurationValueUnitMillis; } -export interface VerifyIndex { +export type VerifyIndex = { check_index_time?: Common.Duration; check_index_time_in_millis: Common.DurationValueUnitMillis; total_time?: Common.Duration; diff --git a/api/_types/indices.resolve_index.d.ts b/api/_types/indices.resolve_index.d.ts index 176c9d8c1..c56e30a59 100644 --- a/api/_types/indices.resolve_index.d.ts +++ b/api/_types/indices.resolve_index.d.ts @@ -16,18 +16,18 @@ import * as Common from './_common' -export interface ResolveIndexAliasItem { +export type ResolveIndexAliasItem = { indices: Common.Indices; name: Common.Name; } -export interface ResolveIndexDataStreamsItem { +export type ResolveIndexDataStreamsItem = { backing_indices: Common.Indices; name: Common.DataStreamName; timestamp_field: Common.Field; } -export interface ResolveIndexItem { +export type ResolveIndexItem = { aliases?: string[]; attributes: string[]; data_stream?: Common.DataStreamName; diff --git a/api/_types/indices.rollover.d.ts b/api/_types/indices.rollover.d.ts index e0d941a73..314d7c6a0 100644 --- a/api/_types/indices.rollover.d.ts +++ b/api/_types/indices.rollover.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface RolloverConditions { +export type RolloverConditions = { max_age?: Common.Duration; max_age_millis?: Common.DurationValueUnitMillis; max_docs?: number; diff --git a/api/_types/indices.segments.d.ts b/api/_types/indices.segments.d.ts index d48c4f9da..4143facdb 100644 --- a/api/_types/indices.segments.d.ts +++ b/api/_types/indices.segments.d.ts @@ -16,11 +16,11 @@ import * as Common from './_common' -export interface IndexSegment { +export type IndexSegment = { shards: Record; } -export interface Segment { +export type Segment = { attributes: Record; committed: boolean; compound: boolean; @@ -35,13 +35,13 @@ export interface Segment { version: Common.VersionString; } -export interface ShardSegmentRouting { +export type ShardSegmentRouting = { node: string; primary: boolean; state: string; } -export interface ShardsSegment { +export type ShardsSegment = { num_committed_segments: number; num_search_segments: number; routing: ShardSegmentRouting; diff --git a/api/_types/indices.shard_stores.d.ts b/api/_types/indices.shard_stores.d.ts index c60f157b6..709265e90 100644 --- a/api/_types/indices.shard_stores.d.ts +++ b/api/_types/indices.shard_stores.d.ts @@ -16,11 +16,11 @@ import * as Common from './_common' -export interface IndicesShardStores { +export type IndicesShardStores = { shards: Record; } -export interface ShardStore { +export type ShardStore = { allocation: ShardStoreAllocation; allocation_id?: Common.Id; store_exception?: ShardStoreException; @@ -28,12 +28,12 @@ export interface ShardStore { export type ShardStoreAllocation = 'primary' | 'replica' | 'unused' -export interface ShardStoreException { +export type ShardStoreException = { reason: string; type: string; } -export interface ShardStoreWrapper { +export type ShardStoreWrapper = { stores: ShardStore[]; } diff --git a/api/_types/indices.simulate_template.d.ts b/api/_types/indices.simulate_template.d.ts index 1b4c2e7ab..4b7acea76 100644 --- a/api/_types/indices.simulate_template.d.ts +++ b/api/_types/indices.simulate_template.d.ts @@ -18,12 +18,12 @@ import * as Common from './_common' import * as Common_Mapping from './_common.mapping' import * as Indices_Common from './indices._common' -export interface Overlapping { +export type Overlapping = { index_patterns: string[]; name: Common.Name; } -export interface Template { +export type Template = { aliases: Record; mappings: Common_Mapping.TypeMapping; settings: Indices_Common.IndexSettings; diff --git a/api/_types/indices.stats.d.ts b/api/_types/indices.stats.d.ts index 25083808c..4e0dabe49 100644 --- a/api/_types/indices.stats.d.ts +++ b/api/_types/indices.stats.d.ts @@ -16,12 +16,12 @@ import * as Common from './_common' -export interface AllIndicesStats { +export type AllIndicesStats = { primaries: IndexStats; total: IndexStats; } -export interface IndexShardStats extends IndexStatsBase { +export type IndexShardStats = IndexStatsBase & { commit?: ShardCommit; retention_leases?: ShardRetentionLeases; routing?: ShardRouting; @@ -31,7 +31,7 @@ export interface IndexShardStats extends IndexStatsBase { export type IndexStats = IndexStatsBase & Record -export interface IndexStatsBase { +export type IndexStatsBase = { completion?: Common.CompletionStats; docs?: Common.DocStats; fielddata?: Common.FielddataStats; @@ -50,7 +50,7 @@ export interface IndexStatsBase { warmer?: Common.WarmerStats; } -export interface IndicesStats { +export type IndicesStats = { primaries: IndexStats; shards?: Record; total: IndexStats; @@ -59,14 +59,14 @@ export interface IndicesStats { export type Metric = '_all' | 'completion' | 'docs' | 'fielddata' | 'flush' | 'get' | 'indexing' | 'merge' | 'query_cache' | 'recovery' | 'refresh' | 'request_cache' | 'search' | 'segments' | 'store' | 'suggest' | 'translog' | 'warmer' -export interface ShardCommit { +export type ShardCommit = { generation: number; id: Common.Id; num_docs: number; user_data: Record; } -export interface ShardFileSizeInfo { +export type ShardFileSizeInfo = { average_size_in_bytes?: Common.ByteCount; count?: number; description: string; @@ -76,26 +76,26 @@ export interface ShardFileSizeInfo { size_in_bytes: Common.ByteCount; } -export interface ShardLease { +export type ShardLease = { id: Common.Id; retaining_seq_no: Common.SequenceNumber; source: string; timestamp: number; } -export interface ShardPath { +export type ShardPath = { data_path: string; is_custom_data_path: boolean; state_path: string; } -export interface ShardRetentionLeases { +export type ShardRetentionLeases = { leases: ShardLease[]; primary_term: number; version: Common.VersionNumber; } -export interface ShardRouting { +export type ShardRouting = { node: string; primary: boolean; relocating_node?: undefined | string; @@ -104,7 +104,7 @@ export interface ShardRouting { export type ShardRoutingState = 'INITIALIZING' | 'RELOCATING' | 'STARTED' | 'UNASSIGNED' -export interface ShardSequenceNumber { +export type ShardSequenceNumber = { global_checkpoint: number; local_checkpoint: number; max_seq_no: Common.SequenceNumber; diff --git a/api/_types/indices.update_aliases.d.ts b/api/_types/indices.update_aliases.d.ts index 0991aaeac..d9e7da17a 100644 --- a/api/_types/indices.update_aliases.d.ts +++ b/api/_types/indices.update_aliases.d.ts @@ -17,13 +17,13 @@ import * as Common from './_common' import * as Common_QueryDsl from './_common.query_dsl' -export interface Action { +export type Action = { add?: AddAction; remove?: RemoveAction; remove_index?: RemoveIndexAction; } -export interface AddAction { +export type AddAction = { alias?: Common.IndexAlias; aliases?: Common.IndexAlias | Common.IndexAlias[]; filter?: Common_QueryDsl.QueryContainer; @@ -37,7 +37,7 @@ export interface AddAction { search_routing?: Common.Routing; } -export interface RemoveAction { +export type RemoveAction = { alias?: Common.IndexAlias; aliases?: Common.IndexAlias | Common.IndexAlias[]; index?: Common.IndexName; @@ -45,7 +45,7 @@ export interface RemoveAction { must_exist?: boolean; } -export interface RemoveIndexAction { +export type RemoveIndexAction = { index?: Common.IndexName; indices?: Common.Indices; must_exist?: boolean; diff --git a/api/_types/indices.validate_query.d.ts b/api/_types/indices.validate_query.d.ts index 2b5380f77..548b8ea24 100644 --- a/api/_types/indices.validate_query.d.ts +++ b/api/_types/indices.validate_query.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface IndicesValidationExplanation { +export type IndicesValidationExplanation = { error?: string; explanation?: string; index: Common.IndexName; diff --git a/api/_types/ingest._common.d.ts b/api/_types/ingest._common.d.ts index c5f4bdff3..77cc7be8f 100644 --- a/api/_types/ingest._common.d.ts +++ b/api/_types/ingest._common.d.ts @@ -16,13 +16,13 @@ import * as Common from './_common' -export interface AppendProcessor extends ProcessorBase { +export type AppendProcessor = ProcessorBase & { allow_duplicates?: boolean; field: Common.Field; value: Record[]; } -export interface AttachmentProcessor extends ProcessorBase { +export type AttachmentProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; indexed_chars?: number; @@ -32,13 +32,13 @@ export interface AttachmentProcessor extends ProcessorBase { target_field?: Common.Field; } -export interface BytesProcessor extends ProcessorBase { +export type BytesProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; } -export interface CircleProcessor extends ProcessorBase { +export type CircleProcessor = ProcessorBase & { error_distance: number; field: Common.Field; ignore_missing?: boolean; @@ -46,7 +46,7 @@ export interface CircleProcessor extends ProcessorBase { target_field?: Common.Field; } -export interface ConvertProcessor extends ProcessorBase { +export type ConvertProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; @@ -55,7 +55,7 @@ export interface ConvertProcessor extends ProcessorBase { export type ConvertType = 'auto' | 'boolean' | 'double' | 'float' | 'integer' | 'long' | 'string' -export interface CsvProcessor extends ProcessorBase { +export type CsvProcessor = ProcessorBase & { empty_value?: Record; field: Common.Field; ignore_missing?: boolean; @@ -65,7 +65,7 @@ export interface CsvProcessor extends ProcessorBase { trim?: boolean; } -export interface DateIndexNameProcessor extends ProcessorBase { +export type DateIndexNameProcessor = ProcessorBase & { date_formats: string[]; date_rounding: string; field: Common.Field; @@ -75,7 +75,7 @@ export interface DateIndexNameProcessor extends ProcessorBase { timezone?: string; } -export interface DateProcessor extends ProcessorBase { +export type DateProcessor = ProcessorBase & { field: Common.Field; formats: string[]; locale?: string; @@ -83,21 +83,21 @@ export interface DateProcessor extends ProcessorBase { timezone?: string; } -export interface DissectProcessor extends ProcessorBase { +export type DissectProcessor = ProcessorBase & { append_separator?: string; field: Common.Field; ignore_missing?: boolean; pattern: string; } -export interface DotExpanderProcessor extends ProcessorBase { +export type DotExpanderProcessor = ProcessorBase & { field: Common.Field; path?: string; } export type DropProcessor = ProcessorBase & Record -export interface EnrichProcessor extends ProcessorBase { +export type EnrichProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; max_matches?: number; @@ -107,17 +107,17 @@ export interface EnrichProcessor extends ProcessorBase { target_field: Common.Field; } -export interface FailProcessor extends ProcessorBase { +export type FailProcessor = ProcessorBase & { message: string; } -export interface ForeachProcessor extends ProcessorBase { +export type ForeachProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; processor: ProcessorContainer; } -export interface GeoIpProcessor extends ProcessorBase { +export type GeoIpProcessor = ProcessorBase & { database_file?: string; field: Common.Field; first_only?: boolean; @@ -126,7 +126,7 @@ export interface GeoIpProcessor extends ProcessorBase { target_field?: Common.Field; } -export interface GrokProcessor extends ProcessorBase { +export type GrokProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; pattern_definitions?: Record; @@ -134,7 +134,7 @@ export interface GrokProcessor extends ProcessorBase { trace_match?: boolean; } -export interface GsubProcessor extends ProcessorBase { +export type GsubProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; pattern: string; @@ -142,12 +142,12 @@ export interface GsubProcessor extends ProcessorBase { target_field?: Common.Field; } -export interface InferenceConfig { +export type InferenceConfig = { classification?: InferenceConfigClassification; regression?: InferenceConfigRegression; } -export interface InferenceConfigClassification { +export type InferenceConfigClassification = { num_top_classes?: number; num_top_feature_importance_values?: number; prediction_field_type?: string; @@ -155,25 +155,25 @@ export interface InferenceConfigClassification { top_classes_results_field?: Common.Field; } -export interface InferenceConfigRegression { +export type InferenceConfigRegression = { num_top_feature_importance_values?: number; results_field?: Common.Field; } -export interface InferenceProcessor extends ProcessorBase { +export type InferenceProcessor = ProcessorBase & { field_map?: Record>; inference_config?: InferenceConfig; model_id: Common.Id; target_field?: Common.Field; } -export interface JoinProcessor extends ProcessorBase { +export type JoinProcessor = ProcessorBase & { field: Common.Field; separator: string; target_field?: Common.Field; } -export interface JsonProcessor extends ProcessorBase { +export type JsonProcessor = ProcessorBase & { add_to_root?: boolean; add_to_root_conflict_strategy?: JsonProcessorConflictStrategy; allow_duplicate_keys?: boolean; @@ -183,7 +183,7 @@ export interface JsonProcessor extends ProcessorBase { export type JsonProcessorConflictStrategy = 'merge' | 'replace' -export interface KeyValueProcessor extends ProcessorBase { +export type KeyValueProcessor = ProcessorBase & { exclude_keys?: string[]; field: Common.Field; field_split: string; @@ -197,13 +197,13 @@ export interface KeyValueProcessor extends ProcessorBase { value_split: string; } -export interface LowercaseProcessor extends ProcessorBase { +export type LowercaseProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; } -export interface Pipeline { +export type Pipeline = { _meta?: Common.Metadata; description?: string; on_failure?: ProcessorContainer[]; @@ -211,12 +211,12 @@ export interface Pipeline { version?: Common.VersionNumber; } -export interface PipelineProcessor extends ProcessorBase { +export type PipelineProcessor = ProcessorBase & { ignore_missing_pipeline?: boolean; name: Common.Name; } -export interface ProcessorBase { +export type ProcessorBase = { description?: string; if?: string; ignore_failure?: boolean; @@ -224,7 +224,7 @@ export interface ProcessorBase { tag?: string; } -export interface ProcessorContainer { +export type ProcessorContainer = { append?: AppendProcessor; attachment?: AttachmentProcessor; bytes?: BytesProcessor; @@ -262,18 +262,18 @@ export interface ProcessorContainer { user_agent?: UserAgentProcessor; } -export interface RemoveProcessor extends ProcessorBase { +export type RemoveProcessor = ProcessorBase & { field: Common.Fields; ignore_missing?: boolean; } -export interface RenameProcessor extends ProcessorBase { +export type RenameProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field: Common.Field; } -export interface SetProcessor extends ProcessorBase { +export type SetProcessor = ProcessorBase & { copy_from?: Common.Field; field: Common.Field; ignore_empty_value?: boolean; @@ -282,20 +282,20 @@ export interface SetProcessor extends ProcessorBase { value?: Record; } -export interface SetSecurityUserProcessor extends ProcessorBase { +export type SetSecurityUserProcessor = ProcessorBase & { field: Common.Field; properties?: string[]; } export type ShapeType = 'geo_shape' | 'shape' -export interface SortProcessor extends ProcessorBase { +export type SortProcessor = ProcessorBase & { field: Common.Field; order?: Common.SortOrder; target_field?: Common.Field; } -export interface SplitProcessor extends ProcessorBase { +export type SplitProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; preserve_trailing?: boolean; @@ -303,31 +303,31 @@ export interface SplitProcessor extends ProcessorBase { target_field?: Common.Field; } -export interface TextEmbeddingProcessor extends ProcessorBase { +export type TextEmbeddingProcessor = ProcessorBase & { description?: string; field_map: Record; model_id: Common.Id; } -export interface TrimProcessor extends ProcessorBase { +export type TrimProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; } -export interface UppercaseProcessor extends ProcessorBase { +export type UppercaseProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; } -export interface UrlDecodeProcessor extends ProcessorBase { +export type UrlDecodeProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; target_field?: Common.Field; } -export interface UserAgentProcessor extends ProcessorBase { +export type UserAgentProcessor = ProcessorBase & { field: Common.Field; ignore_missing?: boolean; options?: UserAgentProperty[]; diff --git a/api/_types/ingest.simulate.d.ts b/api/_types/ingest.simulate.d.ts index 5e5929530..4675dce39 100644 --- a/api/_types/ingest.simulate.d.ts +++ b/api/_types/ingest.simulate.d.ts @@ -16,13 +16,13 @@ import * as Common from './_common' -export interface Document { +export type Document = { _id?: Common.Id; _index?: Common.IndexName; _source: Record; } -export interface DocumentSimulation { +export type DocumentSimulation = { _id: Common.Id; _index: Common.IndexName; _ingest: Ingest; @@ -32,12 +32,12 @@ export interface DocumentSimulation { _version_type?: Common.VersionType; } -export interface Ingest { +export type Ingest = { pipeline?: Common.Name; timestamp: Common.DateTime; } -export interface PipelineSimulation { +export type PipelineSimulation = { doc?: DocumentSimulation; processor_results?: PipelineSimulation[]; processor_type?: string; diff --git a/api/_types/insights._common.d.ts b/api/_types/insights._common.d.ts new file mode 100644 index 000000000..2e4b225a6 --- /dev/null +++ b/api/_types/insights._common.d.ts @@ -0,0 +1,95 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' +import * as Core_Search from './_core.search' + +export type Measurement = { + aggregationType?: string; + count?: number; + number?: number; +} + +export type Measurements = { + cpu?: Measurement; + latency?: Measurement; + memory?: Measurement; +} + +export type Source = { + _source?: Core_Search.SourceConfig; + aggregations?: Record; + collapse?: Core_Search.FieldCollapse; + docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; + explain?: boolean; + ext?: Record>; + fields?: Common_QueryDsl.FieldAndFormat[]; + from?: number; + highlight?: Core_Search.Highlight; + indices_boost?: Record[]; + min_score?: number; + pit?: Core_Search.PointInTimeReference; + post_filter?: Common_QueryDsl.QueryContainer; + profile?: boolean; + query?: Common_QueryDsl.QueryContainer; + script_fields?: Record; + search_after?: Common.SortResults; + seq_no_primary_term?: boolean; + size?: number; + slice?: Common.SlicedScroll; + sort?: Common.Sort; + stats?: string[]; + stored_fields?: Common.Fields; + suggest?: Core_Search.Suggester; + terminate_after?: number; + timeout?: string; + track_scores?: boolean; + track_total_hits?: Core_Search.TrackHits; + version?: boolean; +} + +export type TaskResourceUsage = { + cpu_time_in_nanos?: number; + memory_in_bytes?: number; +} + +export type TaskResourceUsages = { + action?: string; + nodeId?: string; + parentTaskId?: number; + taskId?: number; + taskResourceUsage?: TaskResourceUsage; +} + +export type TopQueriesResponse = { + top_queries: TopQuery[]; +} + +export type TopQuery = { + indices?: string[]; + labels?: Record; + measurements?: Measurements; + node_id?: string; + phase_latency_map?: Record; + query_hashcode?: string; + search_type?: string; + source?: Source; + task_resource_usages?: TaskResourceUsages[]; + timestamp?: number; + total_shards?: number; +} + diff --git a/api/_types/ism._common.d.ts b/api/_types/ism._common.d.ts index 2f6914d40..542915b36 100644 --- a/api/_types/ism._common.d.ts +++ b/api/_types/ism._common.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface Action { +export type Action = { alias?: ActionAlias; allocation?: ActionAllocation; close?: ActionClose; @@ -38,11 +38,11 @@ export interface Action { transform?: ActionTransform; } -export interface ActionAlias { +export type ActionAlias = { actions?: Record; } -export interface ActionAllocation { +export type ActionAllocation = { exclude?: Record; include?: Record; require?: Record; @@ -55,11 +55,11 @@ export type ActionCustom = Record export type ActionDelete = Record -export interface ActionForceMerge { +export type ActionForceMerge = { max_num_segments?: number; } -export interface ActionIndexPriority { +export type ActionIndexPriority = { priority?: number; } @@ -71,17 +71,17 @@ export type ActionReadOnly = Record export type ActionReadWrite = Record -export interface ActionReplicaCount { +export type ActionReplicaCount = { number_of_replicas?: number; } -export interface ActionRetry { +export type ActionRetry = { backoff?: string; count?: number; delay?: string; } -export interface ActionRollover { +export type ActionRollover = { copy_alias?: boolean; min_doc_count?: number; min_index_age?: number; @@ -93,25 +93,25 @@ export type ActionRollup = Record export type ActionShrink = Record -export interface ActionSnapshot { +export type ActionSnapshot = { include_global_state?: boolean; repository?: string; snapshot?: string; } -export interface ActionTimeout { +export type ActionTimeout = { timeout?: Record; } export type ActionTransform = Record -export interface AddPolicyRequest { +export type AddPolicyRequest = { policy_id: string; } export type AddPolicyResponse = ChangePolicyResponse -export interface ChangePolicyRequest { +export type ChangePolicyRequest = { include?: IncludeState[]; policy_id: string; state?: string; @@ -119,81 +119,81 @@ export interface ChangePolicyRequest { export type ChangePolicyResponse = ChangeResponse -export interface ChangeResponse { +export type ChangeResponse = { failed_indices?: FailedIndex[]; failures?: boolean; updated_indices?: number; } -export interface Channel { +export type Channel = { id?: string; } export type DeletePolicyResponse = Common.WriteResponseBase -export interface ErrorNotification { +export type ErrorNotification = { channel?: Channel; destination?: ErrorNotificationDestination; message_template?: Record; } -export interface ErrorNotificationChime { +export type ErrorNotificationChime = { url?: string; } -export interface ErrorNotificationDestination { +export type ErrorNotificationDestination = { last_update_time?: number; name?: string; [key: string]: any | ErrorNotificationChime | ErrorNotificationSlack; } -export interface ErrorNotificationSlack { +export type ErrorNotificationSlack = { custom_webhook?: SlackCustomWebhook; url?: string; } -export interface ExplainIndexResponse { +export type ExplainIndexResponse = { total_managed_indices?: number; [key: string]: any | ExplainPolicy; } -export interface ExplainPolicy { +export type ExplainPolicy = { enabled?: boolean | undefined; 'index.opendistro.index_state_management.policy_id'?: undefined | string; 'index.plugins.index_state_management.policy_id'?: undefined | string; } -export interface FailedIndex { +export type FailedIndex = { index_name?: string; index_uuid?: string; reason?: string; } -export interface GetPoliciesResponse { +export type GetPoliciesResponse = { policies?: PolicyWithMetadata[]; total_policies?: number; } export type GetPolicyResponse = PolicyWithMetadata -export interface IncludeState { +export type IncludeState = { state?: string; } -export interface IsmTemplate { +export type IsmTemplate = { index_patterns?: string[]; last_updated_time?: number; priority?: number; } -export interface Metadata { +export type Metadata = { _id?: Common.Id; _primary_term?: number; _seq_no?: Common.SequenceNumber; _version?: Common.VersionNumber; } -export interface Policy { +export type Policy = { default_state?: string; description?: string; error_notification?: ErrorNotification | undefined; @@ -204,7 +204,7 @@ export interface Policy { states?: States[]; } -export interface PolicyEnvelope { +export type PolicyEnvelope = { policy?: Policy; } @@ -212,29 +212,29 @@ export type PolicyWithMetadata = Metadata & PolicyEnvelope export type PutPolicyRequest = PolicyEnvelope -export interface PutPolicyResponse extends Metadata { +export type PutPolicyResponse = Metadata & { policy?: PolicyEnvelope; } -export interface RefreshSearchAnalyzersResponse { +export type RefreshSearchAnalyzersResponse = { _shards?: Common.ShardStatistics; successful_refresh_details?: RefreshSearchAnalyzersResponseDetails[]; } -export interface RefreshSearchAnalyzersResponseDetails { +export type RefreshSearchAnalyzersResponseDetails = { index?: string; refreshed_analyzers?: string[]; } export type RemovePolicyResponse = ChangePolicyResponse -export interface RetryIndexRequest { +export type RetryIndexRequest = { state: string; } export type RetryIndexResponse = ChangeResponse -export interface SlackCustomWebhook { +export type SlackCustomWebhook = { header_params?: Record; host?: string; password?: string; @@ -246,13 +246,13 @@ export interface SlackCustomWebhook { username?: string; } -export interface States { +export type States = { actions?: Action[]; name?: string; transitions?: Transition[]; } -export interface Transition { +export type Transition = { conditions?: Record; state_name?: string; } diff --git a/api/_types/ml._common.d.ts b/api/_types/ml._common.d.ts index 28ff1e336..27277342f 100644 --- a/api/_types/ml._common.d.ts +++ b/api/_types/ml._common.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface Action { +export type Action = { action_type?: string; headers?: Headers; method?: string; @@ -26,7 +26,7 @@ export interface Action { url?: string; } -export interface ClientConfig { +export type ClientConfig = { connection_timeout?: number; max_connection?: number; max_retry_times?: number; @@ -36,7 +36,7 @@ export interface ClientConfig { retry_timeout_seconds?: number; } -export interface CreateConnectorRequest { +export type CreateConnectorRequest = { actions: Action[]; client_config?: ClientConfig; credential: Credential; @@ -47,33 +47,33 @@ export interface CreateConnectorRequest { version: number; } -export interface Credential { +export type Credential = { access_key?: string; secret_key?: string; session_token?: string; [key: string]: any; } -export interface Headers { +export type Headers = { content_type?: string; [key: string]: any; } -export interface HitsTotal { +export type HitsTotal = { relation: string; value: number; } -export interface LLM { +export type LLM = { model_id?: string; parameters?: Parameters; } -export interface Memory { +export type Memory = { type?: string; } -export interface ModelGroup { +export type ModelGroup = { access: string; created_time?: number; description: string; @@ -82,14 +82,14 @@ export interface ModelGroup { name: string; } -export interface ModelGroupRegistration { +export type ModelGroupRegistration = { model_group_id: string; status: string; } export type Parameters = Record -export interface RegisterAgentsRequest { +export type RegisterAgentsRequest = { app_type?: string; description?: string; llm?: LLM; @@ -100,27 +100,27 @@ export interface RegisterAgentsRequest { type: string; } -export interface SearchModelsHits { +export type SearchModelsHits = { hits: SearchModelsHitsHit[]; total: HitsTotal; } -export interface SearchModelsHitsHit { +export type SearchModelsHitsHit = { _id: string; _index?: string; model_id: string; } -export interface SearchModelsQuery { +export type SearchModelsQuery = { query: Record; size: number; } -export interface SearchModelsResponse { +export type SearchModelsResponse = { hits: SearchModelsHits; } -export interface Task { +export type Task = { create_time?: number; error?: string; function_name?: string; @@ -133,14 +133,14 @@ export interface Task { worker_node?: Common.NodeIds[]; } -export interface ToolItems { +export type ToolItems = { name?: string; parameters?: Parameters; type?: string; [key: string]: any; } -export interface UndeployModelNode { +export type UndeployModelNode = { stats?: UndeployModelNodeStats; } diff --git a/api/_types/nodes._common.d.ts b/api/_types/nodes._common.d.ts index 6c9fd7dac..6dd16744d 100644 --- a/api/_types/nodes._common.d.ts +++ b/api/_types/nodes._common.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Indices_Stats from './indices.stats' -export interface AdaptiveSelection { +export type AdaptiveSelection = { avg_queue_size?: number; avg_response_time?: Common.Duration; avg_response_time_ns?: number; @@ -27,7 +27,7 @@ export interface AdaptiveSelection { rank?: string; } -export interface Breaker { +export type Breaker = { estimated_size?: Common.HumanReadableByteCount; estimated_size_in_bytes?: Common.ByteCount; limit_size?: Common.HumanReadableByteCount; @@ -36,32 +36,32 @@ export interface Breaker { tripped?: number; } -export interface Cgroup { +export type Cgroup = { cpu?: CgroupCpu; cpuacct?: CpuAcct; memory?: CgroupMemory; } -export interface CgroupCpu { +export type CgroupCpu = { cfs_period_micros?: number; cfs_quota_micros?: number; control_group?: string; stat?: CgroupCpuStat; } -export interface CgroupCpuStat { +export type CgroupCpuStat = { number_of_elapsed_periods?: number; number_of_times_throttled?: number; time_throttled_nanos?: Common.DurationValueUnitNanos; } -export interface CgroupMemory { +export type CgroupMemory = { control_group?: string; limit_in_bytes?: string; usage_in_bytes?: string; } -export interface Client { +export type Client = { agent?: string; closed_time_millis?: number; id?: number; @@ -75,27 +75,27 @@ export interface Client { x_opaque_id?: string; } -export interface ClusterAppliedStats { +export type ClusterAppliedStats = { recordings?: Recording[]; } -export interface ClusterStateOverallStats { +export type ClusterStateOverallStats = { failed_count?: number; total_time_in_millis?: Common.DurationValueUnitMillis; update_count?: number; } -export interface ClusterStateQueue { +export type ClusterStateQueue = { committed?: number; pending?: number; total?: number; } -export interface ClusterStateStats { +export type ClusterStateStats = { overall?: ClusterStateOverallStats; } -export interface ClusterStateUpdate { +export type ClusterStateUpdate = { commit_time?: Common.Duration; commit_time_millis?: Common.DurationValueUnitMillis; completion_time?: Common.Duration; @@ -113,14 +113,14 @@ export interface ClusterStateUpdate { publication_time_millis?: Common.DurationValueUnitMillis; } -export interface Context { +export type Context = { cache_evictions?: number; compilation_limit_triggered?: number; compilations?: number; context?: string; } -export interface Cpu { +export type Cpu = { load_average?: Record; percent?: Common.PercentageNumber; sys?: Common.Duration; @@ -131,12 +131,12 @@ export interface Cpu { user_in_millis?: Common.DurationValueUnitMillis; } -export interface CpuAcct { +export type CpuAcct = { control_group?: string; usage_nanos?: Common.DurationValueUnitNanos; } -export interface DataPathStats { +export type DataPathStats = { available?: Common.HumanReadableByteCount; available_in_bytes?: Common.ByteCount; cache_reserved?: Common.HumanReadableByteCount; @@ -157,7 +157,7 @@ export interface DataPathStats { type?: string; } -export interface Discovery { +export type Discovery = { cluster_applier_stats?: ClusterAppliedStats; cluster_state_queue?: ClusterStateQueue; cluster_state_stats?: ClusterStateStats; @@ -166,19 +166,19 @@ export interface Discovery { serialized_cluster_states?: SerializedClusterState; } -export interface ExtendedMemoryStats extends MemoryStats { +export type ExtendedMemoryStats = MemoryStats & { free_percent?: Common.PercentageNumber; used_percent?: Common.PercentageNumber; } -export interface FileSystem { +export type FileSystem = { data?: DataPathStats[]; io_stats?: IoStats; timestamp?: number; total?: FileSystemTotal; } -export interface FileSystemTotal { +export type FileSystemTotal = { available?: Common.HumanReadableByteCount; available_in_bytes?: Common.ByteCount; cache_reserved?: Common.HumanReadableByteCount; @@ -189,39 +189,39 @@ export interface FileSystemTotal { total_in_bytes?: Common.ByteCount; } -export interface GarbageCollector { +export type GarbageCollector = { collectors?: Record; } -export interface GarbageCollectorTotal { +export type GarbageCollectorTotal = { collection_count?: number; collection_time?: string; collection_time_in_millis?: number; } -export interface Http { +export type Http = { clients?: Client[]; current_open?: number; total_opened?: number; } -export interface IndexingPressure { +export type IndexingPressure = { memory?: IndexingPressureMemory; } -export interface IndexingPressureMemory { +export type IndexingPressureMemory = { current?: PressureMemory; limit?: Common.HumanReadableByteCount; limit_in_bytes?: Common.ByteCount; total?: PressureMemory; } -export interface Ingest { +export type Ingest = { pipelines?: Record; total?: IngestTotal; } -export interface IngestTotal { +export type IngestTotal = { count?: number; current?: number; failed?: number; @@ -230,7 +230,7 @@ export interface IngestTotal { time_in_millis?: Common.DurationValueUnitMillis; } -export interface IoStatDevice { +export type IoStatDevice = { device_name?: string; io_time_in_millis?: Common.DurationValueUnitMillis; operations?: number; @@ -243,12 +243,12 @@ export interface IoStatDevice { write_time?: number; } -export interface IoStats { +export type IoStats = { devices?: IoStatDevice[]; total?: IoStatDevice; } -export interface Jvm { +export type Jvm = { buffer_pools?: Record; classes?: JvmClasses; gc?: GarbageCollector; @@ -259,13 +259,13 @@ export interface Jvm { uptime_in_millis?: number; } -export interface JvmClasses { +export type JvmClasses = { current_loaded_count?: number; total_loaded_count?: number; total_unloaded_count?: number; } -export interface JvmMemoryStats { +export type JvmMemoryStats = { heap_committed?: Common.HumanReadableByteCount; heap_committed_in_bytes?: Common.ByteCount; heap_max?: Common.HumanReadableByteCount; @@ -280,17 +280,17 @@ export interface JvmMemoryStats { pools?: Record; } -export interface JvmThreads { +export type JvmThreads = { count?: number; peak_count?: number; } -export interface KeyedProcessor { +export type KeyedProcessor = { stats?: Processor; type?: string; } -export interface LastGcStats { +export type LastGcStats = { max?: Common.HumanReadableByteCount; max_in_bytes?: Common.ByteCount; usage_percent?: Common.PercentageNumber; @@ -298,7 +298,7 @@ export interface LastGcStats { used_in_bytes?: Common.ByteCount; } -export interface MemoryStats { +export type MemoryStats = { adjusted_total_in_bytes?: Common.ByteCount; free?: Common.HumanReadableByteCount; free_in_bytes?: Common.ByteCount; @@ -314,7 +314,7 @@ export interface MemoryStats { used_in_bytes?: Common.ByteCount; } -export interface NodeBufferPool { +export type NodeBufferPool = { count?: number; total_capacity?: Common.HumanReadableByteCount; total_capacity_in_bytes?: Common.ByteCount; @@ -322,18 +322,18 @@ export interface NodeBufferPool { used_in_bytes?: Common.ByteCount; } -export interface NodeReloadError { +export type NodeReloadError = { name: Common.Name; reload_exception?: Common.ErrorCause; } export type NodeReloadResult = Stats | NodeReloadError -export interface NodesResponseBase { +export type NodesResponseBase = { _nodes?: Common.NodeStatistics; } -export interface OperatingSystem { +export type OperatingSystem = { cgroup?: Cgroup; cpu?: Cpu; mem?: ExtendedMemoryStats; @@ -341,7 +341,7 @@ export interface OperatingSystem { timestamp?: number; } -export interface Pool { +export type Pool = { last_gc_stats?: LastGcStats; max?: Common.HumanReadableByteCount; max_in_bytes?: Common.ByteCount; @@ -353,7 +353,7 @@ export interface Pool { used_in_bytes?: Common.ByteCount; } -export interface PressureMemory { +export type PressureMemory = { all?: Common.HumanReadableByteCount; all_in_bytes?: Common.ByteCount; combined_coordinating_and_primary?: Common.HumanReadableByteCount; @@ -369,7 +369,7 @@ export interface PressureMemory { replica_rejections?: number; } -export interface Process { +export type Process = { cpu?: Cpu; max_file_descriptors?: number; mem?: MemoryStats; @@ -377,7 +377,7 @@ export interface Process { timestamp?: number; } -export interface Processor { +export type Processor = { count?: number; current?: number; failed?: number; @@ -385,29 +385,33 @@ export interface Processor { time_in_millis?: Common.DurationValueUnitMillis; } -export interface PublishedClusterStates { +export type PublishedClusterStates = { compatible_diffs?: number; full_states?: number; incompatible_diffs?: number; } -export interface Recording { +export type Recording = { cumulative_execution_count?: number; cumulative_execution_time?: Common.Duration; cumulative_execution_time_millis?: Common.DurationValueUnitMillis; name?: string; } +export type RemoteStoreStats = { + last_successful_fetch_of_pinned_timestamps?: Common.StringifiedEpochTimeUnitSeconds; +} + export type SampleType = 'block' | 'cpu' | 'wait' -export interface ScriptCache { +export type ScriptCache = { cache_evictions?: number; compilation_limit_triggered?: number; compilations?: number; context?: string; } -export interface Scripting { +export type Scripting = { cache_evictions?: number; compilation_limit_triggered?: number; compilations?: number; @@ -415,12 +419,12 @@ export interface Scripting { contexts?: Context[]; } -export interface SerializedClusterState { +export type SerializedClusterState = { diffs?: SerializedClusterStateDetail; full_states?: SerializedClusterStateDetail; } -export interface SerializedClusterStateDetail { +export type SerializedClusterStateDetail = { compressed_size?: Common.HumanReadableByteCount; compressed_size_in_bytes?: Common.ByteCount; count?: number; @@ -428,14 +432,14 @@ export interface SerializedClusterStateDetail { uncompressed_size_in_bytes?: Common.ByteCount; } -export interface ShardAdmissionControlStats { +export type ShardAdmissionControlStats = { global_cpu_usage?: UsageStats; global_io_usage?: UsageStats; } export type ShardCachesStats = Record -export interface ShardCacheStats { +export type ShardCacheStats = { evictions?: number; hit_count?: number; item_count?: number; @@ -445,16 +449,16 @@ export interface ShardCacheStats { store_name?: string; } -export interface ShardClusterManagerThrottlingStats { +export type ShardClusterManagerThrottlingStats = { stats?: ShardClusterManagerThrottlingStatsDetail; } -export interface ShardClusterManagerThrottlingStatsDetail { +export type ShardClusterManagerThrottlingStatsDetail = { throttled_tasks_per_task_type?: Record; total_throttled_tasks?: number; } -export interface ShardIndexingPressureStats { +export type ShardIndexingPressureStats = { enabled?: boolean; enforced?: boolean; stats?: Record; @@ -466,33 +470,33 @@ export type ShardRepositoriesStats = any[] export type ShardResourceUsageStats = Record -export interface ShardResourceUsageStatsDetail { +export type ShardResourceUsageStatsDetail = { cpu_utilization_percent?: Common.PercentageString; io_usage_stats?: ShardResourceUsageStatsIoUsageStats; memory_utilization_percent?: Common.PercentageString; timestamp?: number; } -export interface ShardResourceUsageStatsIoUsageStats { +export type ShardResourceUsageStatsIoUsageStats = { max_io_utilization_percent?: Common.PercentageString; } export type ShardSearchBackpressureMode = 'disabled' | 'enforced' | 'monitor_only' -export interface ShardSearchBackpressureStats { +export type ShardSearchBackpressureStats = { mode?: ShardSearchBackpressureMode; search_shard_task?: ShardSearchBackpressureTaskStats; search_task?: ShardSearchBackpressureTaskStats; } -export interface ShardSearchBackpressureTaskCancellationStats { +export type ShardSearchBackpressureTaskCancellationStats = { cancellation_count?: number; cancellation_limit_reached_count?: number; cancelled_task_percentage?: Common.PercentageNumber; current_cancellation_eligible_tasks_count?: number; } -export interface ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats { +export type ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats = { cancellation_count?: number; current_avg?: Common.Duration; current_avg_millis?: Common.DurationValueUnitMillis; @@ -500,7 +504,7 @@ export interface ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats current_max_millis?: Common.DurationValueUnitMillis; } -export interface ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats { +export type ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats = { cancellation_count?: number; current_avg?: Common.Duration; current_avg_millis?: Common.DurationValueUnitMillis; @@ -508,7 +512,7 @@ export interface ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerSta current_max_millis?: Common.DurationValueUnitMillis; } -export interface ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats { +export type ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats = { cancellation_count?: number; current_avg?: Common.HumanReadableByteCount; current_avg_bytes?: Common.ByteCount; @@ -518,25 +522,25 @@ export interface ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats rolling_avg_bytes?: Common.ByteCount; } -export interface ShardSearchBackpressureTaskResourceTrackerStats { +export type ShardSearchBackpressureTaskResourceTrackerStats = { cpu_usage_tracker?: ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats; elapsed_time_tracker?: ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats; heap_usage_tracker?: ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats; } -export interface ShardSearchBackpressureTaskStats { +export type ShardSearchBackpressureTaskStats = { cancellation_stats?: ShardSearchBackpressureTaskCancellationStats; completion_count?: number; resource_tracker_stats?: ShardSearchBackpressureTaskResourceTrackerStats; } -export interface ShardSearchPipelineStats { +export type ShardSearchPipelineStats = { pipelines?: Record; total_request?: ShardSearchPipelineTotalStats; total_response?: ShardSearchPipelineTotalStats; } -export interface ShardSearchPipelineTotalStats { +export type ShardSearchPipelineTotalStats = { count?: number; current?: number; failed?: number; @@ -544,28 +548,28 @@ export interface ShardSearchPipelineTotalStats { time_in_millis?: Common.DurationValueUnitMillis; } -export interface ShardSegmentReplicationBackpressureStats { +export type ShardSegmentReplicationBackpressureStats = { total_rejected_requests?: number; } -export interface ShardTaskCancellationStats { +export type ShardTaskCancellationStats = { search_shard_task?: ShardTaskCancellationStatsDetail; } -export interface ShardTaskCancellationStatsDetail { +export type ShardTaskCancellationStatsDetail = { current_count_post_cancel?: number; total_count_post_cancel?: number; } -export interface ShardWeightedRoutingStats { +export type ShardWeightedRoutingStats = { stats?: ShardWeightedRoutingStatsDetail; } -export interface ShardWeightedRoutingStatsDetail { +export type ShardWeightedRoutingStatsDetail = { fail_open_count?: number; } -export interface Stats { +export type Stats = { adaptive_selection?: Record; admission_control?: ShardAdmissionControlStats; attributes?: Record; @@ -584,6 +588,7 @@ export interface Stats { name?: Common.Name; os?: OperatingSystem; process?: Process; + remote_store?: RemoteStoreStats; repositories?: ShardRepositoriesStats; resource_usage_stats?: ShardResourceUsageStats; roles?: Common.NodeRoles; @@ -601,7 +606,7 @@ export interface Stats { weighted_routing?: ShardWeightedRoutingStats; } -export interface ThreadCount { +export type ThreadCount = { active?: number; completed?: number; largest?: number; @@ -612,13 +617,13 @@ export interface ThreadCount { total_wait_time_in_nanos?: number; } -export interface TotalRejectionsBreakup { +export type TotalRejectionsBreakup = { no_successful_request_limits?: number; node_limits?: number; throughput_degradation_limits?: number; } -export interface Transport { +export type Transport = { inbound_handling_time_histogram?: TransportHistogram[]; outbound_handling_time_histogram?: TransportHistogram[]; rx_count?: number; @@ -631,17 +636,17 @@ export interface Transport { tx_size_in_bytes?: Common.ByteCount; } -export interface TransportHistogram { +export type TransportHistogram = { count?: number; ge_millis?: number; lt_millis?: number; } -export interface TransportUsageStats { +export type TransportUsageStats = { rejection_count?: Record; } -export interface UsageStats { +export type UsageStats = { transport?: TransportUsageStats; } diff --git a/api/_types/nodes.info.d.ts b/api/_types/nodes.info.d.ts index a911dab20..111d4d47a 100644 --- a/api/_types/nodes.info.d.ts +++ b/api/_types/nodes.info.d.ts @@ -18,13 +18,13 @@ import * as Common from './_common' import * as Indices_Common from './indices._common' import * as Nodes_Common from './nodes._common' -export interface DeprecationIndexing { +export type DeprecationIndexing = { enabled: boolean | string; } export type Metric = '_all' | 'aggregations' | 'http' | 'indices' | 'ingest' | 'jvm' | 'os' | 'plugins' | 'process' | 'search_pipelines' | 'settings' | 'thread_pool' | 'transport' -export interface NodeInfo { +export type NodeInfo = { aggregations?: Record; attributes?: Record; build_flavor?: string; @@ -52,51 +52,51 @@ export interface NodeInfo { version: Common.VersionString; } -export interface NodeInfoAction { +export type NodeInfoAction = { destructive_requires_name: string; } -export interface NodeInfoAggregation { +export type NodeInfoAggregation = { types: string[]; } -export interface NodeInfoBootstrap { +export type NodeInfoBootstrap = { memory_lock: string; } -export interface NodeInfoClient { +export type NodeInfoClient = { type: string; } -export interface NodeInfoDiscovery { +export type NodeInfoDiscovery = { seed_hosts?: string; type?: string; } -export interface NodeInfoHttp { +export type NodeInfoHttp = { bound_address: string[]; max_content_length?: Common.HumanReadableByteCount; max_content_length_in_bytes: Common.ByteCount; publish_address: string; } -export interface NodeInfoIngest { +export type NodeInfoIngest = { processors: NodeInfoIngestProcessor[]; } -export interface NodeInfoIngestDownloader { +export type NodeInfoIngestDownloader = { enabled: string; } -export interface NodeInfoIngestInfo { +export type NodeInfoIngestInfo = { downloader: NodeInfoIngestDownloader; } -export interface NodeInfoIngestProcessor { +export type NodeInfoIngestProcessor = { type: string; } -export interface NodeInfoJvmMemory { +export type NodeInfoJvmMemory = { direct_max?: Common.HumanReadableByteCount; direct_max_in_bytes: Common.ByteCount; heap_init?: Common.HumanReadableByteCount; @@ -109,23 +109,23 @@ export interface NodeInfoJvmMemory { non_heap_max_in_bytes: Common.ByteCount; } -export interface NodeInfoMemory { +export type NodeInfoMemory = { total: Common.HumanReadableByteCount; total_in_bytes: Common.ByteCount; } -export interface NodeInfoNetwork { +export type NodeInfoNetwork = { primary_interface: NodeInfoNetworkInterface; refresh_interval: number; } -export interface NodeInfoNetworkInterface { +export type NodeInfoNetworkInterface = { address: string; mac_address: string; name: Common.Name; } -export interface NodeInfoOSCPU { +export type NodeInfoOSCPU = { cache_size: Common.HumanReadableByteCount; cache_size_in_bytes: Common.ByteCount; cores_per_socket: number; @@ -136,40 +136,40 @@ export interface NodeInfoOSCPU { vendor: string; } -export interface NodeInfoPath { +export type NodeInfoPath = { data?: string[]; home: string; logs: string; repo?: string[]; } -export interface NodeInfoRepositories { +export type NodeInfoRepositories = { url: NodeInfoRepositoriesUrl; } -export interface NodeInfoRepositoriesUrl { +export type NodeInfoRepositoriesUrl = { allowed_urls: string; } -export interface NodeInfoScript { +export type NodeInfoScript = { allowed_types: string; disable_max_compilations_rate: string; } -export interface NodeInfoSearch { +export type NodeInfoSearch = { remote: NodeInfoSearchRemote; } -export interface NodeInfoSearchPipelines { +export type NodeInfoSearchPipelines = { request_processors: NodeInfoIngestProcessor[]; response_processors: NodeInfoIngestProcessor[]; } -export interface NodeInfoSearchRemote { +export type NodeInfoSearchRemote = { connect: string; } -export interface NodeInfoSettings { +export type NodeInfoSettings = { action?: NodeInfoAction; bootstrap?: NodeInfoBootstrap; client: NodeInfoClient; @@ -188,7 +188,7 @@ export interface NodeInfoSettings { transport: NodeInfoSettingsTransport; } -export interface NodeInfoSettingsCluster { +export type NodeInfoSettingsCluster = { deprecation_indexing?: DeprecationIndexing; election?: NodeInfoSettingsClusterElection; initial_cluster_manager_nodes?: string; @@ -197,34 +197,34 @@ export interface NodeInfoSettingsCluster { routing?: Indices_Common.IndexRouting; } -export interface NodeInfoSettingsClusterElection { +export type NodeInfoSettingsClusterElection = { strategy: Common.Name; } -export interface NodeInfoSettingsHttp { +export type NodeInfoSettingsHttp = { compression?: boolean | string; port?: number | string; type: string; 'type.default'?: string; } -export interface NodeInfoSettingsIndex { +export type NodeInfoSettingsIndex = { store?: NodeInfoSettingsIndexStore; } -export interface NodeInfoSettingsIndexHybrid { +export type NodeInfoSettingsIndexHybrid = { mmap?: NodeInfoSettingsIndexStoreMmap; } -export interface NodeInfoSettingsIndexStore { +export type NodeInfoSettingsIndexStore = { hybrid?: NodeInfoSettingsIndexHybrid; } -export interface NodeInfoSettingsIndexStoreMmap { +export type NodeInfoSettingsIndexStoreMmap = { extensions?: string[]; } -export interface NodeInfoSettingsIngest { +export type NodeInfoSettingsIngest = { append?: NodeInfoIngestInfo; attachment?: NodeInfoIngestInfo; bytes?: NodeInfoIngestInfo; @@ -261,11 +261,11 @@ export interface NodeInfoSettingsIngest { user_agent?: NodeInfoIngestInfo; } -export interface NodeInfoSettingsNetwork { +export type NodeInfoSettingsNetwork = { host: Common.Host; } -export interface NodeInfoSettingsNode { +export type NodeInfoSettingsNode = { attr: NodeInfoShardIndexingPressureEnabled; max_local_storage_nodes?: string; name: Common.Name; @@ -273,22 +273,22 @@ export interface NodeInfoSettingsNode { export type NodeInfoSettingsPlugins = Record -export interface NodeInfoSettingsTransport { +export type NodeInfoSettingsTransport = { type: string; 'type.default'?: string; } -export interface NodeInfoShardIndexingPressureEnabled { +export type NodeInfoShardIndexingPressureEnabled = { shard_indexing_pressure_enabled: string; } -export interface NodeInfoTransport { +export type NodeInfoTransport = { bound_address: string[]; profiles: Record; publish_address: string; } -export interface NodeJvmInfo { +export type NodeJvmInfo = { bundled_jdk: boolean; gc_collectors?: string[]; input_arguments?: string[]; @@ -304,7 +304,7 @@ export interface NodeJvmInfo { vm_version?: Common.VersionString; } -export interface NodeOperatingSystemInfo { +export type NodeOperatingSystemInfo = { allocated_processors?: number; arch?: string; available_processors: number; @@ -317,13 +317,13 @@ export interface NodeOperatingSystemInfo { version?: Common.VersionString; } -export interface NodeProcessInfo { +export type NodeProcessInfo = { id: number; mlockall: boolean; refresh_interval_in_millis: Common.DurationValueUnitMillis; } -export interface NodeThreadPoolInfo { +export type NodeThreadPoolInfo = { core?: number; keep_alive?: Common.Duration; max?: number; @@ -332,7 +332,7 @@ export interface NodeThreadPoolInfo { type: string; } -export interface ResponseBase extends Nodes_Common.NodesResponseBase { +export type ResponseBase = Nodes_Common.NodesResponseBase & { cluster_name: Common.Name; nodes: Record; } diff --git a/api/_types/nodes.reload_secure_settings.d.ts b/api/_types/nodes.reload_secure_settings.d.ts index 94ae273a1..d132fb154 100644 --- a/api/_types/nodes.reload_secure_settings.d.ts +++ b/api/_types/nodes.reload_secure_settings.d.ts @@ -17,7 +17,7 @@ import * as Common from './_common' import * as Nodes_Common from './nodes._common' -export interface ResponseBase extends Nodes_Common.NodesResponseBase { +export type ResponseBase = Nodes_Common.NodesResponseBase & { cluster_name: Common.Name; nodes: Record; } diff --git a/api/_types/nodes.stats.d.ts b/api/_types/nodes.stats.d.ts index a8bb6093b..49efb08f2 100644 --- a/api/_types/nodes.stats.d.ts +++ b/api/_types/nodes.stats.d.ts @@ -21,7 +21,7 @@ export type IndexMetric = '_all' | 'completion' | 'docs' | 'fielddata' | 'flush' export type Metric = '_all' | 'adaptive_selection' | 'admission_control' | 'breaker' | 'caches' | 'cluster_manager_throttling' | 'discovery' | 'file_cache' | 'fs' | 'http' | 'indexing_pressure' | 'indices' | 'ingest' | 'jvm' | 'os' | 'process' | 'repositories' | 'resource_usage_stats' | 'script' | 'script_cache' | 'search_backpressure' | 'search_pipeline' | 'segment_replication_backpressure' | 'shard_indexing_pressure' | 'task_cancellation' | 'thread_pool' | 'transport' | 'weighted_routing' -export interface ResponseBase extends Nodes_Common.NodesResponseBase { +export type ResponseBase = Nodes_Common.NodesResponseBase & { cluster_name?: Common.Name; nodes: Record; } diff --git a/api/_types/nodes.usage.d.ts b/api/_types/nodes.usage.d.ts index dab961418..780380451 100644 --- a/api/_types/nodes.usage.d.ts +++ b/api/_types/nodes.usage.d.ts @@ -19,14 +19,14 @@ import * as Nodes_Common from './nodes._common' export type Metric = '_all' | 'rest_actions' -export interface NodeUsage { +export type NodeUsage = { aggregations: Record>; rest_actions: Record; since: Common.EpochTimeUnitMillis; timestamp: Common.EpochTimeUnitMillis; } -export interface ResponseBase extends Nodes_Common.NodesResponseBase { +export type ResponseBase = Nodes_Common.NodesResponseBase & { cluster_name: Common.Name; nodes: Record; } diff --git a/api/_types/notifications._common.d.ts b/api/_types/notifications._common.d.ts index 4ccc8638c..dd8057124 100644 --- a/api/_types/notifications._common.d.ts +++ b/api/_types/notifications._common.d.ts @@ -15,46 +15,46 @@ */ -export interface Chime { +export type Chime = { url: string; } -export interface DeleteConfigsResponse { +export type DeleteConfigsResponse = { delete_response_list?: DeleteResponseList; } export type DeleteResponseList = Record -export interface DeliveryStatus { +export type DeliveryStatus = { status_code?: string; status_text?: string; } -export interface Email { +export type Email = { email_account_id: string; recipient_list?: RecipientListItem[]; } export type EmailEncryptionMethod = 'none' | 'ssl' | 'start_tls' -export interface EmailGroup { +export type EmailGroup = { email_group_id_list?: string[]; recipient_list: RecipientListItem[]; } -export interface EmailRecipientStatus { +export type EmailRecipientStatus = { delivery_status?: DeliveryStatus; recipient?: string; } -export interface EventSource { +export type EventSource = { reference_id?: string; severity?: SeverityType; tags?: string[]; title?: string; } -export interface EventStatus { +export type EventStatus = { config_id?: string; config_name?: string; config_type?: NotificationConfigType; @@ -62,7 +62,7 @@ export interface EventStatus { email_recipient_status?: EmailRecipientStatus[]; } -export interface GetConfigsResponse { +export type GetConfigsResponse = { config_list?: NotificationsConfigsOutputItem[]; start_index?: number; total_hit_relation?: TotalHitRelation; @@ -73,11 +73,11 @@ export type HeaderParamsMap = Record export type HttpMethodType = 'PATCH' | 'POST' | 'PUT' -export interface MicrosoftTeamsItem { +export type MicrosoftTeamsItem = { url: string; } -export interface NotificationChannel { +export type NotificationChannel = { config_id?: string; config_type?: NotificationConfigType; description?: string; @@ -87,12 +87,12 @@ export interface NotificationChannel { export type NotificationConfigType = 'chime' | 'email' | 'email_group' | 'microsoft_teams' | 'ses_account' | 'slack' | 'smtp_account' | 'sns' | 'webhook' -export interface NotificationsConfig { +export type NotificationsConfig = { config: NotificationsConfigItem; config_id?: string; } -export interface NotificationsConfigItem { +export type NotificationsConfigItem = { chime?: Chime; config_type: NotificationConfigType; description?: string; @@ -108,7 +108,7 @@ export interface NotificationsConfigItem { webhook?: Webhook; } -export interface NotificationsConfigsOutputItem { +export type NotificationsConfigsOutputItem = { config?: NotificationsConfigItem; config_id?: string; created_time_ms?: number; @@ -117,13 +117,13 @@ export interface NotificationsConfigsOutputItem { export type NotificationsPluginFeaturesMap = Record -export interface RecipientListItem { +export type RecipientListItem = { recipient?: string; } -export type RestStatus = 'accepted' | 'continue' | 'created' | 'found' | 'moved_permanently' | 'multi_status' | 'multiple_choices' | 'no_content' | 'non_authoritative_information' | 'not_modified' | 'ok' | 'partial_content' | 'reset_content' | 'see_other' | 'switching_protocols' | 'temporary_redirect' | 'use_proxy' +export type RestStatus = 'ACCEPTED' | 'CREATED' | 'MULTI_STATUS' | 'NON_AUTHORITATIVE_INFORMATION' | 'NO_CONTENT' | 'OK' | 'PARTIAL_CONTENT' | 'RESET_CONTENT' -export interface SesAccount { +export type SesAccount = { from_address: string; region: string; role_arn?: string; @@ -131,25 +131,25 @@ export interface SesAccount { export type SeverityType = 'critical' | 'high' | 'info' -export interface SlackItem { +export type SlackItem = { url: string; } -export interface SmtpAccount { +export type SmtpAccount = { from_address: string; host: string; method: EmailEncryptionMethod; port: number; } -export interface SnsItem { +export type SnsItem = { role_arn?: string; topic_arn: string; } export type TotalHitRelation = 'eq' | 'gte' -export interface Webhook { +export type Webhook = { header_params?: HeaderParamsMap; method?: HttpMethodType; url: string; diff --git a/api/_types/observability._common.d.ts b/api/_types/observability._common.d.ts index ee3ff48d0..a885d7928 100644 --- a/api/_types/observability._common.d.ts +++ b/api/_types/observability._common.d.ts @@ -15,18 +15,18 @@ */ -export interface ErrorResponse { +export type ErrorResponse = { reason: string; root_cause: RootCause[]; type: string; } -export interface NotFoundResponse { +export type NotFoundResponse = { error: ErrorResponse; status: number; } -export interface ObservabilityObject { +export type ObservabilityObject = { createdTimeMs?: number; lastUpdatedTimeMs?: number; objectId: string; @@ -36,14 +36,14 @@ export interface ObservabilityObject { tenant: string; } -export interface ObservabilityObjectList { +export type ObservabilityObjectList = { observabilityObjectList: ObservabilityObject[]; startIndex: number; totalHitRelation: string; totalHits: number; } -export interface OperationalPanel { +export type OperationalPanel = { applicationId: string; name: string; queryFilter: QueryFilter; @@ -51,17 +51,17 @@ export interface OperationalPanel { visualizations: Visualization[]; } -export interface QueryFilter { +export type QueryFilter = { language: string; query: string; } -export interface RootCause { +export type RootCause = { reason: string; type: string; } -export interface SavedQuery { +export type SavedQuery = { description: string; name: string; query: string; @@ -70,7 +70,7 @@ export interface SavedQuery { selected_timestamp: SelectedTimestamp; } -export interface SavedVisualization { +export type SavedVisualization = { description: string; name: string; query: string; @@ -80,33 +80,33 @@ export interface SavedVisualization { type: string; } -export interface SelectedDateRange { +export type SelectedDateRange = { end: string; start: string; text: string; } -export interface SelectedFields { +export type SelectedFields = { text: string; tokens: Token[]; } -export interface SelectedTimestamp { +export type SelectedTimestamp = { name: string; type: string; } -export interface TimeRange { +export type TimeRange = { from: string; to: string; } -export interface Token { +export type Token = { name: string; type: string; } -export interface Visualization { +export type Visualization = { h: number; id: string; savedVisualizationId: string; diff --git a/api/_types/query._common.d.ts b/api/_types/query._common.d.ts index 35f4ea305..49b0582d9 100644 --- a/api/_types/query._common.d.ts +++ b/api/_types/query._common.d.ts @@ -15,12 +15,12 @@ */ -export interface Credentials { +export type Credentials = { password: string; username: string; } -export interface DataSource { +export type DataSource = { allowedRoles?: string[]; configuration?: DataSourceConfiguration; connector: string; @@ -31,18 +31,18 @@ export interface DataSource { status: string; } -export interface DataSourceConfiguration { +export type DataSourceConfiguration = { credentials: Credentials; endpoint: string; } export type DataSourceList = DataSource[] -export interface DataSourceNotFound { +export type DataSourceNotFound = { error: ErrorResponse; } -export interface DataSourceRetrieve { +export type DataSourceRetrieve = { allowedRoles?: string[]; configuration?: DataSourceConfiguration; connector: string; @@ -53,13 +53,13 @@ export interface DataSourceRetrieve { status: string; } -export interface ErrorResponse { +export type ErrorResponse = { reason: string; root_cause: RootCause[]; type: string; } -export interface RootCause { +export type RootCause = { reason: string; type: string; } diff --git a/api/_types/remote_store._common.d.ts b/api/_types/remote_store._common.d.ts index 41b6c56a7..1aa07a175 100644 --- a/api/_types/remote_store._common.d.ts +++ b/api/_types/remote_store._common.d.ts @@ -15,13 +15,13 @@ */ -export interface RemoteStoreRestoreInfo { +export type RemoteStoreRestoreInfo = { indices?: string[]; shards?: RemoteStoreRestoreShardsInfo; snapshot?: string; } -export interface RemoteStoreRestoreShardsInfo { +export type RemoteStoreRestoreShardsInfo = { failed?: number; successful?: number; total?: number; diff --git a/api/_types/rollups._common.d.ts b/api/_types/rollups._common.d.ts index e9c509dbe..f8321fc23 100644 --- a/api/_types/rollups._common.d.ts +++ b/api/_types/rollups._common.d.ts @@ -15,7 +15,7 @@ */ -export interface Continuous { +export type Continuous = { failure_reason?: string; next_window_end_time?: number; next_window_start_time?: number; @@ -23,12 +23,12 @@ export interface Continuous { status?: string; } -export interface Cron { +export type Cron = { expression?: string; timezone?: string; } -export interface DateHistogramDimension { +export type DateHistogramDimension = { calendar_interval?: string; fixed_interval?: string; source_field?: string; @@ -36,29 +36,29 @@ export interface DateHistogramDimension { timezone?: string; } -export interface DimensionsConfigItem { +export type DimensionsConfigItem = { date_histogram?: DateHistogramDimension; histogram?: HistogramDimension; terms?: TermsDimension; } -export interface Explain { +export type Explain = { continuous?: Continuous; last_updated_time?: number; rollup_id?: string; } -export interface ExplainEntities { +export type ExplainEntities = { item?: Explain; } -export interface HistogramDimension { +export type HistogramDimension = { interval?: string; source_field?: string; target_field?: string; } -export interface Interval { +export type Interval = { cron?: Cron[] | Cron; period?: number; schedule_delay?: number; @@ -66,13 +66,13 @@ export interface Interval { unit?: string; } -export interface MetricsConfigItem { +export type MetricsConfigItem = { metrics?: MetricsConfigMetrics[]; source_field?: string; target_field?: string; } -export interface MetricsConfigMetrics { +export type MetricsConfigMetrics = { avg?: Record; max?: Record; min?: Record; @@ -80,7 +80,7 @@ export interface MetricsConfigMetrics { value_count?: Record; } -export interface Rollup { +export type Rollup = { continuous?: boolean; delay?: number; description?: string; @@ -99,18 +99,18 @@ export interface Rollup { target_index?: string; } -export interface RollupEntity { +export type RollupEntity = { _id?: string; _primaryTerm?: number; _seqNo?: number; rollup?: Rollup; } -export interface Schedule { +export type Schedule = { interval?: Interval; } -export interface Stats { +export type Stats = { documents_processed?: number; index_time_in_ms?: number; pages_processed?: number; @@ -118,7 +118,7 @@ export interface Stats { search_time_in_ms?: number; } -export interface TermsDimension { +export type TermsDimension = { source_field?: string; target_field?: string; } diff --git a/api/_types/search_pipeline._common.d.ts b/api/_types/search_pipeline._common.d.ts index 13e60ac98..9607bd416 100644 --- a/api/_types/search_pipeline._common.d.ts +++ b/api/_types/search_pipeline._common.d.ts @@ -15,7 +15,7 @@ */ -export interface CollapseResponseProcessor { +export type CollapseResponseProcessor = { context_prefix?: string; description?: string; field: string; @@ -23,27 +23,27 @@ export interface CollapseResponseProcessor { tag?: string; } -export interface FilterQueryRequestProcessor { +export type FilterQueryRequestProcessor = { description?: string; ignore_failure?: boolean; query?: UserDefinedObjectStructure; tag?: string; } -export interface MLOpenSearchReranker { +export type MLOpenSearchReranker = { model_id: string; } export type NeuralFieldMap = Record -export interface NeuralQueryEnricherRequestProcessor { +export type NeuralQueryEnricherRequestProcessor = { default_model_id?: string; description?: string; neural_field_default_id?: NeuralFieldMap; tag?: string; } -export interface NormalizationPhaseResultsProcessor { +export type NormalizationPhaseResultsProcessor = { combination?: ScoreCombination; description?: string; ignore_failure?: boolean; @@ -51,7 +51,7 @@ export interface NormalizationPhaseResultsProcessor { tag?: string; } -export interface OversampleRequestProcessor { +export type OversampleRequestProcessor = { content_prefix?: string; description?: string; ignore_failure?: boolean; @@ -59,7 +59,7 @@ export interface OversampleRequestProcessor { tag?: string; } -export interface PersonalizeSearchRankingResponseProcessor { +export type PersonalizeSearchRankingResponseProcessor = { campaign_arn: string; description?: string; iam_role_arn?: string; @@ -70,11 +70,11 @@ export interface PersonalizeSearchRankingResponseProcessor { weight: number; } -export interface PhaseResultsProcessor { +export type PhaseResultsProcessor = { 'normalization-processor': NormalizationPhaseResultsProcessor; } -export interface RenameFieldResponseProcessor { +export type RenameFieldResponseProcessor = { description?: string; field: string; ignore_failure?: boolean; @@ -92,11 +92,11 @@ export type RequestProcessor = { oversample: OversampleRequestProcessor; } -export interface RerankContext { +export type RerankContext = { document_fields: string[]; } -export interface RerankResponseProcessor { +export type RerankResponseProcessor = { context?: RerankContext; description?: string; ignore_failure?: boolean; @@ -122,7 +122,7 @@ export type ResponseProcessor = { split: SplitResponseProcessor; } -export interface RetrievalAugmentedGenerationResponseProcessor { +export type RetrievalAugmentedGenerationResponseProcessor = { context_field_list: string[]; description?: string; model_id: string; @@ -131,14 +131,14 @@ export interface RetrievalAugmentedGenerationResponseProcessor { user_instructions?: string; } -export interface ScoreCombination { +export type ScoreCombination = { parameters?: number[]; technique?: ScoreCombinationTechnique; } export type ScoreCombinationTechnique = 'arithmetic_mean' | 'geometric_mean' | 'harmonic_mean' -export interface ScoreNormalization { +export type ScoreNormalization = { technique?: ScoreNormalizationTechnique; } @@ -146,14 +146,14 @@ export type ScoreNormalizationTechnique = 'l2' | 'min_max' export type SearchPipelineMap = Record -export interface SearchPipelineStructure { +export type SearchPipelineStructure = { phase_results_processors?: PhaseResultsProcessor[]; request_processors?: RequestProcessor[]; response_processors?: ResponseProcessor[]; version?: number; } -export interface SearchScriptRequestProcessor { +export type SearchScriptRequestProcessor = { description?: string; ignore_failure?: boolean; lang?: string; @@ -161,7 +161,7 @@ export interface SearchScriptRequestProcessor { tag?: string; } -export interface SortResponseProcessor { +export type SortResponseProcessor = { description?: string; field: string; ignore_failure?: boolean; @@ -170,7 +170,7 @@ export interface SortResponseProcessor { target_field?: string; } -export interface SplitResponseProcessor { +export type SplitResponseProcessor = { description?: string; field: string; ignore_failure?: boolean; @@ -180,7 +180,7 @@ export interface SplitResponseProcessor { target_field?: string; } -export interface TruncateHitsResponseProcessor { +export type TruncateHitsResponseProcessor = { context_prefix?: string; description?: string; ignore_failure?: boolean; @@ -188,7 +188,7 @@ export interface TruncateHitsResponseProcessor { target_size?: number; } -export interface UserDefinedObjectStructure { +export type UserDefinedObjectStructure = { bool?: any; boosting?: any; combined_fields?: any; @@ -244,6 +244,6 @@ export interface UserDefinedObjectStructure { wrapper?: any; } -export interface UserDefinedValueMap { +export type UserDefinedValueMap = { } diff --git a/api/_types/security._common.d.ts b/api/_types/security._common.d.ts index 754431369..de48173c1 100644 --- a/api/_types/security._common.d.ts +++ b/api/_types/security._common.d.ts @@ -15,7 +15,7 @@ */ -export interface AccountDetails { +export type AccountDetails = { backend_roles?: string[]; custom_attribute_names?: string[]; is_hidden?: boolean; @@ -27,7 +27,7 @@ export interface AccountDetails { user_requested_tenant?: undefined | string; } -export interface ActionGroup { +export type ActionGroup = { allowed_actions?: string[]; description?: string; hidden?: boolean; @@ -38,23 +38,23 @@ export interface ActionGroup { export type ActionGroupsMap = Record -export interface AllowListConfig { +export type AllowListConfig = { enabled?: boolean; requests?: Record; } -export interface AuditConfig { +export type AuditConfig = { audit?: AuditLogsConfig; compliance?: ComplianceConfig; enabled?: boolean; } -export interface AuditConfigWithReadOnly { +export type AuditConfigWithReadOnly = { _readonly?: string[]; config?: AuditConfig; } -export interface AuditLogsConfig { +export type AuditLogsConfig = { disabled_rest_categories?: string[]; disabled_transport_categories?: string[]; enable_rest?: boolean; @@ -69,7 +69,7 @@ export interface AuditLogsConfig { resolve_indices?: boolean; } -export interface AuthInfo { +export type AuthInfo = { backend_roles?: string[]; custom_attribute_names?: string[]; peer_certificates?: number | string; @@ -86,13 +86,13 @@ export interface AuthInfo { user_requested_tenant?: undefined | string; } -export interface CertificateCountPerNode { +export type CertificateCountPerNode = { failed?: number; successful?: number; total?: number; } -export interface CertificatesDetail { +export type CertificatesDetail = { issuer_dn?: string; not_after?: string; not_before?: string; @@ -100,22 +100,22 @@ export interface CertificatesDetail { subject_dn?: string; } -export interface CertificatesPerNode { +export type CertificatesPerNode = { certificates?: Record; name?: string; } -export interface CertificateTypes { +export type CertificateTypes = { http?: Record[]; transport?: Record[]; } -export interface ChangePasswordRequestContent { +export type ChangePasswordRequestContent = { current_password: string; password: string; } -export interface ComplianceConfig { +export type ComplianceConfig = { enabled?: boolean; external_config?: boolean; internal_config?: boolean; @@ -128,20 +128,20 @@ export interface ComplianceConfig { write_watched_indices?: string[]; } -export interface ConfigUpgradePayload { +export type ConfigUpgradePayload = { config?: string[]; } -export interface Created { +export type Created = { message?: string; status?: number | string; } -export interface CreateTenantParams { +export type CreateTenantParams = { description?: string; } -export interface DashboardsInfo { +export type DashboardsInfo = { default_tenant?: string; multitenancy_enabled?: boolean; not_fail_on_forbidden_enabled?: boolean; @@ -155,17 +155,17 @@ export interface DashboardsInfo { user_name?: string; } -export interface DistinguishedNames { +export type DistinguishedNames = { nodes_dn?: string[]; } export type DistinguishedNamesMap = Record -export interface DynamicConfig { +export type DynamicConfig = { dynamic?: DynamicOptions; } -export interface DynamicOptions { +export type DynamicOptions = { auth_failure_listeners?: Record; authc?: Record; authz?: Record; @@ -183,30 +183,30 @@ export interface DynamicOptions { respect_request_indices_options?: boolean; } -export interface GenerateOBOToken { +export type GenerateOBOToken = { authenticationToken?: string; durationSeconds?: string; user?: string; } -export interface GetCertificates { +export type GetCertificates = { http_certificates_list?: CertificatesDetail[]; transport_certificates_list?: CertificatesDetail[]; } -export interface GetCertificatesNew { +export type GetCertificatesNew = { _nodes?: Record; cluster_name?: string; nodes?: Record; } -export interface HealthInfo { +export type HealthInfo = { message?: undefined | string; mode?: string; status?: string; } -export interface IndexPermission { +export type IndexPermission = { allowed_actions?: string[]; dls?: string; fls?: string[]; @@ -214,42 +214,42 @@ export interface IndexPermission { masked_fields?: string[]; } -export interface InternalServerError { +export type InternalServerError = { error?: string; } -export interface MultiTenancyConfig { +export type MultiTenancyConfig = { default_tenant?: string; multitenancy_enabled?: boolean; private_tenant_enabled?: boolean; sign_in_options?: string[]; } -export interface OBOToken { +export type OBOToken = { description: string; duration?: string; service?: string; } -export interface Ok { +export type Ok = { message?: string; status?: number | string; } -export interface PatchOperation { +export type PatchOperation = { op: string; path: string; value?: Record; } -export interface PermissionsInfo { +export type PermissionsInfo = { disabled_endpoints?: Record; has_api_access?: boolean; user?: string; user_name?: string; } -export interface Role { +export type Role = { cluster_permissions?: string[]; description?: string; hidden?: boolean; @@ -259,7 +259,7 @@ export interface Role { tenant_permissions?: TenantPermission[]; } -export interface RoleMapping { +export type RoleMapping = { and_backend_roles?: string[]; backend_roles?: string[]; description?: string; @@ -273,11 +273,11 @@ export type RoleMappings = Record export type RolesMap = Record -export interface SecurityConfig { +export type SecurityConfig = { config?: DynamicConfig; } -export interface SSLInfo { +export type SSLInfo = { local_certificates_list?: string[]; peer_certificates: number | string; peer_certificates_list?: string[]; @@ -295,7 +295,7 @@ export interface SSLInfo { ssl_provider_transport_server: string; } -export interface Tenant { +export type Tenant = { description?: string; hidden?: boolean; reserved?: boolean; @@ -304,25 +304,25 @@ export interface Tenant { export type TenantInfo = Record -export interface TenantPermission { +export type TenantPermission = { allowed_actions?: string[]; tenant_patterns?: string[]; } export type TenantsMap = Record -export interface UpgradeCheck { +export type UpgradeCheck = { status?: string; upgradeActions?: Record; upgradeAvailable?: boolean; } -export interface UpgradePerform { +export type UpgradePerform = { status?: string; upgrades?: Record; } -export interface User { +export type User = { attributes?: UserAttributes; backend_roles?: string[]; description?: string; @@ -338,13 +338,13 @@ export type UserAttributes = Record export type UsersMap = Record -export interface UserTenants { +export type UserTenants = { admin?: boolean; admin_tenant?: boolean; global_tenant?: boolean; } -export interface WhoAmI { +export type WhoAmI = { dn?: undefined | string; is_admin?: boolean; is_node_certificate_request?: boolean; diff --git a/api/_types/snapshot._common.d.ts b/api/_types/snapshot._common.d.ts index 514d44f06..8b89a33ed 100644 --- a/api/_types/snapshot._common.d.ts +++ b/api/_types/snapshot._common.d.ts @@ -16,30 +16,18 @@ import * as Common from './_common' -export interface FileCountSnapshotStats { +export type FileCountSnapshotStats = { file_count: number; size_in_bytes: Common.ByteCount; } -export interface IndexDetails { - max_segments_per_shard: number; - shard_count: number; - size?: Common.HumanReadableByteCount; - size_in_bytes: Common.ByteCount; -} - -export interface InfoFeatureState { - feature_name: string; - indices: Common.Indices; -} - -export interface Repository { +export type Repository = { settings: RepositorySettings; type: string; uuid?: Common.Uuid; } -export interface RepositorySettings { +export type RepositorySettings = { chunk_size?: string; compress?: string | boolean; concurrent_streams?: string | number; @@ -47,7 +35,7 @@ export interface RepositorySettings { read_only?: string | boolean; } -export interface ShardsStats { +export type ShardsStats = { done: number; failed: number; finalizing: number; @@ -58,7 +46,7 @@ export interface ShardsStats { export type ShardsStatsStage = 'DONE' | 'FAILURE' | 'FINALIZE' | 'INIT' | 'STARTED' -export interface ShardsStatsSummary { +export type ShardsStatsSummary = { incremental: ShardsStatsSummaryItem; start_time_in_millis: Common.EpochTimeUnitMillis; time?: Common.Duration; @@ -66,31 +54,30 @@ export interface ShardsStatsSummary { total: ShardsStatsSummaryItem; } -export interface ShardsStatsSummaryItem { +export type ShardsStatsSummaryItem = { file_count: number; size_in_bytes: Common.ByteCount; } -export interface SnapshotIndexStats { +export type SnapshotIndexStats = { shards: Record; shards_stats: ShardsStats; stats: SnapshotStats; } -export interface SnapshotInfo { +export type SnapshotInfo = { data_streams: string[]; duration?: Common.Duration; duration_in_millis?: Common.DurationValueUnitMillis; end_time?: Common.DateTime; end_time_in_millis?: Common.EpochTimeUnitMillis; failures?: SnapshotShardFailure[]; - feature_states?: InfoFeatureState[]; include_global_state?: boolean; - index_details?: Record; indices?: Common.IndexName[]; metadata?: Common.Metadata; + pinned_timestamp?: Common.EpochTimeUnitMillis; reason?: string; - repository?: Common.Name; + remote_store_index_shallow_copy?: boolean; shards?: Common.ShardStatistics; snapshot: Common.Name; start_time?: Common.DateTime; @@ -101,7 +88,7 @@ export interface SnapshotInfo { version_id?: Common.VersionNumber; } -export interface SnapshotShardFailure { +export type SnapshotShardFailure = { index: Common.IndexName; node_id?: Common.Id; reason: string; @@ -109,12 +96,12 @@ export interface SnapshotShardFailure { status: string; } -export interface SnapshotShardsStatus { +export type SnapshotShardsStatus = { stage: ShardsStatsStage; stats: ShardsStatsSummary; } -export interface SnapshotStats { +export type SnapshotStats = { incremental: FileCountSnapshotStats; start_time_in_millis: Common.EpochTimeUnitMillis; time?: Common.Duration; @@ -122,7 +109,7 @@ export interface SnapshotStats { total: FileCountSnapshotStats; } -export interface Status { +export type Status = { include_global_state: boolean; indices: Record; repository: string; diff --git a/api/_types/snapshot.cleanup_repository.d.ts b/api/_types/snapshot.cleanup_repository.d.ts index 693b809db..d905c67b7 100644 --- a/api/_types/snapshot.cleanup_repository.d.ts +++ b/api/_types/snapshot.cleanup_repository.d.ts @@ -15,7 +15,7 @@ */ -export interface CleanupRepositoryResults { +export type CleanupRepositoryResults = { deleted_blobs: number; deleted_bytes: number; } diff --git a/api/_types/snapshot.restore.d.ts b/api/_types/snapshot.restore.d.ts index a36c3bcdf..c4582a5a1 100644 --- a/api/_types/snapshot.restore.d.ts +++ b/api/_types/snapshot.restore.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface SnapshotRestore { +export type SnapshotRestore = { indices: Common.IndexName[]; shards: Common.ShardStatistics; snapshot: string; diff --git a/api/_types/snapshot.verify_repository.d.ts b/api/_types/snapshot.verify_repository.d.ts index 12de712ba..601037802 100644 --- a/api/_types/snapshot.verify_repository.d.ts +++ b/api/_types/snapshot.verify_repository.d.ts @@ -16,7 +16,7 @@ import * as Common from './_common' -export interface CompactNodeInfo { +export type CompactNodeInfo = { name: Common.Name; } diff --git a/api/_types/sql._common.d.ts b/api/_types/sql._common.d.ts index 96744b8a9..fad096d9b 100644 --- a/api/_types/sql._common.d.ts +++ b/api/_types/sql._common.d.ts @@ -15,48 +15,48 @@ */ -export interface Cursor { +export type Cursor = { keep_alive?: string; } -export interface Explain { +export type Explain = { fetch_size?: number; filter?: Record; query?: string; } -export interface ExplainBody { +export type ExplainBody = { children?: ExplainBody[]; description?: Record; name?: string; } -export interface ExplainResponse { +export type ExplainResponse = { root?: ExplainBody; } -export interface Plugins { +export type Plugins = { ppl?: Ppl; query?: PluginsQuery; sql?: Sql; } -export interface PluginsQuery { +export type PluginsQuery = { memory_limit?: string; size_limit?: string | number; } -export interface Ppl { +export type Ppl = { enabled?: boolean | string; } -export interface Query { +export type Query = { fetch_size?: number; filter?: Record; query?: string; } -export interface QueryResponse { +export type QueryResponse = { cursor?: string; datarows?: any[][]; schema?: Record[]; @@ -65,35 +65,35 @@ export interface QueryResponse { total?: number; } -export interface Sql { +export type Sql = { cursor?: Cursor; enabled?: boolean | string; slowlog?: number | string; } -export interface SqlClose { +export type SqlClose = { cursor?: string; } -export interface SqlCloseResponse { +export type SqlCloseResponse = { succeeded?: boolean; } -export interface SqlSettings { +export type SqlSettings = { transient?: Transient; } -export interface SqlSettingsPlain { +export type SqlSettingsPlain = { transient?: TransientPlain; } -export interface SqlSettingsResponse { +export type SqlSettingsResponse = { acknowledged?: boolean; persistent?: Record; transient?: Transient; } -export interface Stats { +export type Stats = { cluster_name?: Record; end_time?: Record; execution_time?: Record; @@ -103,11 +103,11 @@ export interface Stats { user?: Record; } -export interface Transient { +export type Transient = { plugins?: Plugins; } -export interface TransientPlain { +export type TransientPlain = { 'plugins.ppl.enabled'?: boolean; 'plugins.query.memory_limit'?: string; 'plugins.query.size_limit'?: number; diff --git a/api/_types/tasks._common.d.ts b/api/_types/tasks._common.d.ts index 0e4ca508c..ad23823ce 100644 --- a/api/_types/tasks._common.d.ts +++ b/api/_types/tasks._common.d.ts @@ -18,27 +18,27 @@ import * as Common from './_common' export type GroupBy = 'nodes' | 'none' | 'parents' -export interface PersistentTaskStatus { +export type PersistentTaskStatus = { state: string; } export type RawTaskStatus = Record> -export interface ReplicationTaskStatus { +export type ReplicationTaskStatus = { phase: string; } export type Status = ReplicationTaskStatus | Common.BulkByScrollTaskStatus | PersistentTaskStatus | RawTaskStatus -export interface TaskExecutingNode extends Common.BaseNode { +export type TaskExecutingNode = Common.BaseNode & { tasks: Record; } -export interface TaskGroup extends TaskInfo { +export type TaskGroup = TaskInfo & { children?: TaskGroup[]; } -export interface TaskInfo { +export type TaskInfo = { action: string; cancellable: boolean; cancelled?: boolean; @@ -56,7 +56,7 @@ export interface TaskInfo { export type TaskInfos = TaskInfo[] | Record -export interface TaskListResponseBase { +export type TaskListResponseBase = { node_failures?: Common.ErrorCause[]; nodes?: Record; task_failures?: Common.TaskFailure[]; diff --git a/api/_types/transforms._common.d.ts b/api/_types/transforms._common.d.ts index f4226c745..8d11f01d7 100644 --- a/api/_types/transforms._common.d.ts +++ b/api/_types/transforms._common.d.ts @@ -16,12 +16,12 @@ import * as Common_QueryDsl from './_common.query_dsl' -export interface ContinuousStats { +export type ContinuousStats = { documents_behind?: Record; last_timestamp?: number; } -export interface DateHistogramGroup { +export type DateHistogramGroup = { calendar_interval?: string; fixed_interval?: string; source_field?: string; @@ -29,14 +29,14 @@ export interface DateHistogramGroup { timezone?: string; } -export interface Explain { +export type Explain = { metadata_id?: string; transform_metadata?: TransformMetadata; } export type ExplainResponse = Record -export interface ExplainStats { +export type ExplainStats = { documents_indexed?: number; documents_processed?: number; index_time_in_millis?: number; @@ -44,25 +44,25 @@ export interface ExplainStats { search_time_in_millis?: number; } -export interface GroupsConfigItem { +export type GroupsConfigItem = { date_histogram?: DateHistogramGroup; histogram?: HistogramGroup; terms?: TermsGroup; } -export interface HistogramGroup { +export type HistogramGroup = { interval?: string; source_field?: string; target_field?: string; } -export interface MetricsConfigItem { +export type MetricsConfigItem = { metrics?: MetricsConfigMetrics[]; source_field?: string; target_field?: string; } -export interface MetricsConfigMetrics { +export type MetricsConfigMetrics = { avg?: Record; max?: Record; min?: Record; @@ -70,26 +70,26 @@ export interface MetricsConfigMetrics { value_count?: Record; } -export interface Preview { +export type Preview = { documents?: Record[]; } -export interface Schedule { +export type Schedule = { interval: ScheduleInterval; } -export interface ScheduleInterval { +export type ScheduleInterval = { period?: number; start_time?: number; unit?: string; } -export interface TermsGroup { +export type TermsGroup = { source_field?: string; target_field?: string; } -export interface Transform { +export type Transform = { aggregations?: MetricsConfigItem[]; continuous?: boolean; data_selection_query?: Common_QueryDsl.QueryContainer; @@ -108,14 +108,14 @@ export interface Transform { updated_at?: string; } -export interface TransformEntity { +export type TransformEntity = { _id?: string; _primaryTerm?: number; _seqNo?: number; transform?: Transform; } -export interface TransformMetadata { +export type TransformMetadata = { continuous_stats?: ContinuousStats; failure_reason?: string; last_updated_at?: number; @@ -124,7 +124,7 @@ export interface TransformMetadata { transform_id?: string; } -export interface TransformsResponse { +export type TransformsResponse = { total_transforms?: number; transforms?: TransformEntity[]; } diff --git a/api/_types/wlm._common.d.ts b/api/_types/wlm._common.d.ts new file mode 100644 index 000000000..c1db44570 --- /dev/null +++ b/api/_types/wlm._common.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type QueryGroupCreate = { + name: string; + resiliency_mode: 'enforced' | 'monitor' | 'soft'; + resource_limits: { + cpu?: number; + memory: number; +} | { + cpu: number; + memory?: number; +}; +} + +export type QueryGroupResponse = { + _id: string; + name: string; + resiliency_mode: 'enforced' | 'monitor' | 'soft'; + resource_limits: { + cpu?: number; + memory: number; +} | { + cpu: number; + memory?: number; +}; + updated_at: number; +} + +export type QueryGroupUpdate = { + resiliency_mode?: 'enforced' | 'monitor' | 'soft'; + resource_limits?: ResourceLimitsSchema; +} + +export type ResourceLimitsSchema = { + cpu?: number; + memory?: number; +} + diff --git a/api/asynchronousSearch/delete.d.ts b/api/asynchronousSearch/delete.d.ts index e87afd556..0d491e1e4 100644 --- a/api/asynchronousSearch/delete.d.ts +++ b/api/asynchronousSearch/delete.d.ts @@ -17,15 +17,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface AsynchronousSearch_Delete_Request extends Global.Params { +export type AsynchronousSearch_Delete_Request = Global.Params & { id: string; } -export interface AsynchronousSearch_Delete_Response extends ApiResponse { +export type AsynchronousSearch_Delete_Response = ApiResponse & { body: AsynchronousSearch_Delete_ResponseBody; } -export interface AsynchronousSearch_Delete_ResponseBody { +export type AsynchronousSearch_Delete_ResponseBody = { acknowledged?: boolean; } diff --git a/api/asynchronousSearch/get.d.ts b/api/asynchronousSearch/get.d.ts index 4c57a9804..480072d13 100644 --- a/api/asynchronousSearch/get.d.ts +++ b/api/asynchronousSearch/get.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as AsynchronousSearch_Common from '../_types/asynchronous_search._common' import * as Global from '../_types/_global' -export interface AsynchronousSearch_Get_Request extends Global.Params { +export type AsynchronousSearch_Get_Request = Global.Params & { id: string; } -export interface AsynchronousSearch_Get_Response extends ApiResponse { +export type AsynchronousSearch_Get_Response = ApiResponse & { body: AsynchronousSearch_Get_ResponseBody; } diff --git a/api/asynchronousSearch/search.d.ts b/api/asynchronousSearch/search.d.ts index f8ed81a1d..335b7b36b 100644 --- a/api/asynchronousSearch/search.d.ts +++ b/api/asynchronousSearch/search.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as AsynchronousSearch_Common from '../_types/asynchronous_search._common' import * as Global from '../_types/_global' -export interface AsynchronousSearch_Search_Request extends Global.Params { +export type AsynchronousSearch_Search_Request = Global.Params & { body?: AsynchronousSearch_Common.Search; index?: string; keep_alive?: string; @@ -26,7 +26,7 @@ export interface AsynchronousSearch_Search_Request extends Global.Params { wait_for_completion_timeout?: string; } -export interface AsynchronousSearch_Search_Response extends ApiResponse { +export type AsynchronousSearch_Search_Response = ApiResponse & { body: AsynchronousSearch_Search_ResponseBody; } diff --git a/api/asynchronousSearch/stats.d.ts b/api/asynchronousSearch/stats.d.ts index cb9b49164..82d5b228c 100644 --- a/api/asynchronousSearch/stats.d.ts +++ b/api/asynchronousSearch/stats.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' export type AsynchronousSearch_Stats_Request = Global.Params & Record -export interface AsynchronousSearch_Stats_Response extends ApiResponse { +export type AsynchronousSearch_Stats_Response = ApiResponse & { body: AsynchronousSearch_Stats_ResponseBody; } diff --git a/api/cat/aliases.d.ts b/api/cat/aliases.d.ts index 81afc022f..c87d16bf0 100644 --- a/api/cat/aliases.d.ts +++ b/api/cat/aliases.d.ts @@ -19,7 +19,7 @@ import * as Cat_Aliases from '../_types/cat.aliases' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Aliases_Request extends Global.Params { +export type Cat_Aliases_Request = Global.Params & { expand_wildcards?: Common.ExpandWildcards; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_Aliases_Request extends Global.Params { v?: boolean; } -export interface Cat_Aliases_Response extends ApiResponse { +export type Cat_Aliases_Response = ApiResponse & { body: Cat_Aliases_ResponseBody; } diff --git a/api/cat/allPitSegments.d.ts b/api/cat/allPitSegments.d.ts index 17443b772..7b25627b6 100644 --- a/api/cat/allPitSegments.d.ts +++ b/api/cat/allPitSegments.d.ts @@ -19,7 +19,7 @@ import * as Cat_Common from '../_types/cat._common' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_AllPitSegments_Request extends Global.Params { +export type Cat_AllPitSegments_Request = Global.Params & { bytes?: Common.ByteUnit; format?: string; h?: string[]; @@ -28,7 +28,7 @@ export interface Cat_AllPitSegments_Request extends Global.Params { v?: boolean; } -export interface Cat_AllPitSegments_Response extends ApiResponse { +export type Cat_AllPitSegments_Response = ApiResponse & { body: Cat_AllPitSegments_ResponseBody; } diff --git a/api/cat/allocation.d.ts b/api/cat/allocation.d.ts index 432089c62..6ddd86c8c 100644 --- a/api/cat/allocation.d.ts +++ b/api/cat/allocation.d.ts @@ -19,7 +19,7 @@ import * as Cat_Allocation from '../_types/cat.allocation' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Allocation_Request extends Global.Params { +export type Cat_Allocation_Request = Global.Params & { bytes?: Common.ByteUnit; cluster_manager_timeout?: Common.Duration; format?: string; @@ -32,7 +32,7 @@ export interface Cat_Allocation_Request extends Global.Params { v?: boolean; } -export interface Cat_Allocation_Response extends ApiResponse { +export type Cat_Allocation_Response = ApiResponse & { body: Cat_Allocation_ResponseBody; } diff --git a/api/cat/clusterManager.d.ts b/api/cat/clusterManager.d.ts index 06e5482ab..9d428dff0 100644 --- a/api/cat/clusterManager.d.ts +++ b/api/cat/clusterManager.d.ts @@ -19,7 +19,7 @@ import * as Cat_ClusterManager from '../_types/cat.cluster_manager' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_ClusterManager_Request extends Global.Params { +export type Cat_ClusterManager_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_ClusterManager_Request extends Global.Params { v?: boolean; } -export interface Cat_ClusterManager_Response extends ApiResponse { +export type Cat_ClusterManager_Response = ApiResponse & { body: Cat_ClusterManager_ResponseBody; } diff --git a/api/cat/count.d.ts b/api/cat/count.d.ts index 15e9964d2..66f289164 100644 --- a/api/cat/count.d.ts +++ b/api/cat/count.d.ts @@ -19,7 +19,7 @@ import * as Cat_Count from '../_types/cat.count' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Count_Request extends Global.Params { +export type Cat_Count_Request = Global.Params & { format?: string; h?: string[]; help?: boolean; @@ -28,7 +28,7 @@ export interface Cat_Count_Request extends Global.Params { v?: boolean; } -export interface Cat_Count_Response extends ApiResponse { +export type Cat_Count_Response = ApiResponse & { body: Cat_Count_ResponseBody; } diff --git a/api/cat/fielddata.d.ts b/api/cat/fielddata.d.ts index 29b757181..cd51575bd 100644 --- a/api/cat/fielddata.d.ts +++ b/api/cat/fielddata.d.ts @@ -19,7 +19,7 @@ import * as Cat_Fielddata from '../_types/cat.fielddata' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Fielddata_Request extends Global.Params { +export type Cat_Fielddata_Request = Global.Params & { bytes?: Common.ByteUnit; fields?: Common.Fields; format?: string; @@ -29,7 +29,7 @@ export interface Cat_Fielddata_Request extends Global.Params { v?: boolean; } -export interface Cat_Fielddata_Response extends ApiResponse { +export type Cat_Fielddata_Response = ApiResponse & { body: Cat_Fielddata_ResponseBody; } diff --git a/api/cat/health.d.ts b/api/cat/health.d.ts index 7afcfe188..4a6e681d6 100644 --- a/api/cat/health.d.ts +++ b/api/cat/health.d.ts @@ -19,7 +19,7 @@ import * as Cat_Health from '../_types/cat.health' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Health_Request extends Global.Params { +export type Cat_Health_Request = Global.Params & { format?: string; h?: string[]; help?: boolean; @@ -29,7 +29,7 @@ export interface Cat_Health_Request extends Global.Params { v?: boolean; } -export interface Cat_Health_Response extends ApiResponse { +export type Cat_Health_Response = ApiResponse & { body: Cat_Health_ResponseBody; } diff --git a/api/cat/help.d.ts b/api/cat/help.d.ts index 9c98ea885..0adadb212 100644 --- a/api/cat/help.d.ts +++ b/api/cat/help.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' export type Cat_Help_Request = Global.Params & Record -export interface Cat_Help_Response extends ApiResponse { +export type Cat_Help_Response = ApiResponse & { body: Cat_Help_ResponseBody; } diff --git a/api/cat/indices.d.ts b/api/cat/indices.d.ts index 9ac85a6bf..1e1e167a3 100644 --- a/api/cat/indices.d.ts +++ b/api/cat/indices.d.ts @@ -19,7 +19,7 @@ import * as Cat_Indices from '../_types/cat.indices' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Indices_Request extends Global.Params { +export type Cat_Indices_Request = Global.Params & { bytes?: Common.ByteUnit; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -37,7 +37,7 @@ export interface Cat_Indices_Request extends Global.Params { v?: boolean; } -export interface Cat_Indices_Response extends ApiResponse { +export type Cat_Indices_Response = ApiResponse & { body: Cat_Indices_ResponseBody; } diff --git a/api/cat/master.d.ts b/api/cat/master.d.ts index f7bb1bfbd..cb144232d 100644 --- a/api/cat/master.d.ts +++ b/api/cat/master.d.ts @@ -19,7 +19,7 @@ import * as Cat_Master from '../_types/cat.master' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Master_Request extends Global.Params { +export type Cat_Master_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_Master_Request extends Global.Params { v?: boolean; } -export interface Cat_Master_Response extends ApiResponse { +export type Cat_Master_Response = ApiResponse & { body: Cat_Master_ResponseBody; } diff --git a/api/cat/nodeattrs.d.ts b/api/cat/nodeattrs.d.ts index bcea05f77..56e3c4f5b 100644 --- a/api/cat/nodeattrs.d.ts +++ b/api/cat/nodeattrs.d.ts @@ -19,7 +19,7 @@ import * as Cat_Nodeattrs from '../_types/cat.nodeattrs' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Nodeattrs_Request extends Global.Params { +export type Cat_Nodeattrs_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_Nodeattrs_Request extends Global.Params { v?: boolean; } -export interface Cat_Nodeattrs_Response extends ApiResponse { +export type Cat_Nodeattrs_Response = ApiResponse & { body: Cat_Nodeattrs_ResponseBody; } diff --git a/api/cat/nodes.d.ts b/api/cat/nodes.d.ts index 426ebdd38..014d41883 100644 --- a/api/cat/nodes.d.ts +++ b/api/cat/nodes.d.ts @@ -19,7 +19,7 @@ import * as Cat_Nodes from '../_types/cat.nodes' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Nodes_Request extends Global.Params { +export type Cat_Nodes_Request = Global.Params & { bytes?: Common.ByteUnit; cluster_manager_timeout?: Common.Duration; format?: string; @@ -33,7 +33,7 @@ export interface Cat_Nodes_Request extends Global.Params { v?: boolean; } -export interface Cat_Nodes_Response extends ApiResponse { +export type Cat_Nodes_Response = ApiResponse & { body: Cat_Nodes_ResponseBody; } diff --git a/api/cat/pendingTasks.d.ts b/api/cat/pendingTasks.d.ts index 0fa7d6530..bd7f7931c 100644 --- a/api/cat/pendingTasks.d.ts +++ b/api/cat/pendingTasks.d.ts @@ -19,7 +19,7 @@ import * as Cat_PendingTasks from '../_types/cat.pending_tasks' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_PendingTasks_Request extends Global.Params { +export type Cat_PendingTasks_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -31,7 +31,7 @@ export interface Cat_PendingTasks_Request extends Global.Params { v?: boolean; } -export interface Cat_PendingTasks_Response extends ApiResponse { +export type Cat_PendingTasks_Response = ApiResponse & { body: Cat_PendingTasks_ResponseBody; } diff --git a/api/cat/pitSegments.d.ts b/api/cat/pitSegments.d.ts index ff684c00a..617af7ec2 100644 --- a/api/cat/pitSegments.d.ts +++ b/api/cat/pitSegments.d.ts @@ -19,7 +19,7 @@ import * as Cat_Common from '../_types/cat._common' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_PitSegments_Request extends Global.Params { +export type Cat_PitSegments_Request = Global.Params & { body?: Cat_PitSegments_RequestBody; bytes?: Common.ByteUnit; format?: string; @@ -29,11 +29,11 @@ export interface Cat_PitSegments_Request extends Global.Params { v?: boolean; } -export interface Cat_PitSegments_RequestBody { +export type Cat_PitSegments_RequestBody = { pit_id: string[]; } -export interface Cat_PitSegments_Response extends ApiResponse { +export type Cat_PitSegments_Response = ApiResponse & { body: Cat_PitSegments_ResponseBody; } diff --git a/api/cat/plugins.d.ts b/api/cat/plugins.d.ts index f32c9d368..14f36b404 100644 --- a/api/cat/plugins.d.ts +++ b/api/cat/plugins.d.ts @@ -19,7 +19,7 @@ import * as Cat_Plugins from '../_types/cat.plugins' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Plugins_Request extends Global.Params { +export type Cat_Plugins_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_Plugins_Request extends Global.Params { v?: boolean; } -export interface Cat_Plugins_Response extends ApiResponse { +export type Cat_Plugins_Response = ApiResponse & { body: Cat_Plugins_ResponseBody; } diff --git a/api/cat/recovery.d.ts b/api/cat/recovery.d.ts index 3a307ac7a..f4a7d13e7 100644 --- a/api/cat/recovery.d.ts +++ b/api/cat/recovery.d.ts @@ -19,7 +19,7 @@ import * as Cat_Recovery from '../_types/cat.recovery' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Recovery_Request extends Global.Params { +export type Cat_Recovery_Request = Global.Params & { active_only?: boolean; bytes?: Common.ByteUnit; detailed?: boolean; @@ -32,7 +32,7 @@ export interface Cat_Recovery_Request extends Global.Params { v?: boolean; } -export interface Cat_Recovery_Response extends ApiResponse { +export type Cat_Recovery_Response = ApiResponse & { body: Cat_Recovery_ResponseBody; } diff --git a/api/cat/repositories.d.ts b/api/cat/repositories.d.ts index 939670b66..fb68ecde8 100644 --- a/api/cat/repositories.d.ts +++ b/api/cat/repositories.d.ts @@ -19,7 +19,7 @@ import * as Cat_Repositories from '../_types/cat.repositories' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Repositories_Request extends Global.Params { +export type Cat_Repositories_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -30,7 +30,7 @@ export interface Cat_Repositories_Request extends Global.Params { v?: boolean; } -export interface Cat_Repositories_Response extends ApiResponse { +export type Cat_Repositories_Response = ApiResponse & { body: Cat_Repositories_ResponseBody; } diff --git a/api/cat/segmentReplication.d.ts b/api/cat/segmentReplication.d.ts index 742da1a21..72b71e833 100644 --- a/api/cat/segmentReplication.d.ts +++ b/api/cat/segmentReplication.d.ts @@ -19,7 +19,7 @@ import * as Cat_Common from '../_types/cat._common' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_SegmentReplication_Request extends Global.Params { +export type Cat_SegmentReplication_Request = Global.Params & { active_only?: boolean; allow_no_indices?: boolean; bytes?: Common.ByteUnit; @@ -39,7 +39,7 @@ export interface Cat_SegmentReplication_Request extends Global.Params { v?: boolean; } -export interface Cat_SegmentReplication_Response extends ApiResponse { +export type Cat_SegmentReplication_Response = ApiResponse & { body: Cat_SegmentReplication_ResponseBody; } diff --git a/api/cat/segments.d.ts b/api/cat/segments.d.ts index 41c3dc48d..dd936edc3 100644 --- a/api/cat/segments.d.ts +++ b/api/cat/segments.d.ts @@ -19,7 +19,7 @@ import * as Cat_Segments from '../_types/cat.segments' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Segments_Request extends Global.Params { +export type Cat_Segments_Request = Global.Params & { bytes?: Common.ByteUnit; cluster_manager_timeout?: Common.Duration; format?: string; @@ -31,7 +31,7 @@ export interface Cat_Segments_Request extends Global.Params { v?: boolean; } -export interface Cat_Segments_Response extends ApiResponse { +export type Cat_Segments_Response = ApiResponse & { body: Cat_Segments_ResponseBody; } diff --git a/api/cat/shards.d.ts b/api/cat/shards.d.ts index 9be7ca924..846d2f733 100644 --- a/api/cat/shards.d.ts +++ b/api/cat/shards.d.ts @@ -19,7 +19,7 @@ import * as Cat_Shards from '../_types/cat.shards' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Shards_Request extends Global.Params { +export type Cat_Shards_Request = Global.Params & { bytes?: Common.ByteUnit; cluster_manager_timeout?: Common.Duration; format?: string; @@ -33,7 +33,7 @@ export interface Cat_Shards_Request extends Global.Params { v?: boolean; } -export interface Cat_Shards_Response extends ApiResponse { +export type Cat_Shards_Response = ApiResponse & { body: Cat_Shards_ResponseBody; } diff --git a/api/cat/snapshots.d.ts b/api/cat/snapshots.d.ts index f560b1645..7adfa34e7 100644 --- a/api/cat/snapshots.d.ts +++ b/api/cat/snapshots.d.ts @@ -19,7 +19,7 @@ import * as Cat_Snapshots from '../_types/cat.snapshots' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Snapshots_Request extends Global.Params { +export type Cat_Snapshots_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -32,7 +32,7 @@ export interface Cat_Snapshots_Request extends Global.Params { v?: boolean; } -export interface Cat_Snapshots_Response extends ApiResponse { +export type Cat_Snapshots_Response = ApiResponse & { body: Cat_Snapshots_ResponseBody; } diff --git a/api/cat/tasks.d.ts b/api/cat/tasks.d.ts index f0dcc16c6..0a4fe80ab 100644 --- a/api/cat/tasks.d.ts +++ b/api/cat/tasks.d.ts @@ -19,7 +19,7 @@ import * as Cat_Tasks from '../_types/cat.tasks' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Tasks_Request extends Global.Params { +export type Cat_Tasks_Request = Global.Params & { actions?: string[]; detailed?: boolean; format?: string; @@ -32,7 +32,7 @@ export interface Cat_Tasks_Request extends Global.Params { v?: boolean; } -export interface Cat_Tasks_Response extends ApiResponse { +export type Cat_Tasks_Response = ApiResponse & { body: Cat_Tasks_ResponseBody; } diff --git a/api/cat/templates.d.ts b/api/cat/templates.d.ts index 5bcbea6c6..58666e067 100644 --- a/api/cat/templates.d.ts +++ b/api/cat/templates.d.ts @@ -19,7 +19,7 @@ import * as Cat_Templates from '../_types/cat.templates' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_Templates_Request extends Global.Params { +export type Cat_Templates_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -31,7 +31,7 @@ export interface Cat_Templates_Request extends Global.Params { v?: boolean; } -export interface Cat_Templates_Response extends ApiResponse { +export type Cat_Templates_Response = ApiResponse & { body: Cat_Templates_ResponseBody; } diff --git a/api/cat/threadPool.d.ts b/api/cat/threadPool.d.ts index 410090207..fd8b4a68e 100644 --- a/api/cat/threadPool.d.ts +++ b/api/cat/threadPool.d.ts @@ -19,7 +19,7 @@ import * as Cat_ThreadPool from '../_types/cat.thread_pool' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cat_ThreadPool_Request extends Global.Params { +export type Cat_ThreadPool_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; format?: string; h?: string[]; @@ -32,7 +32,7 @@ export interface Cat_ThreadPool_Request extends Global.Params { v?: boolean; } -export interface Cat_ThreadPool_Response extends ApiResponse { +export type Cat_ThreadPool_Response = ApiResponse & { body: Cat_ThreadPool_ResponseBody; } diff --git a/api/cluster/allocationExplain.d.ts b/api/cluster/allocationExplain.d.ts index d12fc8837..e7df6065e 100644 --- a/api/cluster/allocationExplain.d.ts +++ b/api/cluster/allocationExplain.d.ts @@ -19,24 +19,24 @@ import * as Cluster_AllocationExplain from '../_types/cluster.allocation_explain import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_AllocationExplain_Request extends Global.Params { +export type Cluster_AllocationExplain_Request = Global.Params & { body?: Cluster_AllocationExplain_RequestBody; include_disk_info?: boolean; include_yes_decisions?: boolean; } -export interface Cluster_AllocationExplain_RequestBody { +export type Cluster_AllocationExplain_RequestBody = { current_node?: string; index?: Common.IndexName; primary?: boolean; shard?: number; } -export interface Cluster_AllocationExplain_Response extends ApiResponse { +export type Cluster_AllocationExplain_Response = ApiResponse & { body: Cluster_AllocationExplain_ResponseBody; } -export interface Cluster_AllocationExplain_ResponseBody { +export type Cluster_AllocationExplain_ResponseBody = { allocate_explanation?: string; allocation_delay?: Common.Duration; allocation_delay_in_millis?: Common.DurationValueUnitMillis; diff --git a/api/cluster/deleteComponentTemplate.d.ts b/api/cluster/deleteComponentTemplate.d.ts index ebb184123..62450a209 100644 --- a/api/cluster/deleteComponentTemplate.d.ts +++ b/api/cluster/deleteComponentTemplate.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_DeleteComponentTemplate_Request extends Global.Params { +export type Cluster_DeleteComponentTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; name: Common.Name; timeout?: Common.Duration; } -export interface Cluster_DeleteComponentTemplate_Response extends ApiResponse { +export type Cluster_DeleteComponentTemplate_Response = ApiResponse & { body: Cluster_DeleteComponentTemplate_ResponseBody; } diff --git a/api/cluster/deleteDecommissionAwareness.d.ts b/api/cluster/deleteDecommissionAwareness.d.ts index 5b6da4846..6ae0f6e89 100644 --- a/api/cluster/deleteDecommissionAwareness.d.ts +++ b/api/cluster/deleteDecommissionAwareness.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' export type Cluster_DeleteDecommissionAwareness_Request = Global.Params & Record -export interface Cluster_DeleteDecommissionAwareness_Response extends ApiResponse { +export type Cluster_DeleteDecommissionAwareness_Response = ApiResponse & { body: Cluster_DeleteDecommissionAwareness_ResponseBody; } diff --git a/api/cluster/deleteVotingConfigExclusions.d.ts b/api/cluster/deleteVotingConfigExclusions.d.ts index b44af7a25..7d80bd7d1 100644 --- a/api/cluster/deleteVotingConfigExclusions.d.ts +++ b/api/cluster/deleteVotingConfigExclusions.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Cluster_DeleteVotingConfigExclusions_Request extends Global.Params { +export type Cluster_DeleteVotingConfigExclusions_Request = Global.Params & { wait_for_removal?: boolean; } -export interface Cluster_DeleteVotingConfigExclusions_Response extends ApiResponse { +export type Cluster_DeleteVotingConfigExclusions_Response = ApiResponse & { body: Cluster_DeleteVotingConfigExclusions_ResponseBody; } diff --git a/api/cluster/deleteWeightedRouting.d.ts b/api/cluster/deleteWeightedRouting.d.ts index f31f138e9..025ec8654 100644 --- a/api/cluster/deleteWeightedRouting.d.ts +++ b/api/cluster/deleteWeightedRouting.d.ts @@ -19,11 +19,11 @@ import * as Cluster_WeightedRouting from '../_types/cluster.weighted_routing' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_DeleteWeightedRouting_Request extends Global.Params { +export type Cluster_DeleteWeightedRouting_Request = Global.Params & { body?: Cluster_WeightedRouting.WeightsBase; } -export interface Cluster_DeleteWeightedRouting_Response extends ApiResponse { +export type Cluster_DeleteWeightedRouting_Response = ApiResponse & { body: Cluster_DeleteWeightedRouting_ResponseBody; } diff --git a/api/cluster/existsComponentTemplate.d.ts b/api/cluster/existsComponentTemplate.d.ts index 0041d63be..fb4e0cb06 100644 --- a/api/cluster/existsComponentTemplate.d.ts +++ b/api/cluster/existsComponentTemplate.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_ExistsComponentTemplate_Request extends Global.Params { +export type Cluster_ExistsComponentTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; local?: boolean; master_timeout?: Common.Duration; name: Common.Name; } -export interface Cluster_ExistsComponentTemplate_Response extends ApiResponse { +export type Cluster_ExistsComponentTemplate_Response = ApiResponse & { body: Cluster_ExistsComponentTemplate_ResponseBody; } diff --git a/api/cluster/getComponentTemplate.d.ts b/api/cluster/getComponentTemplate.d.ts index f5e1a3187..a345d28bd 100644 --- a/api/cluster/getComponentTemplate.d.ts +++ b/api/cluster/getComponentTemplate.d.ts @@ -19,18 +19,18 @@ import * as Cluster_Common from '../_types/cluster._common' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_GetComponentTemplate_Request extends Global.Params { +export type Cluster_GetComponentTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; local?: boolean; master_timeout?: Common.Duration; name?: Common.Name; } -export interface Cluster_GetComponentTemplate_Response extends ApiResponse { +export type Cluster_GetComponentTemplate_Response = ApiResponse & { body: Cluster_GetComponentTemplate_ResponseBody; } -export interface Cluster_GetComponentTemplate_ResponseBody { +export type Cluster_GetComponentTemplate_ResponseBody = { component_templates: Cluster_Common.ComponentTemplate[]; } diff --git a/api/cluster/getDecommissionAwareness.d.ts b/api/cluster/getDecommissionAwareness.d.ts index 6dd808aaf..c26a87c07 100644 --- a/api/cluster/getDecommissionAwareness.d.ts +++ b/api/cluster/getDecommissionAwareness.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Cluster_DecommissionAwareness from '../_types/cluster.decommission_awareness' import * as Global from '../_types/_global' -export interface Cluster_GetDecommissionAwareness_Request extends Global.Params { +export type Cluster_GetDecommissionAwareness_Request = Global.Params & { awareness_attribute_name: string; } -export interface Cluster_GetDecommissionAwareness_Response extends ApiResponse { +export type Cluster_GetDecommissionAwareness_Response = ApiResponse & { body: Cluster_GetDecommissionAwareness_ResponseBody; } diff --git a/api/cluster/getSettings.d.ts b/api/cluster/getSettings.d.ts index f7052742b..d2ae794cb 100644 --- a/api/cluster/getSettings.d.ts +++ b/api/cluster/getSettings.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_GetSettings_Request extends Global.Params { +export type Cluster_GetSettings_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; include_defaults?: boolean; @@ -26,11 +26,11 @@ export interface Cluster_GetSettings_Request extends Global.Params { timeout?: Common.Duration; } -export interface Cluster_GetSettings_Response extends ApiResponse { +export type Cluster_GetSettings_Response = ApiResponse & { body: Cluster_GetSettings_ResponseBody; } -export interface Cluster_GetSettings_ResponseBody { +export type Cluster_GetSettings_ResponseBody = { defaults?: Record; persistent: Record; transient: Record; diff --git a/api/cluster/getWeightedRouting.d.ts b/api/cluster/getWeightedRouting.d.ts index 5b3f64668..b2ad3a50a 100644 --- a/api/cluster/getWeightedRouting.d.ts +++ b/api/cluster/getWeightedRouting.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Cluster_WeightedRouting from '../_types/cluster.weighted_routing' import * as Global from '../_types/_global' -export interface Cluster_GetWeightedRouting_Request extends Global.Params { +export type Cluster_GetWeightedRouting_Request = Global.Params & { attribute: string; } -export interface Cluster_GetWeightedRouting_Response extends ApiResponse { +export type Cluster_GetWeightedRouting_Response = ApiResponse & { body: Cluster_GetWeightedRouting_ResponseBody; } diff --git a/api/cluster/health.d.ts b/api/cluster/health.d.ts index 22729f6c0..83750f42f 100644 --- a/api/cluster/health.d.ts +++ b/api/cluster/health.d.ts @@ -19,7 +19,7 @@ import * as Cluster_Health from '../_types/cluster.health' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_Health_Request extends Global.Params { +export type Cluster_Health_Request = Global.Params & { awareness_attribute?: string; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -36,7 +36,7 @@ export interface Cluster_Health_Request extends Global.Params { wait_for_status?: Common.HealthStatus; } -export interface Cluster_Health_Response extends ApiResponse { +export type Cluster_Health_Response = ApiResponse & { body: Cluster_Health_ResponseBody; } diff --git a/api/cluster/pendingTasks.d.ts b/api/cluster/pendingTasks.d.ts index 21bdfb6b6..737ef24e9 100644 --- a/api/cluster/pendingTasks.d.ts +++ b/api/cluster/pendingTasks.d.ts @@ -19,17 +19,17 @@ import * as Cluster_PendingTasks from '../_types/cluster.pending_tasks' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_PendingTasks_Request extends Global.Params { +export type Cluster_PendingTasks_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; local?: boolean; master_timeout?: Common.Duration; } -export interface Cluster_PendingTasks_Response extends ApiResponse { +export type Cluster_PendingTasks_Response = ApiResponse & { body: Cluster_PendingTasks_ResponseBody; } -export interface Cluster_PendingTasks_ResponseBody { +export type Cluster_PendingTasks_ResponseBody = { tasks: Cluster_PendingTasks.PendingTask[]; } diff --git a/api/cluster/postVotingConfigExclusions.d.ts b/api/cluster/postVotingConfigExclusions.d.ts index 8b01d1637..0a93e545b 100644 --- a/api/cluster/postVotingConfigExclusions.d.ts +++ b/api/cluster/postVotingConfigExclusions.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_PostVotingConfigExclusions_Request extends Global.Params { +export type Cluster_PostVotingConfigExclusions_Request = Global.Params & { node_ids?: Common.Ids; node_names?: Common.Names; timeout?: Common.Duration; } -export interface Cluster_PostVotingConfigExclusions_Response extends ApiResponse { +export type Cluster_PostVotingConfigExclusions_Response = ApiResponse & { body: Cluster_PostVotingConfigExclusions_ResponseBody; } diff --git a/api/cluster/putComponentTemplate.d.ts b/api/cluster/putComponentTemplate.d.ts index 5f2835178..035c224f5 100644 --- a/api/cluster/putComponentTemplate.d.ts +++ b/api/cluster/putComponentTemplate.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Cluster_PutComponentTemplate_Request extends Global.Params { +export type Cluster_PutComponentTemplate_Request = Global.Params & { body: Cluster_PutComponentTemplate_RequestBody; cluster_manager_timeout?: Common.Duration; create?: boolean; @@ -28,14 +28,14 @@ export interface Cluster_PutComponentTemplate_Request extends Global.Params { timeout?: Common.Duration; } -export interface Cluster_PutComponentTemplate_RequestBody { +export type Cluster_PutComponentTemplate_RequestBody = { _meta?: Common.Metadata; allow_auto_create?: boolean; template: Indices_Common.IndexState; version?: Common.VersionNumber; } -export interface Cluster_PutComponentTemplate_Response extends ApiResponse { +export type Cluster_PutComponentTemplate_Response = ApiResponse & { body: Cluster_PutComponentTemplate_ResponseBody; } diff --git a/api/cluster/putDecommissionAwareness.d.ts b/api/cluster/putDecommissionAwareness.d.ts index f026b6623..b85aa383a 100644 --- a/api/cluster/putDecommissionAwareness.d.ts +++ b/api/cluster/putDecommissionAwareness.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_PutDecommissionAwareness_Request extends Global.Params { +export type Cluster_PutDecommissionAwareness_Request = Global.Params & { awareness_attribute_name: string; awareness_attribute_value: string; } -export interface Cluster_PutDecommissionAwareness_Response extends ApiResponse { +export type Cluster_PutDecommissionAwareness_Response = ApiResponse & { body: Cluster_PutDecommissionAwareness_ResponseBody; } diff --git a/api/cluster/putSettings.d.ts b/api/cluster/putSettings.d.ts index 9522123a6..ca4fbeb35 100644 --- a/api/cluster/putSettings.d.ts +++ b/api/cluster/putSettings.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_PutSettings_Request extends Global.Params { +export type Cluster_PutSettings_Request = Global.Params & { body: Cluster_PutSettings_RequestBody; cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; @@ -26,18 +26,18 @@ export interface Cluster_PutSettings_Request extends Global.Params { timeout?: Common.Duration; } -export interface Cluster_PutSettings_RequestBody { +export type Cluster_PutSettings_RequestBody = { persistent?: { }; transient?: { }; } -export interface Cluster_PutSettings_Response extends ApiResponse { +export type Cluster_PutSettings_Response = ApiResponse & { body: Cluster_PutSettings_ResponseBody; } -export interface Cluster_PutSettings_ResponseBody { +export type Cluster_PutSettings_ResponseBody = { acknowledged: boolean; persistent: { }; diff --git a/api/cluster/putWeightedRouting.d.ts b/api/cluster/putWeightedRouting.d.ts index 8e18825d6..73930b239 100644 --- a/api/cluster/putWeightedRouting.d.ts +++ b/api/cluster/putWeightedRouting.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Cluster_WeightedRouting from '../_types/cluster.weighted_routing' import * as Global from '../_types/_global' -export interface Cluster_PutWeightedRouting_Request extends Global.Params { +export type Cluster_PutWeightedRouting_Request = Global.Params & { attribute: string; body?: Cluster_WeightedRouting.Weights; } -export interface Cluster_PutWeightedRouting_Response extends ApiResponse { +export type Cluster_PutWeightedRouting_Response = ApiResponse & { body: Cluster_PutWeightedRouting_ResponseBody; } diff --git a/api/cluster/remoteInfo.d.ts b/api/cluster/remoteInfo.d.ts index bcd4a6e58..c812335b9 100644 --- a/api/cluster/remoteInfo.d.ts +++ b/api/cluster/remoteInfo.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' export type Cluster_RemoteInfo_Request = Global.Params & Record -export interface Cluster_RemoteInfo_Response extends ApiResponse { +export type Cluster_RemoteInfo_Response = ApiResponse & { body: Cluster_RemoteInfo_ResponseBody; } diff --git a/api/cluster/reroute.d.ts b/api/cluster/reroute.d.ts index 3cfd33875..6f3e810a7 100644 --- a/api/cluster/reroute.d.ts +++ b/api/cluster/reroute.d.ts @@ -19,7 +19,7 @@ import * as Cluster_Reroute from '../_types/cluster.reroute' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_Reroute_Request extends Global.Params { +export type Cluster_Reroute_Request = Global.Params & { body?: Cluster_Reroute_RequestBody; cluster_manager_timeout?: Common.Duration; dry_run?: boolean; @@ -30,15 +30,15 @@ export interface Cluster_Reroute_Request extends Global.Params { timeout?: Common.Duration; } -export interface Cluster_Reroute_RequestBody { +export type Cluster_Reroute_RequestBody = { commands?: Cluster_Reroute.Command[]; } -export interface Cluster_Reroute_Response extends ApiResponse { +export type Cluster_Reroute_Response = ApiResponse & { body: Cluster_Reroute_ResponseBody; } -export interface Cluster_Reroute_ResponseBody { +export type Cluster_Reroute_ResponseBody = { acknowledged: boolean; explanations?: Cluster_Reroute.RerouteExplanation[]; state?: Record; diff --git a/api/cluster/state.d.ts b/api/cluster/state.d.ts index 585743cd5..c798f658f 100644 --- a/api/cluster/state.d.ts +++ b/api/cluster/state.d.ts @@ -19,7 +19,7 @@ import * as Cluster_State from '../_types/cluster.state' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_State_Request extends Global.Params { +export type Cluster_State_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -33,7 +33,7 @@ export interface Cluster_State_Request extends Global.Params { wait_for_timeout?: Common.Duration; } -export interface Cluster_State_Response extends ApiResponse { +export type Cluster_State_Response = ApiResponse & { body: Cluster_State_ResponseBody; } diff --git a/api/cluster/stats.d.ts b/api/cluster/stats.d.ts index 27a53d805..87587a10d 100644 --- a/api/cluster/stats.d.ts +++ b/api/cluster/stats.d.ts @@ -19,13 +19,13 @@ import * as Cluster_Stats from '../_types/cluster.stats' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Cluster_Stats_Request extends Global.Params { +export type Cluster_Stats_Request = Global.Params & { flat_settings?: boolean; node_id?: Common.NodeIds; timeout?: Common.Duration; } -export interface Cluster_Stats_Response extends ApiResponse { +export type Cluster_Stats_Response = ApiResponse & { body: Cluster_Stats_ResponseBody; } diff --git a/api/danglingIndices/deleteDanglingIndex.d.ts b/api/danglingIndices/deleteDanglingIndex.d.ts index a5936fe94..462cea18c 100644 --- a/api/danglingIndices/deleteDanglingIndex.d.ts +++ b/api/danglingIndices/deleteDanglingIndex.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface DanglingIndices_DeleteDanglingIndex_Request extends Global.Params { +export type DanglingIndices_DeleteDanglingIndex_Request = Global.Params & { accept_data_loss: boolean; cluster_manager_timeout?: Common.Duration; index_uuid: Common.Uuid; @@ -26,7 +26,7 @@ export interface DanglingIndices_DeleteDanglingIndex_Request extends Global.Para timeout?: Common.Duration; } -export interface DanglingIndices_DeleteDanglingIndex_Response extends ApiResponse { +export type DanglingIndices_DeleteDanglingIndex_Response = ApiResponse & { body: DanglingIndices_DeleteDanglingIndex_ResponseBody; } diff --git a/api/danglingIndices/importDanglingIndex.d.ts b/api/danglingIndices/importDanglingIndex.d.ts index 13386360a..8a2aeb21b 100644 --- a/api/danglingIndices/importDanglingIndex.d.ts +++ b/api/danglingIndices/importDanglingIndex.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface DanglingIndices_ImportDanglingIndex_Request extends Global.Params { +export type DanglingIndices_ImportDanglingIndex_Request = Global.Params & { accept_data_loss: boolean; cluster_manager_timeout?: Common.Duration; index_uuid: Common.Uuid; @@ -26,7 +26,7 @@ export interface DanglingIndices_ImportDanglingIndex_Request extends Global.Para timeout?: Common.Duration; } -export interface DanglingIndices_ImportDanglingIndex_Response extends ApiResponse { +export type DanglingIndices_ImportDanglingIndex_Response = ApiResponse & { body: DanglingIndices_ImportDanglingIndex_ResponseBody; } diff --git a/api/danglingIndices/listDanglingIndices.d.ts b/api/danglingIndices/listDanglingIndices.d.ts index bf838e366..e91b11a1c 100644 --- a/api/danglingIndices/listDanglingIndices.d.ts +++ b/api/danglingIndices/listDanglingIndices.d.ts @@ -21,11 +21,11 @@ import * as Global from '../_types/_global' export type DanglingIndices_ListDanglingIndices_Request = Global.Params & Record -export interface DanglingIndices_ListDanglingIndices_Response extends ApiResponse { +export type DanglingIndices_ListDanglingIndices_Response = ApiResponse & { body: DanglingIndices_ListDanglingIndices_ResponseBody; } -export interface DanglingIndices_ListDanglingIndices_ResponseBody { +export type DanglingIndices_ListDanglingIndices_ResponseBody = { _nodes?: Common.NodeStatistics; cluster_name?: Common.Name; dangling_indices: DanglingIndices_ListDanglingIndices.DanglingIndex[]; diff --git a/api/flowFramework/create.d.ts b/api/flowFramework/create.d.ts index 39284858c..d7da3df0b 100644 --- a/api/flowFramework/create.d.ts +++ b/api/flowFramework/create.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Create_Request extends Global.Params { +export type FlowFramework_Create_Request = Global.Params & { body?: FlowFramework_Common.FlowFrameworkCreate; provision?: FlowFramework_Common.Provision; reprovision?: FlowFramework_Common.Reprovision; @@ -27,11 +27,11 @@ export interface FlowFramework_Create_Request extends Global.Params { validation?: FlowFramework_Common.Validation; } -export interface FlowFramework_Create_Response extends ApiResponse { +export type FlowFramework_Create_Response = ApiResponse & { body: FlowFramework_Create_ResponseBody; } -export interface FlowFramework_Create_ResponseBody { +export type FlowFramework_Create_ResponseBody = { workflow_id: string; } diff --git a/api/flowFramework/delete.d.ts b/api/flowFramework/delete.d.ts index a5bccd560..a577c227f 100644 --- a/api/flowFramework/delete.d.ts +++ b/api/flowFramework/delete.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Delete_Request extends Global.Params { +export type FlowFramework_Delete_Request = Global.Params & { clear_status?: boolean; workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_Delete_Response extends ApiResponse { +export type FlowFramework_Delete_Response = ApiResponse & { body: FlowFramework_Delete_ResponseBody; } diff --git a/api/flowFramework/deprovision.d.ts b/api/flowFramework/deprovision.d.ts index 5b693d586..2c9fefec9 100644 --- a/api/flowFramework/deprovision.d.ts +++ b/api/flowFramework/deprovision.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Deprovision_Request extends Global.Params { +export type FlowFramework_Deprovision_Request = Global.Params & { allow_delete?: FlowFramework_Common.AllowDelete; workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_Deprovision_Response extends ApiResponse { +export type FlowFramework_Deprovision_Response = ApiResponse & { body: FlowFramework_Deprovision_ResponseBody; } diff --git a/api/flowFramework/get.d.ts b/api/flowFramework/get.d.ts index df94018ac..cb7001598 100644 --- a/api/flowFramework/get.d.ts +++ b/api/flowFramework/get.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Get_Request extends Global.Params { +export type FlowFramework_Get_Request = Global.Params & { workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_Get_Response extends ApiResponse { +export type FlowFramework_Get_Response = ApiResponse & { body: FlowFramework_Get_ResponseBody; } diff --git a/api/flowFramework/getStatus.d.ts b/api/flowFramework/getStatus.d.ts index ae03a9aac..80eaeeaf8 100644 --- a/api/flowFramework/getStatus.d.ts +++ b/api/flowFramework/getStatus.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_GetStatus_Request extends Global.Params { +export type FlowFramework_GetStatus_Request = Global.Params & { all?: FlowFramework_Common.All; workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_GetStatus_Response extends ApiResponse { +export type FlowFramework_GetStatus_Response = ApiResponse & { body: FlowFramework_GetStatus_ResponseBody; } diff --git a/api/flowFramework/getSteps.d.ts b/api/flowFramework/getSteps.d.ts index 490cca499..ebc0e0137 100644 --- a/api/flowFramework/getSteps.d.ts +++ b/api/flowFramework/getSteps.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_GetSteps_Request extends Global.Params { +export type FlowFramework_GetSteps_Request = Global.Params & { workflow_step?: FlowFramework_Common.WorkflowStepName; } -export interface FlowFramework_GetSteps_Response extends ApiResponse { +export type FlowFramework_GetSteps_Response = ApiResponse & { body: FlowFramework_GetSteps_ResponseBody; } diff --git a/api/flowFramework/provision.d.ts b/api/flowFramework/provision.d.ts index 127fcdf6b..7105c4c59 100644 --- a/api/flowFramework/provision.d.ts +++ b/api/flowFramework/provision.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Provision_Request extends Global.Params { +export type FlowFramework_Provision_Request = Global.Params & { body?: FlowFramework_Common.UserProvidedSubstitutionExpressions; workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_Provision_Response extends ApiResponse { +export type FlowFramework_Provision_Response = ApiResponse & { body: FlowFramework_Provision_ResponseBody; } diff --git a/api/flowFramework/search.d.ts b/api/flowFramework/search.d.ts index bce3c9d32..010b96b0c 100644 --- a/api/flowFramework/search.d.ts +++ b/api/flowFramework/search.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Search_Request extends Global.Params { +export type FlowFramework_Search_Request = Global.Params & { body: FlowFramework_Common.SearchWorkflowRequest; } -export interface FlowFramework_Search_Response extends ApiResponse { +export type FlowFramework_Search_Response = ApiResponse & { body: FlowFramework_Search_ResponseBody; } diff --git a/api/flowFramework/searchState.d.ts b/api/flowFramework/searchState.d.ts index 80e471138..0b9d2d1fa 100644 --- a/api/flowFramework/searchState.d.ts +++ b/api/flowFramework/searchState.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_SearchState_Request extends Global.Params { +export type FlowFramework_SearchState_Request = Global.Params & { body: FlowFramework_Common.SearchWorkflowRequest; } -export interface FlowFramework_SearchState_Response extends ApiResponse { +export type FlowFramework_SearchState_Response = ApiResponse & { body: FlowFramework_SearchState_ResponseBody; } diff --git a/api/flowFramework/update.d.ts b/api/flowFramework/update.d.ts index 643648aed..7adef1320 100644 --- a/api/flowFramework/update.d.ts +++ b/api/flowFramework/update.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' -export interface FlowFramework_Update_Request extends Global.Params { +export type FlowFramework_Update_Request = Global.Params & { body?: FlowFramework_Common.FlowFrameworkUpdate; provision?: FlowFramework_Common.Provision; reprovision?: FlowFramework_Common.Reprovision; @@ -28,11 +28,11 @@ export interface FlowFramework_Update_Request extends Global.Params { workflow_id: FlowFramework_Common.WorkflowID; } -export interface FlowFramework_Update_Response extends ApiResponse { +export type FlowFramework_Update_Response = ApiResponse & { body: FlowFramework_Update_ResponseBody; } -export interface FlowFramework_Update_ResponseBody { +export type FlowFramework_Update_ResponseBody = { workflow_id: string; } diff --git a/api/index.d.ts b/api/index.d.ts index b28c15357..1cd27fffe 100644 --- a/api/index.d.ts +++ b/api/index.d.ts @@ -17,6 +17,7 @@ import { Info_Request, Info_Response, Info_ResponseBody } from './_core/info'; import { Ping_Request, Ping_Response, Ping_ResponseBody } from './_core/ping'; import { Bulk_Request, Bulk_RequestBody, Bulk_Response, Bulk_ResponseBody } from './_core/bulk'; +import { BulkStream_Request, BulkStream_RequestBody, BulkStream_Response, BulkStream_ResponseBody } from './_core/bulkStream'; import { Count_Request, Count_RequestBody, Count_Response, Count_ResponseBody } from './_core/count'; import { DeleteByQueryRethrottle_Request, DeleteByQueryRethrottle_Response, DeleteByQueryRethrottle_ResponseBody } from './_core/deleteByQueryRethrottle'; import { FieldCaps_Request, FieldCaps_RequestBody, FieldCaps_Response, FieldCaps_ResponseBody } from './_core/fieldCaps'; @@ -157,6 +158,7 @@ import { Ingest_Simulate_Request, Ingest_Simulate_RequestBody, Ingest_Simulate_R import { Ingest_DeletePipeline_Request, Ingest_DeletePipeline_Response, Ingest_DeletePipeline_ResponseBody } from './ingest/deletePipeline'; import { Ingest_PutPipeline_Request, Ingest_PutPipeline_RequestBody, Ingest_PutPipeline_Response, Ingest_PutPipeline_ResponseBody } from './ingest/putPipeline'; import { Ingest_ProcessorGrok_Request, Ingest_ProcessorGrok_Response, Ingest_ProcessorGrok_ResponseBody } from './ingest/processorGrok'; +import { Insights_TopQueries_Request, Insights_TopQueries_Response, Insights_TopQueries_ResponseBody } from './insights/topQueries'; import { Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody } from './nodes/info'; import { Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody } from './nodes/hotThreads'; import { Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody } from './nodes/reloadSecureSettings'; @@ -347,11 +349,16 @@ import { Snapshot_Restore_Request, Snapshot_Restore_RequestBody, Snapshot_Restor import { Tasks_List_Request, Tasks_List_Response, Tasks_List_ResponseBody } from './tasks/list'; import { Tasks_Cancel_Request, Tasks_Cancel_Response, Tasks_Cancel_ResponseBody } from './tasks/cancel'; import { Tasks_Get_Request, Tasks_Get_Response, Tasks_Get_ResponseBody } from './tasks/get'; +import { Wlm_GetQueryGroup_Request, Wlm_GetQueryGroup_Response, Wlm_GetQueryGroup_ResponseBody } from './wlm/getQueryGroup'; +import { Wlm_CreateQueryGroup_Request, Wlm_CreateQueryGroup_Response, Wlm_CreateQueryGroup_ResponseBody } from './wlm/createQueryGroup'; +import { Wlm_DeleteQueryGroup_Request, Wlm_DeleteQueryGroup_Response, Wlm_DeleteQueryGroup_ResponseBody } from './wlm/deleteQueryGroup'; +import { Wlm_UpdateQueryGroup_Request, Wlm_UpdateQueryGroup_Response, Wlm_UpdateQueryGroup_ResponseBody } from './wlm/updateQueryGroup'; export { Info_Request, Info_Response, Info_ResponseBody, Ping_Request, Ping_Response, Ping_ResponseBody, Bulk_Request, Bulk_RequestBody, Bulk_Response, Bulk_ResponseBody, + BulkStream_Request, BulkStream_RequestBody, BulkStream_Response, BulkStream_ResponseBody, Count_Request, Count_RequestBody, Count_Response, Count_ResponseBody, DeleteByQueryRethrottle_Request, DeleteByQueryRethrottle_Response, DeleteByQueryRethrottle_ResponseBody, FieldCaps_Request, FieldCaps_RequestBody, FieldCaps_Response, FieldCaps_ResponseBody, @@ -492,6 +499,7 @@ export { Ingest_DeletePipeline_Request, Ingest_DeletePipeline_Response, Ingest_DeletePipeline_ResponseBody, Ingest_PutPipeline_Request, Ingest_PutPipeline_RequestBody, Ingest_PutPipeline_Response, Ingest_PutPipeline_ResponseBody, Ingest_ProcessorGrok_Request, Ingest_ProcessorGrok_Response, Ingest_ProcessorGrok_ResponseBody, + Insights_TopQueries_Request, Insights_TopQueries_Response, Insights_TopQueries_ResponseBody, Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody, Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody, Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody, @@ -682,4 +690,8 @@ export { Tasks_List_Request, Tasks_List_Response, Tasks_List_ResponseBody, Tasks_Cancel_Request, Tasks_Cancel_Response, Tasks_Cancel_ResponseBody, Tasks_Get_Request, Tasks_Get_Response, Tasks_Get_ResponseBody, + Wlm_GetQueryGroup_Request, Wlm_GetQueryGroup_Response, Wlm_GetQueryGroup_ResponseBody, + Wlm_CreateQueryGroup_Request, Wlm_CreateQueryGroup_Response, Wlm_CreateQueryGroup_ResponseBody, + Wlm_DeleteQueryGroup_Request, Wlm_DeleteQueryGroup_Response, Wlm_DeleteQueryGroup_ResponseBody, + Wlm_UpdateQueryGroup_Request, Wlm_UpdateQueryGroup_Response, Wlm_UpdateQueryGroup_ResponseBody, }; \ No newline at end of file diff --git a/api/indices/addBlock.d.ts b/api/indices/addBlock.d.ts index 3352e2b48..79aa734e7 100644 --- a/api/indices/addBlock.d.ts +++ b/api/indices/addBlock.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_AddBlock from '../_types/indices.add_block' -export interface Indices_AddBlock_Request extends Global.Params { +export type Indices_AddBlock_Request = Global.Params & { allow_no_indices?: boolean; block: Indices_AddBlock.IndicesBlockOptions; cluster_manager_timeout?: Common.Duration; @@ -30,11 +30,11 @@ export interface Indices_AddBlock_Request extends Global.Params { timeout?: Common.Duration; } -export interface Indices_AddBlock_Response extends ApiResponse { +export type Indices_AddBlock_Response = ApiResponse & { body: Indices_AddBlock_ResponseBody; } -export interface Indices_AddBlock_ResponseBody { +export type Indices_AddBlock_ResponseBody = { acknowledged: boolean; indices: Indices_AddBlock.IndicesBlockStatus[]; shards_acknowledged: boolean; diff --git a/api/indices/analyze.d.ts b/api/indices/analyze.d.ts index 5ac529e0d..fd32e10b7 100644 --- a/api/indices/analyze.d.ts +++ b/api/indices/analyze.d.ts @@ -20,12 +20,12 @@ import * as Common_Analysis from '../_types/_common.analysis' import * as Global from '../_types/_global' import * as Indices_Analyze from '../_types/indices.analyze' -export interface Indices_Analyze_Request extends Global.Params { +export type Indices_Analyze_Request = Global.Params & { body?: Indices_Analyze_RequestBody; index?: Common.IndexName; } -export interface Indices_Analyze_RequestBody { +export type Indices_Analyze_RequestBody = { analyzer?: string; attributes?: string[]; char_filter?: Common_Analysis.CharFilter[]; @@ -37,11 +37,11 @@ export interface Indices_Analyze_RequestBody { tokenizer?: Common_Analysis.Tokenizer; } -export interface Indices_Analyze_Response extends ApiResponse { +export type Indices_Analyze_Response = ApiResponse & { body: Indices_Analyze_ResponseBody; } -export interface Indices_Analyze_ResponseBody { +export type Indices_Analyze_ResponseBody = { detail?: Indices_Analyze.AnalyzeDetail; tokens?: Indices_Analyze.AnalyzeToken[]; } diff --git a/api/indices/clearCache.d.ts b/api/indices/clearCache.d.ts index b0372f93e..d33d4f123 100644 --- a/api/indices/clearCache.d.ts +++ b/api/indices/clearCache.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_ClearCache_Request extends Global.Params { +export type Indices_ClearCache_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; fielddata?: boolean; @@ -30,7 +30,7 @@ export interface Indices_ClearCache_Request extends Global.Params { request?: boolean; } -export interface Indices_ClearCache_Response extends ApiResponse { +export type Indices_ClearCache_Response = ApiResponse & { body: Indices_ClearCache_ResponseBody; } diff --git a/api/indices/clone.d.ts b/api/indices/clone.d.ts index e3c243a1b..dc7dee78a 100644 --- a/api/indices/clone.d.ts +++ b/api/indices/clone.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_Clone_Request extends Global.Params { +export type Indices_Clone_Request = Global.Params & { body?: Indices_Clone_RequestBody; cluster_manager_timeout?: Common.Duration; index: Common.IndexName; @@ -31,16 +31,16 @@ export interface Indices_Clone_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Clone_RequestBody { +export type Indices_Clone_RequestBody = { aliases?: Record; settings?: Record>; } -export interface Indices_Clone_Response extends ApiResponse { +export type Indices_Clone_Response = ApiResponse & { body: Indices_Clone_ResponseBody; } -export interface Indices_Clone_ResponseBody { +export type Indices_Clone_ResponseBody = { acknowledged: boolean; index: Common.IndexName; shards_acknowledged: boolean; diff --git a/api/indices/close.d.ts b/api/indices/close.d.ts index 5f26b40c6..5c15d8965 100644 --- a/api/indices/close.d.ts +++ b/api/indices/close.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Close from '../_types/indices.close' -export interface Indices_Close_Request extends Global.Params { +export type Indices_Close_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -30,11 +30,11 @@ export interface Indices_Close_Request extends Global.Params { wait_for_active_shards?: Common.WaitForActiveShards; } -export interface Indices_Close_Response extends ApiResponse { +export type Indices_Close_Response = ApiResponse & { body: Indices_Close_ResponseBody; } -export interface Indices_Close_ResponseBody { +export type Indices_Close_ResponseBody = { acknowledged: boolean; indices: Record; shards_acknowledged: boolean; diff --git a/api/indices/create.d.ts b/api/indices/create.d.ts index fb1d2d537..e77fe633a 100644 --- a/api/indices/create.d.ts +++ b/api/indices/create.d.ts @@ -20,7 +20,7 @@ import * as Common_Mapping from '../_types/_common.mapping' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_Create_Request extends Global.Params { +export type Indices_Create_Request = Global.Params & { body?: Indices_Create_RequestBody; cluster_manager_timeout?: Common.Duration; index: Common.IndexName; @@ -29,17 +29,17 @@ export interface Indices_Create_Request extends Global.Params { wait_for_active_shards?: Common.WaitForActiveShards; } -export interface Indices_Create_RequestBody { +export type Indices_Create_RequestBody = { aliases?: Record; mappings?: Common_Mapping.TypeMapping; settings?: Indices_Common.IndexSettings; } -export interface Indices_Create_Response extends ApiResponse { +export type Indices_Create_Response = ApiResponse & { body: Indices_Create_ResponseBody; } -export interface Indices_Create_ResponseBody { +export type Indices_Create_ResponseBody = { acknowledged: boolean; index: Common.IndexName; shards_acknowledged: boolean; diff --git a/api/indices/createDataStream.d.ts b/api/indices/createDataStream.d.ts index 15b6894e3..0fc1ba565 100644 --- a/api/indices/createDataStream.d.ts +++ b/api/indices/createDataStream.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_CreateDataStream_Request extends Global.Params { +export type Indices_CreateDataStream_Request = Global.Params & { body?: Indices_CreateDataStream_RequestBody; name: Common.DataStreamName; } export type Indices_CreateDataStream_RequestBody = Record -export interface Indices_CreateDataStream_Response extends ApiResponse { +export type Indices_CreateDataStream_Response = ApiResponse & { body: Indices_CreateDataStream_ResponseBody; } diff --git a/api/indices/dataStreamsStats.d.ts b/api/indices/dataStreamsStats.d.ts index 3f4e47be9..441cae05a 100644 --- a/api/indices/dataStreamsStats.d.ts +++ b/api/indices/dataStreamsStats.d.ts @@ -19,15 +19,15 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_DataStreamsStats from '../_types/indices.data_streams_stats' -export interface Indices_DataStreamsStats_Request extends Global.Params { +export type Indices_DataStreamsStats_Request = Global.Params & { name?: Common.Indices; } -export interface Indices_DataStreamsStats_Response extends ApiResponse { +export type Indices_DataStreamsStats_Response = ApiResponse & { body: Indices_DataStreamsStats_ResponseBody; } -export interface Indices_DataStreamsStats_ResponseBody { +export type Indices_DataStreamsStats_ResponseBody = { _shards: Common.ShardStatistics; backing_indices: number; data_stream_count: number; diff --git a/api/indices/delete.d.ts b/api/indices/delete.d.ts index 61d7c9e64..31e24fcd3 100644 --- a/api/indices/delete.d.ts +++ b/api/indices/delete.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Delete_Request extends Global.Params { +export type Indices_Delete_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -28,7 +28,7 @@ export interface Indices_Delete_Request extends Global.Params { timeout?: Common.Duration; } -export interface Indices_Delete_Response extends ApiResponse { +export type Indices_Delete_Response = ApiResponse & { body: Indices_Delete_ResponseBody; } diff --git a/api/indices/deleteAlias.d.ts b/api/indices/deleteAlias.d.ts index bb6f57493..6d1ca1246 100644 --- a/api/indices/deleteAlias.d.ts +++ b/api/indices/deleteAlias.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_DeleteAlias_Request extends Global.Params { +export type Indices_DeleteAlias_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; index: Common.Indices; master_timeout?: Common.Duration; @@ -26,7 +26,7 @@ export interface Indices_DeleteAlias_Request extends Global.Params { timeout?: Common.Duration; } -export interface Indices_DeleteAlias_Response extends ApiResponse { +export type Indices_DeleteAlias_Response = ApiResponse & { body: Indices_DeleteAlias_ResponseBody; } diff --git a/api/indices/deleteDataStream.d.ts b/api/indices/deleteDataStream.d.ts index 1197ee7dd..01de07222 100644 --- a/api/indices/deleteDataStream.d.ts +++ b/api/indices/deleteDataStream.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_DeleteDataStream_Request extends Global.Params { +export type Indices_DeleteDataStream_Request = Global.Params & { name: Common.DataStreamNames; } -export interface Indices_DeleteDataStream_Response extends ApiResponse { +export type Indices_DeleteDataStream_Response = ApiResponse & { body: Indices_DeleteDataStream_ResponseBody; } diff --git a/api/indices/deleteIndexTemplate.d.ts b/api/indices/deleteIndexTemplate.d.ts index fcf4ad7a8..4735441a8 100644 --- a/api/indices/deleteIndexTemplate.d.ts +++ b/api/indices/deleteIndexTemplate.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_DeleteIndexTemplate_Request extends Global.Params { +export type Indices_DeleteIndexTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; name: Common.Name; timeout?: Common.Duration; } -export interface Indices_DeleteIndexTemplate_Response extends ApiResponse { +export type Indices_DeleteIndexTemplate_Response = ApiResponse & { body: Indices_DeleteIndexTemplate_ResponseBody; } diff --git a/api/indices/deleteTemplate.d.ts b/api/indices/deleteTemplate.d.ts index c707268ad..b1f1f5e6f 100644 --- a/api/indices/deleteTemplate.d.ts +++ b/api/indices/deleteTemplate.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_DeleteTemplate_Request extends Global.Params { +export type Indices_DeleteTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; name: Common.Name; timeout?: Common.Duration; } -export interface Indices_DeleteTemplate_Response extends ApiResponse { +export type Indices_DeleteTemplate_Response = ApiResponse & { body: Indices_DeleteTemplate_ResponseBody; } diff --git a/api/indices/exists.d.ts b/api/indices/exists.d.ts index 787489e4c..01f0f1f73 100644 --- a/api/indices/exists.d.ts +++ b/api/indices/exists.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Exists_Request extends Global.Params { +export type Indices_Exists_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -29,7 +29,7 @@ export interface Indices_Exists_Request extends Global.Params { local?: boolean; } -export interface Indices_Exists_Response extends ApiResponse { +export type Indices_Exists_Response = ApiResponse & { body: Indices_Exists_ResponseBody; } diff --git a/api/indices/existsAlias.d.ts b/api/indices/existsAlias.d.ts index d283bb68e..c19edabee 100644 --- a/api/indices/existsAlias.d.ts +++ b/api/indices/existsAlias.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_ExistsAlias_Request extends Global.Params { +export type Indices_ExistsAlias_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; @@ -27,7 +27,7 @@ export interface Indices_ExistsAlias_Request extends Global.Params { name: Common.Names; } -export interface Indices_ExistsAlias_Response extends ApiResponse { +export type Indices_ExistsAlias_Response = ApiResponse & { body: Indices_ExistsAlias_ResponseBody; } diff --git a/api/indices/existsIndexTemplate.d.ts b/api/indices/existsIndexTemplate.d.ts index 721ce2128..fed50e90e 100644 --- a/api/indices/existsIndexTemplate.d.ts +++ b/api/indices/existsIndexTemplate.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_ExistsIndexTemplate_Request extends Global.Params { +export type Indices_ExistsIndexTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; local?: boolean; @@ -26,7 +26,7 @@ export interface Indices_ExistsIndexTemplate_Request extends Global.Params { name: Common.Name; } -export interface Indices_ExistsIndexTemplate_Response extends ApiResponse { +export type Indices_ExistsIndexTemplate_Response = ApiResponse & { body: Indices_ExistsIndexTemplate_ResponseBody; } diff --git a/api/indices/existsTemplate.d.ts b/api/indices/existsTemplate.d.ts index 71a8c92b3..056e9f79a 100644 --- a/api/indices/existsTemplate.d.ts +++ b/api/indices/existsTemplate.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_ExistsTemplate_Request extends Global.Params { +export type Indices_ExistsTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; local?: boolean; @@ -26,7 +26,7 @@ export interface Indices_ExistsTemplate_Request extends Global.Params { name: Common.Names; } -export interface Indices_ExistsTemplate_Response extends ApiResponse { +export type Indices_ExistsTemplate_Response = ApiResponse & { body: Indices_ExistsTemplate_ResponseBody; } diff --git a/api/indices/flush.d.ts b/api/indices/flush.d.ts index a8efcfb4c..71c08ae87 100644 --- a/api/indices/flush.d.ts +++ b/api/indices/flush.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Flush_Request extends Global.Params { +export type Indices_Flush_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; force?: boolean; @@ -27,7 +27,7 @@ export interface Indices_Flush_Request extends Global.Params { wait_if_ongoing?: boolean; } -export interface Indices_Flush_Response extends ApiResponse { +export type Indices_Flush_Response = ApiResponse & { body: Indices_Flush_ResponseBody; } diff --git a/api/indices/forcemerge.d.ts b/api/indices/forcemerge.d.ts index f553cd566..7abd9960a 100644 --- a/api/indices/forcemerge.d.ts +++ b/api/indices/forcemerge.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Forcemerge_Request extends Global.Params { +export type Indices_Forcemerge_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; flush?: boolean; @@ -30,11 +30,11 @@ export interface Indices_Forcemerge_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Forcemerge_Response extends ApiResponse { +export type Indices_Forcemerge_Response = ApiResponse & { body: Indices_Forcemerge_ResponseBody; } -export interface Indices_Forcemerge_ResponseBody extends Common.ShardsOperationResponseBase { +export type Indices_Forcemerge_ResponseBody = Common.ShardsOperationResponseBase & { task?: string; } diff --git a/api/indices/get.d.ts b/api/indices/get.d.ts index 7efc94d2b..3b112856e 100644 --- a/api/indices/get.d.ts +++ b/api/indices/get.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_Get_Request extends Global.Params { +export type Indices_Get_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -31,7 +31,7 @@ export interface Indices_Get_Request extends Global.Params { master_timeout?: Common.Duration; } -export interface Indices_Get_Response extends ApiResponse { +export type Indices_Get_Response = ApiResponse & { body: Indices_Get_ResponseBody; } diff --git a/api/indices/getAlias.d.ts b/api/indices/getAlias.d.ts index 9adc08474..2a6d138e7 100644 --- a/api/indices/getAlias.d.ts +++ b/api/indices/getAlias.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_GetAlias from '../_types/indices.get_alias' -export interface Indices_GetAlias_Request extends Global.Params { +export type Indices_GetAlias_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; @@ -28,7 +28,7 @@ export interface Indices_GetAlias_Request extends Global.Params { name?: Common.Names; } -export interface Indices_GetAlias_Response extends ApiResponse { +export type Indices_GetAlias_Response = ApiResponse & { body: Indices_GetAlias_ResponseBody; } diff --git a/api/indices/getDataStream.d.ts b/api/indices/getDataStream.d.ts index b3190fc9c..18e923c38 100644 --- a/api/indices/getDataStream.d.ts +++ b/api/indices/getDataStream.d.ts @@ -19,15 +19,15 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_GetDataStream_Request extends Global.Params { +export type Indices_GetDataStream_Request = Global.Params & { name?: Common.DataStreamNames; } -export interface Indices_GetDataStream_Response extends ApiResponse { +export type Indices_GetDataStream_Response = ApiResponse & { body: Indices_GetDataStream_ResponseBody; } -export interface Indices_GetDataStream_ResponseBody { +export type Indices_GetDataStream_ResponseBody = { data_streams: Indices_Common.DataStream[]; } diff --git a/api/indices/getFieldMapping.d.ts b/api/indices/getFieldMapping.d.ts index 55cc186ea..e4a16e4c7 100644 --- a/api/indices/getFieldMapping.d.ts +++ b/api/indices/getFieldMapping.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_GetFieldMapping from '../_types/indices.get_field_mapping' -export interface Indices_GetFieldMapping_Request extends Global.Params { +export type Indices_GetFieldMapping_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; fields: Common.Fields; @@ -29,7 +29,7 @@ export interface Indices_GetFieldMapping_Request extends Global.Params { local?: boolean; } -export interface Indices_GetFieldMapping_Response extends ApiResponse { +export type Indices_GetFieldMapping_Response = ApiResponse & { body: Indices_GetFieldMapping_ResponseBody; } diff --git a/api/indices/getIndexTemplate.d.ts b/api/indices/getIndexTemplate.d.ts index 3bd152f62..b03e32cf3 100644 --- a/api/indices/getIndexTemplate.d.ts +++ b/api/indices/getIndexTemplate.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_GetIndexTemplate from '../_types/indices.get_index_template' -export interface Indices_GetIndexTemplate_Request extends Global.Params { +export type Indices_GetIndexTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; local?: boolean; @@ -27,11 +27,11 @@ export interface Indices_GetIndexTemplate_Request extends Global.Params { name?: Common.Name; } -export interface Indices_GetIndexTemplate_Response extends ApiResponse { +export type Indices_GetIndexTemplate_Response = ApiResponse & { body: Indices_GetIndexTemplate_ResponseBody; } -export interface Indices_GetIndexTemplate_ResponseBody { +export type Indices_GetIndexTemplate_ResponseBody = { index_templates: Indices_GetIndexTemplate.IndexTemplateItem[]; } diff --git a/api/indices/getMapping.d.ts b/api/indices/getMapping.d.ts index aafbec4a7..fec4332e3 100644 --- a/api/indices/getMapping.d.ts +++ b/api/indices/getMapping.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_GetMapping from '../_types/indices.get_mapping' -export interface Indices_GetMapping_Request extends Global.Params { +export type Indices_GetMapping_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -29,7 +29,7 @@ export interface Indices_GetMapping_Request extends Global.Params { master_timeout?: Common.Duration; } -export interface Indices_GetMapping_Response extends ApiResponse { +export type Indices_GetMapping_Response = ApiResponse & { body: Indices_GetMapping_ResponseBody; } diff --git a/api/indices/getSettings.d.ts b/api/indices/getSettings.d.ts index 13c1af4ff..97302d212 100644 --- a/api/indices/getSettings.d.ts +++ b/api/indices/getSettings.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_GetSettings_Request extends Global.Params { +export type Indices_GetSettings_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -32,7 +32,7 @@ export interface Indices_GetSettings_Request extends Global.Params { name?: Common.Names; } -export interface Indices_GetSettings_Response extends ApiResponse { +export type Indices_GetSettings_Response = ApiResponse & { body: Indices_GetSettings_ResponseBody; } diff --git a/api/indices/getTemplate.d.ts b/api/indices/getTemplate.d.ts index 4ff8d1fc1..c494ceb34 100644 --- a/api/indices/getTemplate.d.ts +++ b/api/indices/getTemplate.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_GetTemplate_Request extends Global.Params { +export type Indices_GetTemplate_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; flat_settings?: boolean; local?: boolean; @@ -27,7 +27,7 @@ export interface Indices_GetTemplate_Request extends Global.Params { name?: Common.Names; } -export interface Indices_GetTemplate_Response extends ApiResponse { +export type Indices_GetTemplate_Response = ApiResponse & { body: Indices_GetTemplate_ResponseBody; } diff --git a/api/indices/getUpgrade.d.ts b/api/indices/getUpgrade.d.ts index df6eea862..9c2c48e04 100644 --- a/api/indices/getUpgrade.d.ts +++ b/api/indices/getUpgrade.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_GetUpgrade_Request extends Global.Params { +export type Indices_GetUpgrade_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; index?: string[]; } -export interface Indices_GetUpgrade_Response extends ApiResponse { +export type Indices_GetUpgrade_Response = ApiResponse & { body: Indices_GetUpgrade_ResponseBody; } diff --git a/api/indices/open.d.ts b/api/indices/open.d.ts index d3cd824d3..8f4ff3744 100644 --- a/api/indices/open.d.ts +++ b/api/indices/open.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Open_Request extends Global.Params { +export type Indices_Open_Request = Global.Params & { allow_no_indices?: boolean; cluster_manager_timeout?: Common.Duration; expand_wildcards?: Common.ExpandWildcards; @@ -31,7 +31,7 @@ export interface Indices_Open_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Open_Response extends ApiResponse { +export type Indices_Open_Response = ApiResponse & { body: Indices_Open_ResponseBody; } diff --git a/api/indices/putAlias.d.ts b/api/indices/putAlias.d.ts index 13eac36cf..5e25ebf1e 100644 --- a/api/indices/putAlias.d.ts +++ b/api/indices/putAlias.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' -export interface Indices_PutAlias_Request extends Global.Params { +export type Indices_PutAlias_Request = Global.Params & { body?: Indices_PutAlias_RequestBody; cluster_manager_timeout?: Common.Duration; index?: Common.Indices; @@ -28,7 +28,7 @@ export interface Indices_PutAlias_Request extends Global.Params { timeout?: Common.Duration; } -export interface Indices_PutAlias_RequestBody { +export type Indices_PutAlias_RequestBody = { alias?: string; filter?: Common_QueryDsl.QueryContainer; index?: string; @@ -39,7 +39,7 @@ export interface Indices_PutAlias_RequestBody { search_routing?: Common.Routing; } -export interface Indices_PutAlias_Response extends ApiResponse { +export type Indices_PutAlias_Response = ApiResponse & { body: Indices_PutAlias_ResponseBody; } diff --git a/api/indices/putIndexTemplate.d.ts b/api/indices/putIndexTemplate.d.ts index b93ce93c6..c40d3826e 100644 --- a/api/indices/putIndexTemplate.d.ts +++ b/api/indices/putIndexTemplate.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template' -export interface Indices_PutIndexTemplate_Request extends Global.Params { +export type Indices_PutIndexTemplate_Request = Global.Params & { body: Indices_PutIndexTemplate_RequestBody; cause?: string; cluster_manager_timeout?: Common.Duration; @@ -29,7 +29,7 @@ export interface Indices_PutIndexTemplate_Request extends Global.Params { name: Common.Name; } -export interface Indices_PutIndexTemplate_RequestBody { +export type Indices_PutIndexTemplate_RequestBody = { _meta?: Common.Metadata; composed_of?: Common.Name[]; data_stream?: Indices_Common.IndexTemplateDataStreamConfiguration; @@ -39,7 +39,7 @@ export interface Indices_PutIndexTemplate_RequestBody { version?: Common.VersionNumber; } -export interface Indices_PutIndexTemplate_Response extends ApiResponse { +export type Indices_PutIndexTemplate_Response = ApiResponse & { body: Indices_PutIndexTemplate_ResponseBody; } diff --git a/api/indices/putMapping.d.ts b/api/indices/putMapping.d.ts index 484b1a5d7..aa31b5eba 100644 --- a/api/indices/putMapping.d.ts +++ b/api/indices/putMapping.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Common_Mapping from '../_types/_common.mapping' import * as Global from '../_types/_global' -export interface Indices_PutMapping_Request extends Global.Params { +export type Indices_PutMapping_Request = Global.Params & { allow_no_indices?: boolean; body: Indices_PutMapping_RequestBody; cluster_manager_timeout?: Common.Duration; @@ -31,7 +31,7 @@ export interface Indices_PutMapping_Request extends Global.Params { write_index_only?: boolean; } -export interface Indices_PutMapping_RequestBody { +export type Indices_PutMapping_RequestBody = { _field_names?: Common_Mapping.FieldNamesField; _meta?: Common.Metadata; _routing?: Common_Mapping.RoutingField; @@ -42,10 +42,9 @@ export interface Indices_PutMapping_RequestBody { dynamic_templates?: Record | Record[]; numeric_detection?: boolean; properties?: Record; - runtime?: Common_Mapping.RuntimeFields; } -export interface Indices_PutMapping_Response extends ApiResponse { +export type Indices_PutMapping_Response = ApiResponse & { body: Indices_PutMapping_ResponseBody; } diff --git a/api/indices/putSettings.d.ts b/api/indices/putSettings.d.ts index 8a3986bfd..f697bfabc 100644 --- a/api/indices/putSettings.d.ts +++ b/api/indices/putSettings.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_PutSettings_Request extends Global.Params { +export type Indices_PutSettings_Request = Global.Params & { allow_no_indices?: boolean; body: Indices_Common.IndexSettings; cluster_manager_timeout?: Common.Duration; @@ -32,7 +32,7 @@ export interface Indices_PutSettings_Request extends Global.Params { timeout?: Common.Duration; } -export interface Indices_PutSettings_Response extends ApiResponse { +export type Indices_PutSettings_Response = ApiResponse & { body: Indices_PutSettings_ResponseBody; } diff --git a/api/indices/putTemplate.d.ts b/api/indices/putTemplate.d.ts index 20e53ced8..38800a810 100644 --- a/api/indices/putTemplate.d.ts +++ b/api/indices/putTemplate.d.ts @@ -20,7 +20,7 @@ import * as Common_Mapping from '../_types/_common.mapping' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_PutTemplate_Request extends Global.Params { +export type Indices_PutTemplate_Request = Global.Params & { body: Indices_PutTemplate_RequestBody; cluster_manager_timeout?: Common.Duration; create?: boolean; @@ -29,7 +29,7 @@ export interface Indices_PutTemplate_Request extends Global.Params { order?: number; } -export interface Indices_PutTemplate_RequestBody { +export type Indices_PutTemplate_RequestBody = { aliases?: Record; index_patterns?: string | string[]; mappings?: Common_Mapping.TypeMapping; @@ -38,7 +38,7 @@ export interface Indices_PutTemplate_RequestBody { version?: Common.VersionNumber; } -export interface Indices_PutTemplate_Response extends ApiResponse { +export type Indices_PutTemplate_Response = ApiResponse & { body: Indices_PutTemplate_ResponseBody; } diff --git a/api/indices/recovery.d.ts b/api/indices/recovery.d.ts index 4def83bf6..814d8e320 100644 --- a/api/indices/recovery.d.ts +++ b/api/indices/recovery.d.ts @@ -19,13 +19,13 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Recovery from '../_types/indices.recovery' -export interface Indices_Recovery_Request extends Global.Params { +export type Indices_Recovery_Request = Global.Params & { active_only?: boolean; detailed?: boolean; index?: Common.Indices; } -export interface Indices_Recovery_Response extends ApiResponse { +export type Indices_Recovery_Response = ApiResponse & { body: Indices_Recovery_ResponseBody; } diff --git a/api/indices/refresh.d.ts b/api/indices/refresh.d.ts index 7f714f455..d78e7f2d2 100644 --- a/api/indices/refresh.d.ts +++ b/api/indices/refresh.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Refresh_Request extends Global.Params { +export type Indices_Refresh_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; index?: Common.Indices; } -export interface Indices_Refresh_Response extends ApiResponse { +export type Indices_Refresh_Response = ApiResponse & { body: Indices_Refresh_ResponseBody; } diff --git a/api/indices/resolveIndex.d.ts b/api/indices/resolveIndex.d.ts index 035691868..ba0da34ca 100644 --- a/api/indices/resolveIndex.d.ts +++ b/api/indices/resolveIndex.d.ts @@ -19,16 +19,16 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_ResolveIndex from '../_types/indices.resolve_index' -export interface Indices_ResolveIndex_Request extends Global.Params { +export type Indices_ResolveIndex_Request = Global.Params & { expand_wildcards?: Common.ExpandWildcards; name: Common.Names; } -export interface Indices_ResolveIndex_Response extends ApiResponse { +export type Indices_ResolveIndex_Response = ApiResponse & { body: Indices_ResolveIndex_ResponseBody; } -export interface Indices_ResolveIndex_ResponseBody { +export type Indices_ResolveIndex_ResponseBody = { aliases: Indices_ResolveIndex.ResolveIndexAliasItem[]; data_streams: Indices_ResolveIndex.ResolveIndexDataStreamsItem[]; indices: Indices_ResolveIndex.ResolveIndexItem[]; diff --git a/api/indices/rollover.d.ts b/api/indices/rollover.d.ts index 95d2115af..7b20b85e2 100644 --- a/api/indices/rollover.d.ts +++ b/api/indices/rollover.d.ts @@ -21,7 +21,7 @@ import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' import * as Indices_Rollover from '../_types/indices.rollover' -export interface Indices_Rollover_Request extends Global.Params { +export type Indices_Rollover_Request = Global.Params & { alias: Common.IndexAlias; body?: Indices_Rollover_RequestBody; cluster_manager_timeout?: Common.Duration; @@ -32,18 +32,18 @@ export interface Indices_Rollover_Request extends Global.Params { wait_for_active_shards?: Common.WaitForActiveShards; } -export interface Indices_Rollover_RequestBody { +export type Indices_Rollover_RequestBody = { aliases?: Record; conditions?: Indices_Rollover.RolloverConditions; mappings?: Common_Mapping.TypeMapping; settings?: Record>; } -export interface Indices_Rollover_Response extends ApiResponse { +export type Indices_Rollover_Response = ApiResponse & { body: Indices_Rollover_ResponseBody; } -export interface Indices_Rollover_ResponseBody { +export type Indices_Rollover_ResponseBody = { acknowledged: boolean; conditions: Record; dry_run: boolean; diff --git a/api/indices/segments.d.ts b/api/indices/segments.d.ts index db65af355..37ccb682b 100644 --- a/api/indices/segments.d.ts +++ b/api/indices/segments.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Segments from '../_types/indices.segments' -export interface Indices_Segments_Request extends Global.Params { +export type Indices_Segments_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; @@ -27,11 +27,11 @@ export interface Indices_Segments_Request extends Global.Params { verbose?: boolean; } -export interface Indices_Segments_Response extends ApiResponse { +export type Indices_Segments_Response = ApiResponse & { body: Indices_Segments_ResponseBody; } -export interface Indices_Segments_ResponseBody { +export type Indices_Segments_ResponseBody = { _shards: Common.ShardStatistics; indices: Record; } diff --git a/api/indices/shardStores.d.ts b/api/indices/shardStores.d.ts index f2a22753f..ed90e192a 100644 --- a/api/indices/shardStores.d.ts +++ b/api/indices/shardStores.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_ShardStores from '../_types/indices.shard_stores' -export interface Indices_ShardStores_Request extends Global.Params { +export type Indices_ShardStores_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; @@ -27,11 +27,11 @@ export interface Indices_ShardStores_Request extends Global.Params { status?: Indices_ShardStores.Status | Indices_ShardStores.Status[]; } -export interface Indices_ShardStores_Response extends ApiResponse { +export type Indices_ShardStores_Response = ApiResponse & { body: Indices_ShardStores_ResponseBody; } -export interface Indices_ShardStores_ResponseBody { +export type Indices_ShardStores_ResponseBody = { indices: Record; } diff --git a/api/indices/shrink.d.ts b/api/indices/shrink.d.ts index 93b7a263b..b2619eaac 100644 --- a/api/indices/shrink.d.ts +++ b/api/indices/shrink.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_Shrink_Request extends Global.Params { +export type Indices_Shrink_Request = Global.Params & { body?: Indices_Shrink_RequestBody; cluster_manager_timeout?: Common.Duration; copy_settings?: boolean; @@ -32,16 +32,16 @@ export interface Indices_Shrink_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Shrink_RequestBody { +export type Indices_Shrink_RequestBody = { aliases?: Record; settings?: Record>; } -export interface Indices_Shrink_Response extends ApiResponse { +export type Indices_Shrink_Response = ApiResponse & { body: Indices_Shrink_ResponseBody; } -export interface Indices_Shrink_ResponseBody { +export type Indices_Shrink_ResponseBody = { acknowledged: boolean; index: Common.IndexName; shards_acknowledged: boolean; diff --git a/api/indices/simulateIndexTemplate.d.ts b/api/indices/simulateIndexTemplate.d.ts index 1d8d29146..5e92856c9 100644 --- a/api/indices/simulateIndexTemplate.d.ts +++ b/api/indices/simulateIndexTemplate.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template' -export interface Indices_SimulateIndexTemplate_Request extends Global.Params { +export type Indices_SimulateIndexTemplate_Request = Global.Params & { body?: Indices_SimulateIndexTemplate_RequestBody; cause?: string; cluster_manager_timeout?: Common.Duration; @@ -29,7 +29,7 @@ export interface Indices_SimulateIndexTemplate_Request extends Global.Params { name: Common.Name; } -export interface Indices_SimulateIndexTemplate_RequestBody { +export type Indices_SimulateIndexTemplate_RequestBody = { _meta?: Common.Metadata; allow_auto_create?: boolean; composed_of?: Common.Name[]; @@ -40,7 +40,7 @@ export interface Indices_SimulateIndexTemplate_RequestBody { version?: Common.VersionNumber; } -export interface Indices_SimulateIndexTemplate_Response extends ApiResponse { +export type Indices_SimulateIndexTemplate_Response = ApiResponse & { body: Indices_SimulateIndexTemplate_ResponseBody; } diff --git a/api/indices/simulateTemplate.d.ts b/api/indices/simulateTemplate.d.ts index 12daa01e5..416a162eb 100644 --- a/api/indices/simulateTemplate.d.ts +++ b/api/indices/simulateTemplate.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' import * as Indices_SimulateTemplate from '../_types/indices.simulate_template' -export interface Indices_SimulateTemplate_Request extends Global.Params { +export type Indices_SimulateTemplate_Request = Global.Params & { body?: Indices_Common.IndexTemplate; cause?: string; cluster_manager_timeout?: Common.Duration; @@ -29,11 +29,11 @@ export interface Indices_SimulateTemplate_Request extends Global.Params { name?: Common.Name; } -export interface Indices_SimulateTemplate_Response extends ApiResponse { +export type Indices_SimulateTemplate_Response = ApiResponse & { body: Indices_SimulateTemplate_ResponseBody; } -export interface Indices_SimulateTemplate_ResponseBody { +export type Indices_SimulateTemplate_ResponseBody = { overlapping?: Indices_SimulateTemplate.Overlapping[]; template: Indices_SimulateTemplate.Template; } diff --git a/api/indices/split.d.ts b/api/indices/split.d.ts index 5cc1a0d77..6f7e7d574 100644 --- a/api/indices/split.d.ts +++ b/api/indices/split.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' -export interface Indices_Split_Request extends Global.Params { +export type Indices_Split_Request = Global.Params & { body?: Indices_Split_RequestBody; cluster_manager_timeout?: Common.Duration; copy_settings?: boolean; @@ -32,17 +32,17 @@ export interface Indices_Split_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Split_RequestBody { +export type Indices_Split_RequestBody = { aliases?: Record; settings?: { }; } -export interface Indices_Split_Response extends ApiResponse { +export type Indices_Split_Response = ApiResponse & { body: Indices_Split_ResponseBody; } -export interface Indices_Split_ResponseBody { +export type Indices_Split_ResponseBody = { acknowledged: boolean; index: Common.IndexName; shards_acknowledged: boolean; diff --git a/api/indices/stats.d.ts b/api/indices/stats.d.ts index 4968b487a..5b73c93e1 100644 --- a/api/indices/stats.d.ts +++ b/api/indices/stats.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_Stats from '../_types/indices.stats' -export interface Indices_Stats_Request extends Global.Params { +export type Indices_Stats_Request = Global.Params & { completion_fields?: Common.Fields; expand_wildcards?: Common.ExpandWildcards; fielddata_fields?: Common.Fields; @@ -33,11 +33,11 @@ export interface Indices_Stats_Request extends Global.Params { metric?: Indices_Stats.Metric | Indices_Stats.Metric[]; } -export interface Indices_Stats_Response extends ApiResponse { +export type Indices_Stats_Response = ApiResponse & { body: Indices_Stats_ResponseBody; } -export interface Indices_Stats_ResponseBody { +export type Indices_Stats_ResponseBody = { _all: Indices_Stats.AllIndicesStats; _shards: Common.ShardStatistics; indices?: Record; diff --git a/api/indices/updateAliases.d.ts b/api/indices/updateAliases.d.ts index 0bc357f60..ec9dec16b 100644 --- a/api/indices/updateAliases.d.ts +++ b/api/indices/updateAliases.d.ts @@ -19,18 +19,18 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Indices_UpdateAliases from '../_types/indices.update_aliases' -export interface Indices_UpdateAliases_Request extends Global.Params { +export type Indices_UpdateAliases_Request = Global.Params & { body: Indices_UpdateAliases_RequestBody; cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; timeout?: Common.Duration; } -export interface Indices_UpdateAliases_RequestBody { +export type Indices_UpdateAliases_RequestBody = { actions?: Indices_UpdateAliases.Action[]; } -export interface Indices_UpdateAliases_Response extends ApiResponse { +export type Indices_UpdateAliases_Response = ApiResponse & { body: Indices_UpdateAliases_ResponseBody; } diff --git a/api/indices/upgrade.d.ts b/api/indices/upgrade.d.ts index 3f480c46a..270812137 100644 --- a/api/indices/upgrade.d.ts +++ b/api/indices/upgrade.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Indices_Upgrade_Request extends Global.Params { +export type Indices_Upgrade_Request = Global.Params & { allow_no_indices?: boolean; expand_wildcards?: Common.ExpandWildcards; ignore_unavailable?: boolean; @@ -27,7 +27,7 @@ export interface Indices_Upgrade_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Indices_Upgrade_Response extends ApiResponse { +export type Indices_Upgrade_Response = ApiResponse & { body: Indices_Upgrade_ResponseBody; } diff --git a/api/indices/validateQuery.d.ts b/api/indices/validateQuery.d.ts index f9c3990e1..788fcf947 100644 --- a/api/indices/validateQuery.d.ts +++ b/api/indices/validateQuery.d.ts @@ -20,7 +20,7 @@ import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Global from '../_types/_global' import * as Indices_ValidateQuery from '../_types/indices.validate_query' -export interface Indices_ValidateQuery_Request extends Global.Params { +export type Indices_ValidateQuery_Request = Global.Params & { all_shards?: boolean; allow_no_indices?: boolean; analyze_wildcard?: boolean; @@ -37,15 +37,15 @@ export interface Indices_ValidateQuery_Request extends Global.Params { rewrite?: boolean; } -export interface Indices_ValidateQuery_RequestBody { +export type Indices_ValidateQuery_RequestBody = { query?: Common_QueryDsl.QueryContainer; } -export interface Indices_ValidateQuery_Response extends ApiResponse { +export type Indices_ValidateQuery_Response = ApiResponse & { body: Indices_ValidateQuery_ResponseBody; } -export interface Indices_ValidateQuery_ResponseBody { +export type Indices_ValidateQuery_ResponseBody = { _shards?: Common.ShardStatistics; error?: string; explanations?: Indices_ValidateQuery.IndicesValidationExplanation[]; diff --git a/api/ingest/deletePipeline.d.ts b/api/ingest/deletePipeline.d.ts index 2459dc956..9a4b8a5fc 100644 --- a/api/ingest/deletePipeline.d.ts +++ b/api/ingest/deletePipeline.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ingest_DeletePipeline_Request extends Global.Params { +export type Ingest_DeletePipeline_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id: Common.Id; master_timeout?: Common.Duration; timeout?: Common.Duration; } -export interface Ingest_DeletePipeline_Response extends ApiResponse { +export type Ingest_DeletePipeline_Response = ApiResponse & { body: Ingest_DeletePipeline_ResponseBody; } diff --git a/api/ingest/getPipeline.d.ts b/api/ingest/getPipeline.d.ts index 4f181544f..a8f2ca349 100644 --- a/api/ingest/getPipeline.d.ts +++ b/api/ingest/getPipeline.d.ts @@ -19,13 +19,13 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ingest_Common from '../_types/ingest._common' -export interface Ingest_GetPipeline_Request extends Global.Params { +export type Ingest_GetPipeline_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id?: Common.Id; master_timeout?: Common.Duration; } -export interface Ingest_GetPipeline_Response extends ApiResponse { +export type Ingest_GetPipeline_Response = ApiResponse & { body: Ingest_GetPipeline_ResponseBody; } diff --git a/api/ingest/processorGrok.d.ts b/api/ingest/processorGrok.d.ts index 0b94fbbf6..022ac0992 100644 --- a/api/ingest/processorGrok.d.ts +++ b/api/ingest/processorGrok.d.ts @@ -19,11 +19,11 @@ import * as Global from '../_types/_global' export type Ingest_ProcessorGrok_Request = Global.Params & Record -export interface Ingest_ProcessorGrok_Response extends ApiResponse { +export type Ingest_ProcessorGrok_Response = ApiResponse & { body: Ingest_ProcessorGrok_ResponseBody; } -export interface Ingest_ProcessorGrok_ResponseBody { +export type Ingest_ProcessorGrok_ResponseBody = { patterns: Record; } diff --git a/api/ingest/putPipeline.d.ts b/api/ingest/putPipeline.d.ts index a2918cc0b..acab02197 100644 --- a/api/ingest/putPipeline.d.ts +++ b/api/ingest/putPipeline.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ingest_Common from '../_types/ingest._common' -export interface Ingest_PutPipeline_Request extends Global.Params { +export type Ingest_PutPipeline_Request = Global.Params & { body: Ingest_PutPipeline_RequestBody; cluster_manager_timeout?: Common.Duration; id: Common.Id; @@ -27,7 +27,7 @@ export interface Ingest_PutPipeline_Request extends Global.Params { timeout?: Common.Duration; } -export interface Ingest_PutPipeline_RequestBody { +export type Ingest_PutPipeline_RequestBody = { _meta?: Common.Metadata; description?: string; on_failure?: Ingest_Common.ProcessorContainer[]; @@ -35,7 +35,7 @@ export interface Ingest_PutPipeline_RequestBody { version?: Common.VersionNumber; } -export interface Ingest_PutPipeline_Response extends ApiResponse { +export type Ingest_PutPipeline_Response = ApiResponse & { body: Ingest_PutPipeline_ResponseBody; } diff --git a/api/ingest/simulate.d.ts b/api/ingest/simulate.d.ts index a122a4a81..c456165b1 100644 --- a/api/ingest/simulate.d.ts +++ b/api/ingest/simulate.d.ts @@ -20,22 +20,22 @@ import * as Global from '../_types/_global' import * as Ingest_Common from '../_types/ingest._common' import * as Ingest_Simulate from '../_types/ingest.simulate' -export interface Ingest_Simulate_Request extends Global.Params { +export type Ingest_Simulate_Request = Global.Params & { body: Ingest_Simulate_RequestBody; id?: Common.Id; verbose?: boolean; } -export interface Ingest_Simulate_RequestBody { +export type Ingest_Simulate_RequestBody = { docs?: Ingest_Simulate.Document[]; pipeline?: Ingest_Common.Pipeline; } -export interface Ingest_Simulate_Response extends ApiResponse { +export type Ingest_Simulate_Response = ApiResponse & { body: Ingest_Simulate_ResponseBody; } -export interface Ingest_Simulate_ResponseBody { +export type Ingest_Simulate_ResponseBody = { docs: Ingest_Simulate.PipelineSimulation[]; } diff --git a/api/_types/snapshot.get.d.ts b/api/insights/_api.js similarity index 61% rename from api/_types/snapshot.get.d.ts rename to api/insights/_api.js index 0644614c6..c590409aa 100644 --- a/api/_types/snapshot.get.d.ts +++ b/api/insights/_api.js @@ -14,12 +14,15 @@ * modify the API generator. */ -import * as Common from './_common' -import * as Snapshot_Common from './snapshot._common' +'use strict'; -export interface SnapshotResponseItem { - error?: Common.ErrorCause; - repository: Common.Name; - snapshots?: Snapshot_Common.SnapshotInfo[]; +/** @namespace API-Insights */ + +function InsightsApi(bindObj) { + this.topQueries = require('./topQueries').bind(bindObj); + + // Deprecated: Use topQueries instead. + this.top_queries = require('./topQueries').bind(bindObj); } +module.exports = InsightsApi; diff --git a/api/insights/topQueries.d.ts b/api/insights/topQueries.d.ts new file mode 100644 index 000000000..2822c0e7c --- /dev/null +++ b/api/insights/topQueries.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Insights_Common from '../_types/insights._common' + +export type Insights_TopQueries_Request = Global.Params & { + type: 'cpu' | 'latency' | 'memory'; +} + +export type Insights_TopQueries_Response = ApiResponse & { + body: Insights_TopQueries_ResponseBody; +} + +export type Insights_TopQueries_ResponseBody = Insights_Common.TopQueriesResponse + diff --git a/api/insights/topQueries.js b/api/insights/topQueries.js new file mode 100644 index 000000000..f924c09c9 --- /dev/null +++ b/api/insights/topQueries.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Retrieves the top queries based on the given metric type (latency, CPU, or memory). + *
See Also: {@link undefined - insights.top_queries} + * + * @memberOf API-Insights + * + * @param {object} params + * @param {string} params.type - Get top n queries by a specific metric. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function topQueriesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.type == null) return handleMissingParam('type', this, callback); + + let { body, ...querystring } = params; + + const path = '/_insights/top_queries'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = topQueriesFunc; diff --git a/api/ism/addPolicy.d.ts b/api/ism/addPolicy.d.ts index 54de112c4..907da7733 100644 --- a/api/ism/addPolicy.d.ts +++ b/api/ism/addPolicy.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_AddPolicy_Request extends Global.Params { +export type Ism_AddPolicy_Request = Global.Params & { body?: Ism_Common.AddPolicyRequest; index?: Common.IndexName; } -export interface Ism_AddPolicy_Response extends ApiResponse { +export type Ism_AddPolicy_Response = ApiResponse & { body: Ism_AddPolicy_ResponseBody; } diff --git a/api/ism/changePolicy.d.ts b/api/ism/changePolicy.d.ts index ecaf87ea0..c9aa32b18 100644 --- a/api/ism/changePolicy.d.ts +++ b/api/ism/changePolicy.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_ChangePolicy_Request extends Global.Params { +export type Ism_ChangePolicy_Request = Global.Params & { body?: Ism_Common.ChangePolicyRequest; index?: Common.IndexName; } -export interface Ism_ChangePolicy_Response extends ApiResponse { +export type Ism_ChangePolicy_Response = ApiResponse & { body: Ism_ChangePolicy_ResponseBody; } diff --git a/api/ism/deletePolicy.d.ts b/api/ism/deletePolicy.d.ts index 85658ceca..a45ef7aa6 100644 --- a/api/ism/deletePolicy.d.ts +++ b/api/ism/deletePolicy.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_DeletePolicy_Request extends Global.Params { +export type Ism_DeletePolicy_Request = Global.Params & { policy_id: string; } -export interface Ism_DeletePolicy_Response extends ApiResponse { +export type Ism_DeletePolicy_Response = ApiResponse & { body: Ism_DeletePolicy_ResponseBody; } diff --git a/api/ism/existsPolicy.d.ts b/api/ism/existsPolicy.d.ts index cf91ff54f..ddd3974bc 100644 --- a/api/ism/existsPolicy.d.ts +++ b/api/ism/existsPolicy.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Ism_ExistsPolicy_Request extends Global.Params { +export type Ism_ExistsPolicy_Request = Global.Params & { policy_id: string; } -export interface Ism_ExistsPolicy_Response extends ApiResponse { +export type Ism_ExistsPolicy_Response = ApiResponse & { body: Ism_ExistsPolicy_ResponseBody; } diff --git a/api/ism/explainPolicy.d.ts b/api/ism/explainPolicy.d.ts index 759965e03..035695863 100644 --- a/api/ism/explainPolicy.d.ts +++ b/api/ism/explainPolicy.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_ExplainPolicy_Request extends Global.Params { +export type Ism_ExplainPolicy_Request = Global.Params & { body?: Ism_ExplainPolicy_RequestBody; index?: Common.IndexName; } export type Ism_ExplainPolicy_RequestBody = any -export interface Ism_ExplainPolicy_Response extends ApiResponse { +export type Ism_ExplainPolicy_Response = ApiResponse & { body: Ism_ExplainPolicy_ResponseBody; } diff --git a/api/ism/getPolicies.d.ts b/api/ism/getPolicies.d.ts index 82629f120..dcc53dc7f 100644 --- a/api/ism/getPolicies.d.ts +++ b/api/ism/getPolicies.d.ts @@ -20,7 +20,7 @@ import * as Ism_Common from '../_types/ism._common' export type Ism_GetPolicies_Request = Global.Params & Record -export interface Ism_GetPolicies_Response extends ApiResponse { +export type Ism_GetPolicies_Response = ApiResponse & { body: Ism_GetPolicies_ResponseBody; } diff --git a/api/ism/getPolicy.d.ts b/api/ism/getPolicy.d.ts index d5efb4141..5e36f33a5 100644 --- a/api/ism/getPolicy.d.ts +++ b/api/ism/getPolicy.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_GetPolicy_Request extends Global.Params { +export type Ism_GetPolicy_Request = Global.Params & { policy_id: string; } -export interface Ism_GetPolicy_Response extends ApiResponse { +export type Ism_GetPolicy_Response = ApiResponse & { body: Ism_GetPolicy_ResponseBody; } diff --git a/api/ism/putPolicies.d.ts b/api/ism/putPolicies.d.ts index 94768ee8f..2ab54977b 100644 --- a/api/ism/putPolicies.d.ts +++ b/api/ism/putPolicies.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_PutPolicies_Request extends Global.Params { +export type Ism_PutPolicies_Request = Global.Params & { body?: Ism_Common.PutPolicyRequest; if_primary_term?: number; if_seq_no?: Common.SequenceNumber; policyID: string; } -export interface Ism_PutPolicies_Response extends ApiResponse { +export type Ism_PutPolicies_Response = ApiResponse & { body: Ism_PutPolicies_ResponseBody; } diff --git a/api/ism/putPolicy.d.ts b/api/ism/putPolicy.d.ts index 4c0c52f0e..8e38ecd4f 100644 --- a/api/ism/putPolicy.d.ts +++ b/api/ism/putPolicy.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_PutPolicy_Request extends Global.Params { +export type Ism_PutPolicy_Request = Global.Params & { body?: Ism_Common.PutPolicyRequest; if_primary_term?: number; if_seq_no?: Common.SequenceNumber; policy_id: string; } -export interface Ism_PutPolicy_Response extends ApiResponse { +export type Ism_PutPolicy_Response = ApiResponse & { body: Ism_PutPolicy_ResponseBody; } diff --git a/api/ism/refreshSearchAnalyzers.d.ts b/api/ism/refreshSearchAnalyzers.d.ts index eb1810fc5..b8fa679c3 100644 --- a/api/ism/refreshSearchAnalyzers.d.ts +++ b/api/ism/refreshSearchAnalyzers.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_RefreshSearchAnalyzers_Request extends Global.Params { +export type Ism_RefreshSearchAnalyzers_Request = Global.Params & { index: Common.IndexName; } -export interface Ism_RefreshSearchAnalyzers_Response extends ApiResponse { +export type Ism_RefreshSearchAnalyzers_Response = ApiResponse & { body: Ism_RefreshSearchAnalyzers_ResponseBody; } diff --git a/api/ism/removePolicy.d.ts b/api/ism/removePolicy.d.ts index dae225849..6b81ce5b0 100644 --- a/api/ism/removePolicy.d.ts +++ b/api/ism/removePolicy.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_RemovePolicy_Request extends Global.Params { +export type Ism_RemovePolicy_Request = Global.Params & { index?: Common.IndexName; } -export interface Ism_RemovePolicy_Response extends ApiResponse { +export type Ism_RemovePolicy_Response = ApiResponse & { body: Ism_RemovePolicy_ResponseBody; } diff --git a/api/ism/retryIndex.d.ts b/api/ism/retryIndex.d.ts index e95d558b6..08fdbfa3f 100644 --- a/api/ism/retryIndex.d.ts +++ b/api/ism/retryIndex.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Ism_Common from '../_types/ism._common' -export interface Ism_RetryIndex_Request extends Global.Params { +export type Ism_RetryIndex_Request = Global.Params & { body?: Ism_Common.RetryIndexRequest; index?: Common.IndexName; } -export interface Ism_RetryIndex_Response extends ApiResponse { +export type Ism_RetryIndex_Response = ApiResponse & { body: Ism_RetryIndex_ResponseBody; } diff --git a/api/knn/deleteModel.d.ts b/api/knn/deleteModel.d.ts index 84932057e..56b870133 100644 --- a/api/knn/deleteModel.d.ts +++ b/api/knn/deleteModel.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Knn_DeleteModel_Request extends Global.Params { +export type Knn_DeleteModel_Request = Global.Params & { model_id: string; } -export interface Knn_DeleteModel_Response extends ApiResponse { +export type Knn_DeleteModel_Response = ApiResponse & { body: Knn_DeleteModel_ResponseBody; } diff --git a/api/knn/getModel.d.ts b/api/knn/getModel.d.ts index 929e39866..52f80c1ab 100644 --- a/api/knn/getModel.d.ts +++ b/api/knn/getModel.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Knn_GetModel_Request extends Global.Params { +export type Knn_GetModel_Request = Global.Params & { model_id: string; } -export interface Knn_GetModel_Response extends ApiResponse { +export type Knn_GetModel_Response = ApiResponse & { body: Knn_GetModel_ResponseBody; } diff --git a/api/knn/searchModels.d.ts b/api/knn/searchModels.d.ts index 520163587..795d445fc 100644 --- a/api/knn/searchModels.d.ts +++ b/api/knn/searchModels.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Knn_Common from '../_types/knn._common' -export interface Knn_SearchModels_Request extends Global.Params { +export type Knn_SearchModels_Request = Global.Params & { _source?: string[]; _source_excludes?: string[]; _source_includes?: string[]; @@ -45,7 +45,7 @@ export interface Knn_SearchModels_Request extends Global.Params { q?: string; request_cache?: boolean; rest_total_hits_as_int?: boolean; - routing?: Common.Routing; + routing?: Common.RoutingInQueryString; scroll?: Common.Duration; search_type?: Knn_Common.SearchType; seq_no_primary_term?: boolean; @@ -67,7 +67,7 @@ export interface Knn_SearchModels_Request extends Global.Params { export type Knn_SearchModels_RequestBody = Record -export interface Knn_SearchModels_Response extends ApiResponse { +export type Knn_SearchModels_Response = ApiResponse & { body: Knn_SearchModels_ResponseBody; } diff --git a/api/knn/stats.d.ts b/api/knn/stats.d.ts index c39c4d511..dc875e8e9 100644 --- a/api/knn/stats.d.ts +++ b/api/knn/stats.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Knn_Stats_Request extends Global.Params { +export type Knn_Stats_Request = Global.Params & { node_id?: string[]; stat?: 'cache_capacity_reached' | 'circuit_breaker_triggered' | 'eviction_count' | 'faiss_initialized' | 'graph_index_errors' | 'graph_index_requests' | 'graph_memory_usage' | 'graph_memory_usage_percentage' | 'graph_query_errors' | 'graph_query_requests' | 'hit_count' | 'indexing_from_model_degraded' | 'indices_in_cache' | 'knn_query_requests' | 'load_exception_count' | 'load_success_count' | 'miss_count' | 'model_index_status' | 'nmslib_initialized' | 'script_compilation_errors' | 'script_compilations' | 'script_query_errors' | 'script_query_requests' | 'total_load_time' | 'training_errors' | 'training_memory_usage' | 'training_memory_usage_percentage' | 'training_requests'[]; timeout?: Common.Duration; } -export interface Knn_Stats_Response extends ApiResponse { +export type Knn_Stats_Response = ApiResponse & { body: Knn_Stats_ResponseBody; } diff --git a/api/knn/trainModel.d.ts b/api/knn/trainModel.d.ts index 74f4700f6..00605c507 100644 --- a/api/knn/trainModel.d.ts +++ b/api/knn/trainModel.d.ts @@ -17,13 +17,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Knn_TrainModel_Request extends Global.Params { +export type Knn_TrainModel_Request = Global.Params & { body: Knn_TrainModel_RequestBody; model_id?: string; preference?: string; } -export interface Knn_TrainModel_RequestBody { +export type Knn_TrainModel_RequestBody = { compression_level?: string; description?: string; dimension: number; @@ -36,11 +36,11 @@ export interface Knn_TrainModel_RequestBody { training_index: string; } -export interface Knn_TrainModel_Response extends ApiResponse { +export type Knn_TrainModel_Response = ApiResponse & { body: Knn_TrainModel_ResponseBody; } -export interface Knn_TrainModel_ResponseBody { +export type Knn_TrainModel_ResponseBody = { model_id: string; } diff --git a/api/knn/warmup.d.ts b/api/knn/warmup.d.ts index 948c71d3e..82481761a 100644 --- a/api/knn/warmup.d.ts +++ b/api/knn/warmup.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Knn_Warmup_Request extends Global.Params { +export type Knn_Warmup_Request = Global.Params & { index: string[]; } -export interface Knn_Warmup_Response extends ApiResponse { +export type Knn_Warmup_Response = ApiResponse & { body: Knn_Warmup_ResponseBody; } diff --git a/api/ml/createConnector.d.ts b/api/ml/createConnector.d.ts index f980036f9..7a8f66e66 100644 --- a/api/ml/createConnector.d.ts +++ b/api/ml/createConnector.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_CreateConnector_Request extends Global.Params { +export type Ml_CreateConnector_Request = Global.Params & { body?: Ml_Common.CreateConnectorRequest; } -export interface Ml_CreateConnector_Response extends ApiResponse { +export type Ml_CreateConnector_Response = ApiResponse & { body: Ml_CreateConnector_ResponseBody; } -export interface Ml_CreateConnector_ResponseBody { +export type Ml_CreateConnector_ResponseBody = { connector_id?: string; } diff --git a/api/ml/deleteAgent.d.ts b/api/ml/deleteAgent.d.ts index d7a978084..b127d4106 100644 --- a/api/ml/deleteAgent.d.ts +++ b/api/ml/deleteAgent.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ml_DeleteAgent_Request extends Global.Params { +export type Ml_DeleteAgent_Request = Global.Params & { agent_id: string; } -export interface Ml_DeleteAgent_Response extends ApiResponse { +export type Ml_DeleteAgent_Response = ApiResponse & { body: Ml_DeleteAgent_ResponseBody; } diff --git a/api/ml/deleteConnector.d.ts b/api/ml/deleteConnector.d.ts index be960d485..442a9e313 100644 --- a/api/ml/deleteConnector.d.ts +++ b/api/ml/deleteConnector.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ml_DeleteConnector_Request extends Global.Params { +export type Ml_DeleteConnector_Request = Global.Params & { connector_id: string; } -export interface Ml_DeleteConnector_Response extends ApiResponse { +export type Ml_DeleteConnector_Response = ApiResponse & { body: Ml_DeleteConnector_ResponseBody; } diff --git a/api/ml/deleteModel.d.ts b/api/ml/deleteModel.d.ts index e9ed88f23..262baec68 100644 --- a/api/ml/deleteModel.d.ts +++ b/api/ml/deleteModel.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ml_DeleteModel_Request extends Global.Params { +export type Ml_DeleteModel_Request = Global.Params & { model_id: string; } -export interface Ml_DeleteModel_Response extends ApiResponse { +export type Ml_DeleteModel_Response = ApiResponse & { body: Ml_DeleteModel_ResponseBody; } diff --git a/api/ml/deleteModelGroup.d.ts b/api/ml/deleteModelGroup.d.ts index 68bcb10e3..2e15c8f2e 100644 --- a/api/ml/deleteModelGroup.d.ts +++ b/api/ml/deleteModelGroup.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ml_DeleteModelGroup_Request extends Global.Params { +export type Ml_DeleteModelGroup_Request = Global.Params & { model_group_id: string; } -export interface Ml_DeleteModelGroup_Response extends ApiResponse { +export type Ml_DeleteModelGroup_Response = ApiResponse & { body: Ml_DeleteModelGroup_ResponseBody; } diff --git a/api/ml/deleteTask.d.ts b/api/ml/deleteTask.d.ts index 6d34f348d..42b222b98 100644 --- a/api/ml/deleteTask.d.ts +++ b/api/ml/deleteTask.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Ml_DeleteTask_Request extends Global.Params { +export type Ml_DeleteTask_Request = Global.Params & { task_id: string; } -export interface Ml_DeleteTask_Response extends ApiResponse { +export type Ml_DeleteTask_Response = ApiResponse & { body: Ml_DeleteTask_ResponseBody; } diff --git a/api/ml/deployModel.d.ts b/api/ml/deployModel.d.ts index cbe6f2563..e5baf721c 100644 --- a/api/ml/deployModel.d.ts +++ b/api/ml/deployModel.d.ts @@ -17,15 +17,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Ml_DeployModel_Request extends Global.Params { +export type Ml_DeployModel_Request = Global.Params & { model_id: string; } -export interface Ml_DeployModel_Response extends ApiResponse { +export type Ml_DeployModel_Response = ApiResponse & { body: Ml_DeployModel_ResponseBody; } -export interface Ml_DeployModel_ResponseBody { +export type Ml_DeployModel_ResponseBody = { status: string; task_id: string; task_type?: string; diff --git a/api/ml/getModelGroup.d.ts b/api/ml/getModelGroup.d.ts index 00712ba02..21c4f9004 100644 --- a/api/ml/getModelGroup.d.ts +++ b/api/ml/getModelGroup.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_GetModelGroup_Request extends Global.Params { +export type Ml_GetModelGroup_Request = Global.Params & { model_group_id: string; } -export interface Ml_GetModelGroup_Response extends ApiResponse { +export type Ml_GetModelGroup_Response = ApiResponse & { body: Ml_GetModelGroup_ResponseBody; } diff --git a/api/ml/getTask.d.ts b/api/ml/getTask.d.ts index f3e95eb07..6798d3b02 100644 --- a/api/ml/getTask.d.ts +++ b/api/ml/getTask.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_GetTask_Request extends Global.Params { +export type Ml_GetTask_Request = Global.Params & { task_id: string; } -export interface Ml_GetTask_Response extends ApiResponse { +export type Ml_GetTask_Response = ApiResponse & { body: Ml_GetTask_ResponseBody; } diff --git a/api/ml/registerAgents.d.ts b/api/ml/registerAgents.d.ts index 0577cdd5f..d049cbf62 100644 --- a/api/ml/registerAgents.d.ts +++ b/api/ml/registerAgents.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_RegisterAgents_Request extends Global.Params { +export type Ml_RegisterAgents_Request = Global.Params & { body?: Ml_Common.RegisterAgentsRequest; } -export interface Ml_RegisterAgents_Response extends ApiResponse { +export type Ml_RegisterAgents_Response = ApiResponse & { body: Ml_RegisterAgents_ResponseBody; } -export interface Ml_RegisterAgents_ResponseBody { +export type Ml_RegisterAgents_ResponseBody = { agent_id?: string; } diff --git a/api/ml/registerModel.d.ts b/api/ml/registerModel.d.ts index 1b775abc6..cad421486 100644 --- a/api/ml/registerModel.d.ts +++ b/api/ml/registerModel.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Ml_RegisterModel_Request extends Global.Params { +export type Ml_RegisterModel_Request = Global.Params & { body?: Ml_RegisterModel_RequestBody; } -export interface Ml_RegisterModel_RequestBody { +export type Ml_RegisterModel_RequestBody = { description?: string; model_format: 'ONNX' | 'TORCH_SCRIPT'; model_group_id?: string; @@ -29,11 +29,11 @@ export interface Ml_RegisterModel_RequestBody { version: string; } -export interface Ml_RegisterModel_Response extends ApiResponse { +export type Ml_RegisterModel_Response = ApiResponse & { body: Ml_RegisterModel_ResponseBody; } -export interface Ml_RegisterModel_ResponseBody { +export type Ml_RegisterModel_ResponseBody = { status: string; task_id: string; } diff --git a/api/ml/registerModelGroup.d.ts b/api/ml/registerModelGroup.d.ts index fa7edf07b..ea5ebeea0 100644 --- a/api/ml/registerModelGroup.d.ts +++ b/api/ml/registerModelGroup.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_RegisterModelGroup_Request extends Global.Params { +export type Ml_RegisterModelGroup_Request = Global.Params & { body?: Ml_RegisterModelGroup_RequestBody; } -export interface Ml_RegisterModelGroup_RequestBody { +export type Ml_RegisterModelGroup_RequestBody = { access_mode?: 'private' | 'public' | 'restricted'; add_all_backend_roles?: boolean; backend_roles?: string[]; @@ -30,7 +30,7 @@ export interface Ml_RegisterModelGroup_RequestBody { name: string; } -export interface Ml_RegisterModelGroup_Response extends ApiResponse { +export type Ml_RegisterModelGroup_Response = ApiResponse & { body: Ml_RegisterModelGroup_ResponseBody; } diff --git a/api/ml/searchModels.d.ts b/api/ml/searchModels.d.ts index 43a5b74a2..1b45d244b 100644 --- a/api/ml/searchModels.d.ts +++ b/api/ml/searchModels.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_SearchModels_Request extends Global.Params { +export type Ml_SearchModels_Request = Global.Params & { body?: Ml_Common.SearchModelsQuery; } -export interface Ml_SearchModels_Response extends ApiResponse { +export type Ml_SearchModels_Response = ApiResponse & { body: Ml_SearchModels_ResponseBody; } diff --git a/api/ml/undeployModel.d.ts b/api/ml/undeployModel.d.ts index 596508cd8..b454c323b 100644 --- a/api/ml/undeployModel.d.ts +++ b/api/ml/undeployModel.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Ml_Common from '../_types/ml._common' -export interface Ml_UndeployModel_Request extends Global.Params { +export type Ml_UndeployModel_Request = Global.Params & { model_id: string; } -export interface Ml_UndeployModel_Response extends ApiResponse { +export type Ml_UndeployModel_Response = ApiResponse & { body: Ml_UndeployModel_ResponseBody; } diff --git a/api/nodes/hotThreads.d.ts b/api/nodes/hotThreads.d.ts index c78d81b17..e7aa0935c 100644 --- a/api/nodes/hotThreads.d.ts +++ b/api/nodes/hotThreads.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Nodes_Common from '../_types/nodes._common' -export interface Nodes_HotThreads_Request extends Global.Params { +export type Nodes_HotThreads_Request = Global.Params & { ignore_idle_threads?: boolean; interval?: Common.Duration; node_id?: string[]; @@ -29,7 +29,7 @@ export interface Nodes_HotThreads_Request extends Global.Params { type?: Nodes_Common.SampleType; } -export interface Nodes_HotThreads_Response extends ApiResponse { +export type Nodes_HotThreads_Response = ApiResponse & { body: Nodes_HotThreads_ResponseBody; } diff --git a/api/nodes/info.d.ts b/api/nodes/info.d.ts index f867956ee..28f7e64e7 100644 --- a/api/nodes/info.d.ts +++ b/api/nodes/info.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Nodes_Info from '../_types/nodes.info' -export interface Nodes_Info_Request extends Global.Params { +export type Nodes_Info_Request = Global.Params & { flat_settings?: boolean; metric?: Nodes_Info.Metric[]; node_id?: Common.NodeIds; timeout?: Common.Duration; } -export interface Nodes_Info_Response extends ApiResponse { +export type Nodes_Info_Response = ApiResponse & { body: Nodes_Info_ResponseBody; } diff --git a/api/nodes/reloadSecureSettings.d.ts b/api/nodes/reloadSecureSettings.d.ts index c1ac2bd5e..b1f90f67e 100644 --- a/api/nodes/reloadSecureSettings.d.ts +++ b/api/nodes/reloadSecureSettings.d.ts @@ -19,17 +19,17 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Nodes_ReloadSecureSettings from '../_types/nodes.reload_secure_settings' -export interface Nodes_ReloadSecureSettings_Request extends Global.Params { +export type Nodes_ReloadSecureSettings_Request = Global.Params & { body?: Nodes_ReloadSecureSettings_RequestBody; node_id?: Common.NodeIds; timeout?: Common.Duration; } -export interface Nodes_ReloadSecureSettings_RequestBody { +export type Nodes_ReloadSecureSettings_RequestBody = { secure_settings_password?: Common.Password; } -export interface Nodes_ReloadSecureSettings_Response extends ApiResponse { +export type Nodes_ReloadSecureSettings_Response = ApiResponse & { body: Nodes_ReloadSecureSettings_ResponseBody; } diff --git a/api/nodes/stats.d.ts b/api/nodes/stats.d.ts index c650a6db8..474c45d24 100644 --- a/api/nodes/stats.d.ts +++ b/api/nodes/stats.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Nodes_Stats from '../_types/nodes.stats' -export interface Nodes_Stats_Request extends Global.Params { +export type Nodes_Stats_Request = Global.Params & { completion_fields?: Common.Fields; fielddata_fields?: Common.Fields; fields?: Common.Fields; @@ -33,7 +33,7 @@ export interface Nodes_Stats_Request extends Global.Params { types?: string[]; } -export interface Nodes_Stats_Response extends ApiResponse { +export type Nodes_Stats_Response = ApiResponse & { body: Nodes_Stats_ResponseBody; } diff --git a/api/nodes/usage.d.ts b/api/nodes/usage.d.ts index 1f27ab6da..0f406754d 100644 --- a/api/nodes/usage.d.ts +++ b/api/nodes/usage.d.ts @@ -19,13 +19,13 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Nodes_Usage from '../_types/nodes.usage' -export interface Nodes_Usage_Request extends Global.Params { +export type Nodes_Usage_Request = Global.Params & { metric?: Nodes_Usage.Metric[]; node_id?: Common.NodeIds; timeout?: Common.Duration; } -export interface Nodes_Usage_Response extends ApiResponse { +export type Nodes_Usage_Response = ApiResponse & { body: Nodes_Usage_ResponseBody; } diff --git a/api/notifications/createConfig.d.ts b/api/notifications/createConfig.d.ts index 872d1d9e7..a55dabcc2 100644 --- a/api/notifications/createConfig.d.ts +++ b/api/notifications/createConfig.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_CreateConfig_Request extends Global.Params { +export type Notifications_CreateConfig_Request = Global.Params & { body: Notifications_Common.NotificationsConfig; } -export interface Notifications_CreateConfig_Response extends ApiResponse { +export type Notifications_CreateConfig_Response = ApiResponse & { body: Notifications_CreateConfig_ResponseBody; } -export interface Notifications_CreateConfig_ResponseBody { +export type Notifications_CreateConfig_ResponseBody = { config_id?: string; } diff --git a/api/notifications/deleteConfig.d.ts b/api/notifications/deleteConfig.d.ts index 13a4a2c0e..cb17bcc95 100644 --- a/api/notifications/deleteConfig.d.ts +++ b/api/notifications/deleteConfig.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_DeleteConfig_Request extends Global.Params { +export type Notifications_DeleteConfig_Request = Global.Params & { config_id: string; } -export interface Notifications_DeleteConfig_Response extends ApiResponse { +export type Notifications_DeleteConfig_Response = ApiResponse & { body: Notifications_DeleteConfig_ResponseBody; } diff --git a/api/notifications/deleteConfigs.d.ts b/api/notifications/deleteConfigs.d.ts index c64aad408..8a133bc41 100644 --- a/api/notifications/deleteConfigs.d.ts +++ b/api/notifications/deleteConfigs.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_DeleteConfigs_Request extends Global.Params { +export type Notifications_DeleteConfigs_Request = Global.Params & { config_id: string; config_id_list?: string; } -export interface Notifications_DeleteConfigs_Response extends ApiResponse { +export type Notifications_DeleteConfigs_Response = ApiResponse & { body: Notifications_DeleteConfigs_ResponseBody; } diff --git a/api/notifications/getConfig.d.ts b/api/notifications/getConfig.d.ts index 78322cecd..fbb316104 100644 --- a/api/notifications/getConfig.d.ts +++ b/api/notifications/getConfig.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_GetConfig_Request extends Global.Params { +export type Notifications_GetConfig_Request = Global.Params & { config_id: string; } -export interface Notifications_GetConfig_Response extends ApiResponse { +export type Notifications_GetConfig_Response = ApiResponse & { body: Notifications_GetConfig_ResponseBody; } diff --git a/api/notifications/getConfigs.d.ts b/api/notifications/getConfigs.d.ts index 51decd55e..88bcb8de7 100644 --- a/api/notifications/getConfigs.d.ts +++ b/api/notifications/getConfigs.d.ts @@ -18,10 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_GetConfigs_Request extends Global.Params { +export type Notifications_GetConfigs_Request = Global.Params & { body?: Notifications_GetConfigs_RequestBody; 'chime.url'?: string; 'chime.url.keyword'?: string; + config_id?: string; + config_id_list?: string[]; config_type?: Notifications_Common.NotificationConfigType; created_time_ms?: number; description?: string; @@ -60,7 +62,7 @@ export interface Notifications_GetConfigs_Request extends Global.Params { 'webhook.url.keyword'?: string; } -export interface Notifications_GetConfigs_RequestBody { +export type Notifications_GetConfigs_RequestBody = { config_id_list?: string[]; from_index?: number; max_items?: number; @@ -68,7 +70,7 @@ export interface Notifications_GetConfigs_RequestBody { sort_order?: string; } -export interface Notifications_GetConfigs_Response extends ApiResponse { +export type Notifications_GetConfigs_Response = ApiResponse & { body: Notifications_GetConfigs_ResponseBody; } diff --git a/api/notifications/getConfigs.js b/api/notifications/getConfigs.js index 796f68ae0..1e3ed9217 100644 --- a/api/notifications/getConfigs.js +++ b/api/notifications/getConfigs.js @@ -27,6 +27,8 @@ const { normalizeArguments } = require('../utils'); * @param {object} [params] * @param {string} [params.chime.url] * @param {string} [params.chime.url.keyword] + * @param {string} [params.config_id] - Notification configuration ID. + * @param {array} [params.config_id_list] - Notification configuration IDs. * @param {string} [params.config_type] - Type of notification configuration. * @param {number} [params.created_time_ms] * @param {string} [params.description] diff --git a/api/notifications/listChannels.d.ts b/api/notifications/listChannels.d.ts index bf94bed02..dbf71018e 100644 --- a/api/notifications/listChannels.d.ts +++ b/api/notifications/listChannels.d.ts @@ -20,11 +20,11 @@ import * as Notifications_Common from '../_types/notifications._common' export type Notifications_ListChannels_Request = Global.Params & Record -export interface Notifications_ListChannels_Response extends ApiResponse { +export type Notifications_ListChannels_Response = ApiResponse & { body: Notifications_ListChannels_ResponseBody; } -export interface Notifications_ListChannels_ResponseBody { +export type Notifications_ListChannels_ResponseBody = { channel_list?: Notifications_Common.NotificationChannel[]; start_index?: number; total_hit_relation?: Notifications_Common.TotalHitRelation; diff --git a/api/notifications/listFeatures.d.ts b/api/notifications/listFeatures.d.ts index abfb5a723..f81dd253f 100644 --- a/api/notifications/listFeatures.d.ts +++ b/api/notifications/listFeatures.d.ts @@ -20,11 +20,11 @@ import * as Notifications_Common from '../_types/notifications._common' export type Notifications_ListFeatures_Request = Global.Params & Record -export interface Notifications_ListFeatures_Response extends ApiResponse { +export type Notifications_ListFeatures_Response = ApiResponse & { body: Notifications_ListFeatures_ResponseBody; } -export interface Notifications_ListFeatures_ResponseBody { +export type Notifications_ListFeatures_ResponseBody = { allowed_config_type_list?: Notifications_Common.NotificationConfigType[]; plugin_features?: Notifications_Common.NotificationsPluginFeaturesMap; } diff --git a/api/notifications/sendTest.d.ts b/api/notifications/sendTest.d.ts index ae04f2bef..f281b06da 100644 --- a/api/notifications/sendTest.d.ts +++ b/api/notifications/sendTest.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_SendTest_Request extends Global.Params { +export type Notifications_SendTest_Request = Global.Params & { config_id: string; } -export interface Notifications_SendTest_Response extends ApiResponse { +export type Notifications_SendTest_Response = ApiResponse & { body: Notifications_SendTest_ResponseBody; } -export interface Notifications_SendTest_ResponseBody { +export type Notifications_SendTest_ResponseBody = { event_source?: Notifications_Common.EventSource; status_list?: Notifications_Common.EventStatus[]; } diff --git a/api/notifications/updateConfig.d.ts b/api/notifications/updateConfig.d.ts index 82d79ee14..9f19abbbc 100644 --- a/api/notifications/updateConfig.d.ts +++ b/api/notifications/updateConfig.d.ts @@ -18,16 +18,16 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Notifications_Common from '../_types/notifications._common' -export interface Notifications_UpdateConfig_Request extends Global.Params { +export type Notifications_UpdateConfig_Request = Global.Params & { body: Notifications_Common.NotificationsConfig; config_id: string; } -export interface Notifications_UpdateConfig_Response extends ApiResponse { +export type Notifications_UpdateConfig_Response = ApiResponse & { body: Notifications_UpdateConfig_ResponseBody; } -export interface Notifications_UpdateConfig_ResponseBody { +export type Notifications_UpdateConfig_ResponseBody = { config_id?: string; } diff --git a/api/observability/createObject.d.ts b/api/observability/createObject.d.ts index 0e7e3dbf0..63dfa74ab 100644 --- a/api/observability/createObject.d.ts +++ b/api/observability/createObject.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Observability_Common from '../_types/observability._common' -export interface Observability_CreateObject_Request extends Global.Params { +export type Observability_CreateObject_Request = Global.Params & { body?: Observability_Common.ObservabilityObject; } -export interface Observability_CreateObject_Response extends ApiResponse { +export type Observability_CreateObject_Response = ApiResponse & { body: Observability_CreateObject_ResponseBody; } -export interface Observability_CreateObject_ResponseBody { +export type Observability_CreateObject_ResponseBody = { objectId?: string; } diff --git a/api/observability/deleteObject.d.ts b/api/observability/deleteObject.d.ts index 55d7deab2..b5c356b87 100644 --- a/api/observability/deleteObject.d.ts +++ b/api/observability/deleteObject.d.ts @@ -17,15 +17,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Observability_DeleteObject_Request extends Global.Params { +export type Observability_DeleteObject_Request = Global.Params & { object_id: string; } -export interface Observability_DeleteObject_Response extends ApiResponse { +export type Observability_DeleteObject_Response = ApiResponse & { body: Observability_DeleteObject_ResponseBody; } -export interface Observability_DeleteObject_ResponseBody { +export type Observability_DeleteObject_ResponseBody = { deleteResponseList?: Record; } diff --git a/api/observability/deleteObjects.d.ts b/api/observability/deleteObjects.d.ts index c8a364c54..db5631302 100644 --- a/api/observability/deleteObjects.d.ts +++ b/api/observability/deleteObjects.d.ts @@ -17,16 +17,16 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Observability_DeleteObjects_Request extends Global.Params { +export type Observability_DeleteObjects_Request = Global.Params & { objectId?: string; objectIdList?: string; } -export interface Observability_DeleteObjects_Response extends ApiResponse { +export type Observability_DeleteObjects_Response = ApiResponse & { body: Observability_DeleteObjects_ResponseBody; } -export interface Observability_DeleteObjects_ResponseBody { +export type Observability_DeleteObjects_ResponseBody = { deleteResponseList?: Record; } diff --git a/api/observability/getLocalstats.d.ts b/api/observability/getLocalstats.d.ts index df6df9716..99d97e88d 100644 --- a/api/observability/getLocalstats.d.ts +++ b/api/observability/getLocalstats.d.ts @@ -19,7 +19,7 @@ import * as Global from '../_types/_global' export type Observability_GetLocalstats_Request = Global.Params & Record -export interface Observability_GetLocalstats_Response extends ApiResponse { +export type Observability_GetLocalstats_Response = ApiResponse & { body: Observability_GetLocalstats_ResponseBody; } diff --git a/api/observability/getObject.d.ts b/api/observability/getObject.d.ts index 735e4f2f4..886a61350 100644 --- a/api/observability/getObject.d.ts +++ b/api/observability/getObject.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Observability_Common from '../_types/observability._common' -export interface Observability_GetObject_Request extends Global.Params { +export type Observability_GetObject_Request = Global.Params & { object_id: string; } -export interface Observability_GetObject_Response extends ApiResponse { +export type Observability_GetObject_Response = ApiResponse & { body: Observability_GetObject_ResponseBody; } diff --git a/api/observability/listObjects.d.ts b/api/observability/listObjects.d.ts index f558377cd..fba76b043 100644 --- a/api/observability/listObjects.d.ts +++ b/api/observability/listObjects.d.ts @@ -20,7 +20,7 @@ import * as Observability_Common from '../_types/observability._common' export type Observability_ListObjects_Request = Global.Params & Record -export interface Observability_ListObjects_Response extends ApiResponse { +export type Observability_ListObjects_Response = ApiResponse & { body: Observability_ListObjects_ResponseBody; } diff --git a/api/observability/updateObject.d.ts b/api/observability/updateObject.d.ts index d785e625c..618818a02 100644 --- a/api/observability/updateObject.d.ts +++ b/api/observability/updateObject.d.ts @@ -18,16 +18,16 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Observability_Common from '../_types/observability._common' -export interface Observability_UpdateObject_Request extends Global.Params { +export type Observability_UpdateObject_Request = Global.Params & { body?: Observability_Common.ObservabilityObject; object_id: string; } -export interface Observability_UpdateObject_Response extends ApiResponse { +export type Observability_UpdateObject_Response = ApiResponse & { body: Observability_UpdateObject_ResponseBody; } -export interface Observability_UpdateObject_ResponseBody { +export type Observability_UpdateObject_ResponseBody = { objectId?: string; } diff --git a/api/ppl/explain.d.ts b/api/ppl/explain.d.ts index a2a154a15..9d6f8d807 100644 --- a/api/ppl/explain.d.ts +++ b/api/ppl/explain.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Ppl_Explain_Request extends Global.Params { +export type Ppl_Explain_Request = Global.Params & { body: Sql_Common.Explain; format?: string; sanitize?: boolean; } -export interface Ppl_Explain_Response extends ApiResponse { +export type Ppl_Explain_Response = ApiResponse & { body: Ppl_Explain_ResponseBody; } diff --git a/api/ppl/getStats.d.ts b/api/ppl/getStats.d.ts index 9350ec798..73bb9de27 100644 --- a/api/ppl/getStats.d.ts +++ b/api/ppl/getStats.d.ts @@ -17,12 +17,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Ppl_GetStats_Request extends Global.Params { +export type Ppl_GetStats_Request = Global.Params & { format?: string; sanitize?: boolean; } -export interface Ppl_GetStats_Response extends ApiResponse { +export type Ppl_GetStats_Response = ApiResponse & { body: Ppl_GetStats_ResponseBody; } diff --git a/api/ppl/postStats.d.ts b/api/ppl/postStats.d.ts index 04abd91cf..a6a0042d9 100644 --- a/api/ppl/postStats.d.ts +++ b/api/ppl/postStats.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Ppl_PostStats_Request extends Global.Params { +export type Ppl_PostStats_Request = Global.Params & { body: Sql_Common.Stats; format?: string; sanitize?: boolean; } -export interface Ppl_PostStats_Response extends ApiResponse { +export type Ppl_PostStats_Response = ApiResponse & { body: Ppl_PostStats_ResponseBody; } diff --git a/api/ppl/query.d.ts b/api/ppl/query.d.ts index db4c86e8c..0fdb4749b 100644 --- a/api/ppl/query.d.ts +++ b/api/ppl/query.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Ppl_Query_Request extends Global.Params { +export type Ppl_Query_Request = Global.Params & { body: Sql_Common.Query; format?: string; sanitize?: boolean; } -export interface Ppl_Query_Response extends ApiResponse { +export type Ppl_Query_Response = ApiResponse & { body: Ppl_Query_ResponseBody; } diff --git a/api/query/datasourceDelete.d.ts b/api/query/datasourceDelete.d.ts index 6079c1a2f..4d88440ae 100644 --- a/api/query/datasourceDelete.d.ts +++ b/api/query/datasourceDelete.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Query_DatasourceDelete_Request extends Global.Params { +export type Query_DatasourceDelete_Request = Global.Params & { datasource_name: string; } -export interface Query_DatasourceDelete_Response extends ApiResponse { +export type Query_DatasourceDelete_Response = ApiResponse & { body: Query_DatasourceDelete_ResponseBody; } diff --git a/api/query/datasourceRetrieve.d.ts b/api/query/datasourceRetrieve.d.ts index a100080b4..d67b9d566 100644 --- a/api/query/datasourceRetrieve.d.ts +++ b/api/query/datasourceRetrieve.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Query_Common from '../_types/query._common' -export interface Query_DatasourceRetrieve_Request extends Global.Params { +export type Query_DatasourceRetrieve_Request = Global.Params & { datasource_name: string; } -export interface Query_DatasourceRetrieve_Response extends ApiResponse { +export type Query_DatasourceRetrieve_Response = ApiResponse & { body: Query_DatasourceRetrieve_ResponseBody; } diff --git a/api/query/datasourcesCreate.d.ts b/api/query/datasourcesCreate.d.ts index 3b01a716f..45dac1535 100644 --- a/api/query/datasourcesCreate.d.ts +++ b/api/query/datasourcesCreate.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Query_Common from '../_types/query._common' -export interface Query_DatasourcesCreate_Request extends Global.Params { +export type Query_DatasourcesCreate_Request = Global.Params & { body?: Query_Common.DataSource; } -export interface Query_DatasourcesCreate_Response extends ApiResponse { +export type Query_DatasourcesCreate_Response = ApiResponse & { body: Query_DatasourcesCreate_ResponseBody; } diff --git a/api/query/datasourcesList.d.ts b/api/query/datasourcesList.d.ts index ce090304f..0d928d582 100644 --- a/api/query/datasourcesList.d.ts +++ b/api/query/datasourcesList.d.ts @@ -20,7 +20,7 @@ import * as Query_Common from '../_types/query._common' export type Query_DatasourcesList_Request = Global.Params & Record -export interface Query_DatasourcesList_Response extends ApiResponse { +export type Query_DatasourcesList_Response = ApiResponse & { body: Query_DatasourcesList_ResponseBody; } diff --git a/api/query/datasourcesUpdate.d.ts b/api/query/datasourcesUpdate.d.ts index ac0dd49c3..db7c76e7c 100644 --- a/api/query/datasourcesUpdate.d.ts +++ b/api/query/datasourcesUpdate.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Query_Common from '../_types/query._common' -export interface Query_DatasourcesUpdate_Request extends Global.Params { +export type Query_DatasourcesUpdate_Request = Global.Params & { body?: Query_Common.DataSource; } -export interface Query_DatasourcesUpdate_Response extends ApiResponse { +export type Query_DatasourcesUpdate_Response = ApiResponse & { body: Query_DatasourcesUpdate_ResponseBody; } diff --git a/api/remoteStore/restore.d.ts b/api/remoteStore/restore.d.ts index 9c5694857..bd635ea7b 100644 --- a/api/remoteStore/restore.d.ts +++ b/api/remoteStore/restore.d.ts @@ -19,21 +19,21 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as RemoteStore_Common from '../_types/remote_store._common' -export interface RemoteStore_Restore_Request extends Global.Params { +export type RemoteStore_Restore_Request = Global.Params & { body: RemoteStore_Restore_RequestBody; cluster_manager_timeout?: Common.Duration; wait_for_completion?: boolean; } -export interface RemoteStore_Restore_RequestBody { +export type RemoteStore_Restore_RequestBody = { indices: string[]; } -export interface RemoteStore_Restore_Response extends ApiResponse { +export type RemoteStore_Restore_Response = ApiResponse & { body: RemoteStore_Restore_ResponseBody; } -export interface RemoteStore_Restore_ResponseBody { +export type RemoteStore_Restore_ResponseBody = { accepted?: boolean; remote_store?: RemoteStore_Common.RemoteStoreRestoreInfo; } diff --git a/api/rollups/delete.d.ts b/api/rollups/delete.d.ts index 9d371d5da..1911d06b4 100644 --- a/api/rollups/delete.d.ts +++ b/api/rollups/delete.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Rollups_Delete_Request extends Global.Params { +export type Rollups_Delete_Request = Global.Params & { id: Common.Id; } -export interface Rollups_Delete_Response extends ApiResponse { +export type Rollups_Delete_Response = ApiResponse & { body: Rollups_Delete_ResponseBody; } diff --git a/api/rollups/explain.d.ts b/api/rollups/explain.d.ts index fceacb6e0..782a9637d 100644 --- a/api/rollups/explain.d.ts +++ b/api/rollups/explain.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Rollups_Common from '../_types/rollups._common' -export interface Rollups_Explain_Request extends Global.Params { +export type Rollups_Explain_Request = Global.Params & { id: Common.Id; } -export interface Rollups_Explain_Response extends ApiResponse { +export type Rollups_Explain_Response = ApiResponse & { body: Rollups_Explain_ResponseBody; } diff --git a/api/rollups/get.d.ts b/api/rollups/get.d.ts index 1d23b878d..502ec887f 100644 --- a/api/rollups/get.d.ts +++ b/api/rollups/get.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Rollups_Common from '../_types/rollups._common' -export interface Rollups_Get_Request extends Global.Params { +export type Rollups_Get_Request = Global.Params & { id: Common.Id; } -export interface Rollups_Get_Response extends ApiResponse { +export type Rollups_Get_Response = ApiResponse & { body: Rollups_Get_ResponseBody; } diff --git a/api/rollups/put.d.ts b/api/rollups/put.d.ts index 5ab2c1a3b..aff4e3704 100644 --- a/api/rollups/put.d.ts +++ b/api/rollups/put.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Rollups_Common from '../_types/rollups._common' -export interface Rollups_Put_Request extends Global.Params { +export type Rollups_Put_Request = Global.Params & { body?: Rollups_Common.RollupEntity; id: Common.Id; if_primary_term?: number; if_seq_no?: Common.SequenceNumber; } -export interface Rollups_Put_Response extends ApiResponse { +export type Rollups_Put_Response = ApiResponse & { body: Rollups_Put_ResponseBody; } diff --git a/api/rollups/start.d.ts b/api/rollups/start.d.ts index 083e68922..cafdb554f 100644 --- a/api/rollups/start.d.ts +++ b/api/rollups/start.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Rollups_Start_Request extends Global.Params { +export type Rollups_Start_Request = Global.Params & { id: Common.Id; } -export interface Rollups_Start_Response extends ApiResponse { +export type Rollups_Start_Response = ApiResponse & { body: Rollups_Start_ResponseBody; } diff --git a/api/rollups/stop.d.ts b/api/rollups/stop.d.ts index f16bf35b6..fd77ca176 100644 --- a/api/rollups/stop.d.ts +++ b/api/rollups/stop.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Rollups_Stop_Request extends Global.Params { +export type Rollups_Stop_Request = Global.Params & { id: Common.Id; } -export interface Rollups_Stop_Response extends ApiResponse { +export type Rollups_Stop_Response = ApiResponse & { body: Rollups_Stop_ResponseBody; } diff --git a/api/searchPipeline/delete.d.ts b/api/searchPipeline/delete.d.ts index 7eef278e4..997a2613e 100644 --- a/api/searchPipeline/delete.d.ts +++ b/api/searchPipeline/delete.d.ts @@ -18,17 +18,17 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface SearchPipeline_Delete_Request extends Global.Params { +export type SearchPipeline_Delete_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id: string; timeout?: Common.Duration; } -export interface SearchPipeline_Delete_Response extends ApiResponse { +export type SearchPipeline_Delete_Response = ApiResponse & { body: SearchPipeline_Delete_ResponseBody; } -export interface SearchPipeline_Delete_ResponseBody { +export type SearchPipeline_Delete_ResponseBody = { acknowledged?: boolean; } diff --git a/api/searchPipeline/get.d.ts b/api/searchPipeline/get.d.ts index 08290e14a..d5c7662a1 100644 --- a/api/searchPipeline/get.d.ts +++ b/api/searchPipeline/get.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as SearchPipeline_Common from '../_types/search_pipeline._common' -export interface SearchPipeline_Get_Request extends Global.Params { +export type SearchPipeline_Get_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; id?: string; } -export interface SearchPipeline_Get_Response extends ApiResponse { +export type SearchPipeline_Get_Response = ApiResponse & { body: SearchPipeline_Get_ResponseBody; } diff --git a/api/searchPipeline/put.d.ts b/api/searchPipeline/put.d.ts index 224c4d875..1719a3d60 100644 --- a/api/searchPipeline/put.d.ts +++ b/api/searchPipeline/put.d.ts @@ -19,18 +19,18 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as SearchPipeline_Common from '../_types/search_pipeline._common' -export interface SearchPipeline_Put_Request extends Global.Params { +export type SearchPipeline_Put_Request = Global.Params & { body: SearchPipeline_Common.SearchPipelineStructure; cluster_manager_timeout?: Common.Duration; id: string; timeout?: Common.Duration; } -export interface SearchPipeline_Put_Response extends ApiResponse { +export type SearchPipeline_Put_Response = ApiResponse & { body: SearchPipeline_Put_ResponseBody; } -export interface SearchPipeline_Put_ResponseBody { +export type SearchPipeline_Put_ResponseBody = { acknowledged?: boolean; } diff --git a/api/security/authinfo.d.ts b/api/security/authinfo.d.ts index 67c884f2c..98ef1a804 100644 --- a/api/security/authinfo.d.ts +++ b/api/security/authinfo.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_Authinfo_Request extends Global.Params { +export type Security_Authinfo_Request = Global.Params & { auth_type?: string; verbose?: boolean; } -export interface Security_Authinfo_Response extends ApiResponse { +export type Security_Authinfo_Response = ApiResponse & { body: Security_Authinfo_ResponseBody; } diff --git a/api/security/authtoken.d.ts b/api/security/authtoken.d.ts index 855186211..a8471b769 100644 --- a/api/security/authtoken.d.ts +++ b/api/security/authtoken.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_Authtoken_Request = Global.Params & Record -export interface Security_Authtoken_Response extends ApiResponse { +export type Security_Authtoken_Response = ApiResponse & { body: Security_Authtoken_ResponseBody; } diff --git a/api/security/changePassword.d.ts b/api/security/changePassword.d.ts index 3e19786cf..f93370e63 100644 --- a/api/security/changePassword.d.ts +++ b/api/security/changePassword.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_ChangePassword_Request extends Global.Params { +export type Security_ChangePassword_Request = Global.Params & { body: Security_Common.ChangePasswordRequestContent; } -export interface Security_ChangePassword_Response extends ApiResponse { +export type Security_ChangePassword_Response = ApiResponse & { body: Security_ChangePassword_ResponseBody; } diff --git a/api/security/configUpgradeCheck.d.ts b/api/security/configUpgradeCheck.d.ts index 6f89e60cd..6ceef96e7 100644 --- a/api/security/configUpgradeCheck.d.ts +++ b/api/security/configUpgradeCheck.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_ConfigUpgradeCheck_Request = Global.Params & Record -export interface Security_ConfigUpgradeCheck_Response extends ApiResponse { +export type Security_ConfigUpgradeCheck_Response = ApiResponse & { body: Security_ConfigUpgradeCheck_ResponseBody; } diff --git a/api/security/configUpgradePerform.d.ts b/api/security/configUpgradePerform.d.ts index 605aa90be..f946d2d13 100644 --- a/api/security/configUpgradePerform.d.ts +++ b/api/security/configUpgradePerform.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_ConfigUpgradePerform_Request extends Global.Params { +export type Security_ConfigUpgradePerform_Request = Global.Params & { body?: Security_Common.ConfigUpgradePayload; } -export interface Security_ConfigUpgradePerform_Response extends ApiResponse { +export type Security_ConfigUpgradePerform_Response = ApiResponse & { body: Security_ConfigUpgradePerform_ResponseBody; } diff --git a/api/security/createActionGroup.d.ts b/api/security/createActionGroup.d.ts index 2defe7516..1f5e15373 100644 --- a/api/security/createActionGroup.d.ts +++ b/api/security/createActionGroup.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateActionGroup_Request extends Global.Params { +export type Security_CreateActionGroup_Request = Global.Params & { action_group: string; body: Security_Common.ActionGroup; } -export interface Security_CreateActionGroup_Response extends ApiResponse { +export type Security_CreateActionGroup_Response = ApiResponse & { body: Security_CreateActionGroup_ResponseBody; } diff --git a/api/security/createAllowlist.d.ts b/api/security/createAllowlist.d.ts index b9bb2e2a2..29cdae6f9 100644 --- a/api/security/createAllowlist.d.ts +++ b/api/security/createAllowlist.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateAllowlist_Request extends Global.Params { +export type Security_CreateAllowlist_Request = Global.Params & { body: Security_Common.AllowListConfig; } -export interface Security_CreateAllowlist_Response extends ApiResponse { +export type Security_CreateAllowlist_Response = ApiResponse & { body: Security_CreateAllowlist_ResponseBody; } diff --git a/api/security/createRole.d.ts b/api/security/createRole.d.ts index f76bdac26..ae906b995 100644 --- a/api/security/createRole.d.ts +++ b/api/security/createRole.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateRole_Request extends Global.Params { +export type Security_CreateRole_Request = Global.Params & { body: Security_Common.Role; role: string; } -export interface Security_CreateRole_Response extends ApiResponse { +export type Security_CreateRole_Response = ApiResponse & { body: Security_CreateRole_ResponseBody; } diff --git a/api/security/createRoleMapping.d.ts b/api/security/createRoleMapping.d.ts index bcf1588f9..5a7cd8ea5 100644 --- a/api/security/createRoleMapping.d.ts +++ b/api/security/createRoleMapping.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateRoleMapping_Request extends Global.Params { +export type Security_CreateRoleMapping_Request = Global.Params & { body: Security_Common.RoleMapping; role: string; } -export interface Security_CreateRoleMapping_Response extends ApiResponse { +export type Security_CreateRoleMapping_Response = ApiResponse & { body: Security_CreateRoleMapping_ResponseBody; } diff --git a/api/security/createTenant.d.ts b/api/security/createTenant.d.ts index e347b6c39..8316ef9de 100644 --- a/api/security/createTenant.d.ts +++ b/api/security/createTenant.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateTenant_Request extends Global.Params { +export type Security_CreateTenant_Request = Global.Params & { body: Security_Common.CreateTenantParams; tenant: string; } -export interface Security_CreateTenant_Response extends ApiResponse { +export type Security_CreateTenant_Response = ApiResponse & { body: Security_CreateTenant_ResponseBody; } diff --git a/api/security/createUpdateTenancyConfig.d.ts b/api/security/createUpdateTenancyConfig.d.ts index 5402b421d..19a0c8762 100644 --- a/api/security/createUpdateTenancyConfig.d.ts +++ b/api/security/createUpdateTenancyConfig.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateUpdateTenancyConfig_Request extends Global.Params { +export type Security_CreateUpdateTenancyConfig_Request = Global.Params & { body: Security_Common.MultiTenancyConfig; } -export interface Security_CreateUpdateTenancyConfig_Response extends ApiResponse { +export type Security_CreateUpdateTenancyConfig_Response = ApiResponse & { body: Security_CreateUpdateTenancyConfig_ResponseBody; } diff --git a/api/security/createUser.d.ts b/api/security/createUser.d.ts index 0bb03c598..331b969db 100644 --- a/api/security/createUser.d.ts +++ b/api/security/createUser.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateUser_Request extends Global.Params { +export type Security_CreateUser_Request = Global.Params & { body: Security_Common.User; username: string; } -export interface Security_CreateUser_Response extends ApiResponse { +export type Security_CreateUser_Response = ApiResponse & { body: Security_CreateUser_ResponseBody; } diff --git a/api/security/createUserLegacy.d.ts b/api/security/createUserLegacy.d.ts index 798ce6a6a..6f059b576 100644 --- a/api/security/createUserLegacy.d.ts +++ b/api/security/createUserLegacy.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_CreateUserLegacy_Request extends Global.Params { +export type Security_CreateUserLegacy_Request = Global.Params & { body: Security_Common.User; username: string; } -export interface Security_CreateUserLegacy_Response extends ApiResponse { +export type Security_CreateUserLegacy_Response = ApiResponse & { body: Security_CreateUserLegacy_ResponseBody; } diff --git a/api/security/deleteActionGroup.d.ts b/api/security/deleteActionGroup.d.ts index d28e16e0d..b733e5685 100644 --- a/api/security/deleteActionGroup.d.ts +++ b/api/security/deleteActionGroup.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteActionGroup_Request extends Global.Params { +export type Security_DeleteActionGroup_Request = Global.Params & { action_group: string; } -export interface Security_DeleteActionGroup_Response extends ApiResponse { +export type Security_DeleteActionGroup_Response = ApiResponse & { body: Security_DeleteActionGroup_ResponseBody; } diff --git a/api/security/deleteDistinguishedName.d.ts b/api/security/deleteDistinguishedName.d.ts index 1a6f57bd3..ffa8d92c2 100644 --- a/api/security/deleteDistinguishedName.d.ts +++ b/api/security/deleteDistinguishedName.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteDistinguishedName_Request extends Global.Params { +export type Security_DeleteDistinguishedName_Request = Global.Params & { cluster_name: string; } -export interface Security_DeleteDistinguishedName_Response extends ApiResponse { +export type Security_DeleteDistinguishedName_Response = ApiResponse & { body: Security_DeleteDistinguishedName_ResponseBody; } diff --git a/api/security/deleteRole.d.ts b/api/security/deleteRole.d.ts index cfb434652..e1e6564fb 100644 --- a/api/security/deleteRole.d.ts +++ b/api/security/deleteRole.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteRole_Request extends Global.Params { +export type Security_DeleteRole_Request = Global.Params & { role: string; } -export interface Security_DeleteRole_Response extends ApiResponse { +export type Security_DeleteRole_Response = ApiResponse & { body: Security_DeleteRole_ResponseBody; } diff --git a/api/security/deleteRoleMapping.d.ts b/api/security/deleteRoleMapping.d.ts index 531e94806..56cd5c341 100644 --- a/api/security/deleteRoleMapping.d.ts +++ b/api/security/deleteRoleMapping.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteRoleMapping_Request extends Global.Params { +export type Security_DeleteRoleMapping_Request = Global.Params & { role: string; } -export interface Security_DeleteRoleMapping_Response extends ApiResponse { +export type Security_DeleteRoleMapping_Response = ApiResponse & { body: Security_DeleteRoleMapping_ResponseBody; } diff --git a/api/security/deleteTenant.d.ts b/api/security/deleteTenant.d.ts index 0326614e4..f52f081ec 100644 --- a/api/security/deleteTenant.d.ts +++ b/api/security/deleteTenant.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteTenant_Request extends Global.Params { +export type Security_DeleteTenant_Request = Global.Params & { tenant: string; } -export interface Security_DeleteTenant_Response extends ApiResponse { +export type Security_DeleteTenant_Response = ApiResponse & { body: Security_DeleteTenant_ResponseBody; } diff --git a/api/security/deleteUser.d.ts b/api/security/deleteUser.d.ts index 14747f366..65eddb8b3 100644 --- a/api/security/deleteUser.d.ts +++ b/api/security/deleteUser.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteUser_Request extends Global.Params { +export type Security_DeleteUser_Request = Global.Params & { username: string; } -export interface Security_DeleteUser_Response extends ApiResponse { +export type Security_DeleteUser_Response = ApiResponse & { body: Security_DeleteUser_ResponseBody; } diff --git a/api/security/deleteUserLegacy.d.ts b/api/security/deleteUserLegacy.d.ts index 6be5df5fc..96dcb5985 100644 --- a/api/security/deleteUserLegacy.d.ts +++ b/api/security/deleteUserLegacy.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_DeleteUserLegacy_Request extends Global.Params { +export type Security_DeleteUserLegacy_Request = Global.Params & { username: string; } -export interface Security_DeleteUserLegacy_Response extends ApiResponse { +export type Security_DeleteUserLegacy_Response = ApiResponse & { body: Security_DeleteUserLegacy_ResponseBody; } diff --git a/api/security/flushCache.d.ts b/api/security/flushCache.d.ts index 7af03dd1a..27b676dd7 100644 --- a/api/security/flushCache.d.ts +++ b/api/security/flushCache.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_FlushCache_Request = Global.Params & Record -export interface Security_FlushCache_Response extends ApiResponse { +export type Security_FlushCache_Response = ApiResponse & { body: Security_FlushCache_ResponseBody; } diff --git a/api/security/generateOboToken.d.ts b/api/security/generateOboToken.d.ts index 0e6e365b5..d179c8124 100644 --- a/api/security/generateOboToken.d.ts +++ b/api/security/generateOboToken.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GenerateOboToken_Request extends Global.Params { +export type Security_GenerateOboToken_Request = Global.Params & { body: Security_Common.OBOToken; } -export interface Security_GenerateOboToken_Response extends ApiResponse { +export type Security_GenerateOboToken_Response = ApiResponse & { body: Security_GenerateOboToken_ResponseBody; } diff --git a/api/security/generateUserToken.d.ts b/api/security/generateUserToken.d.ts index 5bc5cc76f..8fed5c5f6 100644 --- a/api/security/generateUserToken.d.ts +++ b/api/security/generateUserToken.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GenerateUserToken_Request extends Global.Params { +export type Security_GenerateUserToken_Request = Global.Params & { username: string; } -export interface Security_GenerateUserToken_Response extends ApiResponse { +export type Security_GenerateUserToken_Response = ApiResponse & { body: Security_GenerateUserToken_ResponseBody; } diff --git a/api/security/generateUserTokenLegacy.d.ts b/api/security/generateUserTokenLegacy.d.ts index 53187dad7..312dcaf42 100644 --- a/api/security/generateUserTokenLegacy.d.ts +++ b/api/security/generateUserTokenLegacy.d.ts @@ -17,11 +17,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Security_GenerateUserTokenLegacy_Request extends Global.Params { +export type Security_GenerateUserTokenLegacy_Request = Global.Params & { username: string; } -export interface Security_GenerateUserTokenLegacy_Response extends ApiResponse { +export type Security_GenerateUserTokenLegacy_Response = ApiResponse & { body: Security_GenerateUserTokenLegacy_ResponseBody; } diff --git a/api/security/getAccountDetails.d.ts b/api/security/getAccountDetails.d.ts index 129700e20..d5a010f48 100644 --- a/api/security/getAccountDetails.d.ts +++ b/api/security/getAccountDetails.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetAccountDetails_Request = Global.Params & Record -export interface Security_GetAccountDetails_Response extends ApiResponse { +export type Security_GetAccountDetails_Response = ApiResponse & { body: Security_GetAccountDetails_ResponseBody; } diff --git a/api/security/getActionGroup.d.ts b/api/security/getActionGroup.d.ts index f17fb75a0..177962e81 100644 --- a/api/security/getActionGroup.d.ts +++ b/api/security/getActionGroup.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetActionGroup_Request extends Global.Params { +export type Security_GetActionGroup_Request = Global.Params & { action_group: string; } -export interface Security_GetActionGroup_Response extends ApiResponse { +export type Security_GetActionGroup_Response = ApiResponse & { body: Security_GetActionGroup_ResponseBody; } diff --git a/api/security/getActionGroups.d.ts b/api/security/getActionGroups.d.ts index 2d31cc676..9e3fd4785 100644 --- a/api/security/getActionGroups.d.ts +++ b/api/security/getActionGroups.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetActionGroups_Request = Global.Params & Record -export interface Security_GetActionGroups_Response extends ApiResponse { +export type Security_GetActionGroups_Response = ApiResponse & { body: Security_GetActionGroups_ResponseBody; } diff --git a/api/security/getAllCertificates.d.ts b/api/security/getAllCertificates.d.ts index aacf9c611..4d23e9e5b 100644 --- a/api/security/getAllCertificates.d.ts +++ b/api/security/getAllCertificates.d.ts @@ -19,12 +19,12 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetAllCertificates_Request extends Global.Params { +export type Security_GetAllCertificates_Request = Global.Params & { cert_type?: string; timeout?: Common.Duration; } -export interface Security_GetAllCertificates_Response extends ApiResponse { +export type Security_GetAllCertificates_Response = ApiResponse & { body: Security_GetAllCertificates_ResponseBody; } diff --git a/api/security/getAllowlist.d.ts b/api/security/getAllowlist.d.ts index 1a2d5950a..df22bc5b7 100644 --- a/api/security/getAllowlist.d.ts +++ b/api/security/getAllowlist.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetAllowlist_Request = Global.Params & Record -export interface Security_GetAllowlist_Response extends ApiResponse { +export type Security_GetAllowlist_Response = ApiResponse & { body: Security_GetAllowlist_ResponseBody; } diff --git a/api/security/getAuditConfiguration.d.ts b/api/security/getAuditConfiguration.d.ts index c492a96fa..87f09ae97 100644 --- a/api/security/getAuditConfiguration.d.ts +++ b/api/security/getAuditConfiguration.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetAuditConfiguration_Request = Global.Params & Record -export interface Security_GetAuditConfiguration_Response extends ApiResponse { +export type Security_GetAuditConfiguration_Response = ApiResponse & { body: Security_GetAuditConfiguration_ResponseBody; } diff --git a/api/security/getCertificates.d.ts b/api/security/getCertificates.d.ts index dd39889a7..0ae6742f7 100644 --- a/api/security/getCertificates.d.ts +++ b/api/security/getCertificates.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetCertificates_Request = Global.Params & Record -export interface Security_GetCertificates_Response extends ApiResponse { +export type Security_GetCertificates_Response = ApiResponse & { body: Security_GetCertificates_ResponseBody; } diff --git a/api/security/getConfiguration.d.ts b/api/security/getConfiguration.d.ts index 92a8a0a1f..3015c73d1 100644 --- a/api/security/getConfiguration.d.ts +++ b/api/security/getConfiguration.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetConfiguration_Request = Global.Params & Record -export interface Security_GetConfiguration_Response extends ApiResponse { +export type Security_GetConfiguration_Response = ApiResponse & { body: Security_GetConfiguration_ResponseBody; } diff --git a/api/security/getDashboardsInfo.d.ts b/api/security/getDashboardsInfo.d.ts index 263d3e8f5..ac7a9f92a 100644 --- a/api/security/getDashboardsInfo.d.ts +++ b/api/security/getDashboardsInfo.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetDashboardsInfo_Request = Global.Params & Record -export interface Security_GetDashboardsInfo_Response extends ApiResponse { +export type Security_GetDashboardsInfo_Response = ApiResponse & { body: Security_GetDashboardsInfo_ResponseBody; } diff --git a/api/security/getDistinguishedName.d.ts b/api/security/getDistinguishedName.d.ts index 898a93296..b1f1fd153 100644 --- a/api/security/getDistinguishedName.d.ts +++ b/api/security/getDistinguishedName.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetDistinguishedName_Request extends Global.Params { +export type Security_GetDistinguishedName_Request = Global.Params & { cluster_name: string; show_all?: boolean; } -export interface Security_GetDistinguishedName_Response extends ApiResponse { +export type Security_GetDistinguishedName_Response = ApiResponse & { body: Security_GetDistinguishedName_ResponseBody; } diff --git a/api/security/getDistinguishedNames.d.ts b/api/security/getDistinguishedNames.d.ts index 783104a2c..7da9e857f 100644 --- a/api/security/getDistinguishedNames.d.ts +++ b/api/security/getDistinguishedNames.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetDistinguishedNames_Request extends Global.Params { +export type Security_GetDistinguishedNames_Request = Global.Params & { show_all?: boolean; } -export interface Security_GetDistinguishedNames_Response extends ApiResponse { +export type Security_GetDistinguishedNames_Response = ApiResponse & { body: Security_GetDistinguishedNames_ResponseBody; } diff --git a/api/security/getNodeCertificates.d.ts b/api/security/getNodeCertificates.d.ts index e4bd4b0d6..caee215ad 100644 --- a/api/security/getNodeCertificates.d.ts +++ b/api/security/getNodeCertificates.d.ts @@ -19,13 +19,13 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetNodeCertificates_Request extends Global.Params { +export type Security_GetNodeCertificates_Request = Global.Params & { cert_type?: string; node_id: string; timeout?: Common.Duration; } -export interface Security_GetNodeCertificates_Response extends ApiResponse { +export type Security_GetNodeCertificates_Response = ApiResponse & { body: Security_GetNodeCertificates_ResponseBody; } diff --git a/api/security/getPermissionsInfo.d.ts b/api/security/getPermissionsInfo.d.ts index 2323bc62a..5f75d9285 100644 --- a/api/security/getPermissionsInfo.d.ts +++ b/api/security/getPermissionsInfo.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetPermissionsInfo_Request = Global.Params & Record -export interface Security_GetPermissionsInfo_Response extends ApiResponse { +export type Security_GetPermissionsInfo_Response = ApiResponse & { body: Security_GetPermissionsInfo_ResponseBody; } diff --git a/api/security/getRole.d.ts b/api/security/getRole.d.ts index 3ef8d7d0c..6b33d69ce 100644 --- a/api/security/getRole.d.ts +++ b/api/security/getRole.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetRole_Request extends Global.Params { +export type Security_GetRole_Request = Global.Params & { role: string; } -export interface Security_GetRole_Response extends ApiResponse { +export type Security_GetRole_Response = ApiResponse & { body: Security_GetRole_ResponseBody; } diff --git a/api/security/getRoleMapping.d.ts b/api/security/getRoleMapping.d.ts index bc1b57d49..ae89fb0a9 100644 --- a/api/security/getRoleMapping.d.ts +++ b/api/security/getRoleMapping.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetRoleMapping_Request extends Global.Params { +export type Security_GetRoleMapping_Request = Global.Params & { role: string; } -export interface Security_GetRoleMapping_Response extends ApiResponse { +export type Security_GetRoleMapping_Response = ApiResponse & { body: Security_GetRoleMapping_ResponseBody; } diff --git a/api/security/getRoleMappings.d.ts b/api/security/getRoleMappings.d.ts index 77165ba77..e2e2479c2 100644 --- a/api/security/getRoleMappings.d.ts +++ b/api/security/getRoleMappings.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetRoleMappings_Request = Global.Params & Record -export interface Security_GetRoleMappings_Response extends ApiResponse { +export type Security_GetRoleMappings_Response = ApiResponse & { body: Security_GetRoleMappings_ResponseBody; } diff --git a/api/security/getRoles.d.ts b/api/security/getRoles.d.ts index f2a17fa40..e7413f17f 100644 --- a/api/security/getRoles.d.ts +++ b/api/security/getRoles.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetRoles_Request = Global.Params & Record -export interface Security_GetRoles_Response extends ApiResponse { +export type Security_GetRoles_Response = ApiResponse & { body: Security_GetRoles_ResponseBody; } diff --git a/api/security/getSslinfo.d.ts b/api/security/getSslinfo.d.ts index 095db3f1c..88dfdda0a 100644 --- a/api/security/getSslinfo.d.ts +++ b/api/security/getSslinfo.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetSslinfo_Request extends Global.Params { +export type Security_GetSslinfo_Request = Global.Params & { show_dn?: boolean | string; } -export interface Security_GetSslinfo_Response extends ApiResponse { +export type Security_GetSslinfo_Response = ApiResponse & { body: Security_GetSslinfo_ResponseBody; } diff --git a/api/security/getTenancyConfig.d.ts b/api/security/getTenancyConfig.d.ts index a2b4d902b..67b883e43 100644 --- a/api/security/getTenancyConfig.d.ts +++ b/api/security/getTenancyConfig.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetTenancyConfig_Request = Global.Params & Record -export interface Security_GetTenancyConfig_Response extends ApiResponse { +export type Security_GetTenancyConfig_Response = ApiResponse & { body: Security_GetTenancyConfig_ResponseBody; } diff --git a/api/security/getTenant.d.ts b/api/security/getTenant.d.ts index 1705168e8..6faef7e10 100644 --- a/api/security/getTenant.d.ts +++ b/api/security/getTenant.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetTenant_Request extends Global.Params { +export type Security_GetTenant_Request = Global.Params & { tenant: string; } -export interface Security_GetTenant_Response extends ApiResponse { +export type Security_GetTenant_Response = ApiResponse & { body: Security_GetTenant_ResponseBody; } diff --git a/api/security/getTenants.d.ts b/api/security/getTenants.d.ts index c60e906b7..2fe897713 100644 --- a/api/security/getTenants.d.ts +++ b/api/security/getTenants.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetTenants_Request = Global.Params & Record -export interface Security_GetTenants_Response extends ApiResponse { +export type Security_GetTenants_Response = ApiResponse & { body: Security_GetTenants_ResponseBody; } diff --git a/api/security/getUser.d.ts b/api/security/getUser.d.ts index 19195ee9e..e0c01fad0 100644 --- a/api/security/getUser.d.ts +++ b/api/security/getUser.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetUser_Request extends Global.Params { +export type Security_GetUser_Request = Global.Params & { username: string; } -export interface Security_GetUser_Response extends ApiResponse { +export type Security_GetUser_Response = ApiResponse & { body: Security_GetUser_ResponseBody; } diff --git a/api/security/getUserLegacy.d.ts b/api/security/getUserLegacy.d.ts index f6952b494..98d09563f 100644 --- a/api/security/getUserLegacy.d.ts +++ b/api/security/getUserLegacy.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_GetUserLegacy_Request extends Global.Params { +export type Security_GetUserLegacy_Request = Global.Params & { username: string; } -export interface Security_GetUserLegacy_Response extends ApiResponse { +export type Security_GetUserLegacy_Response = ApiResponse & { body: Security_GetUserLegacy_ResponseBody; } diff --git a/api/security/getUsers.d.ts b/api/security/getUsers.d.ts index 7f8479c4b..fb0e9d04e 100644 --- a/api/security/getUsers.d.ts +++ b/api/security/getUsers.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetUsers_Request = Global.Params & Record -export interface Security_GetUsers_Response extends ApiResponse { +export type Security_GetUsers_Response = ApiResponse & { body: Security_GetUsers_ResponseBody; } diff --git a/api/security/getUsersLegacy.d.ts b/api/security/getUsersLegacy.d.ts index f6ecf088d..f85b01611 100644 --- a/api/security/getUsersLegacy.d.ts +++ b/api/security/getUsersLegacy.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_GetUsersLegacy_Request = Global.Params & Record -export interface Security_GetUsersLegacy_Response extends ApiResponse { +export type Security_GetUsersLegacy_Response = ApiResponse & { body: Security_GetUsersLegacy_ResponseBody; } diff --git a/api/security/health.d.ts b/api/security/health.d.ts index 807d94810..932fd79b7 100644 --- a/api/security/health.d.ts +++ b/api/security/health.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_Health_Request extends Global.Params { +export type Security_Health_Request = Global.Params & { mode?: string; } -export interface Security_Health_Response extends ApiResponse { +export type Security_Health_Response = ApiResponse & { body: Security_Health_ResponseBody; } diff --git a/api/security/migrate.d.ts b/api/security/migrate.d.ts index 5964ca73b..a90193e7d 100644 --- a/api/security/migrate.d.ts +++ b/api/security/migrate.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_Migrate_Request = Global.Params & Record -export interface Security_Migrate_Response extends ApiResponse { +export type Security_Migrate_Response = ApiResponse & { body: Security_Migrate_ResponseBody; } diff --git a/api/security/patchActionGroup.d.ts b/api/security/patchActionGroup.d.ts index 899eaa901..7aa5c50d6 100644 --- a/api/security/patchActionGroup.d.ts +++ b/api/security/patchActionGroup.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchActionGroup_Request extends Global.Params { +export type Security_PatchActionGroup_Request = Global.Params & { action_group: string; body: Security_PatchActionGroup_RequestBody; } export type Security_PatchActionGroup_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchActionGroup_Response extends ApiResponse { +export type Security_PatchActionGroup_Response = ApiResponse & { body: Security_PatchActionGroup_ResponseBody; } diff --git a/api/security/patchActionGroups.d.ts b/api/security/patchActionGroups.d.ts index 8da8f5ef6..92742a853 100644 --- a/api/security/patchActionGroups.d.ts +++ b/api/security/patchActionGroups.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchActionGroups_Request extends Global.Params { +export type Security_PatchActionGroups_Request = Global.Params & { body: Security_PatchActionGroups_RequestBody; } export type Security_PatchActionGroups_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchActionGroups_Response extends ApiResponse { +export type Security_PatchActionGroups_Response = ApiResponse & { body: Security_PatchActionGroups_ResponseBody; } diff --git a/api/security/patchAllowlist.d.ts b/api/security/patchAllowlist.d.ts index 69b171e4c..9615cbffe 100644 --- a/api/security/patchAllowlist.d.ts +++ b/api/security/patchAllowlist.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchAllowlist_Request extends Global.Params { +export type Security_PatchAllowlist_Request = Global.Params & { body: Security_PatchAllowlist_RequestBody; } export type Security_PatchAllowlist_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchAllowlist_Response extends ApiResponse { +export type Security_PatchAllowlist_Response = ApiResponse & { body: Security_PatchAllowlist_ResponseBody; } diff --git a/api/security/patchAuditConfiguration.d.ts b/api/security/patchAuditConfiguration.d.ts index 8790361bb..c52230a13 100644 --- a/api/security/patchAuditConfiguration.d.ts +++ b/api/security/patchAuditConfiguration.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchAuditConfiguration_Request extends Global.Params { +export type Security_PatchAuditConfiguration_Request = Global.Params & { body: Security_PatchAuditConfiguration_RequestBody; } export type Security_PatchAuditConfiguration_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchAuditConfiguration_Response extends ApiResponse { +export type Security_PatchAuditConfiguration_Response = ApiResponse & { body: Security_PatchAuditConfiguration_ResponseBody; } diff --git a/api/security/patchConfiguration.d.ts b/api/security/patchConfiguration.d.ts index caec7aaed..6501940d7 100644 --- a/api/security/patchConfiguration.d.ts +++ b/api/security/patchConfiguration.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchConfiguration_Request extends Global.Params { +export type Security_PatchConfiguration_Request = Global.Params & { body: Security_PatchConfiguration_RequestBody; } export type Security_PatchConfiguration_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchConfiguration_Response extends ApiResponse { +export type Security_PatchConfiguration_Response = ApiResponse & { body: Security_PatchConfiguration_ResponseBody; } diff --git a/api/security/patchDistinguishedName.d.ts b/api/security/patchDistinguishedName.d.ts index 43eb44f2b..5f0310b48 100644 --- a/api/security/patchDistinguishedName.d.ts +++ b/api/security/patchDistinguishedName.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchDistinguishedName_Request extends Global.Params { +export type Security_PatchDistinguishedName_Request = Global.Params & { body?: Security_Common.PatchOperation; cluster_name: string; } -export interface Security_PatchDistinguishedName_Response extends ApiResponse { +export type Security_PatchDistinguishedName_Response = ApiResponse & { body: Security_PatchDistinguishedName_ResponseBody; } diff --git a/api/security/patchDistinguishedNames.d.ts b/api/security/patchDistinguishedNames.d.ts index 9632f1a90..e23b45f51 100644 --- a/api/security/patchDistinguishedNames.d.ts +++ b/api/security/patchDistinguishedNames.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchDistinguishedNames_Request extends Global.Params { +export type Security_PatchDistinguishedNames_Request = Global.Params & { body: Security_PatchDistinguishedNames_RequestBody; } export type Security_PatchDistinguishedNames_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchDistinguishedNames_Response extends ApiResponse { +export type Security_PatchDistinguishedNames_Response = ApiResponse & { body: Security_PatchDistinguishedNames_ResponseBody; } diff --git a/api/security/patchRole.d.ts b/api/security/patchRole.d.ts index c451d3675..05d5a99f5 100644 --- a/api/security/patchRole.d.ts +++ b/api/security/patchRole.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchRole_Request extends Global.Params { +export type Security_PatchRole_Request = Global.Params & { body: Security_PatchRole_RequestBody; role: string; } export type Security_PatchRole_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchRole_Response extends ApiResponse { +export type Security_PatchRole_Response = ApiResponse & { body: Security_PatchRole_ResponseBody; } diff --git a/api/security/patchRoleMapping.d.ts b/api/security/patchRoleMapping.d.ts index 5434fccee..604ebc6e2 100644 --- a/api/security/patchRoleMapping.d.ts +++ b/api/security/patchRoleMapping.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchRoleMapping_Request extends Global.Params { +export type Security_PatchRoleMapping_Request = Global.Params & { body: Security_PatchRoleMapping_RequestBody; role: string; } export type Security_PatchRoleMapping_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchRoleMapping_Response extends ApiResponse { +export type Security_PatchRoleMapping_Response = ApiResponse & { body: Security_PatchRoleMapping_ResponseBody; } diff --git a/api/security/patchRoleMappings.d.ts b/api/security/patchRoleMappings.d.ts index decb67155..999a0f069 100644 --- a/api/security/patchRoleMappings.d.ts +++ b/api/security/patchRoleMappings.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchRoleMappings_Request extends Global.Params { +export type Security_PatchRoleMappings_Request = Global.Params & { body: Security_PatchRoleMappings_RequestBody; } export type Security_PatchRoleMappings_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchRoleMappings_Response extends ApiResponse { +export type Security_PatchRoleMappings_Response = ApiResponse & { body: Security_PatchRoleMappings_ResponseBody; } diff --git a/api/security/patchRoles.d.ts b/api/security/patchRoles.d.ts index c6ed3e7ec..e0b5694c5 100644 --- a/api/security/patchRoles.d.ts +++ b/api/security/patchRoles.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchRoles_Request extends Global.Params { +export type Security_PatchRoles_Request = Global.Params & { body: Security_PatchRoles_RequestBody; } export type Security_PatchRoles_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchRoles_Response extends ApiResponse { +export type Security_PatchRoles_Response = ApiResponse & { body: Security_PatchRoles_ResponseBody; } diff --git a/api/security/patchTenant.d.ts b/api/security/patchTenant.d.ts index cda859287..3a1154cfd 100644 --- a/api/security/patchTenant.d.ts +++ b/api/security/patchTenant.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchTenant_Request extends Global.Params { +export type Security_PatchTenant_Request = Global.Params & { body: Security_PatchTenant_RequestBody; tenant: string; } export type Security_PatchTenant_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchTenant_Response extends ApiResponse { +export type Security_PatchTenant_Response = ApiResponse & { body: Security_PatchTenant_ResponseBody; } diff --git a/api/security/patchTenants.d.ts b/api/security/patchTenants.d.ts index 3cd209c33..064374e84 100644 --- a/api/security/patchTenants.d.ts +++ b/api/security/patchTenants.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchTenants_Request extends Global.Params { +export type Security_PatchTenants_Request = Global.Params & { body: Security_PatchTenants_RequestBody; } export type Security_PatchTenants_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchTenants_Response extends ApiResponse { +export type Security_PatchTenants_Response = ApiResponse & { body: Security_PatchTenants_ResponseBody; } diff --git a/api/security/patchUser.d.ts b/api/security/patchUser.d.ts index ab235bf16..bc10a2cee 100644 --- a/api/security/patchUser.d.ts +++ b/api/security/patchUser.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchUser_Request extends Global.Params { +export type Security_PatchUser_Request = Global.Params & { body: Security_PatchUser_RequestBody; username: string; } export type Security_PatchUser_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchUser_Response extends ApiResponse { +export type Security_PatchUser_Response = ApiResponse & { body: Security_PatchUser_ResponseBody; } diff --git a/api/security/patchUsers.d.ts b/api/security/patchUsers.d.ts index 9c3d22cfe..fc2bb795f 100644 --- a/api/security/patchUsers.d.ts +++ b/api/security/patchUsers.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_PatchUsers_Request extends Global.Params { +export type Security_PatchUsers_Request = Global.Params & { body: Security_PatchUsers_RequestBody; } export type Security_PatchUsers_RequestBody = Security_Common.PatchOperation[] -export interface Security_PatchUsers_Response extends ApiResponse { +export type Security_PatchUsers_Response = ApiResponse & { body: Security_PatchUsers_ResponseBody; } diff --git a/api/security/postDashboardsInfo.d.ts b/api/security/postDashboardsInfo.d.ts index 0805f5723..0f064943c 100644 --- a/api/security/postDashboardsInfo.d.ts +++ b/api/security/postDashboardsInfo.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_PostDashboardsInfo_Request = Global.Params & Record -export interface Security_PostDashboardsInfo_Response extends ApiResponse { +export type Security_PostDashboardsInfo_Response = ApiResponse & { body: Security_PostDashboardsInfo_ResponseBody; } diff --git a/api/security/reloadHttpCertificates.d.ts b/api/security/reloadHttpCertificates.d.ts index a9cce582f..d1bec2ab3 100644 --- a/api/security/reloadHttpCertificates.d.ts +++ b/api/security/reloadHttpCertificates.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_ReloadHttpCertificates_Request = Global.Params & Record -export interface Security_ReloadHttpCertificates_Response extends ApiResponse { +export type Security_ReloadHttpCertificates_Response = ApiResponse & { body: Security_ReloadHttpCertificates_ResponseBody; } diff --git a/api/security/reloadTransportCertificates.d.ts b/api/security/reloadTransportCertificates.d.ts index 066c99ea5..96ad7dced 100644 --- a/api/security/reloadTransportCertificates.d.ts +++ b/api/security/reloadTransportCertificates.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_ReloadTransportCertificates_Request = Global.Params & Record -export interface Security_ReloadTransportCertificates_Response extends ApiResponse { +export type Security_ReloadTransportCertificates_Response = ApiResponse & { body: Security_ReloadTransportCertificates_ResponseBody; } diff --git a/api/security/tenantInfo.d.ts b/api/security/tenantInfo.d.ts index 9b13f25da..4591713bc 100644 --- a/api/security/tenantInfo.d.ts +++ b/api/security/tenantInfo.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_TenantInfo_Request = Global.Params & Record -export interface Security_TenantInfo_Response extends ApiResponse { +export type Security_TenantInfo_Response = ApiResponse & { body: Security_TenantInfo_ResponseBody; } diff --git a/api/security/updateAuditConfiguration.d.ts b/api/security/updateAuditConfiguration.d.ts index 1d8b874dc..85b537ef6 100644 --- a/api/security/updateAuditConfiguration.d.ts +++ b/api/security/updateAuditConfiguration.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_UpdateAuditConfiguration_Request extends Global.Params { +export type Security_UpdateAuditConfiguration_Request = Global.Params & { body: Security_Common.AuditConfig; } -export interface Security_UpdateAuditConfiguration_Response extends ApiResponse { +export type Security_UpdateAuditConfiguration_Response = ApiResponse & { body: Security_UpdateAuditConfiguration_ResponseBody; } diff --git a/api/security/updateConfiguration.d.ts b/api/security/updateConfiguration.d.ts index 72d50d069..2abc31cb1 100644 --- a/api/security/updateConfiguration.d.ts +++ b/api/security/updateConfiguration.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_UpdateConfiguration_Request extends Global.Params { +export type Security_UpdateConfiguration_Request = Global.Params & { body: Security_Common.DynamicConfig; } -export interface Security_UpdateConfiguration_Response extends ApiResponse { +export type Security_UpdateConfiguration_Response = ApiResponse & { body: Security_UpdateConfiguration_ResponseBody; } diff --git a/api/security/updateDistinguishedName.d.ts b/api/security/updateDistinguishedName.d.ts index 9d8cd133b..336df2f91 100644 --- a/api/security/updateDistinguishedName.d.ts +++ b/api/security/updateDistinguishedName.d.ts @@ -18,12 +18,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_UpdateDistinguishedName_Request extends Global.Params { +export type Security_UpdateDistinguishedName_Request = Global.Params & { body?: Security_Common.DistinguishedNames; cluster_name: string; } -export interface Security_UpdateDistinguishedName_Response extends ApiResponse { +export type Security_UpdateDistinguishedName_Response = ApiResponse & { body: Security_UpdateDistinguishedName_ResponseBody; } diff --git a/api/security/validate.d.ts b/api/security/validate.d.ts index 9c676530a..d22104d39 100644 --- a/api/security/validate.d.ts +++ b/api/security/validate.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Security_Common from '../_types/security._common' -export interface Security_Validate_Request extends Global.Params { +export type Security_Validate_Request = Global.Params & { accept_invalid?: boolean; } -export interface Security_Validate_Response extends ApiResponse { +export type Security_Validate_Response = ApiResponse & { body: Security_Validate_ResponseBody; } diff --git a/api/security/whoAmI.d.ts b/api/security/whoAmI.d.ts index 3a901edfe..40b8e9cd6 100644 --- a/api/security/whoAmI.d.ts +++ b/api/security/whoAmI.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_WhoAmI_Request = Global.Params & Record -export interface Security_WhoAmI_Response extends ApiResponse { +export type Security_WhoAmI_Response = ApiResponse & { body: Security_WhoAmI_ResponseBody; } diff --git a/api/security/whoAmIProtected.d.ts b/api/security/whoAmIProtected.d.ts index 081056a77..470741502 100644 --- a/api/security/whoAmIProtected.d.ts +++ b/api/security/whoAmIProtected.d.ts @@ -20,7 +20,7 @@ import * as Security_Common from '../_types/security._common' export type Security_WhoAmIProtected_Request = Global.Params & Record -export interface Security_WhoAmIProtected_Response extends ApiResponse { +export type Security_WhoAmIProtected_Response = ApiResponse & { body: Security_WhoAmIProtected_ResponseBody; } diff --git a/api/snapshot/cleanupRepository.d.ts b/api/snapshot/cleanupRepository.d.ts index 622f6d5db..a18f63222 100644 --- a/api/snapshot/cleanupRepository.d.ts +++ b/api/snapshot/cleanupRepository.d.ts @@ -19,18 +19,18 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_CleanupRepository from '../_types/snapshot.cleanup_repository' -export interface Snapshot_CleanupRepository_Request extends Global.Params { +export type Snapshot_CleanupRepository_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; repository: Common.Name; timeout?: Common.Duration; } -export interface Snapshot_CleanupRepository_Response extends ApiResponse { +export type Snapshot_CleanupRepository_Response = ApiResponse & { body: Snapshot_CleanupRepository_ResponseBody; } -export interface Snapshot_CleanupRepository_ResponseBody { +export type Snapshot_CleanupRepository_ResponseBody = { results: Snapshot_CleanupRepository.CleanupRepositoryResults; } diff --git a/api/snapshot/clone.d.ts b/api/snapshot/clone.d.ts index d0d071a6e..6847cc547 100644 --- a/api/snapshot/clone.d.ts +++ b/api/snapshot/clone.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Snapshot_Clone_Request extends Global.Params { +export type Snapshot_Clone_Request = Global.Params & { body: Snapshot_Clone_RequestBody; cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; @@ -27,11 +27,11 @@ export interface Snapshot_Clone_Request extends Global.Params { target_snapshot: Common.Name; } -export interface Snapshot_Clone_RequestBody { +export type Snapshot_Clone_RequestBody = { indices: string; } -export interface Snapshot_Clone_Response extends ApiResponse { +export type Snapshot_Clone_Response = ApiResponse & { body: Snapshot_Clone_ResponseBody; } diff --git a/api/snapshot/create.d.ts b/api/snapshot/create.d.ts index bebe5df2f..9acd8d452 100644 --- a/api/snapshot/create.d.ts +++ b/api/snapshot/create.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_Common from '../_types/snapshot._common' -export interface Snapshot_Create_Request extends Global.Params { +export type Snapshot_Create_Request = Global.Params & { body?: Snapshot_Create_RequestBody; cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; @@ -28,7 +28,7 @@ export interface Snapshot_Create_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Snapshot_Create_RequestBody { +export type Snapshot_Create_RequestBody = { feature_states?: string[]; ignore_unavailable?: boolean; include_global_state?: boolean; @@ -37,11 +37,11 @@ export interface Snapshot_Create_RequestBody { partial?: boolean; } -export interface Snapshot_Create_Response extends ApiResponse { +export type Snapshot_Create_Response = ApiResponse & { body: Snapshot_Create_ResponseBody; } -export interface Snapshot_Create_ResponseBody { +export type Snapshot_Create_ResponseBody = { accepted?: boolean; snapshot?: Snapshot_Common.SnapshotInfo; } diff --git a/api/snapshot/createRepository.d.ts b/api/snapshot/createRepository.d.ts index 5323c2ea3..f77968039 100644 --- a/api/snapshot/createRepository.d.ts +++ b/api/snapshot/createRepository.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_Common from '../_types/snapshot._common' -export interface Snapshot_CreateRepository_Request extends Global.Params { +export type Snapshot_CreateRepository_Request = Global.Params & { body: Snapshot_CreateRepository_RequestBody; cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; @@ -28,13 +28,13 @@ export interface Snapshot_CreateRepository_Request extends Global.Params { verify?: boolean; } -export interface Snapshot_CreateRepository_RequestBody { +export type Snapshot_CreateRepository_RequestBody = { repository?: Snapshot_Common.Repository; settings: Snapshot_Common.RepositorySettings; type: string; } -export interface Snapshot_CreateRepository_Response extends ApiResponse { +export type Snapshot_CreateRepository_Response = ApiResponse & { body: Snapshot_CreateRepository_ResponseBody; } diff --git a/api/snapshot/delete.d.ts b/api/snapshot/delete.d.ts index a5c2d475c..0f0e2c21f 100644 --- a/api/snapshot/delete.d.ts +++ b/api/snapshot/delete.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Snapshot_Delete_Request extends Global.Params { +export type Snapshot_Delete_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; repository: Common.Name; snapshot: Common.Name; } -export interface Snapshot_Delete_Response extends ApiResponse { +export type Snapshot_Delete_Response = ApiResponse & { body: Snapshot_Delete_ResponseBody; } diff --git a/api/snapshot/deleteRepository.d.ts b/api/snapshot/deleteRepository.d.ts index cf2e00660..d79b3d7fb 100644 --- a/api/snapshot/deleteRepository.d.ts +++ b/api/snapshot/deleteRepository.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Snapshot_DeleteRepository_Request extends Global.Params { +export type Snapshot_DeleteRepository_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; repository: Common.Names; timeout?: Common.Duration; } -export interface Snapshot_DeleteRepository_Response extends ApiResponse { +export type Snapshot_DeleteRepository_Response = ApiResponse & { body: Snapshot_DeleteRepository_ResponseBody; } diff --git a/api/snapshot/get.d.ts b/api/snapshot/get.d.ts index b9f54a22c..266cf65e9 100644 --- a/api/snapshot/get.d.ts +++ b/api/snapshot/get.d.ts @@ -18,9 +18,8 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_Common from '../_types/snapshot._common' -import * as Snapshot_Get from '../_types/snapshot.get' -export interface Snapshot_Get_Request extends Global.Params { +export type Snapshot_Get_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; ignore_unavailable?: boolean; master_timeout?: Common.Duration; @@ -29,14 +28,11 @@ export interface Snapshot_Get_Request extends Global.Params { verbose?: boolean; } -export interface Snapshot_Get_Response extends ApiResponse { +export type Snapshot_Get_Response = ApiResponse & { body: Snapshot_Get_ResponseBody; } -export interface Snapshot_Get_ResponseBody { - remaining: number; - responses?: Snapshot_Get.SnapshotResponseItem[]; - snapshots?: Snapshot_Common.SnapshotInfo[]; - total: number; +export type Snapshot_Get_ResponseBody = { + snapshots: Snapshot_Common.SnapshotInfo[]; } diff --git a/api/snapshot/getRepository.d.ts b/api/snapshot/getRepository.d.ts index a6c42820b..8b80021ce 100644 --- a/api/snapshot/getRepository.d.ts +++ b/api/snapshot/getRepository.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_Common from '../_types/snapshot._common' -export interface Snapshot_GetRepository_Request extends Global.Params { +export type Snapshot_GetRepository_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; local?: boolean; master_timeout?: Common.Duration; repository?: Common.Names; } -export interface Snapshot_GetRepository_Response extends ApiResponse { +export type Snapshot_GetRepository_Response = ApiResponse & { body: Snapshot_GetRepository_ResponseBody; } diff --git a/api/snapshot/restore.d.ts b/api/snapshot/restore.d.ts index f3a2fb810..5874a6fe7 100644 --- a/api/snapshot/restore.d.ts +++ b/api/snapshot/restore.d.ts @@ -20,7 +20,7 @@ import * as Global from '../_types/_global' import * as Indices_Common from '../_types/indices._common' import * as Snapshot_Restore from '../_types/snapshot.restore' -export interface Snapshot_Restore_Request extends Global.Params { +export type Snapshot_Restore_Request = Global.Params & { body?: Snapshot_Restore_RequestBody; cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; @@ -29,7 +29,7 @@ export interface Snapshot_Restore_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Snapshot_Restore_RequestBody { +export type Snapshot_Restore_RequestBody = { feature_states?: string[]; ignore_index_settings?: string[]; ignore_unavailable?: boolean; @@ -42,11 +42,12 @@ export interface Snapshot_Restore_RequestBody { rename_replacement?: string; } -export interface Snapshot_Restore_Response extends ApiResponse { +export type Snapshot_Restore_Response = ApiResponse & { body: Snapshot_Restore_ResponseBody; } -export interface Snapshot_Restore_ResponseBody { - snapshot: Snapshot_Restore.SnapshotRestore; +export type Snapshot_Restore_ResponseBody = { + accepted?: boolean; + snapshot?: Snapshot_Restore.SnapshotRestore; } diff --git a/api/snapshot/status.d.ts b/api/snapshot/status.d.ts index decdecc68..99215850e 100644 --- a/api/snapshot/status.d.ts +++ b/api/snapshot/status.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_Common from '../_types/snapshot._common' -export interface Snapshot_Status_Request extends Global.Params { +export type Snapshot_Status_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; ignore_unavailable?: boolean; master_timeout?: Common.Duration; @@ -27,11 +27,11 @@ export interface Snapshot_Status_Request extends Global.Params { snapshot?: Common.Names; } -export interface Snapshot_Status_Response extends ApiResponse { +export type Snapshot_Status_Response = ApiResponse & { body: Snapshot_Status_ResponseBody; } -export interface Snapshot_Status_ResponseBody { +export type Snapshot_Status_ResponseBody = { snapshots: Snapshot_Common.Status[]; } diff --git a/api/snapshot/verifyRepository.d.ts b/api/snapshot/verifyRepository.d.ts index b254ba705..c1ac06091 100644 --- a/api/snapshot/verifyRepository.d.ts +++ b/api/snapshot/verifyRepository.d.ts @@ -19,18 +19,18 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Snapshot_VerifyRepository from '../_types/snapshot.verify_repository' -export interface Snapshot_VerifyRepository_Request extends Global.Params { +export type Snapshot_VerifyRepository_Request = Global.Params & { cluster_manager_timeout?: Common.Duration; master_timeout?: Common.Duration; repository: Common.Name; timeout?: Common.Duration; } -export interface Snapshot_VerifyRepository_Response extends ApiResponse { +export type Snapshot_VerifyRepository_Response = ApiResponse & { body: Snapshot_VerifyRepository_ResponseBody; } -export interface Snapshot_VerifyRepository_ResponseBody { +export type Snapshot_VerifyRepository_ResponseBody = { nodes: Record; } diff --git a/api/sql/close.d.ts b/api/sql/close.d.ts index 87c9c2b1a..e33df7a0a 100644 --- a/api/sql/close.d.ts +++ b/api/sql/close.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Sql_Close_Request extends Global.Params { +export type Sql_Close_Request = Global.Params & { body: Sql_Common.SqlClose; format?: string; sanitize?: boolean; } -export interface Sql_Close_Response extends ApiResponse { +export type Sql_Close_Response = ApiResponse & { body: Sql_Close_ResponseBody; } diff --git a/api/sql/explain.d.ts b/api/sql/explain.d.ts index 988b4c3da..be70e04ea 100644 --- a/api/sql/explain.d.ts +++ b/api/sql/explain.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Sql_Explain_Request extends Global.Params { +export type Sql_Explain_Request = Global.Params & { body: Sql_Common.Explain; format?: string; sanitize?: boolean; } -export interface Sql_Explain_Response extends ApiResponse { +export type Sql_Explain_Response = ApiResponse & { body: Sql_Explain_ResponseBody; } diff --git a/api/sql/getStats.d.ts b/api/sql/getStats.d.ts index 23494b0e5..95be0eb49 100644 --- a/api/sql/getStats.d.ts +++ b/api/sql/getStats.d.ts @@ -17,12 +17,12 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' -export interface Sql_GetStats_Request extends Global.Params { +export type Sql_GetStats_Request = Global.Params & { format?: string; sanitize?: boolean; } -export interface Sql_GetStats_Response extends ApiResponse { +export type Sql_GetStats_Response = ApiResponse & { body: Sql_GetStats_ResponseBody; } diff --git a/api/sql/postStats.d.ts b/api/sql/postStats.d.ts index 537efce21..159cecc4c 100644 --- a/api/sql/postStats.d.ts +++ b/api/sql/postStats.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Sql_PostStats_Request extends Global.Params { +export type Sql_PostStats_Request = Global.Params & { body: Sql_Common.Stats; format?: string; sanitize?: boolean; } -export interface Sql_PostStats_Response extends ApiResponse { +export type Sql_PostStats_Response = ApiResponse & { body: Sql_PostStats_ResponseBody; } diff --git a/api/sql/query.d.ts b/api/sql/query.d.ts index 8570d7427..3684e11a4 100644 --- a/api/sql/query.d.ts +++ b/api/sql/query.d.ts @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Sql_Query_Request extends Global.Params { +export type Sql_Query_Request = Global.Params & { body: Sql_Common.Query; format?: string; sanitize?: boolean; } -export interface Sql_Query_Response extends ApiResponse { +export type Sql_Query_Response = ApiResponse & { body: Sql_Query_ResponseBody; } diff --git a/api/sql/settings.d.ts b/api/sql/settings.d.ts index 082b1e065..0f0b54147 100644 --- a/api/sql/settings.d.ts +++ b/api/sql/settings.d.ts @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Sql_Common from '../_types/sql._common' -export interface Sql_Settings_Request extends Global.Params { +export type Sql_Settings_Request = Global.Params & { body: Sql_Settings_RequestBody; format?: string; } export type Sql_Settings_RequestBody = Sql_Common.SqlSettingsPlain | Sql_Common.SqlSettings -export interface Sql_Settings_Response extends ApiResponse { +export type Sql_Settings_Response = ApiResponse & { body: Sql_Settings_ResponseBody; } diff --git a/api/tasks/cancel.d.ts b/api/tasks/cancel.d.ts index 147a2140b..2bcab0a29 100644 --- a/api/tasks/cancel.d.ts +++ b/api/tasks/cancel.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Tasks_Common from '../_types/tasks._common' -export interface Tasks_Cancel_Request extends Global.Params { +export type Tasks_Cancel_Request = Global.Params & { actions?: string | string[]; nodes?: string[]; parent_task_id?: string; @@ -27,7 +27,7 @@ export interface Tasks_Cancel_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Tasks_Cancel_Response extends ApiResponse { +export type Tasks_Cancel_Response = ApiResponse & { body: Tasks_Cancel_ResponseBody; } diff --git a/api/tasks/get.d.ts b/api/tasks/get.d.ts index 8090d4120..095bbe1a3 100644 --- a/api/tasks/get.d.ts +++ b/api/tasks/get.d.ts @@ -19,17 +19,17 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Tasks_Common from '../_types/tasks._common' -export interface Tasks_Get_Request extends Global.Params { +export type Tasks_Get_Request = Global.Params & { task_id: Common.Id; timeout?: Common.Duration; wait_for_completion?: boolean; } -export interface Tasks_Get_Response extends ApiResponse { +export type Tasks_Get_Response = ApiResponse & { body: Tasks_Get_ResponseBody; } -export interface Tasks_Get_ResponseBody { +export type Tasks_Get_ResponseBody = { completed: boolean; error?: Common.ErrorCause; response?: Tasks_Common.TaskResponse; diff --git a/api/tasks/list.d.ts b/api/tasks/list.d.ts index f9728c177..f1ed79870 100644 --- a/api/tasks/list.d.ts +++ b/api/tasks/list.d.ts @@ -19,7 +19,7 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Tasks_Common from '../_types/tasks._common' -export interface Tasks_List_Request extends Global.Params { +export type Tasks_List_Request = Global.Params & { actions?: string | string[]; detailed?: boolean; group_by?: Tasks_Common.GroupBy; @@ -29,7 +29,7 @@ export interface Tasks_List_Request extends Global.Params { wait_for_completion?: boolean; } -export interface Tasks_List_Response extends ApiResponse { +export type Tasks_List_Response = ApiResponse & { body: Tasks_List_ResponseBody; } diff --git a/api/transforms/delete.d.ts b/api/transforms/delete.d.ts index bb691130c..464e639be 100644 --- a/api/transforms/delete.d.ts +++ b/api/transforms/delete.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Transforms_Delete_Request extends Global.Params { +export type Transforms_Delete_Request = Global.Params & { id: Common.Id; } -export interface Transforms_Delete_Response extends ApiResponse { +export type Transforms_Delete_Response = ApiResponse & { body: Transforms_Delete_ResponseBody; } diff --git a/api/transforms/explain.d.ts b/api/transforms/explain.d.ts index c63df56d4..79718c7ca 100644 --- a/api/transforms/explain.d.ts +++ b/api/transforms/explain.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Transforms_Common from '../_types/transforms._common' -export interface Transforms_Explain_Request extends Global.Params { +export type Transforms_Explain_Request = Global.Params & { id: Common.Id; } -export interface Transforms_Explain_Response extends ApiResponse { +export type Transforms_Explain_Response = ApiResponse & { body: Transforms_Explain_ResponseBody; } diff --git a/api/transforms/get.d.ts b/api/transforms/get.d.ts index 4015c2ebd..864f062ae 100644 --- a/api/transforms/get.d.ts +++ b/api/transforms/get.d.ts @@ -19,11 +19,11 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Transforms_Common from '../_types/transforms._common' -export interface Transforms_Get_Request extends Global.Params { +export type Transforms_Get_Request = Global.Params & { id: Common.Id; } -export interface Transforms_Get_Response extends ApiResponse { +export type Transforms_Get_Response = ApiResponse & { body: Transforms_Get_ResponseBody; } diff --git a/api/transforms/preview.d.ts b/api/transforms/preview.d.ts index f56bd38e4..04289a841 100644 --- a/api/transforms/preview.d.ts +++ b/api/transforms/preview.d.ts @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Transforms_Common from '../_types/transforms._common' -export interface Transforms_Preview_Request extends Global.Params { +export type Transforms_Preview_Request = Global.Params & { body?: Transforms_Preview_RequestBody; } -export interface Transforms_Preview_RequestBody { +export type Transforms_Preview_RequestBody = { transform: Transforms_Common.Transform; } -export interface Transforms_Preview_Response extends ApiResponse { +export type Transforms_Preview_Response = ApiResponse & { body: Transforms_Preview_ResponseBody; } diff --git a/api/transforms/put.d.ts b/api/transforms/put.d.ts index 46202c154..57d5dd5d7 100644 --- a/api/transforms/put.d.ts +++ b/api/transforms/put.d.ts @@ -19,14 +19,14 @@ import * as Common from '../_types/_common' import * as Global from '../_types/_global' import * as Transforms_Common from '../_types/transforms._common' -export interface Transforms_Put_Request extends Global.Params { +export type Transforms_Put_Request = Global.Params & { body?: Transforms_Common.Transform; id: Common.Id; if_primary_term?: number; if_seq_no?: Common.SequenceNumber; } -export interface Transforms_Put_Response extends ApiResponse { +export type Transforms_Put_Response = ApiResponse & { body: Transforms_Put_ResponseBody; } diff --git a/api/transforms/search.d.ts b/api/transforms/search.d.ts index e185a04c3..d78a0dd83 100644 --- a/api/transforms/search.d.ts +++ b/api/transforms/search.d.ts @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport' import * as Global from '../_types/_global' import * as Transforms_Common from '../_types/transforms._common' -export interface Transforms_Search_Request extends Global.Params { +export type Transforms_Search_Request = Global.Params & { from?: number; search?: string; size?: number; @@ -26,7 +26,7 @@ export interface Transforms_Search_Request extends Global.Params { sortField?: string; } -export interface Transforms_Search_Response extends ApiResponse { +export type Transforms_Search_Response = ApiResponse & { body: Transforms_Search_ResponseBody; } diff --git a/api/transforms/start.d.ts b/api/transforms/start.d.ts index 093f90273..6981c8759 100644 --- a/api/transforms/start.d.ts +++ b/api/transforms/start.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Transforms_Start_Request extends Global.Params { +export type Transforms_Start_Request = Global.Params & { id: Common.Id; } -export interface Transforms_Start_Response extends ApiResponse { +export type Transforms_Start_Response = ApiResponse & { body: Transforms_Start_ResponseBody; } diff --git a/api/transforms/stop.d.ts b/api/transforms/stop.d.ts index 8377b7106..8a2600a22 100644 --- a/api/transforms/stop.d.ts +++ b/api/transforms/stop.d.ts @@ -18,11 +18,11 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' import * as Global from '../_types/_global' -export interface Transforms_Stop_Request extends Global.Params { +export type Transforms_Stop_Request = Global.Params & { id: Common.Id; } -export interface Transforms_Stop_Response extends ApiResponse { +export type Transforms_Stop_Response = ApiResponse & { body: Transforms_Stop_ResponseBody; } diff --git a/api/wlm/_api.js b/api/wlm/_api.js new file mode 100644 index 000000000..bd56cc603 --- /dev/null +++ b/api/wlm/_api.js @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Wlm */ + +function WlmApi(bindObj) { + this.createQueryGroup = require('./createQueryGroup').bind(bindObj); + this.deleteQueryGroup = require('./deleteQueryGroup').bind(bindObj); + this.getQueryGroup = require('./getQueryGroup').bind(bindObj); + this.updateQueryGroup = require('./updateQueryGroup').bind(bindObj); + + // Deprecated: Use createQueryGroup instead. + this.create_query_group = require('./createQueryGroup').bind(bindObj); + // Deprecated: Use deleteQueryGroup instead. + this.delete_query_group = require('./deleteQueryGroup').bind(bindObj); + // Deprecated: Use getQueryGroup instead. + this.get_query_group = require('./getQueryGroup').bind(bindObj); + // Deprecated: Use updateQueryGroup instead. + this.update_query_group = require('./updateQueryGroup').bind(bindObj); +} + +module.exports = WlmApi; diff --git a/api/wlm/createQueryGroup.d.ts b/api/wlm/createQueryGroup.d.ts new file mode 100644 index 000000000..9f038009b --- /dev/null +++ b/api/wlm/createQueryGroup.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Wlm_Common from '../_types/wlm._common' + +export type Wlm_CreateQueryGroup_Request = Global.Params & { + body: Wlm_Common.QueryGroupCreate; +} + +export type Wlm_CreateQueryGroup_Response = ApiResponse & { + body: Wlm_CreateQueryGroup_ResponseBody; +} + +export type Wlm_CreateQueryGroup_ResponseBody = Wlm_Common.QueryGroupResponse + diff --git a/api/wlm/createQueryGroup.js b/api/wlm/createQueryGroup.js new file mode 100644 index 000000000..887b9b19c --- /dev/null +++ b/api/wlm/createQueryGroup.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates the specified query group. + *
See Also: {@link undefined - wlm.create_query_group} + * + * @memberOf API-Wlm + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createQueryGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_wlm/query_group'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createQueryGroupFunc; diff --git a/api/wlm/deleteQueryGroup.d.ts b/api/wlm/deleteQueryGroup.d.ts new file mode 100644 index 000000000..bb31cca21 --- /dev/null +++ b/api/wlm/deleteQueryGroup.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Wlm_DeleteQueryGroup_Request = Global.Params & { + name: string; +} + +export type Wlm_DeleteQueryGroup_Response = ApiResponse & { + body: Wlm_DeleteQueryGroup_ResponseBody; +} + +export type Wlm_DeleteQueryGroup_ResponseBody = { + acknowledged?: boolean; +} + diff --git a/api/wlm/deleteQueryGroup.js b/api/wlm/deleteQueryGroup.js new file mode 100644 index 000000000..e8af2461d --- /dev/null +++ b/api/wlm/deleteQueryGroup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes the specified QueryGroup. + *
See Also: {@link undefined - wlm.delete_query_group} + * + * @memberOf API-Wlm + * + * @param {object} params + * @param {string} params.name - QueryGroup name. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteQueryGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_wlm/query_group/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteQueryGroupFunc; diff --git a/api/wlm/getQueryGroup.d.ts b/api/wlm/getQueryGroup.d.ts new file mode 100644 index 000000000..a285dc760 --- /dev/null +++ b/api/wlm/getQueryGroup.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Wlm_Common from '../_types/wlm._common' + +export type Wlm_GetQueryGroup_Request = Global.Params & { + name?: string; +} + +export type Wlm_GetQueryGroup_Response = ApiResponse & { + body: Wlm_GetQueryGroup_ResponseBody; +} + +export type Wlm_GetQueryGroup_ResponseBody = { + query_groups?: Wlm_Common.QueryGroupResponse[]; +} + diff --git a/api/wlm/getQueryGroup.js b/api/wlm/getQueryGroup.js new file mode 100644 index 000000000..c5c2f55d2 --- /dev/null +++ b/api/wlm/getQueryGroup.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Gets the specified QueryGroup or get all if no name is provided. + *
See Also: {@link undefined - wlm.get_query_group} + * + * @memberOf API-Wlm + * + * @param {object} [params] + * @param {string} [params.name] - QueryGroup name. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getQueryGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_wlm/query_group/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getQueryGroupFunc; diff --git a/api/wlm/updateQueryGroup.d.ts b/api/wlm/updateQueryGroup.d.ts new file mode 100644 index 000000000..87c97b7c9 --- /dev/null +++ b/api/wlm/updateQueryGroup.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Wlm_Common from '../_types/wlm._common' + +export type Wlm_UpdateQueryGroup_Request = Global.Params & { + body: Wlm_Common.QueryGroupUpdate; + name: string; +} + +export type Wlm_UpdateQueryGroup_Response = ApiResponse & { + body: Wlm_UpdateQueryGroup_ResponseBody; +} + +export type Wlm_UpdateQueryGroup_ResponseBody = Wlm_Common.QueryGroupResponse + diff --git a/api/wlm/updateQueryGroup.js b/api/wlm/updateQueryGroup.js new file mode 100644 index 000000000..e9c44f1e1 --- /dev/null +++ b/api/wlm/updateQueryGroup.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates the specified query group. + *
See Also: {@link undefined - wlm.update_query_group} + * + * @memberOf API-Wlm + * + * @param {object} params + * @param {string} params.name - QueryGroup name. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateQueryGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_wlm/query_group/' + name; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateQueryGroupFunc;