@opensearch-project/opensearch 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/api/OpenSearchApi.d.ts +8 -0
  2. package/api/OpenSearchApi.js +2 -0
  3. package/api/_core/exists.d.ts +1 -3
  4. package/api/_core/existsSource.d.ts +1 -3
  5. package/api/_core/ping.d.ts +1 -3
  6. package/api/_types/_common.aggregations.d.ts +143 -71
  7. package/api/_types/_common.d.ts +2 -1
  8. package/api/_types/_common.mapping.d.ts +1 -0
  9. package/api/_types/_common.query_dsl.d.ts +11 -2
  10. package/api/_types/_core.explain.d.ts +2 -2
  11. package/api/_types/cluster.stats.d.ts +1 -0
  12. package/api/_types/flow_framework.common.d.ts +12 -16
  13. package/api/_types/index.d.ts +2 -0
  14. package/api/_types/indices._common.d.ts +1 -0
  15. package/api/_types/insights._common.d.ts +4 -0
  16. package/api/_types/knn._common.d.ts +8 -7
  17. package/api/_types/ltr._common.d.ts +55 -0
  18. package/api/_types/nodes.info.d.ts +2 -2
  19. package/api/_types/nodes.stats.d.ts +22 -13
  20. package/api/_types/security._common.d.ts +5 -0
  21. package/api/_types/snapshot._common.d.ts +38 -38
  22. package/api/cluster/allocationExplain.js +1 -1
  23. package/api/cluster/deleteComponentTemplate.js +3 -3
  24. package/api/cluster/existsComponentTemplate.d.ts +1 -3
  25. package/api/cluster/existsComponentTemplate.js +2 -2
  26. package/api/cluster/getComponentTemplate.js +3 -3
  27. package/api/cluster/getSettings.js +4 -4
  28. package/api/cluster/health.js +4 -4
  29. package/api/cluster/pendingTasks.js +2 -2
  30. package/api/cluster/postVotingConfigExclusions.js +2 -2
  31. package/api/cluster/putComponentTemplate.js +4 -4
  32. package/api/cluster/putDecommissionAwareness.js +1 -1
  33. package/api/cluster/putSettings.js +4 -4
  34. package/api/cluster/putWeightedRouting.js +1 -1
  35. package/api/cluster/reroute.js +4 -4
  36. package/api/cluster/state.js +4 -4
  37. package/api/cluster/stats.js +2 -2
  38. package/api/flowFramework/delete.d.ts +2 -1
  39. package/api/index.d.ts +2 -0
  40. package/api/indices/exists.d.ts +1 -3
  41. package/api/indices/existsAlias.d.ts +1 -3
  42. package/api/indices/existsIndexTemplate.d.ts +1 -3
  43. package/api/indices/existsTemplate.d.ts +1 -3
  44. package/api/ingest/deletePipeline.js +4 -4
  45. package/api/ingest/getPipeline.js +3 -3
  46. package/api/ingest/processorGrok.js +2 -2
  47. package/api/ingest/putPipeline.js +5 -5
  48. package/api/ingest/simulate.js +3 -3
  49. package/api/ism/existsPolicy.d.ts +1 -3
  50. package/api/knn/searchModels.d.ts +4 -4
  51. package/api/ltr/_api.js +26 -0
  52. package/api/ltr/stats.d.ts +33 -0
  53. package/api/ltr/stats.js +51 -0
  54. package/api/replication/autofollowStats.js +1 -1
  55. package/api/replication/createReplicationRule.js +1 -1
  56. package/api/replication/followerStats.js +1 -1
  57. package/api/replication/leaderStats.js +1 -1
  58. package/api/replication/pause.js +2 -2
  59. package/api/replication/resume.js +1 -1
  60. package/api/replication/start.js +2 -2
  61. package/api/replication/status.js +2 -2
  62. package/api/replication/stop.js +2 -2
  63. package/api/replication/updateSettings.js +2 -2
  64. package/api/sm/createPolicy.js +1 -1
  65. package/api/sm/deletePolicy.js +1 -1
  66. package/api/sm/explainPolicy.js +1 -1
  67. package/api/sm/getPolicies.js +5 -5
  68. package/api/sm/getPolicy.js +1 -1
  69. package/api/sm/startPolicy.js +1 -1
  70. package/api/sm/stopPolicy.js +1 -1
  71. package/api/sm/updatePolicy.js +1 -1
  72. package/api/snapshot/cleanupRepository.js +3 -3
  73. package/api/snapshot/clone.js +6 -6
  74. package/api/snapshot/create.js +6 -6
  75. package/api/snapshot/createRepository.js +6 -6
  76. package/api/snapshot/delete.js +3 -3
  77. package/api/snapshot/deleteRepository.js +4 -4
  78. package/api/snapshot/get.js +5 -5
  79. package/api/snapshot/getRepository.js +4 -4
  80. package/api/snapshot/restore.js +5 -5
  81. package/api/snapshot/status.js +4 -4
  82. package/api/snapshot/verifyRepository.js +3 -3
  83. package/api/tasks/cancel.js +5 -5
  84. package/api/tasks/get.js +3 -3
  85. package/api/tasks/list.js +7 -7
  86. package/lib/pool/BaseConnectionPool.js +6 -0
  87. package/package.json +1 -1
