From e7c5b3dafa9e23d3466bfc31d262b77fdf62a872 Mon Sep 17 00:00:00 2001 From: delvedor Date: Thu, 24 Feb 2022 11:11:52 +0100 Subject: [PATCH] API generation --- src/api/api/ml.ts | 29 +++++++++++++ src/api/api/security.ts | 66 ++++++++++++++++++++++++++++++ src/api/kibana.ts | 4 ++ src/api/types.ts | 81 +++++++++++++++++++++---------------- src/api/typesWithBodyKey.ts | 81 +++++++++++++++++++++---------------- src/helpers.ts | 1 - 6 files changed, 191 insertions(+), 71 deletions(-) diff --git a/src/api/api/ml.ts b/src/api/api/ml.ts index 434d20133..64f10f486 100644 --- a/src/api/api/ml.ts +++ b/src/api/api/ml.ts @@ -937,6 +937,35 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + async getMemoryStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async getMemoryStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async getMemoryStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async getMemoryStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['node_id'] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + let method = '' + let path = '' + if (params.node_id != null) { + method = 'GET' + path = `/_ml/memory/${encodeURIComponent(params.node_id.toString())}/_stats` + } else { + method = 'GET' + path = '/_ml/memory/_stats' + } + return await this.transport.request({ path, method, querystring, body }, options) + } + async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise diff --git a/src/api/api/security.ts b/src/api/api/security.ts index 7cd54d048..082db4b76 100644 --- a/src/api/api/security.ts +++ b/src/api/api/security.ts @@ -954,6 +954,72 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'POST' + const path = '/_security/oidc/authenticate' + return await this.transport.request({ path, method, querystring, body }, options) + } + + async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'POST' + const path = '/_security/oidc/logout' + return await this.transport.request({ path, method, querystring, body }, options) + } + + async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'POST' + const path = '/_security/oidc/prepare' + return await this.transport.request({ path, method, querystring, body }, options) + } + async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/kibana.ts b/src/api/kibana.ts index ce1fb15a5..b2a60034c 100644 --- a/src/api/kibana.ts +++ b/src/api/kibana.ts @@ -306,6 +306,7 @@ interface KibanaClient { getInfluencers: (params: T.MlGetInfluencersRequest| TB.MlGetInfluencersRequest, options?: TransportRequestOptions) => Promise> getJobStats: (params?: T.MlGetJobStatsRequest| TB.MlGetJobStatsRequest, options?: TransportRequestOptions) => Promise> getJobs: (params?: T.MlGetJobsRequest| TB.MlGetJobsRequest, options?: TransportRequestOptions) => Promise> + getMemoryStats: (params?: T.TODO, options?: TransportRequestOptions) => Promise> getModelSnapshotUpgradeStats: (params?: T.TODO, options?: TransportRequestOptions) => Promise> getModelSnapshots: (params: T.MlGetModelSnapshotsRequest| TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions) => Promise> getOverallBuckets: (params: T.MlGetOverallBucketsRequest| TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions) => Promise> @@ -427,6 +428,9 @@ interface KibanaClient { hasPrivileges: (params?: T.SecurityHasPrivilegesRequest| TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptions) => Promise> invalidateApiKey: (params?: T.SecurityInvalidateApiKeyRequest| TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions) => Promise> invalidateToken: (params?: T.SecurityInvalidateTokenRequest| TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptions) => Promise> + oidcAuthenticate: (params?: T.TODO, options?: TransportRequestOptions) => Promise> + oidcLogout: (params?: T.TODO, options?: TransportRequestOptions) => Promise> + oidcPrepareAuthentication: (params?: T.TODO, options?: TransportRequestOptions) => Promise> putPrivileges: (params?: T.SecurityPutPrivilegesRequest| TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptions) => Promise> putRole: (params: T.SecurityPutRoleRequest| TB.SecurityPutRoleRequest, options?: TransportRequestOptions) => Promise> putRoleMapping: (params: T.SecurityPutRoleMappingRequest| TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptions) => Promise> diff --git a/src/api/types.ts b/src/api/types.ts index f81a5de01..2156290ce 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -545,7 +545,7 @@ export interface MgetResponse { export type MgetResponseItem = GetGetResult | MgetMultiGetError -export interface MsearchMultiSearchItem extends SearchResponse { +export interface MsearchMultiSearchItem extends SearchResponseBody { status?: integer } @@ -920,8 +920,7 @@ export interface ScrollRequest extends RequestBase { rest_total_hits_as_int?: boolean } -export interface ScrollResponse> extends SearchResponse { -} +export type ScrollResponse> = SearchResponseBody export interface SearchRequest extends RequestBase { index?: Indices @@ -987,12 +986,14 @@ export interface SearchRequest extends RequestBase { runtime_mappings?: MappingRuntimeFields } -export interface SearchResponse> { +export type SearchResponse> = SearchResponseBody + +export interface SearchResponseBody { took: long timed_out: boolean _shards: ShardStatistics hits: SearchHitsMetadata - aggregations?: TAggregations + aggregations?: Record _clusters?: ClusterStatistics fields?: Record max_score?: double @@ -5809,6 +5810,10 @@ export type CatCatDfaColumns = CatCatDfaColumn | CatCatDfaColumn[] export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters { } +export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v' + +export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[] + export type CatCatTransformColumn = 'changes_last_detection_time' | 'cldt' | 'checkpoint' | 'cp' | 'checkpoint_duration_time_exp_avg' | 'cdtea' | 'checkpointTimeExpAvg' | 'checkpoint_progress' | 'c' | 'checkpointProgress' | 'create_time' | 'ct' | 'createTime' | 'delete_time' | 'dtime' | 'description' | 'd' | 'dest_index' | 'di' | 'destIndex' | 'documents_deleted' | 'docd' | 'documents_indexed' | 'doci' | 'docs_per_second' | 'dps' | 'documents_processed' | 'docp' | 'frequency' | 'f' | 'id' | 'index_failure' | 'if' | 'index_time' | 'itime' | 'index_total' | 'it' | 'indexed_documents_exp_avg' | 'idea' | 'last_search_time' | 'lst' | 'lastSearchTime' | 'max_page_search_size' | 'mpsz' | 'pages_processed' | 'pp' | 'pipeline' | 'p' | 'processed_documents_exp_avg' | 'pdea' | 'processing_time' | 'pt' | 'reason' | 'r' | 'search_failure' | 'sf' | 'search_time' | 'stime' | 'search_total' | 'st' | 'source_index' | 'si' | 'sourceIndex' | 'state' | 's' | 'transform_type' | 'tt' | 'trigger_count' | 'tc' | 'version' | 'v' export type CatCatTransformColumns = CatCatTransformColumn | CatCatTransformColumn[] @@ -6582,6 +6587,8 @@ export interface CatMlTrainedModelsRequest extends CatCatRequestBase { model_id?: Id allow_no_match?: boolean bytes?: Bytes + h?: CatCatTrainedModelsColumns + s?: CatCatTrainedModelsColumns from?: integer size?: integer } @@ -9229,6 +9236,28 @@ export interface IndicesIndexState { data_stream?: DataStreamName } +export interface IndicesIndexTemplate { + index_patterns: Names + composed_of: Name[] + template?: IndicesIndexTemplateSummary + version?: VersionNumber + priority?: long + _meta?: Metadata + allow_auto_create?: boolean + data_stream?: IndicesIndexTemplateDataStreamConfiguration +} + +export interface IndicesIndexTemplateDataStreamConfiguration { + hidden?: boolean + allow_custom_routing?: boolean +} + +export interface IndicesIndexTemplateSummary { + aliases?: Record + mappings?: MappingTypeMapping + settings?: IndicesIndexSettings +} + export interface IndicesIndexVersioning { created: VersionString created_string?: VersionString @@ -9787,26 +9816,9 @@ export interface IndicesGetFieldMappingTypeFieldMappings { mappings: Partial> } -export interface IndicesGetIndexTemplateIndexTemplate { - index_patterns: Name[] - composed_of: Name[] - template?: IndicesGetIndexTemplateIndexTemplateSummary - version?: VersionNumber - priority?: long - _meta?: Metadata - allow_auto_create?: boolean - data_stream?: Record -} - export interface IndicesGetIndexTemplateIndexTemplateItem { name: Name - index_template: IndicesGetIndexTemplateIndexTemplate -} - -export interface IndicesGetIndexTemplateIndexTemplateSummary { - aliases?: Record - mappings?: MappingTypeMapping - settings?: Record + index_template: IndicesIndexTemplate } export interface IndicesGetIndexTemplateRequest extends RequestBase { @@ -10300,18 +10312,18 @@ export interface IndicesSimulateTemplateRequest extends RequestBase { name?: Name create?: boolean master_timeout?: Time - template?: IndicesGetIndexTemplateIndexTemplate + template?: IndicesIndexTemplate } export interface IndicesSimulateTemplateResponse { + overlapping?: IndicesSimulateTemplateOverlapping[] template: IndicesSimulateTemplateTemplate } export interface IndicesSimulateTemplateTemplate { aliases: Record mappings: MappingTypeMapping - settings: Record - overlapping: IndicesSimulateTemplateOverlapping[] + settings: IndicesIndexSettings } export interface IndicesSplitRequest extends RequestBase { @@ -11893,10 +11905,10 @@ export interface MlModelSizeStats { export interface MlModelSnapshot { description?: string job_id: Id - latest_record_time_stamp: integer - latest_result_time_stamp: integer + latest_record_time_stamp?: integer + latest_result_time_stamp?: integer min_version: VersionString - model_size_stats: MlModelSizeStats + model_size_stats?: MlModelSizeStats retain: boolean snapshot_doc_count: long snapshot_id: Id @@ -12139,7 +12151,7 @@ export interface MlDeleteCalendarEventResponse extends AcknowledgedResponseBase export interface MlDeleteCalendarJobRequest extends RequestBase { calendar_id: Id - job_id: Id + job_id: Ids } export interface MlDeleteCalendarJobResponse { @@ -12482,7 +12494,7 @@ export interface MlGetDatafeedsResponse { } export interface MlGetFiltersRequest extends RequestBase { - filter_id?: Id + filter_id?: Ids from?: integer size?: integer } @@ -12599,7 +12611,7 @@ export interface MlGetTrainedModelsResponse { } export interface MlGetTrainedModelsStatsRequest extends RequestBase { - model_id?: Id + model_id?: Ids allow_no_match?: boolean from?: integer size?: integer @@ -13718,7 +13730,6 @@ export interface NodesClearRepositoriesMeteringArchiveRequest extends RequestBas } export interface NodesClearRepositoriesMeteringArchiveResponse extends NodesNodesResponseBase { - _nodes: NodeStatistics cluster_name: Name nodes: Record } @@ -13728,7 +13739,6 @@ export interface NodesGetRepositoriesMeteringInfoRequest extends RequestBase { } export interface NodesGetRepositoriesMeteringInfoResponse extends NodesNodesResponseBase { - _nodes: NodeStatistics cluster_name: Name nodes: Record } @@ -15945,7 +15955,7 @@ export interface TransformDeleteTransformResponse extends AcknowledgedResponseBa } export interface TransformGetTransformRequest extends RequestBase { - transform_id?: Name + transform_id?: Names allow_no_match?: boolean from?: integer size?: integer @@ -16254,6 +16264,7 @@ export interface WatcherDataEmailAttachment { export type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' export interface WatcherEmail { + id?: Id bcc?: string[] body?: WatcherEmailBody cc?: string[] diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 1406e71b1..87f1ac3d1 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -574,7 +574,7 @@ export interface MgetResponse { export type MgetResponseItem = GetGetResult | MgetMultiGetError -export interface MsearchMultiSearchItem extends SearchResponse { +export interface MsearchMultiSearchItem extends SearchResponseBody { status?: integer } @@ -975,8 +975,7 @@ export interface ScrollRequest extends RequestBase { } } -export interface ScrollResponse> extends SearchResponse { -} +export type ScrollResponse> = SearchResponseBody export interface SearchRequest extends RequestBase { index?: Indices @@ -1059,12 +1058,14 @@ export interface SearchRequest extends RequestBase { } } -export interface SearchResponse> { +export type SearchResponse> = SearchResponseBody + +export interface SearchResponseBody { took: long timed_out: boolean _shards: ShardStatistics hits: SearchHitsMetadata - aggregations?: TAggregations + aggregations?: Record _clusters?: ClusterStatistics fields?: Record max_score?: double @@ -5927,6 +5928,10 @@ export type CatCatDfaColumns = CatCatDfaColumn | CatCatDfaColumn[] export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters { } +export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v' + +export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[] + export type CatCatTransformColumn = 'changes_last_detection_time' | 'cldt' | 'checkpoint' | 'cp' | 'checkpoint_duration_time_exp_avg' | 'cdtea' | 'checkpointTimeExpAvg' | 'checkpoint_progress' | 'c' | 'checkpointProgress' | 'create_time' | 'ct' | 'createTime' | 'delete_time' | 'dtime' | 'description' | 'd' | 'dest_index' | 'di' | 'destIndex' | 'documents_deleted' | 'docd' | 'documents_indexed' | 'doci' | 'docs_per_second' | 'dps' | 'documents_processed' | 'docp' | 'frequency' | 'f' | 'id' | 'index_failure' | 'if' | 'index_time' | 'itime' | 'index_total' | 'it' | 'indexed_documents_exp_avg' | 'idea' | 'last_search_time' | 'lst' | 'lastSearchTime' | 'max_page_search_size' | 'mpsz' | 'pages_processed' | 'pp' | 'pipeline' | 'p' | 'processed_documents_exp_avg' | 'pdea' | 'processing_time' | 'pt' | 'reason' | 'r' | 'search_failure' | 'sf' | 'search_time' | 'stime' | 'search_total' | 'st' | 'source_index' | 'si' | 'sourceIndex' | 'state' | 's' | 'transform_type' | 'tt' | 'trigger_count' | 'tc' | 'version' | 'v' export type CatCatTransformColumns = CatCatTransformColumn | CatCatTransformColumn[] @@ -6700,6 +6705,8 @@ export interface CatMlTrainedModelsRequest extends CatCatRequestBase { model_id?: Id allow_no_match?: boolean bytes?: Bytes + h?: CatCatTrainedModelsColumns + s?: CatCatTrainedModelsColumns from?: integer size?: integer } @@ -9410,6 +9417,28 @@ export interface IndicesIndexState { data_stream?: DataStreamName } +export interface IndicesIndexTemplate { + index_patterns: Names + composed_of: Name[] + template?: IndicesIndexTemplateSummary + version?: VersionNumber + priority?: long + _meta?: Metadata + allow_auto_create?: boolean + data_stream?: IndicesIndexTemplateDataStreamConfiguration +} + +export interface IndicesIndexTemplateDataStreamConfiguration { + hidden?: boolean + allow_custom_routing?: boolean +} + +export interface IndicesIndexTemplateSummary { + aliases?: Record + mappings?: MappingTypeMapping + settings?: IndicesIndexSettings +} + export interface IndicesIndexVersioning { created: VersionString created_string?: VersionString @@ -9977,26 +10006,9 @@ export interface IndicesGetFieldMappingTypeFieldMappings { mappings: Partial> } -export interface IndicesGetIndexTemplateIndexTemplate { - index_patterns: Name[] - composed_of: Name[] - template?: IndicesGetIndexTemplateIndexTemplateSummary - version?: VersionNumber - priority?: long - _meta?: Metadata - allow_auto_create?: boolean - data_stream?: Record -} - export interface IndicesGetIndexTemplateIndexTemplateItem { name: Name - index_template: IndicesGetIndexTemplateIndexTemplate -} - -export interface IndicesGetIndexTemplateIndexTemplateSummary { - aliases?: Record - mappings?: MappingTypeMapping - settings?: Record + index_template: IndicesIndexTemplate } export interface IndicesGetIndexTemplateRequest extends RequestBase { @@ -10514,18 +10526,18 @@ export interface IndicesSimulateTemplateRequest extends RequestBase { create?: boolean master_timeout?: Time /** @deprecated The use of the 'body' key has been deprecated, use 'template' instead. */ - body?: IndicesGetIndexTemplateIndexTemplate + body?: IndicesIndexTemplate } export interface IndicesSimulateTemplateResponse { + overlapping?: IndicesSimulateTemplateOverlapping[] template: IndicesSimulateTemplateTemplate } export interface IndicesSimulateTemplateTemplate { aliases: Record mappings: MappingTypeMapping - settings: Record - overlapping: IndicesSimulateTemplateOverlapping[] + settings: IndicesIndexSettings } export interface IndicesSplitRequest extends RequestBase { @@ -12126,10 +12138,10 @@ export interface MlModelSizeStats { export interface MlModelSnapshot { description?: string job_id: Id - latest_record_time_stamp: integer - latest_result_time_stamp: integer + latest_record_time_stamp?: integer + latest_result_time_stamp?: integer min_version: VersionString - model_size_stats: MlModelSizeStats + model_size_stats?: MlModelSizeStats retain: boolean snapshot_doc_count: long snapshot_id: Id @@ -12378,7 +12390,7 @@ export interface MlDeleteCalendarEventResponse extends AcknowledgedResponseBase export interface MlDeleteCalendarJobRequest extends RequestBase { calendar_id: Id - job_id: Id + job_id: Ids } export interface MlDeleteCalendarJobResponse { @@ -12765,7 +12777,7 @@ export interface MlGetDatafeedsResponse { } export interface MlGetFiltersRequest extends RequestBase { - filter_id?: Id + filter_id?: Ids from?: integer size?: integer } @@ -12911,7 +12923,7 @@ export interface MlGetTrainedModelsResponse { } export interface MlGetTrainedModelsStatsRequest extends RequestBase { - model_id?: Id + model_id?: Ids allow_no_match?: boolean from?: integer size?: integer @@ -14107,7 +14119,6 @@ export interface NodesClearRepositoriesMeteringArchiveRequest extends RequestBas } export interface NodesClearRepositoriesMeteringArchiveResponse extends NodesNodesResponseBase { - _nodes: NodeStatistics cluster_name: Name nodes: Record } @@ -14117,7 +14128,6 @@ export interface NodesGetRepositoriesMeteringInfoRequest extends RequestBase { } export interface NodesGetRepositoriesMeteringInfoResponse extends NodesNodesResponseBase { - _nodes: NodeStatistics cluster_name: Name nodes: Record } @@ -16422,7 +16432,7 @@ export interface TransformDeleteTransformResponse extends AcknowledgedResponseBa } export interface TransformGetTransformRequest extends RequestBase { - transform_id?: Name + transform_id?: Names allow_no_match?: boolean from?: integer size?: integer @@ -16740,6 +16750,7 @@ export interface WatcherDataEmailAttachment { export type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' export interface WatcherEmail { + id?: Id bcc?: string[] body?: WatcherEmailBody cc?: string[] diff --git a/src/helpers.ts b/src/helpers.ts index 293c23bbe..59b11cc4a 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -228,7 +228,6 @@ export default class Helpers { rest_total_hits_as_int: params.rest_total_hits_as_int, scroll_id }, options as TransportRequestOptionsWithMeta) - // @ts-expect-error response = r as TransportResult, unknown> assert(response !== undefined, 'The response is undefined, please file a bug report') if (response.statusCode !== 429) break