@opensearch-project/opensearch 1.1.0 → 2.0.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 (86) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.json +26 -0
  3. package/.prettierrc.json +5 -0
  4. package/.whitesource +15 -0
  5. package/ADMINS.md +18 -11
  6. package/COMPATIBILITY.md +24 -0
  7. package/DEVELOPER_GUIDE.md +22 -5
  8. package/MAINTAINERS.md +23 -18
  9. package/README.md +100 -101
  10. package/RELEASING.md +3 -3
  11. package/SECURITY.md +1 -1
  12. package/api/api/bulk.js +53 -26
  13. package/api/api/cat.js +354 -264
  14. package/api/api/clear_scroll.js +17 -17
  15. package/api/api/cluster.js +366 -219
  16. package/api/api/count.js +55 -24
  17. package/api/api/create.js +50 -24
  18. package/api/api/dangling_indices.js +95 -51
  19. package/api/api/delete.js +49 -22
  20. package/api/api/delete_by_query.js +88 -25
  21. package/api/api/delete_by_query_rethrottle.js +33 -19
  22. package/api/api/delete_script.js +31 -17
  23. package/api/api/exists.js +55 -22
  24. package/api/api/exists_source.js +60 -27
  25. package/api/api/explain.js +60 -22
  26. package/api/api/features.js +56 -35
  27. package/api/api/field_caps.js +36 -18
  28. package/api/api/get.js +55 -22
  29. package/api/api/get_script.js +30 -17
  30. package/api/api/get_script_context.js +15 -15
  31. package/api/api/get_script_languages.js +15 -15
  32. package/api/api/get_source.js +55 -22
  33. package/api/api/index.js +60 -28
  34. package/api/api/indices.js +1068 -857
  35. package/api/api/info.js +15 -15
  36. package/api/api/ingest.js +132 -96
  37. package/api/api/mget.js +50 -26
  38. package/api/api/msearch.js +49 -26
  39. package/api/api/msearch_template.js +53 -26
  40. package/api/api/mtermvectors.js +48 -24
  41. package/api/api/nodes.js +281 -154
  42. package/api/api/ping.js +15 -15
  43. package/api/api/put_script.js +40 -25
  44. package/api/api/rank_eval.js +37 -20
  45. package/api/api/reindex.js +38 -17
  46. package/api/api/reindex_rethrottle.js +32 -19
  47. package/api/api/render_search_template.js +18 -18
  48. package/api/api/scripts_painless_execute.js +15 -15
  49. package/api/api/scroll.js +31 -17
  50. package/api/api/search.js +108 -24
  51. package/api/api/search_shards.js +36 -18
  52. package/api/api/search_template.js +64 -26
  53. package/api/api/shutdown.js +66 -54
  54. package/api/api/snapshot.js +347 -224
  55. package/api/api/tasks.js +65 -46
  56. package/api/api/terms_enum.js +17 -17
  57. package/api/api/termvectors.js +57 -26
  58. package/api/api/update.js +64 -24
  59. package/api/api/update_by_query.js +89 -23
  60. package/api/api/update_by_query_rethrottle.js +33 -19
  61. package/api/index.js +267 -179
  62. package/api/new.d.ts +2042 -529
  63. package/api/opensearch_dashboards.d.ts +239 -236
  64. package/api/requestParams.d.ts +301 -69
  65. package/api/types.d.ts +6204 -5719
  66. package/api/utils.js +22 -22
  67. package/codecov.yml +2 -2
  68. package/index.d.ts +4776 -935
  69. package/index.js +152 -140
  70. package/index.mjs +9 -9
  71. package/lib/Connection.d.ts +37 -26
  72. package/lib/Connection.js +163 -168
  73. package/lib/Helpers.d.ts +103 -64
  74. package/lib/Helpers.js +398 -371
  75. package/lib/Serializer.d.ts +2 -2
  76. package/lib/Serializer.js +39 -39
  77. package/lib/Transport.d.ts +30 -12
  78. package/lib/Transport.js +375 -336
  79. package/lib/errors.d.ts +25 -7
  80. package/lib/errors.js +75 -71
  81. package/lib/pool/BaseConnectionPool.js +100 -97
  82. package/lib/pool/CloudConnectionPool.js +16 -16
  83. package/lib/pool/ConnectionPool.js +105 -105
  84. package/lib/pool/index.d.ts +8 -6
  85. package/lib/pool/index.js +6 -6
  86. package/package.json +13 -8
