@opensearch-project/opensearch 3.0.0-beta.4 → 3.0.0-beta.6

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 (54) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/api/cat/_api.js +24 -26
  3. package/api/cluster/_api.js +21 -23
  4. package/api/danglingIndices/_api.js +3 -5
  5. package/api/http/_api.js +9 -11
  6. package/api/indices/_api.js +48 -50
  7. package/api/ingest/_api.js +5 -7
  8. package/api/knn/_api.js +6 -8
  9. package/api/ml/_api.js +7 -9
  10. package/api/nodes/_api.js +5 -7
  11. package/api/notifications/_api.js +9 -11
  12. package/api/ppl/_api.js +4 -6
  13. package/api/remoteStore/_api.js +1 -3
  14. package/api/rollups/_api.js +6 -8
  15. package/api/searchPipeline/_api.js +3 -5
  16. package/api/security/_api.js +74 -76
  17. package/api/snapshot/_api.js +11 -13
  18. package/api/sql/_api.js +6 -8
  19. package/api/tasks/_api.js +3 -5
  20. package/api/transforms/_api.js +8 -10
  21. package/api/utils.js +6 -7
  22. package/lib/OpenSearchAPI.d.ts +1403 -0
  23. package/lib/OpenSearchAPI.js +117 -0
  24. package/package.json +5 -1
  25. package/.dockerignore +0 -5
  26. package/.eslintignore +0 -2
  27. package/.eslintrc.json +0 -34
  28. package/.prettierrc.json +0 -5
  29. package/.whitesource +0 -15
  30. package/ADMINS.md +0 -16
  31. package/COMPATIBILITY.md +0 -13
  32. package/DEVELOPER_GUIDE.md +0 -127
  33. package/MAINTAINERS.md +0 -23
  34. package/Makefile +0 -17
  35. package/RELEASING.md +0 -41
  36. package/SECURITY.md +0 -3
  37. package/USER_GUIDE.md +0 -316
  38. package/codecov.yml +0 -14
  39. package/guides/advanced_index_actions.md +0 -92
  40. package/guides/bulk.md +0 -126
  41. package/guides/document_lifecycle.md +0 -162
  42. package/guides/index_lifecycle.md +0 -142
  43. package/guides/index_template.md +0 -228
  44. package/guides/json.md +0 -53
  45. package/guides/msearch.md +0 -56
  46. package/guides/search.md +0 -203
  47. package/jenkins/release.JenkinsFile +0 -11
  48. package/samples/README.md +0 -17
  49. package/samples/bulk.js +0 -91
  50. package/samples/json.js +0 -75
  51. package/samples/msearch.js +0 -131
  52. package/samples/rollups.js +0 -139
  53. package/samples/search.js +0 -155
  54. package/samples/transforms.ts +0 -146
package/CHANGELOG.md CHANGED
@@ -22,11 +22,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
22
22
  ### Added
23
23
  ### Dependencies
24
24
  - Bumps `@babel/eslint-parser` from 7.24.8 to 7.25.1
25
- - Bumps `@types/node` from 20.14.11 to 22.0.0
25
+ - Bumps `@types/node` from 20.14.11 to 22.5.0
26
+ - Bumps `aws4` from 1.13.0 to 1.13.1
27
+ - Bumps `ora` from 8.0.1 to 8.1.0
28
+ - Bumps `simple-statistics` from 7.8.3 to 7.8.4
26
29
  ### Changed
27
30
  ### Deprecated
28
31
  ### Removed
29
32
  ### Fixed