@@ -692,6 +692,14 @@ export default class OpenSearchAPI {
692
692
 
693
693
  };
694
694
 
695
+ ltr: {
696
+ stats (params?: API.Ltr_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ltr_Stats_Response>;
697
+ stats (callback: callbackFn<API.Ltr_Stats_Response>): TransportRequestCallback;
698
+ stats (params: API.Ltr_Stats_Request, callback: callbackFn<API.Ltr_Stats_Response>): TransportRequestCallback;
699
+ stats (params: API.Ltr_Stats_Request, options: TransportRequestOptions, callback: callbackFn<API.Ltr_Stats_Response>): TransportRequestCallback;
700
+
701
+ };
702
+
695
703
  ml: {
696
704
  executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_ExecuteAlgorithm_Response>;
697
705
  executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
@@ -35,6 +35,7 @@ class OpenSearchAPI {
35
35
  ism: new(require('./ism/_api'))(this),
36
36
  knn: new(require('./knn/_api'))(this),
37
37
  list: new(require('./list/_api'))(this),
38
+ ltr: new(require('./ltr/_api'))(this),
38
39
  ml: new(require('./ml/_api'))(this),
39
40
  nodes: new(require('./nodes/_api'))(this),
40
41
  notifications: new(require('./notifications/_api'))(this),
@@ -165,6 +166,7 @@ class OpenSearchAPI {
165
166
  ism: { get() { return this[kApiModules].ism } },
166
167
  knn: { get() { return this[kApiModules].knn } },
167
168
  list: { get() { return this[kApiModules].list } },
169
+ ltr: { get() { return this[kApiModules].ltr } },
168
170
  ml: { get() { return this[kApiModules].ml } },
169
171
  nodes: { get() { return this[kApiModules].nodes } },
170
172
  notifications: { get() { return this[kApiModules].notifications } },
@@ -34,9 +34,7 @@ export interface Exists_Request extends Global.Params {
34
34
  version_type?: Common.VersionType;
35
35
  }
36
36
 
37
- export interface Exists_Response extends ApiResponse {
38
- body: Exists_ResponseBody;
39
- }
37
+ export type Exists_Response = boolean
40
38
 
41
39
  export type Exists_ResponseBody = Record<string, any>
42
40
 
@@ -33,9 +33,7 @@ export interface ExistsSource_Request extends Global.Params {
33
33
  version_type?: Common.VersionType;
34
34
  }
35
35
 
36
- export interface ExistsSource_Response extends ApiResponse {
37
- body: ExistsSource_ResponseBody;
38
- }
36
+ export type ExistsSource_Response = boolean
39
37
 
40
38
  export type ExistsSource_ResponseBody = Record<string, any>
41
39
 
@@ -19,9 +19,7 @@ import * as Global from '../_types/_global'
19
19
 
20
20
  export type Ping_Request = Global.Params & Record<string, any>
21
21
 
22
- export interface Ping_Response extends ApiResponse {
23
- body: Ping_ResponseBody;
24
- }
22
+ export type Ping_Response = boolean
25
23
 
26
24
  export type Ping_ResponseBody = Record<string, any>
27
25
 
@@ -42,79 +42,150 @@ export type Aggregation = {
42
42
  }
43
43
 
44
44
  export type AggregationContainer = {
45
- adjacency_matrix?: AdjacencyMatrixAggregation;
46
45
  aggregations?: Record<string, AggregationContainer>;
47
- auto_date_histogram?: AutoDateHistogramAggregation;
48
- avg?: AverageAggregation;
49
- avg_bucket?: AverageBucketAggregation;
50
- boxplot?: BoxplotAggregation;
51
- bucket_script?: BucketScriptAggregation;
52
- bucket_selector?: BucketSelectorAggregation;
53
- bucket_sort?: BucketSortAggregation;
54
- cardinality?: CardinalityAggregation;
55
- children?: ChildrenAggregation;
56
- composite?: CompositeAggregation;
57
- cumulative_cardinality?: CumulativeCardinalityAggregation;
58
- cumulative_sum?: CumulativeSumAggregation;
59
- date_histogram?: DateHistogramAggregation;
60
- date_range?: DateRangeAggregation;
61
- derivative?: DerivativeAggregation;
62
- diversified_sampler?: DiversifiedSamplerAggregation;
63
- extended_stats?: ExtendedStatsAggregation;
64
- extended_stats_bucket?: ExtendedStatsBucketAggregation;
65
- filter?: Common_QueryDsl.QueryContainer;
66
- filters?: FiltersAggregation;
67
- geo_bounds?: GeoBoundsAggregation;
68
- geo_centroid?: GeoCentroidAggregation;
69
- geo_distance?: GeoDistanceAggregation;
70
- geo_line?: GeoLineAggregation;
71
- geohash_grid?: GeoHashGridAggregation;
72
- geotile_grid?: GeoTileGridAggregation;
73
- global?: GlobalAggregation;
74
- histogram?: HistogramAggregation;
75
- inference?: InferenceAggregation;
76
- ip_range?: IpRangeAggregation;
77
- line?: GeoLineAggregation;
78
- matrix_stats?: MatrixStatsAggregation;
79
- max?: MaxAggregation;
80
- max_bucket?: MaxBucketAggregation;
81
- median_absolute_deviation?: MedianAbsoluteDeviationAggregation;
46
+ aggs?: Record<string, AggregationContainer>;
82
47
  meta?: Common.Metadata;
83
- min?: MinAggregation;
84
- min_bucket?: MinBucketAggregation;
85
- missing?: MissingAggregation;
86
- moving_avg?: MovingAverageAggregation;
87
- moving_fn?: MovingFunctionAggregation;
88
- moving_percentiles?: MovingPercentilesAggregation;
89
- multi_terms?: MultiTermsAggregation;
90
- nested?: NestedAggregation;
91
- normalize?: NormalizeAggregation;
92
- parent?: ParentAggregation;
93
- percentile_ranks?: PercentileRanksAggregation;
94
- percentiles?: PercentilesAggregation;
95
- percentiles_bucket?: PercentilesBucketAggregation;
96
- range?: RangeAggregation;
97
- rare_terms?: RareTermsAggregation;
98
- rate?: RateAggregation;
99
- reverse_nested?: ReverseNestedAggregation;
100
- sampler?: SamplerAggregation;
101
- scripted_metric?: ScriptedMetricAggregation;
102
- serial_diff?: SerialDifferencingAggregation;
103
- significant_terms?: SignificantTermsAggregation;
104
- significant_text?: SignificantTextAggregation;
105
- stats?: StatsAggregation;
106
- stats_bucket?: StatsBucketAggregation;
107
- string_stats?: StringStatsAggregation;
108
- sum?: SumAggregation;
109
- sum_bucket?: SumBucketAggregation;
110
- t_test?: TTestAggregation;
111
- terms?: TermsAggregation;
112
- top_hits?: TopHitsAggregation;
113
- top_metrics?: TopMetricsAggregation;
114
- value_count?: ValueCountAggregation;
115
- variable_width_histogram?: VariableWidthHistogramAggregation;
116
- weighted_avg?: WeightedAverageAggregation;
117
- }
48
+ } & ({
49
+ adjacency_matrix: AdjacencyMatrixAggregation;
50
+ } | {
51
+ auto_date_histogram: AutoDateHistogramAggregation;
52
+ } | {
53
+ avg: AverageAggregation;
54
+ } | {
55
+ avg_bucket: AverageBucketAggregation;
56
+ } | {
57
+ boxplot: BoxplotAggregation;
58
+ } | {
59
+ bucket_script: BucketScriptAggregation;
60
+ } | {
61
+ bucket_selector: BucketSelectorAggregation;
62
+ } | {
63
+ bucket_sort: BucketSortAggregation;
64
+ } | {
65
+ cardinality: CardinalityAggregation;
66
+ } | {
67
+ children: ChildrenAggregation;
68
+ } | {
69
+ composite: CompositeAggregation;
70
+ } | {
71
+ cumulative_cardinality: CumulativeCardinalityAggregation;
72
+ } | {
73
+ cumulative_sum: CumulativeSumAggregation;
74
+ } | {
75
+ date_histogram: DateHistogramAggregation;
76
+ } | {
77
+ date_range: DateRangeAggregation;
78
+ } | {
79
+ derivative: DerivativeAggregation;
80
+ } | {
81
+ diversified_sampler: DiversifiedSamplerAggregation;
82
+ } | {
83
+ extended_stats: ExtendedStatsAggregation;
84
+ } | {
85
+ extended_stats_bucket: ExtendedStatsBucketAggregation;
86
+ } | {
87
+ filter: Common_QueryDsl.QueryContainer;
88
+ } | {
89
+ filters: FiltersAggregation;
90
+ } | {
91
+ geo_bounds: GeoBoundsAggregation;
92
+ } | {
93
+ geo_centroid: GeoCentroidAggregation;
94
+ } | {
95
+ geo_distance: GeoDistanceAggregation;
96
+ } | {
97
+ geohash_grid: GeoHashGridAggregation;
98
+ } | {
99
+ geo_line: GeoLineAggregation;
100
+ } | {
101
+ geotile_grid: GeoTileGridAggregation;
102
+ } | {
103
+ global: GlobalAggregation;
104
+ } | {
105
+ histogram: HistogramAggregation;
106
+ } | {
107
+ ip_range: IpRangeAggregation;
108
+ } | {
109
+ inference: InferenceAggregation;
110
+ } | {
111
+ line: GeoLineAggregation;
112
+ } | {
113
+ matrix_stats: MatrixStatsAggregation;
114
+ } | {
115
+ max: MaxAggregation;
116
+ } | {
117
+ max_bucket: MaxBucketAggregation;
118
+ } | {
119
+ median_absolute_deviation: MedianAbsoluteDeviationAggregation;
120
+ } | {
121
+ min: MinAggregation;
122
+ } | {
123
+ min_bucket: MinBucketAggregation;
124
+ } | {
125
+ missing: MissingAggregation;
126
+ } | {
127
+ moving_avg: MovingAverageAggregation;
128
+ } | {
129
+ moving_percentiles: MovingPercentilesAggregation;
130
+ } | {
131
+ moving_fn: MovingFunctionAggregation;
132
+ } | {
133
+ multi_terms: MultiTermsAggregation;
134
+ } | {
135
+ nested: NestedAggregation;
136
+ } | {
137
+ normalize: NormalizeAggregation;
138
+ } | {
139
+ parent: ParentAggregation;
140
+ } | {
141
+ percentile_ranks: PercentileRanksAggregation;
142
+ } | {
143
+ percentiles: PercentilesAggregation;
144
+ } | {
145
+ percentiles_bucket: PercentilesBucketAggregation;
146
+ } | {
147
+ range: RangeAggregation;
148
+ } | {
149
+ rare_terms: RareTermsAggregation;
150
+ } | {
151
+ rate: RateAggregation;
152
+ } | {
153
+ reverse_nested: ReverseNestedAggregation;
154
+ } | {
155
+ sampler: SamplerAggregation;
156
+ } | {
157
+ scripted_metric: ScriptedMetricAggregation;
158
+ } | {
159
+ serial_diff: SerialDifferencingAggregation;
160
+ } | {
161
+ significant_terms: SignificantTermsAggregation;
162
+ } | {
163
+ significant_text: SignificantTextAggregation;
164
+ } | {
165
+ stats: StatsAggregation;
166
+ } | {
167
+ stats_bucket: StatsBucketAggregation;
168
+ } | {
169
+ string_stats: StringStatsAggregation;
170
+ } | {
171
+ sum: SumAggregation;
172
+ } | {
173
+ sum_bucket: SumBucketAggregation;
174
+ } | {
175
+ terms: TermsAggregation;
176
+ } | {
177
+ top_hits: TopHitsAggregation;
178
+ } | {
179
+ t_test: TTestAggregation;
180
+ } | {
181
+ top_metrics: TopMetricsAggregation;
182
+ } | {
183
+ value_count: ValueCountAggregation;
184
+ } | {
185
+ weighted_avg: WeightedAverageAggregation;
186
+ } | {
187
+ variable_width_histogram: VariableWidthHistogramAggregation;
188
+ })
118
189
 
119
190
  export type AggregationRange = {
120
191
  from?: undefined | number | string;
@@ -1088,6 +1159,7 @@ export type SimpleValueAggregate = SingleMetricAggregateBase & Record<string, an
1088
1159
 
1089
1160
  export type SingleBucketAggregateBase = AggregateBase & {
1090
1161
  doc_count: number;
1162
+ [key: string]: any | Aggregate;
1091
1163
  }
1092
1164
 
1093
1165
  export type SingleMetricAggregateBase = AggregateBase & {
@@ -471,6 +471,7 @@ export type PluginStats = {
471
471
  licensed?: boolean;
472
472
  name: Name;
473
473
  opensearch_version: VersionString;
474
+ optional_extended_plugins?: string[];
474
475
  version: VersionString;
475
476
  }
476
477
 
@@ -894,7 +895,7 @@ export type WaitForActiveShardOptions = 'all' | 'index-setting'
894
895
 
895
896
  export type WaitForActiveShards = number | WaitForActiveShardOptions
896
897
 
897
- export type WaitForEvents = 'high' | 'immediate' | 'languid' | 'low' | 'normal' | 'urgent'
898
+ export type WaitForEvents = 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid'
898
899
 
899
900
  export type WarmerStats = {
900
901
  current: number;
@@ -452,6 +452,7 @@ export type VersionProperty = DocValuesPropertyBase & {
452
452
  }
453
453
 
454
454
  export type WildcardProperty = DocValuesPropertyBase & {
455
+ normalizer?: string;
455
456
  null_value?: string;
456
457
  type: 'wildcard';
457
458
  }
@@ -92,7 +92,15 @@ export type DisMaxQuery = QueryBase & {
92
92
  tie_breaker?: number;
93
93
  }
94
94
 
95
- export type DistanceFeatureQuery = QueryBase & Record<string, any>
95
+ export type DistanceFeatureQuery = QueryBase & ({
96
+ field: Common.Field;
97
+ origin: Common.GeoLocation;
98
+ pivot: Common.Distance;
99
+ } | {
100
+ field: Common.Field;
101
+ origin: Common.DateMath;
102
+ pivot: Common.Duration;
103
+ })
96
104
 
97
105
  export type ExistsQuery = QueryBase & {
98
106
  field: Common.Field;
@@ -224,6 +232,7 @@ export type HasParentQuery = QueryBase & {
224
232
  }
225
233
 
226
234
  export type HybridQuery = QueryBase & {
235
+ pagination_depth?: number;
227
236
  queries?: QueryContainer[];
228
237
  }
229
238
 
@@ -590,7 +599,7 @@ export type RandomScoreFunction = {
590
599
  seed?: number | string;
591
600
  }
592
601
 
593
- export type RangeQuery = RangeQueryBase & Record<string, any>
602
+ export type RangeQuery = RangeQueryBase & (NumberRangeQueryParameters | DateRangeQueryParameters)
594
603
 
595
604
  export type RangeQueryBase = QueryBase & {
596
605
  relation?: RangeRelation;
@@ -18,12 +18,12 @@
18
18
  export type Explanation = {
19
19
  description: string;
20
20
  details: ExplanationDetail[];
21
- value: number | number | number | number;
21
+ value: number;
22
22
  }
23
23
 
24
24
  export type ExplanationDetail = {
25
25
  description: string;
26
26
  details?: ExplanationDetail[];
27
- value: number | number | number | number;
27
+ value: number;
28
28
  }
29
29
 
@@ -117,6 +117,7 @@ export type ClusterNodeCount = {
117
117
  total: number;
118
118
  transform?: number;
119
119
  voting_only?: number;
120
+ warm?: number;
120
121
  }
121
122
 
122
123
  export type ClusterNodes = {
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import * as Common from './_common'
18
+ import * as Common_QueryDsl from './_common.query_dsl'
18
19
 
19
20
  export type All = boolean
20
21
 
@@ -28,16 +29,6 @@ export type FlowFrameworkCreate = {
28
29
  workflows?: Record<string, any>;
29
30
  }
30
31
 
31
- export type FlowFrameworkDeleteResponse = {
32
- _id?: string;
33
- _index?: string;
34
- _primary_term?: number;
35
- _seq_no?: number;
36
- _shards?: shards;
37
- _version?: number;
38
- result?: 'deleted' | 'not_found';
39
- }
40
-
41
32
  export type FlowFrameworkGetResponse = {
42
33
  created_time?: number;
43
34
  description?: string;
@@ -76,22 +67,27 @@ export type itemsObject = {
76
67
 
77
68
  export type Provision = boolean
78
69
 
79
- export type query = {
80
- match?: Record<string, any>;
81
- match_all?: Record<string, any>;
82
- }
83
-
84
70
  export type Reprovision = boolean
85
71
 
72
+ export type ResourcesCreated = {
73
+ resource_id?: string;
74
+ resource_type?: string;
75
+ workflow_step_id?: string;
76
+ workflow_step_name?: string;
77
+ }
78
+
86
79
  export type SearchStateResponse = {
80
+ provision_end_time?: Common.DateTime;
81
+ provision_start_time?: Common.DateTime;
87
82
  provisioning_progress?: string;
83
+ resources_created?: ResourcesCreated;
88
84
  state?: string;
89
85
  user?: user;
90
86
  workflow_id?: string;
91
87
  }
92
88
 
93
89
  export type SearchWorkflowRequest = {
94
- query?: query;
90
+ query?: Common_QueryDsl.QueryContainer;
95
91
  }
96
92
 
97
93
  export type shards = {
@@ -97,6 +97,7 @@ import * as Ingest_Simulate from './ingest.simulate'
97
97
  import * as Insights_Common from './insights._common'
98
98
  import * as Ism_Common from './ism._common'
99
99
  import * as Knn_Common from './knn._common'
100
+ import * as Ltr_Common from './ltr._common'
100
101
  import * as Ml_Common from './ml._common'
101
102
  import * as Nodes_Common from './nodes._common'
102
103
  import * as Nodes_Info from './nodes.info'
@@ -206,6 +207,7 @@ export {
206
207
  Insights_Common,
207
208
  Ism_Common,
208
209
  Knn_Common,
210
+ Ltr_Common,
209
211
  Ml_Common,
210
212
  Nodes_Common,
211
213
  Nodes_Info,
@@ -134,6 +134,7 @@ export type IndexRoutingAllocation = {
134
134
  enable?: IndexRoutingAllocationOptions;
135
135
  include?: IndexRoutingAllocationInclude;
136
136
  initial_recovery?: IndexRoutingAllocationInitialRecovery;
137
+ total_primary_shards_per_node?: Common.StringifiedInteger;
137
138
  total_shards_per_node?: Common.StringifiedInteger;
138
139
  }
139
140
 
@@ -18,6 +18,8 @@ import * as Common from './_common'
18
18
  import * as Common_QueryDsl from './_common.query_dsl'
19
19
  import * as Core_Search from './_core.search'
20
20
 
21
+ export type GroupingType = 'NONE' | 'SIMILARITY' | 'none' | 'similarity'
22
+
21
23
  export type Measurement = {
22
24
  aggregationType?: string;
23
25
  count?: number;
@@ -80,6 +82,8 @@ export type TopQueriesResponse = {
80
82
  }
81
83
 
82
84
  export type TopQuery = {
85
+ group_by?: GroupingType;
86
+ id?: string;
83
87
  indices?: string[];
84
88
  labels?: Record<string, any>;
85
89
  measurements?: Measurements;
@@ -16,8 +16,6 @@
16
16
 
17
17
  import * as Common from './_common'
18
18
 
19
- export type DefaultOperator = 'AND' | 'OR'
20
-
21
19
  export type DeletedModel = {
22
20
  model_id: string;
23
21
  result: 'deleted' | 'error';
@@ -43,6 +41,13 @@ export type GraphStats = {
43
41
  refresh?: GraphRefreshStats;
44
42
  }
45
43
 
44
+ export type KnnMethod = {
45
+ engine?: string;
46
+ name: string;
47
+ parameters?: Record<string, any>;
48
+ space_type?: string;
49
+ }
50
+
46
51
  export type NodeStats = {
47
52
  cache_capacity_reached?: boolean;
48
53
  eviction_count?: number;
@@ -79,8 +84,6 @@ export type NodeStats = {
79
84
  training_requests?: number;
80
85
  }
81
86
 
82
- export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch'
83
-
84
87
  export type Stats = {
85
88
  _nodes?: Common.NodeStatistics;
86
89
  circuit_breaker_triggered?: boolean;
@@ -89,14 +92,12 @@ export type Stats = {
89
92
  nodes?: Record<string, NodeStats>;
90
93
  }
91
94
 
92
- export type SuggestMode = 'always' | 'missing' | 'popular'
93
-
94
95
  export type TrainedModel = {
95
96
  compression_level?: string;
96
97
  description?: string;
97
98
  dimension: number;
98
99
  max_training_vector_count?: number;
99
- method?: string;
100
+ method?: KnnMethod;
100
101
  mode?: string;
101
102
  search_size?: number;
102
103
  spaceType?: string;
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright OpenSearch Contributors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * The OpenSearch Contributors require contributions made to
6
+ * this file be licensed under the Apache-2.0 license or a
7
+ * compatible open source license.
8
+ *
9
+ */
10
+
11
+ /*
12
+ * This file was generated from the OpenSearch API Spec. Do NOT edit it
13
+ * manually. If you want to make changes, either update the spec or
14
+ * modify the API generator.
15
+ */
16
+
17
+ import * as Common from './_common'
18
+
19
+ export type CacheStat = {
20
+ entry_count?: number;
21
+ eviction_count?: number;
22
+ hit_count?: number;
23
+ memory_usage_in_bytes?: number;
24
+ miss_count?: number;
25
+ }
26
+
27
+ export type CacheStats = {
28
+ feature?: CacheStat;
29
+ featureset?: CacheStat;
30
+ model?: CacheStat;
31
+ }
32
+
33
+ export type NodeStats = {
34
+ cache?: CacheStats;
35
+ request_error_count?: number;
36
+ request_total_count?: number;
37
+ }
38
+
39
+ export type Stats = {
40
+ _nodes?: Common.NodeStatistics;
41
+ cluster_name?: Common.Name;
42
+ nodes?: Record<string, NodeStats>;
43
+ status?: string;
44
+ stores?: StoreStats;
45
+ }
46
+
47
+ export type StoreStat = {
48
+ feature_count?: number;
49
+ featureset_count?: number;
50
+ model_count?: number;
51
+ status?: string;
52
+ }
53
+
54
+ export type StoreStats = Record<string, StoreStat>
55
+
@@ -40,8 +40,8 @@ export type NodeInfo = {
40
40
  search_pipelines?: NodeInfoSearchPipelines;
41
41
  settings?: NodeInfoSettings;
42
42
  thread_pool?: Record<string, NodeThreadPoolInfo>;
43
- total_indexing_buffer?: Common.ByteCount;
44
- total_indexing_buffer_in_bytes?: Common.HumanReadableByteCount;
43
+ total_indexing_buffer?: Common.ByteCount | Common.HumanReadableByteCount;
44
+ total_indexing_buffer_in_bytes?: Common.HumanReadableByteCount | Common.ByteCount;
45
45
  transport?: NodeInfoTransport;
46
46
  transport_address?: Common.TransportAddress;
47
47
  version: Common.VersionString;
@@ -36,6 +36,27 @@ export type Breaker = {
36
36
  tripped?: number;
37
37
  }
38
38
 
39
+ export type CacheIndicesStats = CacheStatsBase & Record<string, any>
40
+
41
+ export type CacheShardStats = CacheStatsBase & Record<string, any>
42
+
43
+ export type CachesStats = Record<string, CacheStats>
44
+
45
+ export type CacheStats = CacheStatsBase & {
46
+ indices?: Record<string, CacheIndicesStats>;
47
+ shards?: Record<string, CacheShardStats>;
48
+ store_name?: string;
49
+ }
50
+
51
+ export type CacheStatsBase = {
52
+ evictions?: number;
53
+ hit_count?: number;
54
+ item_count?: number;
55
+ miss_count?: number;
56
+ size?: Common.HumanReadableByteCount;
57
+ size_in_bytes?: Common.ByteCount;
58
+ }
59
+
39
60
  export type CgroupCpuAcctStats = {
40
61
  control_group?: string;
41
62
  usage_nanos?: Common.DurationValueUnitNanos;
@@ -363,18 +384,6 @@ export type ShardAdmissionControlStats = {
363
384
  global_io_usage?: UsageStats;
364
385
  }
365
386
 
366
- export type ShardCachesStats = Record<string, ShardCacheStats>
367
-
368
- export type ShardCacheStats = {
369
- evictions?: number;
370
- hit_count?: number;
371
- item_count?: number;
372
- miss_count?: number;
373
- size?: Common.HumanReadableByteCount;
374
- size_in_bytes?: Common.ByteCount;
375
- store_name?: string;
376
- }
377
-
378
387
  export type ShardClusterManagerThrottlingStats = {
379
388
  stats?: ShardClusterManagerThrottlingStatsDetail;
380
389
  }
@@ -594,7 +603,7 @@ export type Stats = {
594
603
  admission_control?: ShardAdmissionControlStats;
595
604
  attributes?: Record<string, string>;
596
605
  breakers?: Record<string, Breaker>;
597
- caches?: ShardCachesStats;
606
+ caches?: CachesStats;
598
607
  cluster_manager_throttling?: ShardClusterManagerThrottlingStats;
599
608
  discovery?: Discovery;
600
609
  fs?: FileSystem;
@@ -115,6 +115,11 @@ export type ChangePasswordRequestContent = {
115
115
  password: string;
116
116
  }
117
117
 
118
+ export type ClientError = {
119
+ error?: string;
120
+ status?: number;
121
+ }
122
+
118
123
  export type ComplianceConfig = {
119
124
  enabled?: boolean;
120
125
  external_config?: boolean;