@opensearch-project/opensearch 3.3.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 (151) 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.analysis.d.ts +11 -1
  8. package/api/_types/_common.d.ts +2 -1
  9. package/api/_types/_common.mapping.d.ts +1 -0
  10. package/api/_types/_common.query_dsl.d.ts +11 -2
  11. package/api/_types/_core.explain.d.ts +2 -2
  12. package/api/_types/_core.search.d.ts +134 -7
  13. package/api/_types/cluster.stats.d.ts +1 -0
  14. package/api/_types/flow_framework.common.d.ts +12 -16
  15. package/api/_types/index.d.ts +2 -0
  16. package/api/_types/indices._common.d.ts +1 -0
  17. package/api/_types/insights._common.d.ts +4 -0
  18. package/api/_types/knn._common.d.ts +8 -7
  19. package/api/_types/ltr._common.d.ts +55 -0
  20. package/api/_types/nodes.info.d.ts +2 -2
  21. package/api/_types/nodes.stats.d.ts +22 -13
  22. package/api/_types/search_pipeline._common.d.ts +2 -60
  23. package/api/_types/security._common.d.ts +5 -0
  24. package/api/_types/snapshot._common.d.ts +38 -38
  25. package/api/cluster/allocationExplain.js +1 -1
  26. package/api/cluster/deleteComponentTemplate.js +3 -3
  27. package/api/cluster/existsComponentTemplate.d.ts +1 -3
  28. package/api/cluster/existsComponentTemplate.js +2 -2
  29. package/api/cluster/getComponentTemplate.js +3 -3
  30. package/api/cluster/getSettings.js +4 -4
  31. package/api/cluster/health.js +5 -5
  32. package/api/cluster/pendingTasks.js +2 -2
  33. package/api/cluster/postVotingConfigExclusions.js +2 -2
  34. package/api/cluster/putComponentTemplate.js +4 -4
  35. package/api/cluster/putDecommissionAwareness.js +1 -1
  36. package/api/cluster/putSettings.js +4 -4
  37. package/api/cluster/putWeightedRouting.js +1 -1
  38. package/api/cluster/reroute.js +4 -4
  39. package/api/cluster/state.js +4 -4
  40. package/api/cluster/stats.js +2 -2
  41. package/api/flowFramework/delete.d.ts +2 -1
  42. package/api/index.d.ts +2 -0
  43. package/api/indices/exists.d.ts +1 -3
  44. package/api/indices/existsAlias.d.ts +1 -3
  45. package/api/indices/existsIndexTemplate.d.ts +1 -3
  46. package/api/indices/existsTemplate.d.ts +1 -3
  47. package/api/ingest/deletePipeline.js +4 -4
  48. package/api/ingest/getPipeline.js +3 -3
  49. package/api/ingest/processorGrok.js +2 -2
  50. package/api/ingest/putPipeline.js +5 -5
  51. package/api/ingest/simulate.js +3 -3
  52. package/api/ism/existsPolicy.d.ts +1 -3
  53. package/api/knn/searchModels.d.ts +4 -4
  54. package/api/ltr/_api.js +26 -0
  55. package/api/ltr/stats.d.ts +33 -0
  56. package/api/ltr/stats.js +51 -0
  57. package/api/replication/autofollowStats.js +1 -1
  58. package/api/replication/createReplicationRule.js +1 -1
  59. package/api/replication/followerStats.js +1 -1
  60. package/api/replication/leaderStats.js +1 -1
  61. package/api/replication/pause.js +2 -2
  62. package/api/replication/resume.js +1 -1
  63. package/api/replication/start.js +2 -2
  64. package/api/replication/status.js +2 -2
  65. package/api/replication/stop.js +2 -2
  66. package/api/replication/updateSettings.js +2 -2
  67. package/api/security/authinfo.js +3 -3
  68. package/api/security/authtoken.js +1 -1
  69. package/api/security/configUpgradeCheck.js +1 -1
  70. package/api/security/configUpgradePerform.js +1 -1
  71. package/api/security/createAllowlist.js +1 -1
  72. package/api/security/createRole.js +1 -1
  73. package/api/security/createRoleMapping.js +1 -1
  74. package/api/security/createTenant.js +1 -1
  75. package/api/security/createUpdateTenancyConfig.js +1 -1
  76. package/api/security/createUser.js +1 -1
  77. package/api/security/createUserLegacy.js +1 -1
  78. package/api/security/deleteActionGroup.js +1 -1
  79. package/api/security/deleteDistinguishedName.js +2 -2
  80. package/api/security/deleteRole.js +1 -1
  81. package/api/security/deleteRoleMapping.js +1 -1
  82. package/api/security/deleteTenant.js +1 -1
  83. package/api/security/deleteUser.js +1 -1
  84. package/api/security/flushCache.js +1 -1
  85. package/api/security/generateOboToken.js +1 -1
  86. package/api/security/generateUserToken.js +2 -2
  87. package/api/security/generateUserTokenLegacy.js +1 -1
  88. package/api/security/getAccountDetails.js +1 -1
  89. package/api/security/getAllCertificates.js +2 -2
  90. package/api/security/getAllowlist.js +1 -1
  91. package/api/security/getConfiguration.js +1 -1
  92. package/api/security/getDashboardsInfo.js +1 -1
  93. package/api/security/getDistinguishedName.js +3 -3
  94. package/api/security/getDistinguishedNames.js +2 -2
  95. package/api/security/getNodeCertificates.js +4 -4
  96. package/api/security/getPermissionsInfo.js +1 -1
  97. package/api/security/getRole.js +1 -1
  98. package/api/security/getRoleMapping.js +2 -2
  99. package/api/security/getSslinfo.js +2 -2
  100. package/api/security/getTenancyConfig.js +1 -1
  101. package/api/security/getTenant.js +1 -1
  102. package/api/security/getUser.js +1 -1
  103. package/api/security/health.js +2 -2
  104. package/api/security/migrate.js +1 -1
  105. package/api/security/patchActionGroup.js +1 -1
  106. package/api/security/patchActionGroups.js +1 -1
  107. package/api/security/patchAllowlist.js +1 -1
  108. package/api/security/patchAuditConfiguration.js +1 -1
  109. package/api/security/patchConfiguration.js +1 -1
  110. package/api/security/patchDistinguishedName.js +2 -2
  111. package/api/security/patchDistinguishedNames.js +1 -1
  112. package/api/security/patchRole.js +1 -1
  113. package/api/security/patchRoleMapping.js +2 -2
  114. package/api/security/patchRoleMappings.js +1 -1
  115. package/api/security/patchTenant.js +1 -1
  116. package/api/security/patchTenants.js +1 -1
  117. package/api/security/patchUser.js +1 -1
  118. package/api/security/patchUsers.js +1 -1
  119. package/api/security/postDashboardsInfo.js +1 -1
  120. package/api/security/reloadHttpCertificates.js +1 -1
  121. package/api/security/reloadTransportCertificates.js +1 -1
  122. package/api/security/tenantInfo.js +1 -1
  123. package/api/security/updateConfiguration.js +1 -1
  124. package/api/security/updateDistinguishedName.js +2 -2
  125. package/api/security/validate.js +1 -1
  126. package/api/security/whoAmI.js +1 -1
  127. package/api/security/whoAmIProtected.js +1 -1
  128. package/api/sm/createPolicy.js +1 -1
  129. package/api/sm/deletePolicy.js +1 -1
  130. package/api/sm/explainPolicy.js +1 -1
  131. package/api/sm/getPolicies.js +5 -5
  132. package/api/sm/getPolicy.js +1 -1
  133. package/api/sm/startPolicy.js +1 -1
  134. package/api/sm/stopPolicy.js +1 -1
  135. package/api/sm/updatePolicy.js +1 -1
  136. package/api/snapshot/cleanupRepository.js +3 -3
  137. package/api/snapshot/clone.js +6 -6
  138. package/api/snapshot/create.js +6 -6
  139. package/api/snapshot/createRepository.js +6 -6
  140. package/api/snapshot/delete.js +3 -3
  141. package/api/snapshot/deleteRepository.js +4 -4
  142. package/api/snapshot/get.js +5 -5
  143. package/api/snapshot/getRepository.js +4 -4
  144. package/api/snapshot/restore.js +5 -5
  145. package/api/snapshot/status.js +4 -4
  146. package/api/snapshot/verifyRepository.js +3 -3
  147. package/api/tasks/cancel.js +5 -5
  148. package/api/tasks/get.js +3 -3
  149. package/api/tasks/list.js +7 -7
  150. package/lib/pool/BaseConnectionPool.js +6 -0
  151. 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 & {
@@ -493,6 +493,16 @@ export type SimpleAnalyzer = {
493
493
  version?: Common.VersionString;
494
494
  }
495
495
 
496
+ export type SimplePatternSplitTokenizer = TokenizerBase & {
497
+ pattern?: string;
498
+ type: 'simple_pattern_split';
499
+ }
500
+
501
+ export type SimplePatternTokenizer = TokenizerBase & {
502
+ pattern?: string;
503
+ type: 'simple_pattern';
504
+ }
505
+
496
506
  export type SmartcnAnalyzer = {
497
507
  type?: 'smartcn';
498
508
  }
@@ -598,7 +608,7 @@ export type TokenizerBase = {
598
608
  version?: Common.VersionString;
599
609
  }
600
610
 
601
- export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | IcuTokenizer | SmartcnTokenizer
611
+ export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | SimplePatternTokenizer | SimplePatternSplitTokenizer | IcuTokenizer | SmartcnTokenizer
602
612
 
603
613
  export type TrimTokenFilter = TokenFilterBase & {
604
614
  type: 'trim';
@@ -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
 
@@ -52,21 +52,16 @@ export type AggregationProfileDebug = {
52
52
  collection_strategy?: string;
53
53
  deferred_aggregators?: string[];
54
54
  delegate?: string;
55
- delegate_debug?: AggregationProfileDebug;
55
+ delegate_debug?: AggregationProfileDelegateDebug;
56
56
  empty_collectors_used?: number;
57
57
  extract_count?: number;
58
58
  extract_ns?: number;
59
- filters?: AggregationProfileDelegateDebugFilter[];
60
59
  has_filter?: boolean;
61
60
  map_reducer?: string;
62
61
  numeric_collectors_used?: number;
63
62
  ordinals_collectors_overhead_too_high?: number;
64
63
  ordinals_collectors_used?: number;
65
64
  result_strategy?: string;
66
- segments_collected?: number;
67
- segments_counted?: number;
68
- segments_with_deleted_docs?: number;
69
- segments_with_doc_count_field?: number;
70
65
  segments_with_multi_valued_ords?: number;
71
66
  segments_with_single_valued_ords?: number;
72
67
  string_hashing_collectors_used?: number;
@@ -75,6 +70,14 @@ export type AggregationProfileDebug = {
75
70
  values_fetched?: number;
76
71
  }
77
72
 
73
+ export type AggregationProfileDelegateDebug = {
74
+ filters?: AggregationProfileDelegateDebugFilter[];
75
+ segments_collected?: number;
76
+ segments_counted?: number;
77
+ segments_with_deleted_docs?: number;
78
+ segments_with_doc_count_field?: number;
79
+ }
80
+
78
81
  export type AggregationProfileDelegateDebugFilter = {
79
82
  query?: string;
80
83
  results_from_metadata?: number;
@@ -93,10 +96,25 @@ export type Collector = {
93
96
  time_in_nanos: Common.DurationValueUnitNanos;
94
97
  }
95
98
 
99
+ export type CompletionContext = Context | {
100
+ boost?: number;
101
+ context: Context;
102
+ neighbours?: Common.GeoHashPrecision[];
103
+ precision?: Common.GeoHashPrecision;
104
+ prefix?: boolean;
105
+ }
106
+
96
107
  export type CompletionSuggest = SuggestBase & {
97
108
  options: CompletionSuggestOption | CompletionSuggestOption[];
98
109
  }
99
110
 
111
+ export type CompletionSuggester = SuggesterBase & {
112
+ contexts?: Record<string, CompletionContext[]>;
113
+ fuzzy?: SuggestFuzziness;
114
+ regex?: string;
115
+ skip_duplicates?: boolean;
116
+ }
117
+
100
118
  export type CompletionSuggestOption = {
101
119
  _id?: string;
102
120
  _index?: Common.IndexName;
@@ -112,6 +130,20 @@ export type CompletionSuggestOption = {
112
130
 
113
131
  export type Context = string | Common.GeoLocation
114
132
 
133
+ export type DirectGenerator = {
134
+ field: string;
135
+ max_edits?: number;
136
+ max_inspections?: number;
137
+ max_term_freq?: number;
138
+ min_doc_freq?: number;
139
+ min_word_length?: number;
140
+ post_filter?: string;
141
+ pre_filter?: string;
142
+ prefix_length?: number;
143
+ size?: number;
144
+ suggest_mode?: Common.SuggestMode;
145
+ }
146
+
115
147
  export type FetchProfile = {
116
148
  breakdown: FetchProfileBreakdown;
117
149
  children?: FetchProfile[];
@@ -143,6 +175,15 @@ export type FieldCollapse = {
143
175
  max_concurrent_group_searches?: number;
144
176
  }
145
177
 
178
+ export type FieldSuggester = {
179
+ completion?: CompletionSuggester;
180
+ phrase?: PhraseSuggester;
181
+ prefix?: string;
182
+ regex?: string;
183
+ term?: TermSuggester;
184
+ text?: string;
185
+ }
186
+
146
187
  export type Highlight = HighlightBase & {
147
188
  encoder?: HighlighterEncoder;
148
189
  fields: Record<string, HighlightField>;
@@ -240,6 +281,16 @@ export type InnerHitsResult = {
240
281
  hits: HitsMetadata;
241
282
  }
242
283
 
284
+ export type LaplaceSmoothingModel = {
285
+ alpha: number;
286
+ }
287
+
288
+ export type LinearInterpolationSmoothingModel = {
289
+ bigram_lambda: number;
290
+ trigram_lambda: number;
291
+ unigram_lambda: number;
292
+ }
293
+
243
294
  export type NestedIdentity = {
244
295
  _nested?: NestedIdentity;
245
296
  field: Common.Field;
@@ -250,6 +301,38 @@ export type PhraseSuggest = SuggestBase & {
250
301
  options: PhraseSuggestOption | PhraseSuggestOption[];
251
302
  }
252
303
 
304
+ export type PhraseSuggestCollate = {
305
+ params?: Record<string, any>;
306
+ prune?: boolean;
307
+ query: PhraseSuggestCollateQuery;
308
+ }
309
+
310
+ export type PhraseSuggestCollateQuery = {
311
+ id?: string;
312
+ source?: string;
313
+ }
314
+
315
+ export type PhraseSuggester = SuggesterBase & {
316
+ collate?: PhraseSuggestCollate;
317
+ confidence?: number;
318
+ direct_generator?: DirectGenerator[];
319
+ force_unigrams?: boolean;
320
+ gram_size?: number;
321
+ highlight?: PhraseSuggestHighlight;
322
+ max_errors?: number;
323
+ real_word_error_likelihood?: number;
324
+ separator?: string;
325
+ shard_size?: number;
326
+ smoothing?: SmoothingModel;
327
+ text?: string;
328
+ token_limit?: number;
329
+ }
330
+
331
+ export type PhraseSuggestHighlight = {
332
+ post_tag: string;
333
+ pre_tag: string;
334
+ }
335
+
253
336
  export type PhraseSuggestOption = {
254
337
  collate_match?: boolean;
255
338
  highlighted?: string;
@@ -340,6 +423,12 @@ export type ShardProfile = {
340
423
  searches: SearchProfile[];
341
424
  }
342
425
 
426
+ export type SmoothingModel = {
427
+ laplace?: LaplaceSmoothingModel;
428
+ linear_interpolation?: LinearInterpolationSmoothingModel;
429
+ stupid_backoff?: StupidBackoffSmoothingModel;
430
+ }
431
+
343
432
  export type SourceConfig = boolean | SourceFilter
344
433
 
345
434
  export type SourceConfigParam = boolean | Common.Fields
@@ -349,6 +438,12 @@ export type SourceFilter = Common.Fields | {
349
438
  includes?: Common.Fields;
350
439
  }
351
440
 
441
+ export type StringDistance = 'damerau_levenshtein' | 'internal' | 'jaro_winkler' | 'levenshtein' | 'ngram'
442
+
443
+ export type StupidBackoffSmoothingModel = {
444
+ discount: number;
445
+ }
446
+
352
447
  export type Suggest = CompletionSuggest | PhraseSuggest | TermSuggest
353
448
 
354
449
  export type SuggestBase = {
@@ -359,15 +454,47 @@ export type SuggestBase = {
359
454
 
360
455
  export type Suggester = {
361
456
  text?: string;
457
+ [key: string]: any | FieldSuggester;
458
+ }
459
+
460
+ export type SuggesterBase = {
461
+ analyzer?: string;
462
+ field: string;
463
+ size?: number;
362
464
  }
363
465
 
466
+ export type SuggestFuzziness = {
467
+ fuzziness: string;
468
+ min_length: number;
469
+ prefix_length: number;
470
+ transpositions: boolean;
471
+ unicode_aware: boolean;
472
+ }
473
+
474
+ export type SuggestSort = 'frequency' | 'score'
475
+
364
476
  export type TermSuggest = SuggestBase & {
365
477
  options: TermSuggestOption | TermSuggestOption[];
366
478
  }
367
479
 
480
+ export type TermSuggester = SuggesterBase & {
481
+ lowercase_terms?: boolean;
482
+ max_edits?: number;
483
+ max_inspections?: number;
484
+ max_term_freq?: number;
485
+ min_doc_freq?: number;
486
+ min_word_length?: number;
487
+ prefix_length?: number;
488
+ shard_size?: number;
489
+ sort?: SuggestSort;
490
+ string_distance?: StringDistance;
491
+ suggest_mode?: Common.SuggestMode;
492
+ text?: string;
493
+ }
494
+
368
495
  export type TermSuggestOption = {
369
496
  collate_match?: boolean;
370
- freq: number;
497
+ freq?: number;
371
498
  highlighted?: string;
372
499
  score: number;
373
500
  text: string;
@@ -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 = {