package/api/index.js CHANGED
@@ -28,227 +28,315 @@
28
28
  * under the License.
29
29
  */
30
30
 
31
- 'use strict'
31
+ 'use strict';
32
32
 
33
- const bulkApi = require('./api/bulk')
34
- const CatApi = require('./api/cat')
35
- const clearScrollApi = require('./api/clear_scroll')
36
- const ClusterApi = require('./api/cluster')
37
- const countApi = require('./api/count')
38
- const createApi = require('./api/create')
39
- const DanglingIndicesApi = require('./api/dangling_indices')
40
- const deleteApi = require('./api/delete')
41
- const deleteByQueryApi = require('./api/delete_by_query')
42
- const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
43
- const deleteScriptApi = require('./api/delete_script')
44
- const existsApi = require('./api/exists')
45
- const existsSourceApi = require('./api/exists_source')
46
- const explainApi = require('./api/explain')
47
- const FeaturesApi = require('./api/features')
48
- const fieldCapsApi = require('./api/field_caps')
49
- const getApi = require('./api/get')
50
- const getScriptApi = require('./api/get_script')
51
- const getScriptContextApi = require('./api/get_script_context')
52
- const getScriptLanguagesApi = require('./api/get_script_languages')
53
- const getSourceApi = require('./api/get_source')
54
- const indexApi = require('./api/index')
55
- const IndicesApi = require('./api/indices')
56
- const infoApi = require('./api/info')
57
- const IngestApi = require('./api/ingest')
58
- const mgetApi = require('./api/mget')
59
- const msearchApi = require('./api/msearch')
60
- const msearchTemplateApi = require('./api/msearch_template')
61
- const mtermvectorsApi = require('./api/mtermvectors')
62
- const NodesApi = require('./api/nodes')
63
- const pingApi = require('./api/ping')
64
- const putScriptApi = require('./api/put_script')
65
- const rankEvalApi = require('./api/rank_eval')
66
- const reindexApi = require('./api/reindex')
67
- const reindexRethrottleApi = require('./api/reindex_rethrottle')
68
- const renderSearchTemplateApi = require('./api/render_search_template')
69
- const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
70
- const scrollApi = require('./api/scroll')
71
- const searchApi = require('./api/search')
72
- const searchShardsApi = require('./api/search_shards')
73
- const searchTemplateApi = require('./api/search_template')
74
- const ShutdownApi = require('./api/shutdown')
75
- const SnapshotApi = require('./api/snapshot')
76
- const TasksApi = require('./api/tasks')
77
- const termsEnumApi = require('./api/terms_enum')
78
- const termvectorsApi = require('./api/termvectors')
79
- const updateApi = require('./api/update')
80
- const updateByQueryApi = require('./api/update_by_query')
81
- const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
33
+ const bulkApi = require('./api/bulk');
34
+ const CatApi = require('./api/cat');
35
+ const clearScrollApi = require('./api/clear_scroll');
36
+ const ClusterApi = require('./api/cluster');
37
+ const countApi = require('./api/count');
38
+ const createApi = require('./api/create');
39
+ const DanglingIndicesApi = require('./api/dangling_indices');
40
+ const deleteApi = require('./api/delete');
41
+ const deleteByQueryApi = require('./api/delete_by_query');
42
+ const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle');
43
+ const deleteScriptApi = require('./api/delete_script');
44
+ const existsApi = require('./api/exists');
45
+ const existsSourceApi = require('./api/exists_source');
46
+ const explainApi = require('./api/explain');
47
+ const FeaturesApi = require('./api/features');
48
+ const fieldCapsApi = require('./api/field_caps');
49
+ const getApi = require('./api/get');
50
+ const getScriptApi = require('./api/get_script');
51
+ const getScriptContextApi = require('./api/get_script_context');
52
+ const getScriptLanguagesApi = require('./api/get_script_languages');
53
+ const getSourceApi = require('./api/get_source');
54
+ const indexApi = require('./api/index');
55
+ const IndicesApi = require('./api/indices');
56
+ const infoApi = require('./api/info');
57
+ const IngestApi = require('./api/ingest');
58
+ const mgetApi = require('./api/mget');
59
+ const msearchApi = require('./api/msearch');
60
+ const msearchTemplateApi = require('./api/msearch_template');
61
+ const mtermvectorsApi = require('./api/mtermvectors');
62
+ const NodesApi = require('./api/nodes');
63
+ const pingApi = require('./api/ping');
64
+ const putScriptApi = require('./api/put_script');
65
+ const rankEvalApi = require('./api/rank_eval');
66
+ const reindexApi = require('./api/reindex');
67
+ const reindexRethrottleApi = require('./api/reindex_rethrottle');
68
+ const renderSearchTemplateApi = require('./api/render_search_template');
69
+ const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute');
70
+ const scrollApi = require('./api/scroll');
71
+ const searchApi = require('./api/search');
72
+ const searchShardsApi = require('./api/search_shards');
73
+ const searchTemplateApi = require('./api/search_template');
74
+ const ShutdownApi = require('./api/shutdown');
75
+ const SnapshotApi = require('./api/snapshot');
76
+ const TasksApi = require('./api/tasks');
77
+ const termsEnumApi = require('./api/terms_enum');
78
+ const termvectorsApi = require('./api/termvectors');
79
+ const updateApi = require('./api/update');
80
+ const updateByQueryApi = require('./api/update_by_query');
81
+ const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle');
82
82
 
