diff --git a/api/_types/_common.aggregations.d.ts b/api/_types/_common.aggregations.d.ts index 63b6f9645..83c52a51b 100644 --- a/api/_types/_common.aggregations.d.ts +++ b/api/_types/_common.aggregations.d.ts @@ -42,78 +42,9 @@ export type Aggregation = { } export type AggregationContainer = { - adjacency_matrix?: AdjacencyMatrixAggregation; aggregations?: Record; - auto_date_histogram?: AutoDateHistogramAggregation; - avg?: AverageAggregation; - avg_bucket?: AverageBucketAggregation; - boxplot?: BoxplotAggregation; - bucket_script?: BucketScriptAggregation; - bucket_selector?: BucketSelectorAggregation; - bucket_sort?: BucketSortAggregation; - cardinality?: CardinalityAggregation; - children?: ChildrenAggregation; - composite?: CompositeAggregation; - cumulative_cardinality?: CumulativeCardinalityAggregation; - cumulative_sum?: CumulativeSumAggregation; - date_histogram?: DateHistogramAggregation; - date_range?: DateRangeAggregation; - derivative?: DerivativeAggregation; - diversified_sampler?: DiversifiedSamplerAggregation; - extended_stats?: ExtendedStatsAggregation; - extended_stats_bucket?: ExtendedStatsBucketAggregation; - filter?: Common_QueryDsl.QueryContainer; - filters?: FiltersAggregation; - geo_bounds?: GeoBoundsAggregation; - geo_centroid?: GeoCentroidAggregation; - geo_distance?: GeoDistanceAggregation; - geo_line?: GeoLineAggregation; - geohash_grid?: GeoHashGridAggregation; - geotile_grid?: GeoTileGridAggregation; - global?: GlobalAggregation; - histogram?: HistogramAggregation; - inference?: InferenceAggregation; - ip_range?: IpRangeAggregation; - line?: GeoLineAggregation; - matrix_stats?: MatrixStatsAggregation; - max?: MaxAggregation; - max_bucket?: MaxBucketAggregation; - median_absolute_deviation?: MedianAbsoluteDeviationAggregation; + aggs?: Record; meta?: Common.Metadata; - min?: MinAggregation; - min_bucket?: MinBucketAggregation; - missing?: MissingAggregation; - moving_avg?: MovingAverageAggregation; - moving_fn?: MovingFunctionAggregation; - moving_percentiles?: MovingPercentilesAggregation; - multi_terms?: MultiTermsAggregation; - nested?: NestedAggregation; - normalize?: NormalizeAggregation; - parent?: ParentAggregation; - percentile_ranks?: PercentileRanksAggregation; - percentiles?: PercentilesAggregation; - percentiles_bucket?: PercentilesBucketAggregation; - range?: RangeAggregation; - rare_terms?: RareTermsAggregation; - rate?: RateAggregation; - reverse_nested?: ReverseNestedAggregation; - sampler?: SamplerAggregation; - scripted_metric?: ScriptedMetricAggregation; - serial_diff?: SerialDifferencingAggregation; - significant_terms?: SignificantTermsAggregation; - significant_text?: SignificantTextAggregation; - stats?: StatsAggregation; - stats_bucket?: StatsBucketAggregation; - string_stats?: StringStatsAggregation; - sum?: SumAggregation; - sum_bucket?: SumBucketAggregation; - t_test?: TTestAggregation; - terms?: TermsAggregation; - top_hits?: TopHitsAggregation; - top_metrics?: TopMetricsAggregation; - value_count?: ValueCountAggregation; - variable_width_histogram?: VariableWidthHistogramAggregation; - weighted_avg?: WeightedAverageAggregation; } export type AggregationRange = { @@ -1088,6 +1019,7 @@ export type SimpleValueAggregate = SingleMetricAggregateBase & Record; } -export type FlowFrameworkDeleteResponse = { - _id?: string; - _index?: string; - _primary_term?: number; - _seq_no?: number; - _shards?: shards; - _version?: number; - result?: 'deleted' | 'not_found'; -} - export type FlowFrameworkGetResponse = { created_time?: number; description?: string; @@ -76,22 +67,27 @@ export type itemsObject = { export type Provision = boolean -export type query = { - match?: Record; - match_all?: Record; -} - export type Reprovision = boolean +export type ResourcesCreated = { + resource_id?: string; + resource_type?: string; + workflow_step_id?: string; + workflow_step_name?: string; +} + export type SearchStateResponse = { + provision_end_time?: Common.DateTime; + provision_start_time?: Common.DateTime; provisioning_progress?: string; + resources_created?: ResourcesCreated; state?: string; user?: user; workflow_id?: string; } export type SearchWorkflowRequest = { - query?: query; + query?: Common_QueryDsl.QueryContainer; } export type shards = { diff --git a/api/_types/insights._common.d.ts b/api/_types/insights._common.d.ts index 2e4b225a6..067fb1645 100644 --- a/api/_types/insights._common.d.ts +++ b/api/_types/insights._common.d.ts @@ -18,6 +18,8 @@ import * as Common from './_common' import * as Common_QueryDsl from './_common.query_dsl' import * as Core_Search from './_core.search' +export type GroupingType = 'NONE' | 'SIMILARITY' | 'none' | 'similarity' + export type Measurement = { aggregationType?: string; count?: number; @@ -80,6 +82,8 @@ export type TopQueriesResponse = { } export type TopQuery = { + group_by?: GroupingType; + id?: string; indices?: string[]; labels?: Record; measurements?: Measurements; diff --git a/api/_types/knn._common.d.ts b/api/_types/knn._common.d.ts index f96885325..c13231dd8 100644 --- a/api/_types/knn._common.d.ts +++ b/api/_types/knn._common.d.ts @@ -16,8 +16,6 @@ import * as Common from './_common' -export type DefaultOperator = 'AND' | 'OR' - export type DeletedModel = { model_id: string; result: 'deleted' | 'error'; @@ -43,6 +41,13 @@ export type GraphStats = { refresh?: GraphRefreshStats; } +export type KnnMethod = { + engine?: string; + name: string; + parameters?: Record; + space_type?: string; +} + export type NodeStats = { cache_capacity_reached?: boolean; eviction_count?: number; @@ -79,8 +84,6 @@ export type NodeStats = { training_requests?: number; } -export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch' - export type Stats = { _nodes?: Common.NodeStatistics; circuit_breaker_triggered?: boolean; @@ -89,14 +92,12 @@ export type Stats = { nodes?: Record; } -export type SuggestMode = 'always' | 'missing' | 'popular' - export type TrainedModel = { compression_level?: string; description?: string; dimension: number; max_training_vector_count?: number; - method?: string; + method?: KnnMethod; mode?: string; search_size?: number; spaceType?: string; diff --git a/api/flowFramework/delete.d.ts b/api/flowFramework/delete.d.ts index b406fa85a..d3c770a55 100644 --- a/api/flowFramework/delete.d.ts +++ b/api/flowFramework/delete.d.ts @@ -15,6 +15,7 @@ */ import { ApiResponse } from '../../lib/Transport' +import * as Common from '../_types/_common' import * as FlowFramework_Common from '../_types/flow_framework.common' import * as Global from '../_types/_global' @@ -27,5 +28,5 @@ export interface FlowFramework_Delete_Response extends ApiResponse { body: FlowFramework_Delete_ResponseBody; } -export type FlowFramework_Delete_ResponseBody = FlowFramework_Common.FlowFrameworkDeleteResponse +export type FlowFramework_Delete_ResponseBody = Common.WriteResponseBase diff --git a/api/knn/searchModels.d.ts b/api/knn/searchModels.d.ts index f389e6c89..dbd42e219 100644 --- a/api/knn/searchModels.d.ts +++ b/api/knn/searchModels.d.ts @@ -16,9 +16,9 @@ import { ApiResponse } from '../../lib/Transport' import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' import * as Core_Search from '../_types/_core.search' import * as Global from '../_types/_global' -import * as Knn_Common from '../_types/knn._common' export interface Knn_SearchModels_Request extends Global.Params { _source?: string[]; @@ -31,7 +31,7 @@ export interface Knn_SearchModels_Request extends Global.Params { batched_reduce_size?: number; body?: Knn_SearchModels_RequestBody; ccs_minimize_roundtrips?: boolean; - default_operator?: Knn_Common.DefaultOperator; + default_operator?: Common_QueryDsl.Operator; df?: string; docvalue_fields?: string[]; expand_wildcards?: Common.ExpandWildcards; @@ -48,14 +48,14 @@ export interface Knn_SearchModels_Request extends Global.Params { rest_total_hits_as_int?: boolean; routing?: Common.RoutingInQueryString; scroll?: Common.Duration; - search_type?: Knn_Common.SearchType; + search_type?: Common.SearchType; seq_no_primary_term?: boolean; size?: number; sort?: string[]; stats?: string[]; stored_fields?: string[]; suggest_field?: string; - suggest_mode?: Knn_Common.SuggestMode; + suggest_mode?: Common.SuggestMode; suggest_size?: number; suggest_text?: string; terminate_after?: number;