33
+ - Fixed docker-compose command in Makefile ([#845](https://github.com/opensearch-project/opensearch-js/issues/845))
30
34
  ### Security
31
35
 
32
36
  ## [2.11.0]
package/api/cat/_api.js CHANGED
@@ -15,36 +15,34 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Cat */
21
19
 
22
20
  function CatApi(bindObj) {
23
21
  const cache = {};
24
- this.aliases = apiFunc(bindObj, cache, './cat/aliases');
25
- this.allocation = apiFunc(bindObj, cache, './cat/allocation');
26
- this.allPitSegments = apiFunc(bindObj, cache, './cat/allPitSegments');
27
- this.clusterManager = apiFunc(bindObj, cache, './cat/clusterManager');
28
- this.count = apiFunc(bindObj, cache, './cat/count');
29
- this.fielddata = apiFunc(bindObj, cache, './cat/fielddata');
30
- this.health = apiFunc(bindObj, cache, './cat/health');
31
- this.help = apiFunc(bindObj, cache, './cat/help');
32
- this.indices = apiFunc(bindObj, cache, './cat/indices');
33
- this.master = apiFunc(bindObj, cache, './cat/master');
34
- this.nodeattrs = apiFunc(bindObj, cache, './cat/nodeattrs');
35
- this.nodes = apiFunc(bindObj, cache, './cat/nodes');
36
- this.pendingTasks = apiFunc(bindObj, cache, './cat/pendingTasks');
37
- this.pitSegments = apiFunc(bindObj, cache, './cat/pitSegments');
38
- this.plugins = apiFunc(bindObj, cache, './cat/plugins');
39
- this.recovery = apiFunc(bindObj, cache, './cat/recovery');
40
- this.repositories = apiFunc(bindObj, cache, './cat/repositories');
41
- this.segmentReplication = apiFunc(bindObj, cache, './cat/segmentReplication');
42
- this.segments = apiFunc(bindObj, cache, './cat/segments');
43
- this.shards = apiFunc(bindObj, cache, './cat/shards');
44
- this.snapshots = apiFunc(bindObj, cache, './cat/snapshots');
45
- this.tasks = apiFunc(bindObj, cache, './cat/tasks');
46
- this.templates = apiFunc(bindObj, cache, './cat/templates');
47
- this.threadPool = apiFunc(bindObj, cache, './cat/threadPool');
22
+ this.aliases = require('./aliases').bind(bindObj);
23
+ this.allocation = require('./allocation').bind(bindObj);
24
+ this.allPitSegments = require('./allPitSegments').bind(bindObj);
25
+ this.clusterManager = require('./clusterManager').bind(bindObj);
26
+ this.count = require('./count').bind(bindObj);
27
+ this.fielddata = require('./fielddata').bind(bindObj);
28
+ this.health = require('./health').bind(bindObj);
29
+ this.help = require('./help').bind(bindObj);
30
+ this.indices = require('./indices').bind(bindObj);
31
+ this.master = require('./master').bind(bindObj);
32
+ this.nodeattrs = require('./nodeattrs').bind(bindObj);
33
+ this.nodes = require('./nodes').bind(bindObj);
34
+ this.pendingTasks = require('./pendingTasks').bind(bindObj);
35
+ this.pitSegments = require('./pitSegments').bind(bindObj);
36
+ this.plugins = require('./plugins').bind(bindObj);
37
+ this.recovery = require('./recovery').bind(bindObj);
38
+ this.repositories = require('./repositories').bind(bindObj);
39
+ this.segmentReplication = require('./segmentReplication').bind(bindObj);
40
+ this.segments = require('./segments').bind(bindObj);
41
+ this.shards = require('./shards').bind(bindObj);
42
+ this.snapshots = require('./snapshots').bind(bindObj);
43
+ this.tasks = require('./tasks').bind(bindObj);
44
+ this.templates = require('./templates').bind(bindObj);
45
+ this.threadPool = require('./threadPool').bind(bindObj);
48
46
  }
49
47
 
50
48
  module.exports = CatApi;
@@ -15,33 +15,31 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Cluster */
21
19
 
22
20
  function ClusterApi(bindObj) {
23
21
  const cache = {};
24
- this.allocationExplain = apiFunc(bindObj, cache, './cluster/allocationExplain');
25
- this.deleteComponentTemplate = apiFunc(bindObj, cache, './cluster/deleteComponentTemplate');
26
- this.deleteDecommissionAwareness = apiFunc(bindObj, cache, './cluster/deleteDecommissionAwareness');
27
- this.deleteVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/deleteVotingConfigExclusions');
28
- this.deleteWeightedRouting = apiFunc(bindObj, cache, './cluster/deleteWeightedRouting');
29
- this.existsComponentTemplate = apiFunc(bindObj, cache, './cluster/existsComponentTemplate');
30
- this.getComponentTemplate = apiFunc(bindObj, cache, './cluster/getComponentTemplate');
31
- this.getDecommissionAwareness = apiFunc(bindObj, cache, './cluster/getDecommissionAwareness');
32
- this.getSettings = apiFunc(bindObj, cache, './cluster/getSettings');
33
- this.getWeightedRouting = apiFunc(bindObj, cache, './cluster/getWeightedRouting');
34
- this.health = apiFunc(bindObj, cache, './cluster/health');
35
- this.pendingTasks = apiFunc(bindObj, cache, './cluster/pendingTasks');
36
- this.postVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/postVotingConfigExclusions');
37
- this.putComponentTemplate = apiFunc(bindObj, cache, './cluster/putComponentTemplate');
38
- this.putDecommissionAwareness = apiFunc(bindObj, cache, './cluster/putDecommissionAwareness');
39
- this.putSettings = apiFunc(bindObj, cache, './cluster/putSettings');
40
- this.putWeightedRouting = apiFunc(bindObj, cache, './cluster/putWeightedRouting');
41
- this.remoteInfo = apiFunc(bindObj, cache, './cluster/remoteInfo');
42
- this.reroute = apiFunc(bindObj, cache, './cluster/reroute');
43
- this.state = apiFunc(bindObj, cache, './cluster/state');
44
- this.stats = apiFunc(bindObj, cache, './cluster/stats');
22
+ this.allocationExplain = require('./allocationExplain').bind(bindObj);
23
+ this.deleteComponentTemplate = require('./deleteComponentTemplate').bind(bindObj);
24
+ this.deleteDecommissionAwareness = require('./deleteDecommissionAwareness').bind(bindObj);
25
+ this.deleteVotingConfigExclusions = require('./deleteVotingConfigExclusions').bind(bindObj);
26
+ this.deleteWeightedRouting = require('./deleteWeightedRouting').bind(bindObj);
27
+ this.existsComponentTemplate = require('./existsComponentTemplate').bind(bindObj);
28
+ this.getComponentTemplate = require('./getComponentTemplate').bind(bindObj);
29
+ this.getDecommissionAwareness = require('./getDecommissionAwareness').bind(bindObj);
30
+ this.getSettings = require('./getSettings').bind(bindObj);
31
+ this.getWeightedRouting = require('./getWeightedRouting').bind(bindObj);
32
+ this.health = require('./health').bind(bindObj);
33
+ this.pendingTasks = require('./pendingTasks').bind(bindObj);
34
+ this.postVotingConfigExclusions = require('./postVotingConfigExclusions').bind(bindObj);
35
+ this.putComponentTemplate = require('./putComponentTemplate').bind(bindObj);
36
+ this.putDecommissionAwareness = require('./putDecommissionAwareness').bind(bindObj);
37
+ this.putSettings = require('./putSettings').bind(bindObj);
38
+ this.putWeightedRouting = require('./putWeightedRouting').bind(bindObj);
39
+ this.remoteInfo = require('./remoteInfo').bind(bindObj);
40
+ this.reroute = require('./reroute').bind(bindObj);
41
+ this.state = require('./state').bind(bindObj);
42
+ this.stats = require('./stats').bind(bindObj);
45
43
  }
46
44
 
47
45
  module.exports = ClusterApi;
@@ -15,15 +15,13 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Dangling-Indices */
21
19
 
22
20
  function DanglingindicesApi(bindObj) {
23
21
  const cache = {};
24
- this.deleteDanglingIndex = apiFunc(bindObj, cache, './danglingIndices/deleteDanglingIndex');
25
- this.importDanglingIndex = apiFunc(bindObj, cache, './danglingIndices/importDanglingIndex');
26
- this.listDanglingIndices = apiFunc(bindObj, cache, './danglingIndices/listDanglingIndices');
22
+ this.deleteDanglingIndex = require('./deleteDanglingIndex').bind(bindObj);
23
+ this.importDanglingIndex = require('./importDanglingIndex').bind(bindObj);
24
+ this.listDanglingIndices = require('./listDanglingIndices').bind(bindObj);
27
25
  }
28
26
 
29
27
  module.exports = DanglingindicesApi;
package/api/http/_api.js CHANGED
@@ -15,21 +15,19 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Http */
21
19
 
22
20
  function HttpApi(bindObj) {
23
21
  const cache = {};
24
- this.connect = apiFunc(bindObj, cache, './http/connect');
25
- this.delete = apiFunc(bindObj, cache, './http/delete');
26
- this.get = apiFunc(bindObj, cache, './http/get');
27
- this.head = apiFunc(bindObj, cache, './http/head');
28
- this.options = apiFunc(bindObj, cache, './http/options');
29
- this.patch = apiFunc(bindObj, cache, './http/patch');
30
- this.post = apiFunc(bindObj, cache, './http/post');
31
- this.put = apiFunc(bindObj, cache, './http/put');
32
- this.trace = apiFunc(bindObj, cache, './http/trace');
22
+ this.connect = require('./connect').bind(bindObj);
23
+ this.delete = require('./delete').bind(bindObj);
24
+ this.get = require('./get').bind(bindObj);
25
+ this.head = require('./head').bind(bindObj);
26
+ this.options = require('./options').bind(bindObj);
27
+ this.patch = require('./patch').bind(bindObj);
28
+ this.post = require('./post').bind(bindObj);
29
+ this.put = require('./put').bind(bindObj);
30
+ this.trace = require('./trace').bind(bindObj);
33
31
  }
34
32
 
35
33
  module.exports = HttpApi;
@@ -15,60 +15,58 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Indices */
21
19
 
22
20
  function IndicesApi(bindObj) {
23
21
  const cache = {};
24
- this.addBlock = apiFunc(bindObj, cache, './indices/addBlock');
25
- this.analyze = apiFunc(bindObj, cache, './indices/analyze');
26
- this.clearCache = apiFunc(bindObj, cache, './indices/clearCache');
27
- this.clone = apiFunc(bindObj, cache, './indices/clone');
28
- this.close = apiFunc(bindObj, cache, './indices/close');
29
- this.create = apiFunc(bindObj, cache, './indices/create');
30
- this.createDataStream = apiFunc(bindObj, cache, './indices/createDataStream');
31
- this.dataStreamsStats = apiFunc(bindObj, cache, './indices/dataStreamsStats');
32
- this.delete = apiFunc(bindObj, cache, './indices/delete');
33
- this.deleteAlias = apiFunc(bindObj, cache, './indices/deleteAlias');
34
- this.deleteDataStream = apiFunc(bindObj, cache, './indices/deleteDataStream');
35
- this.deleteIndexTemplate = apiFunc(bindObj, cache, './indices/deleteIndexTemplate');
36
- this.deleteTemplate = apiFunc(bindObj, cache, './indices/deleteTemplate');
37
- this.exists = apiFunc(bindObj, cache, './indices/exists');
38
- this.existsAlias = apiFunc(bindObj, cache, './indices/existsAlias');
39
- this.existsIndexTemplate = apiFunc(bindObj, cache, './indices/existsIndexTemplate');
40
- this.existsTemplate = apiFunc(bindObj, cache, './indices/existsTemplate');
41
- this.flush = apiFunc(bindObj, cache, './indices/flush');
42
- this.forcemerge = apiFunc(bindObj, cache, './indices/forcemerge');
43
- this.get = apiFunc(bindObj, cache, './indices/get');
44
- this.getAlias = apiFunc(bindObj, cache, './indices/getAlias');
45
- this.getDataStream = apiFunc(bindObj, cache, './indices/getDataStream');
46
- this.getFieldMapping = apiFunc(bindObj, cache, './indices/getFieldMapping');
47
- this.getIndexTemplate = apiFunc(bindObj, cache, './indices/getIndexTemplate');
48
- this.getMapping = apiFunc(bindObj, cache, './indices/getMapping');
49
- this.getSettings = apiFunc(bindObj, cache, './indices/getSettings');
50
- this.getTemplate = apiFunc(bindObj, cache, './indices/getTemplate');
51
- this.getUpgrade = apiFunc(bindObj, cache, './indices/getUpgrade');
52
- this.open = apiFunc(bindObj, cache, './indices/open');
53
- this.putAlias = apiFunc(bindObj, cache, './indices/putAlias');
54
- this.putIndexTemplate = apiFunc(bindObj, cache, './indices/putIndexTemplate');
55
- this.putMapping = apiFunc(bindObj, cache, './indices/putMapping');
56
- this.putSettings = apiFunc(bindObj, cache, './indices/putSettings');
57
- this.putTemplate = apiFunc(bindObj, cache, './indices/putTemplate');
58
- this.recovery = apiFunc(bindObj, cache, './indices/recovery');
59
- this.refresh = apiFunc(bindObj, cache, './indices/refresh');
60
- this.resolveIndex = apiFunc(bindObj, cache, './indices/resolveIndex');
61
- this.rollover = apiFunc(bindObj, cache, './indices/rollover');
62
- this.segments = apiFunc(bindObj, cache, './indices/segments');
63
- this.shardStores = apiFunc(bindObj, cache, './indices/shardStores');
64
- this.shrink = apiFunc(bindObj, cache, './indices/shrink');
65
- this.simulateIndexTemplate = apiFunc(bindObj, cache, './indices/simulateIndexTemplate');
66
- this.simulateTemplate = apiFunc(bindObj, cache, './indices/simulateTemplate');
67
- this.split = apiFunc(bindObj, cache, './indices/split');
68
- this.stats = apiFunc(bindObj, cache, './indices/stats');
69
- this.updateAliases = apiFunc(bindObj, cache, './indices/updateAliases');
70
- this.upgrade = apiFunc(bindObj, cache, './indices/upgrade');
71
- this.validateQuery = apiFunc(bindObj, cache, './indices/validateQuery');
22
+ this.addBlock = require('./addBlock').bind(bindObj);
23
+ this.analyze = require('./analyze').bind(bindObj);
24
+ this.clearCache = require('./clearCache').bind(bindObj);
25
+ this.clone = require('./clone').bind(bindObj);
26
+ this.close = require('./close').bind(bindObj);
27
+ this.create = require('./create').bind(bindObj);
28
+ this.createDataStream = require('./createDataStream').bind(bindObj);
29
+ this.dataStreamsStats = require('./dataStreamsStats').bind(bindObj);
30
+ this.delete = require('./delete').bind(bindObj);
31
+ this.deleteAlias = require('./deleteAlias').bind(bindObj);
32
+ this.deleteDataStream = require('./deleteDataStream').bind(bindObj);
33
+ this.deleteIndexTemplate = require('./deleteIndexTemplate').bind(bindObj);
34
+ this.deleteTemplate = require('./deleteTemplate').bind(bindObj);
35
+ this.exists = require('./exists').bind(bindObj);
36
+ this.existsAlias = require('./existsAlias').bind(bindObj);
37
+ this.existsIndexTemplate = require('./existsIndexTemplate').bind(bindObj);
38
+ this.existsTemplate = require('./existsTemplate').bind(bindObj);
39
+ this.flush = require('./flush').bind(bindObj);
40
+ this.forcemerge = require('./forcemerge').bind(bindObj);
41
+ this.get = require('./get').bind(bindObj);
42
+ this.getAlias = require('./getAlias').bind(bindObj);
43
+ this.getDataStream = require('./getDataStream').bind(bindObj);
44
+ this.getFieldMapping = require('./getFieldMapping').bind(bindObj);
45
+ this.getIndexTemplate = require('./getIndexTemplate').bind(bindObj);
46
+ this.getMapping = require('./getMapping').bind(bindObj);
47
+ this.getSettings = require('./getSettings').bind(bindObj);
48
+ this.getTemplate = require('./getTemplate').bind(bindObj);
49
+ this.getUpgrade = require('./getUpgrade').bind(bindObj);
50
+ this.open = require('./open').bind(bindObj);
51
+ this.putAlias = require('./putAlias').bind(bindObj);
52
+ this.putIndexTemplate = require('./putIndexTemplate').bind(bindObj);
53
+ this.putMapping = require('./putMapping').bind(bindObj);
54
+ this.putSettings = require('./putSettings').bind(bindObj);
55
+ this.putTemplate = require('./putTemplate').bind(bindObj);
56
+ this.recovery = require('./recovery').bind(bindObj);
57
+ this.refresh = require('./refresh').bind(bindObj);
58
+ this.resolveIndex = require('./resolveIndex').bind(bindObj);
59
+ this.rollover = require('./rollover').bind(bindObj);
60
+ this.segments = require('./segments').bind(bindObj);
61
+ this.shardStores = require('./shardStores').bind(bindObj);
62
+ this.shrink = require('./shrink').bind(bindObj);
63
+ this.simulateIndexTemplate = require('./simulateIndexTemplate').bind(bindObj);
64
+ this.simulateTemplate = require('./simulateTemplate').bind(bindObj);
65
+ this.split = require('./split').bind(bindObj);
66
+ this.stats = require('./stats').bind(bindObj);
67
+ this.updateAliases = require('./updateAliases').bind(bindObj);
68
+ this.upgrade = require('./upgrade').bind(bindObj);
69
+ this.validateQuery = require('./validateQuery').bind(bindObj);
72
70
  }
73
71
 
74
72
  module.exports = IndicesApi;
@@ -15,17 +15,15 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Ingest */
21
19
 
22
20
  function IngestApi(bindObj) {
23
21
  const cache = {};
24
- this.deletePipeline = apiFunc(bindObj, cache, './ingest/deletePipeline');
25
- this.getPipeline = apiFunc(bindObj, cache, './ingest/getPipeline');
26
- this.processorGrok = apiFunc(bindObj, cache, './ingest/processorGrok');
27
- this.putPipeline = apiFunc(bindObj, cache, './ingest/putPipeline');
28
- this.simulate = apiFunc(bindObj, cache, './ingest/simulate');
22
+ this.deletePipeline = require('./deletePipeline').bind(bindObj);
23
+ this.getPipeline = require('./getPipeline').bind(bindObj);
24
+ this.processorGrok = require('./processorGrok').bind(bindObj);
25
+ this.putPipeline = require('./putPipeline').bind(bindObj);
26
+ this.simulate = require('./simulate').bind(bindObj);
29
27
  }
30
28
 
31
29
  module.exports = IngestApi;
package/api/knn/_api.js CHANGED
@@ -15,18 +15,16 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Knn */
21
19
 
22
20
  function KnnApi(bindObj) {
23
21
  const cache = {};
24
- this.deleteModel = apiFunc(bindObj, cache, './knn/deleteModel');
25
- this.getModel = apiFunc(bindObj, cache, './knn/getModel');
26
- this.searchModels = apiFunc(bindObj, cache, './knn/searchModels');
27
- this.stats = apiFunc(bindObj, cache, './knn/stats');
28
- this.trainModel = apiFunc(bindObj, cache, './knn/trainModel');
29
- this.warmup = apiFunc(bindObj, cache, './knn/warmup');
22
+ this.deleteModel = require('./deleteModel').bind(bindObj);
23
+ this.getModel = require('./getModel').bind(bindObj);
24
+ this.searchModels = require('./searchModels').bind(bindObj);
25
+ this.stats = require('./stats').bind(bindObj);
26
+ this.trainModel = require('./trainModel').bind(bindObj);
27
+ this.warmup = require('./warmup').bind(bindObj);
30
28
  }
31
29
 
32
30
  module.exports = KnnApi;
package/api/ml/_api.js CHANGED
@@ -15,19 +15,17 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Ml */
21
19
 
22
20
  function MlApi(bindObj) {
23
21
  const cache = {};
24
- this.deleteModel = apiFunc(bindObj, cache, './ml/deleteModel');
25
- this.deleteModelGroup = apiFunc(bindObj, cache, './ml/deleteModelGroup');
26
- this.getModelGroup = apiFunc(bindObj, cache, './ml/getModelGroup');
27
- this.getTask = apiFunc(bindObj, cache, './ml/getTask');
28
- this.registerModel = apiFunc(bindObj, cache, './ml/registerModel');
29
- this.registerModelGroup = apiFunc(bindObj, cache, './ml/registerModelGroup');
30
- this.searchModels = apiFunc(bindObj, cache, './ml/searchModels');
22
+ this.deleteModel = require('./deleteModel').bind(bindObj);
23
+ this.deleteModelGroup = require('./deleteModelGroup').bind(bindObj);
24
+ this.getModelGroup = require('./getModelGroup').bind(bindObj);
25
+ this.getTask = require('./getTask').bind(bindObj);
26
+ this.registerModel = require('./registerModel').bind(bindObj);
27
+ this.registerModelGroup = require('./registerModelGroup').bind(bindObj);
28
+ this.searchModels = require('./searchModels').bind(bindObj);
31
29
  }
32
30
 
33
31
  module.exports = MlApi;
package/api/nodes/_api.js CHANGED
@@ -15,17 +15,15 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Nodes */
21
19
 
22
20
  function NodesApi(bindObj) {
23
21
  const cache = {};
24
- this.hotThreads = apiFunc(bindObj, cache, './nodes/hotThreads');
25
- this.info = apiFunc(bindObj, cache, './nodes/info');
26
- this.reloadSecureSettings = apiFunc(bindObj, cache, './nodes/reloadSecureSettings');
27
- this.stats = apiFunc(bindObj, cache, './nodes/stats');
28
- this.usage = apiFunc(bindObj, cache, './nodes/usage');
22
+ this.hotThreads = require('./hotThreads').bind(bindObj);
23
+ this.info = require('./info').bind(bindObj);
24
+ this.reloadSecureSettings = require('./reloadSecureSettings').bind(bindObj);
25
+ this.stats = require('./stats').bind(bindObj);
26
+ this.usage = require('./usage').bind(bindObj);
29
27
  }
30
28
 
31
29
  module.exports = NodesApi;
@@ -15,21 +15,19 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Notifications */
21
19
 
22
20
  function NotificationsApi(bindObj) {
23
21
  const cache = {};
24
- this.createConfig = apiFunc(bindObj, cache, './notifications/createConfig');
25
- this.deleteConfig = apiFunc(bindObj, cache, './notifications/deleteConfig');
26
- this.deleteConfigs = apiFunc(bindObj, cache, './notifications/deleteConfigs');
27
- this.getConfig = apiFunc(bindObj, cache, './notifications/getConfig');
28
- this.getConfigs = apiFunc(bindObj, cache, './notifications/getConfigs');
29
- this.listChannels = apiFunc(bindObj, cache, './notifications/listChannels');
30
- this.listFeatures = apiFunc(bindObj, cache, './notifications/listFeatures');
31
- this.sendTest = apiFunc(bindObj, cache, './notifications/sendTest');
32
- this.updateConfig = apiFunc(bindObj, cache, './notifications/updateConfig');
22
+ this.createConfig = require('./createConfig').bind(bindObj);
23
+ this.deleteConfig = require('./deleteConfig').bind(bindObj);
24
+ this.deleteConfigs = require('./deleteConfigs').bind(bindObj);
25
+ this.getConfig = require('./getConfig').bind(bindObj);
26
+ this.getConfigs = require('./getConfigs').bind(bindObj);
27
+ this.listChannels = require('./listChannels').bind(bindObj);
28
+ this.listFeatures = require('./listFeatures').bind(bindObj);
29
+ this.sendTest = require('./sendTest').bind(bindObj);
30
+ this.updateConfig = require('./updateConfig').bind(bindObj);
33
31
  }
34
32
 
35
33
  module.exports = NotificationsApi;
package/api/ppl/_api.js CHANGED
@@ -15,16 +15,14 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Ppl */
21
19
 
22
20
  function PplApi(bindObj) {
23
21
  const cache = {};
24
- this.explain = apiFunc(bindObj, cache, './ppl/explain');
25
- this.getStats = apiFunc(bindObj, cache, './ppl/getStats');
26
- this.postStats = apiFunc(bindObj, cache, './ppl/postStats');
27
- this.query = apiFunc(bindObj, cache, './ppl/query');
22
+ this.explain = require('./explain').bind(bindObj);
23
+ this.getStats = require('./getStats').bind(bindObj);
24
+ this.postStats = require('./postStats').bind(bindObj);
25
+ this.query = require('./query').bind(bindObj);
28
26
  }
29
27
 
30
28
  module.exports = PplApi;
@@ -15,13 +15,11 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Remote-Store */
21
19
 
22
20
  function RemotestoreApi(bindObj) {
23
21
  const cache = {};
24
- this.restore = apiFunc(bindObj, cache, './remoteStore/restore');
22
+ this.restore = require('./restore').bind(bindObj);
25
23
  }
26
24
 
27
25
  module.exports = RemotestoreApi;
@@ -15,18 +15,16 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Rollups */
21
19
 
22
20
  function RollupsApi(bindObj) {
23
21
  const cache = {};
24
- this.delete = apiFunc(bindObj, cache, './rollups/delete');
25
- this.explain = apiFunc(bindObj, cache, './rollups/explain');
26
- this.get = apiFunc(bindObj, cache, './rollups/get');
27
- this.put = apiFunc(bindObj, cache, './rollups/put');
28
- this.start = apiFunc(bindObj, cache, './rollups/start');
29
- this.stop = apiFunc(bindObj, cache, './rollups/stop');
22
+ this.delete = require('./delete').bind(bindObj);
23
+ this.explain = require('./explain').bind(bindObj);
24
+ this.get = require('./get').bind(bindObj);
25
+ this.put = require('./put').bind(bindObj);
26
+ this.start = require('./start').bind(bindObj);
27
+ this.stop = require('./stop').bind(bindObj);
30
28
  }
31
29
 
32
30
  module.exports = RollupsApi;
@@ -15,15 +15,13 @@
15
15
 
16
16
  'use strict';
17
17
 
18
- const { apiFunc } = require('../utils');
19
-
20
18
  /** @namespace API-Search-Pipeline */
21
19
 
22
20
  function SearchpipelineApi(bindObj) {
23
21
  const cache = {};
24
- this.delete = apiFunc(bindObj, cache, './searchPipeline/delete');
25
- this.get = apiFunc(bindObj, cache, './searchPipeline/get');
26
- this.put = apiFunc(bindObj, cache, './searchPipeline/put');
22
+ this.delete = require('./delete').bind(bindObj);
23
+ this.get = require('./get').bind(bindObj);
24
+ this.put = require('./put').bind(bindObj);
27
25
  }
28
26
 
29
27
  module.exports = SearchpipelineApi;