83
- const { kConfigurationError } = require('./utils')
84
- const kCat = Symbol('Cat')
85
- const kCluster = Symbol('Cluster')
86
- const kDanglingIndices = Symbol('DanglingIndices')
87
- const kFeatures = Symbol('Features')
88
- const kIndices = Symbol('Indices')
89
- const kIngest = Symbol('Ingest')
90
- const kNodes = Symbol('Nodes')
91
- const kShutdown = Symbol('Shutdown')
92
- const kSnapshot = Symbol('Snapshot')
93
- const kTasks = Symbol('Tasks')
83
+ const { kConfigurationError } = require('./utils');
84
+ const kCat = Symbol('Cat');
85
+ const kCluster = Symbol('Cluster');
86
+ const kDanglingIndices = Symbol('DanglingIndices');
87
+ const kFeatures = Symbol('Features');
88
+ const kIndices = Symbol('Indices');
89
+ const kIngest = Symbol('Ingest');
90
+ const kNodes = Symbol('Nodes');
91
+ const kShutdown = Symbol('Shutdown');
92
+ const kSnapshot = Symbol('Snapshot');
93
+ const kTasks = Symbol('Tasks');
94
94
 
95
- function OpenSearchAPI (opts) {
96
- this[kConfigurationError] = opts.ConfigurationError
97
- this[kCat] = null
98
- this[kCluster] = null
99
- this[kDanglingIndices] = null
100
- this[kFeatures] = null
101
- this[kIndices] = null
102
- this[kIngest] = null
103
- this[kNodes] = null
104
- this[kShutdown] = null
105
- this[kSnapshot] = null
106
- this[kTasks] = null
95
+ function OpenSearchAPI(opts) {
96
+ this[kConfigurationError] = opts.ConfigurationError;
97
+ this[kCat] = null;
98
+ this[kCluster] = null;
99
+ this[kDanglingIndices] = null;
100
+ this[kFeatures] = null;
101
+ this[kIndices] = null;
102
+ this[kIngest] = null;
103
+ this[kNodes] = null;
104
+ this[kShutdown] = null;
105
+ this[kSnapshot] = null;
106
+ this[kTasks] = null;
107
107
  }
108
108
 
109
- OpenSearchAPI.prototype.bulk = bulkApi
110
- OpenSearchAPI.prototype.clearScroll = clearScrollApi
111
- OpenSearchAPI.prototype.count = countApi
112
- OpenSearchAPI.prototype.create = createApi
113
- OpenSearchAPI.prototype.delete = deleteApi
114
- OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi
115
- OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi
116
- OpenSearchAPI.prototype.deleteScript = deleteScriptApi
117
- OpenSearchAPI.prototype.exists = existsApi
118
- OpenSearchAPI.prototype.existsSource = existsSourceApi
119
- OpenSearchAPI.prototype.explain = explainApi
120
- OpenSearchAPI.prototype.fieldCaps = fieldCapsApi
121
- OpenSearchAPI.prototype.get = getApi
122
- OpenSearchAPI.prototype.getScript = getScriptApi
123
- OpenSearchAPI.prototype.getScriptContext = getScriptContextApi
124
- OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi
125
- OpenSearchAPI.prototype.getSource = getSourceApi
126
- OpenSearchAPI.prototype.index = indexApi
127
- OpenSearchAPI.prototype.info = infoApi
128
- OpenSearchAPI.prototype.mget = mgetApi
129
- OpenSearchAPI.prototype.msearch = msearchApi
130
- OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi
131
- OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi
132
- OpenSearchAPI.prototype.ping = pingApi
133
- OpenSearchAPI.prototype.putScript = putScriptApi
134
- OpenSearchAPI.prototype.rankEval = rankEvalApi
135
- OpenSearchAPI.prototype.reindex = reindexApi
136
- OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi
137
- OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
138
- OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
139
- OpenSearchAPI.prototype.scroll = scrollApi
140
- OpenSearchAPI.prototype.search = searchApi
141
- OpenSearchAPI.prototype.searchShards = searchShardsApi
142
- OpenSearchAPI.prototype.searchTemplate = searchTemplateApi
143
- OpenSearchAPI.prototype.termsEnum = termsEnumApi
144
- OpenSearchAPI.prototype.termvectors = termvectorsApi
145
- OpenSearchAPI.prototype.update = updateApi
146
- OpenSearchAPI.prototype.updateByQuery = updateByQueryApi
147
- OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
109
+ OpenSearchAPI.prototype.bulk = bulkApi;
110
+ OpenSearchAPI.prototype.clearScroll = clearScrollApi;
111
+ OpenSearchAPI.prototype.count = countApi;
112
+ OpenSearchAPI.prototype.create = createApi;
113
+ OpenSearchAPI.prototype.delete = deleteApi;
114
+ OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi;
115
+ OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi;
116
+ OpenSearchAPI.prototype.deleteScript = deleteScriptApi;
117
+ OpenSearchAPI.prototype.exists = existsApi;
118
+ OpenSearchAPI.prototype.existsSource = existsSourceApi;
119
+ OpenSearchAPI.prototype.explain = explainApi;
120
+ OpenSearchAPI.prototype.fieldCaps = fieldCapsApi;
121
+ OpenSearchAPI.prototype.get = getApi;
122
+ OpenSearchAPI.prototype.getScript = getScriptApi;
123
+ OpenSearchAPI.prototype.getScriptContext = getScriptContextApi;
124
+ OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi;
125
+ OpenSearchAPI.prototype.getSource = getSourceApi;
126
+ OpenSearchAPI.prototype.index = indexApi;
127
+ OpenSearchAPI.prototype.info = infoApi;
128
+ OpenSearchAPI.prototype.mget = mgetApi;
129
+ OpenSearchAPI.prototype.msearch = msearchApi;
130
+ OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi;
131
+ OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi;
132
+ OpenSearchAPI.prototype.ping = pingApi;
133
+ OpenSearchAPI.prototype.putScript = putScriptApi;
134
+ OpenSearchAPI.prototype.rankEval = rankEvalApi;
135
+ OpenSearchAPI.prototype.reindex = reindexApi;
136
+ OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi;
137
+ OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi;
138
+ OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi;
139
+ OpenSearchAPI.prototype.scroll = scrollApi;
140
+ OpenSearchAPI.prototype.search = searchApi;
141
+ OpenSearchAPI.prototype.searchShards = searchShardsApi;
142
+ OpenSearchAPI.prototype.searchTemplate = searchTemplateApi;
143
+ OpenSearchAPI.prototype.termsEnum = termsEnumApi;
144
+ OpenSearchAPI.prototype.termvectors = termvectorsApi;
145
+ OpenSearchAPI.prototype.update = updateApi;
146
+ OpenSearchAPI.prototype.updateByQuery = updateByQueryApi;
147
+ OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi;
148
148
 
149
149
  Object.defineProperties(OpenSearchAPI.prototype, {
150
150
  cat: {
151
- get () {
151
+ get() {
152
152
  if (this[kCat] === null) {
153
- this[kCat] = new CatApi(this.transport, this[kConfigurationError])
153
+ this[kCat] = new CatApi(this.transport, this[kConfigurationError]);
154
154
  }
155
- return this[kCat]
156
- }
155
+ return this[kCat];
156
+ },
157
+ },
158
+ clear_scroll: {
159
+ get() {
160
+ return this.clearScroll;
161
+ },
157
162
  },
158
- clear_scroll: { get () { return this.clearScroll } },
159
163
  cluster: {
160
- get () {
164
+ get() {
161
165
  if (this[kCluster] === null) {
162
- this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError])
166
+ this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError]);
163
167
  }
164
- return this[kCluster]
165
- }
168
+ return this[kCluster];
169
+ },
166
170
  },
167
171
  danglingIndices: {
168
- get () {
172
+ get() {
169
173
  if (this[kDanglingIndices] === null) {
170
- this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError])
174
+ this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError]);
171
175
  }
172
- return this[kDanglingIndices]
173
- }
174
- },
175
- dangling_indices: { get () { return this.danglingIndices } },
176
- delete_by_query: { get () { return this.deleteByQuery } },
177
- delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
178
- delete_script: { get () { return this.deleteScript } },
179
- exists_source: { get () { return this.existsSource } },
176
+ return this[kDanglingIndices];
177
+ },
178
+ },
179
+ dangling_indices: {
180
+ get() {
181
+ return this.danglingIndices;
182
+ },
183
+ },
184
+ delete_by_query: {
185
+ get() {
186
+ return this.deleteByQuery;
187
+ },
188
+ },
189
+ delete_by_query_rethrottle: {
190
+ get() {
191
+ return this.deleteByQueryRethrottle;
192
+ },
193
+ },
194
+ delete_script: {
195
+ get() {
196
+ return this.deleteScript;
197
+ },
198
+ },
199
+ exists_source: {
200
+ get() {
201
+ return this.existsSource;
202
+ },
203
+ },
180
204
  features: {
181
- get () {
205
+ get() {
182
206
  if (this[kFeatures] === null) {
183
- this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
207
+ this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]);
184
208
  }
185
- return this[kFeatures]
186
- }
187
- },
188
- field_caps: { get () { return this.fieldCaps } },
189
- get_script: { get () { return this.getScript } },
190
- get_script_context: { get () { return this.getScriptContext } },
191
- get_script_languages: { get () { return this.getScriptLanguages } },
192
- get_source: { get () { return this.getSource } },
209
+ return this[kFeatures];
210
+ },
211
+ },
212
+ field_caps: {
213
+ get() {
214
+ return this.fieldCaps;
215
+ },
216
+ },
217
+ get_script: {
218
+ get() {
219
+ return this.getScript;
220
+ },
221
+ },
222
+ get_script_context: {
223
+ get() {
224
+ return this.getScriptContext;
225
+ },
226
+ },
227
+ get_script_languages: {
228
+ get() {
229
+ return this.getScriptLanguages;
230
+ },
231
+ },
232
+ get_source: {
233
+ get() {
234
+ return this.getSource;
235
+ },
236
+ },
193
237
  indices: {
194
- get () {
238
+ get() {
195
239
  if (this[kIndices] === null) {
196
- this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
240
+ this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]);
197
241
  }
198
- return this[kIndices]
199
- }
242
+ return this[kIndices];
243
+ },
200
244
  },
201
245
  ingest: {
202
- get () {
246
+ get() {
203
247
  if (this[kIngest] === null) {
204
- this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
248
+ this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]);
205
249
  }
206
- return this[kIngest]
207
- }
250
+ return this[kIngest];
251
+ },
252
+ },
253
+ msearch_template: {
254
+ get() {
255
+ return this.msearchTemplate;
256
+ },
208
257
  },
209
- msearch_template: { get () { return this.msearchTemplate } },
210
258
  nodes: {
211
- get () {
259
+ get() {
212
260
  if (this[kNodes] === null) {
213
- this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
261
+ this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]);
214
262
  }
215
- return this[kNodes]
216
- }
217
- },
218
- put_script: { get () { return this.putScript } },
219
- rank_eval: { get () { return this.rankEval } },
220
- reindex_rethrottle: { get () { return this.reindexRethrottle } },
221
- render_search_template: { get () { return this.renderSearchTemplate } },
222
- scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
223
- search_shards: { get () { return this.searchShards } },
224
- search_template: { get () { return this.searchTemplate } },
263
+ return this[kNodes];
264
+ },
265
+ },
266
+ put_script: {
267
+ get() {
268
+ return this.putScript;
269
+ },
270
+ },
271
+ rank_eval: {
272
+ get() {
273
+ return this.rankEval;
274
+ },
275
+ },
276
+ reindex_rethrottle: {
277
+ get() {
278
+ return this.reindexRethrottle;
279
+ },
280
+ },
281
+ render_search_template: {
282
+ get() {
283
+ return this.renderSearchTemplate;
284
+ },
285
+ },
286
+ scripts_painless_execute: {
287
+ get() {
288
+ return this.scriptsPainlessExecute;
289
+ },
290
+ },
291
+ search_shards: {
292
+ get() {
293
+ return this.searchShards;
294
+ },
295
+ },
296
+ search_template: {
297
+ get() {
298
+ return this.searchTemplate;
299
+ },
300
+ },
225
301
  shutdown: {
226
- get () {
302
+ get() {
227
303
  if (this[kShutdown] === null) {
228
- this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
304
+ this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError]);
229
305
  }
230
- return this[kShutdown]
231
- }
306
+ return this[kShutdown];
307
+ },
232
308
  },
233
309
  snapshot: {
234
- get () {
310
+ get() {
235
311
  if (this[kSnapshot] === null) {
236
- this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
312
+ this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]);
237
313
  }
238
- return this[kSnapshot]
239
- }
314
+ return this[kSnapshot];
315
+ },
240
316
  },
241
317
  tasks: {
242
- get () {
318
+ get() {
243
319
  if (this[kTasks] === null) {
244
- this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
320
+ this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]);
245
321
  }
246
- return this[kTasks]
247
- }
322
+ return this[kTasks];
323
+ },
324
+ },
325
+ terms_enum: {
326
+ get() {
327
+ return this.termsEnum;
328
+ },
329
+ },
330
+ update_by_query: {
331
+ get() {
332
+ return this.updateByQuery;
333
+ },
334
+ },
335
+ update_by_query_rethrottle: {
336
+ get() {
337
+ return this.updateByQueryRethrottle;
338
+ },
248
339
  },
249
- terms_enum: { get () { return this.termsEnum } },
250
- update_by_query: { get () { return this.updateByQuery } },
251
- update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }
252
- })
340
+ });
253
341
 
254
- module.exports = OpenSearchAPI
342
+ module.exports = OpenSearchAPI;