@terascope/opensearch-client 1.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 (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/dist/src/client/client.d.ts +233 -0
  4. package/dist/src/client/client.d.ts.map +1 -0
  5. package/dist/src/client/client.js +421 -0
  6. package/dist/src/client/client.js.map +1 -0
  7. package/dist/src/client/create-client.d.ts +17 -0
  8. package/dist/src/client/create-client.d.ts.map +1 -0
  9. package/dist/src/client/create-client.js +144 -0
  10. package/dist/src/client/create-client.js.map +1 -0
  11. package/dist/src/client/index.d.ts +4 -0
  12. package/dist/src/client/index.d.ts.map +1 -0
  13. package/dist/src/client/index.js +4 -0
  14. package/dist/src/client/index.js.map +1 -0
  15. package/dist/src/client/interfaces.d.ts +67 -0
  16. package/dist/src/client/interfaces.d.ts.map +1 -0
  17. package/dist/src/client/interfaces.js +2 -0
  18. package/dist/src/client/interfaces.js.map +1 -0
  19. package/dist/src/client/log-wrapper.d.ts +3 -0
  20. package/dist/src/client/log-wrapper.d.ts.map +1 -0
  21. package/dist/src/client/log-wrapper.js +21 -0
  22. package/dist/src/client/log-wrapper.js.map +1 -0
  23. package/dist/src/client/method-helpers/bulk.d.ts +25 -0
  24. package/dist/src/client/method-helpers/bulk.d.ts.map +1 -0
  25. package/dist/src/client/method-helpers/bulk.js +30 -0
  26. package/dist/src/client/method-helpers/bulk.js.map +1 -0
  27. package/dist/src/client/method-helpers/catIndices.d.ts +16 -0
  28. package/dist/src/client/method-helpers/catIndices.d.ts.map +1 -0
  29. package/dist/src/client/method-helpers/catIndices.js +24 -0
  30. package/dist/src/client/method-helpers/catIndices.js.map +1 -0
  31. package/dist/src/client/method-helpers/clusterGetSettings.d.ts +3 -0
  32. package/dist/src/client/method-helpers/clusterGetSettings.d.ts.map +1 -0
  33. package/dist/src/client/method-helpers/clusterGetSettings.js +16 -0
  34. package/dist/src/client/method-helpers/clusterGetSettings.js.map +1 -0
  35. package/dist/src/client/method-helpers/clusterHealth.d.ts +14 -0
  36. package/dist/src/client/method-helpers/clusterHealth.d.ts.map +1 -0
  37. package/dist/src/client/method-helpers/clusterHealth.js +27 -0
  38. package/dist/src/client/method-helpers/clusterHealth.js.map +1 -0
  39. package/dist/src/client/method-helpers/count.d.ts +17 -0
  40. package/dist/src/client/method-helpers/count.d.ts.map +1 -0
  41. package/dist/src/client/method-helpers/count.js +22 -0
  42. package/dist/src/client/method-helpers/count.js.map +1 -0
  43. package/dist/src/client/method-helpers/create.d.ts +34 -0
  44. package/dist/src/client/method-helpers/create.d.ts.map +1 -0
  45. package/dist/src/client/method-helpers/create.js +32 -0
  46. package/dist/src/client/method-helpers/create.js.map +1 -0
  47. package/dist/src/client/method-helpers/delete.d.ts +26 -0
  48. package/dist/src/client/method-helpers/delete.d.ts.map +1 -0
  49. package/dist/src/client/method-helpers/delete.js +23 -0
  50. package/dist/src/client/method-helpers/delete.js.map +1 -0
  51. package/dist/src/client/method-helpers/deleteByQuery.d.ts +66 -0
  52. package/dist/src/client/method-helpers/deleteByQuery.d.ts.map +1 -0
  53. package/dist/src/client/method-helpers/deleteByQuery.js +32 -0
  54. package/dist/src/client/method-helpers/deleteByQuery.js.map +1 -0
  55. package/dist/src/client/method-helpers/exists.d.ts +18 -0
  56. package/dist/src/client/method-helpers/exists.d.ts.map +1 -0
  57. package/dist/src/client/method-helpers/exists.js +23 -0
  58. package/dist/src/client/method-helpers/exists.js.map +1 -0
  59. package/dist/src/client/method-helpers/get.d.ts +18 -0
  60. package/dist/src/client/method-helpers/get.d.ts.map +1 -0
  61. package/dist/src/client/method-helpers/get.js +23 -0
  62. package/dist/src/client/method-helpers/get.js.map +1 -0
  63. package/dist/src/client/method-helpers/helper-utils.d.ts +5 -0
  64. package/dist/src/client/method-helpers/helper-utils.d.ts.map +1 -0
  65. package/dist/src/client/method-helpers/helper-utils.js +43 -0
  66. package/dist/src/client/method-helpers/helper-utils.js.map +1 -0
  67. package/dist/src/client/method-helpers/index-method.d.ts +43 -0
  68. package/dist/src/client/method-helpers/index-method.d.ts.map +1 -0
  69. package/dist/src/client/method-helpers/index-method.js +34 -0
  70. package/dist/src/client/method-helpers/index-method.js.map +1 -0
  71. package/dist/src/client/method-helpers/index.d.ts +41 -0
  72. package/dist/src/client/method-helpers/index.d.ts.map +1 -0
  73. package/dist/src/client/method-helpers/index.js +41 -0
  74. package/dist/src/client/method-helpers/index.js.map +1 -0
  75. package/dist/src/client/method-helpers/indicesCreate.d.ts +13 -0
  76. package/dist/src/client/method-helpers/indicesCreate.d.ts.map +1 -0
  77. package/dist/src/client/method-helpers/indicesCreate.js +47 -0
  78. package/dist/src/client/method-helpers/indicesCreate.js.map +1 -0
  79. package/dist/src/client/method-helpers/indicesDelete.d.ts +3 -0
  80. package/dist/src/client/method-helpers/indicesDelete.d.ts.map +1 -0
  81. package/dist/src/client/method-helpers/indicesDelete.js +23 -0
  82. package/dist/src/client/method-helpers/indicesDelete.js.map +1 -0
  83. package/dist/src/client/method-helpers/indicesDeleteTemplate.d.ts +3 -0
  84. package/dist/src/client/method-helpers/indicesDeleteTemplate.d.ts.map +1 -0
  85. package/dist/src/client/method-helpers/indicesDeleteTemplate.js +23 -0
  86. package/dist/src/client/method-helpers/indicesDeleteTemplate.js.map +1 -0
  87. package/dist/src/client/method-helpers/indicesExists.d.ts +3 -0
  88. package/dist/src/client/method-helpers/indicesExists.d.ts.map +1 -0
  89. package/dist/src/client/method-helpers/indicesExists.js +16 -0
  90. package/dist/src/client/method-helpers/indicesExists.js.map +1 -0
  91. package/dist/src/client/method-helpers/indicesExistsTemplate.d.ts +3 -0
  92. package/dist/src/client/method-helpers/indicesExistsTemplate.d.ts.map +1 -0
  93. package/dist/src/client/method-helpers/indicesExistsTemplate.js +22 -0
  94. package/dist/src/client/method-helpers/indicesExistsTemplate.js.map +1 -0
  95. package/dist/src/client/method-helpers/indicesGet.d.ts +12 -0
  96. package/dist/src/client/method-helpers/indicesGet.d.ts.map +1 -0
  97. package/dist/src/client/method-helpers/indicesGet.js +27 -0
  98. package/dist/src/client/method-helpers/indicesGet.js.map +1 -0
  99. package/dist/src/client/method-helpers/indicesGetFieldMapping.d.ts +20 -0
  100. package/dist/src/client/method-helpers/indicesGetFieldMapping.d.ts.map +1 -0
  101. package/dist/src/client/method-helpers/indicesGetFieldMapping.js +23 -0
  102. package/dist/src/client/method-helpers/indicesGetFieldMapping.js.map +1 -0
  103. package/dist/src/client/method-helpers/indicesGetIndexTemplate.d.ts +3 -0
  104. package/dist/src/client/method-helpers/indicesGetIndexTemplate.d.ts.map +1 -0
  105. package/dist/src/client/method-helpers/indicesGetIndexTemplate.js +29 -0
  106. package/dist/src/client/method-helpers/indicesGetIndexTemplate.js.map +1 -0
  107. package/dist/src/client/method-helpers/indicesGetMapping.d.ts +10 -0
  108. package/dist/src/client/method-helpers/indicesGetMapping.d.ts.map +1 -0
  109. package/dist/src/client/method-helpers/indicesGetMapping.js +24 -0
  110. package/dist/src/client/method-helpers/indicesGetMapping.js.map +1 -0
  111. package/dist/src/client/method-helpers/indicesGetSettings.d.ts +3 -0
  112. package/dist/src/client/method-helpers/indicesGetSettings.d.ts.map +1 -0
  113. package/dist/src/client/method-helpers/indicesGetSettings.js +20 -0
  114. package/dist/src/client/method-helpers/indicesGetSettings.js.map +1 -0
  115. package/dist/src/client/method-helpers/indicesGetTemplate.d.ts +3 -0
  116. package/dist/src/client/method-helpers/indicesGetTemplate.d.ts.map +1 -0
  117. package/dist/src/client/method-helpers/indicesGetTemplate.js +29 -0
  118. package/dist/src/client/method-helpers/indicesGetTemplate.js.map +1 -0
  119. package/dist/src/client/method-helpers/indicesPutMapping.d.ts +53 -0
  120. package/dist/src/client/method-helpers/indicesPutMapping.d.ts.map +1 -0
  121. package/dist/src/client/method-helpers/indicesPutMapping.js +28 -0
  122. package/dist/src/client/method-helpers/indicesPutMapping.js.map +1 -0
  123. package/dist/src/client/method-helpers/indicesPutSettings.d.ts +14 -0
  124. package/dist/src/client/method-helpers/indicesPutSettings.d.ts.map +1 -0
  125. package/dist/src/client/method-helpers/indicesPutSettings.js +27 -0
  126. package/dist/src/client/method-helpers/indicesPutSettings.js.map +1 -0
  127. package/dist/src/client/method-helpers/indicesPutTemplate.d.ts +22 -0
  128. package/dist/src/client/method-helpers/indicesPutTemplate.d.ts.map +1 -0
  129. package/dist/src/client/method-helpers/indicesPutTemplate.js +50 -0
  130. package/dist/src/client/method-helpers/indicesPutTemplate.js.map +1 -0
  131. package/dist/src/client/method-helpers/indicesRecovery.d.ts +3 -0
  132. package/dist/src/client/method-helpers/indicesRecovery.d.ts.map +1 -0
  133. package/dist/src/client/method-helpers/indicesRecovery.js +16 -0
  134. package/dist/src/client/method-helpers/indicesRecovery.js.map +1 -0
  135. package/dist/src/client/method-helpers/indicesRefresh.d.ts +3 -0
  136. package/dist/src/client/method-helpers/indicesRefresh.d.ts.map +1 -0
  137. package/dist/src/client/method-helpers/indicesRefresh.js +16 -0
  138. package/dist/src/client/method-helpers/indicesRefresh.js.map +1 -0
  139. package/dist/src/client/method-helpers/indicesStats.d.ts +15 -0
  140. package/dist/src/client/method-helpers/indicesStats.d.ts.map +1 -0
  141. package/dist/src/client/method-helpers/indicesStats.js +20 -0
  142. package/dist/src/client/method-helpers/indicesStats.js.map +1 -0
  143. package/dist/src/client/method-helpers/indicesValidateQuery.d.ts +36 -0
  144. package/dist/src/client/method-helpers/indicesValidateQuery.d.ts.map +1 -0
  145. package/dist/src/client/method-helpers/indicesValidateQuery.js +23 -0
  146. package/dist/src/client/method-helpers/indicesValidateQuery.js.map +1 -0
  147. package/dist/src/client/method-helpers/mget.d.ts +14 -0
  148. package/dist/src/client/method-helpers/mget.d.ts.map +1 -0
  149. package/dist/src/client/method-helpers/mget.js +64 -0
  150. package/dist/src/client/method-helpers/mget.js.map +1 -0
  151. package/dist/src/client/method-helpers/msearch.d.ts +13 -0
  152. package/dist/src/client/method-helpers/msearch.d.ts.map +1 -0
  153. package/dist/src/client/method-helpers/msearch.js +53 -0
  154. package/dist/src/client/method-helpers/msearch.js.map +1 -0
  155. package/dist/src/client/method-helpers/nodesInfo.d.ts +8 -0
  156. package/dist/src/client/method-helpers/nodesInfo.d.ts.map +1 -0
  157. package/dist/src/client/method-helpers/nodesInfo.js +25 -0
  158. package/dist/src/client/method-helpers/nodesInfo.js.map +1 -0
  159. package/dist/src/client/method-helpers/nodesStats.d.ts +15 -0
  160. package/dist/src/client/method-helpers/nodesStats.d.ts.map +1 -0
  161. package/dist/src/client/method-helpers/nodesStats.js +25 -0
  162. package/dist/src/client/method-helpers/nodesStats.js.map +1 -0
  163. package/dist/src/client/method-helpers/reindex.d.ts +37 -0
  164. package/dist/src/client/method-helpers/reindex.d.ts.map +1 -0
  165. package/dist/src/client/method-helpers/reindex.js +35 -0
  166. package/dist/src/client/method-helpers/reindex.js.map +1 -0
  167. package/dist/src/client/method-helpers/search.d.ts +51 -0
  168. package/dist/src/client/method-helpers/search.d.ts.map +1 -0
  169. package/dist/src/client/method-helpers/search.js +54 -0
  170. package/dist/src/client/method-helpers/search.js.map +1 -0
  171. package/dist/src/client/method-helpers/tasksCancel.d.ts +3 -0
  172. package/dist/src/client/method-helpers/tasksCancel.d.ts.map +1 -0
  173. package/dist/src/client/method-helpers/tasksCancel.js +16 -0
  174. package/dist/src/client/method-helpers/tasksCancel.js.map +1 -0
  175. package/dist/src/client/method-helpers/tasksGet.d.ts +3 -0
  176. package/dist/src/client/method-helpers/tasksGet.d.ts.map +1 -0
  177. package/dist/src/client/method-helpers/tasksGet.js +16 -0
  178. package/dist/src/client/method-helpers/tasksGet.js.map +1 -0
  179. package/dist/src/client/method-helpers/tasksList.d.ts +3 -0
  180. package/dist/src/client/method-helpers/tasksList.d.ts.map +1 -0
  181. package/dist/src/client/method-helpers/tasksList.js +16 -0
  182. package/dist/src/client/method-helpers/tasksList.js.map +1 -0
  183. package/dist/src/client/method-helpers/update.d.ts +79 -0
  184. package/dist/src/client/method-helpers/update.d.ts.map +1 -0
  185. package/dist/src/client/method-helpers/update.js +32 -0
  186. package/dist/src/client/method-helpers/update.js.map +1 -0
  187. package/dist/src/index.d.ts +4 -0
  188. package/dist/src/index.d.ts.map +1 -0
  189. package/dist/src/index.js +8 -0
  190. package/dist/src/index.js.map +1 -0
  191. package/dist/src/test-helpers/config.d.ts +3 -0
  192. package/dist/src/test-helpers/config.d.ts.map +1 -0
  193. package/dist/src/test-helpers/config.js +3 -0
  194. package/dist/src/test-helpers/config.js.map +1 -0
  195. package/dist/src/test-helpers/elasticsearch.d.ts +38 -0
  196. package/dist/src/test-helpers/elasticsearch.d.ts.map +1 -0
  197. package/dist/src/test-helpers/elasticsearch.js +213 -0
  198. package/dist/src/test-helpers/elasticsearch.js.map +1 -0
  199. package/dist/src/test-helpers/fixtures/even-date-data.d.ts +9 -0
  200. package/dist/src/test-helpers/fixtures/even-date-data.d.ts.map +1 -0
  201. package/dist/src/test-helpers/fixtures/even-date-data.js +10018 -0
  202. package/dist/src/test-helpers/fixtures/even-date-data.js.map +1 -0
  203. package/dist/src/test-helpers/fixtures/index.d.ts +3 -0
  204. package/dist/src/test-helpers/fixtures/index.d.ts.map +1 -0
  205. package/dist/src/test-helpers/fixtures/index.js +3 -0
  206. package/dist/src/test-helpers/fixtures/index.js.map +1 -0
  207. package/dist/src/test-helpers/fixtures/interfaces.d.ts +11 -0
  208. package/dist/src/test-helpers/fixtures/interfaces.d.ts.map +1 -0
  209. package/dist/src/test-helpers/fixtures/interfaces.js +2 -0
  210. package/dist/src/test-helpers/fixtures/interfaces.js.map +1 -0
  211. package/dist/src/test-helpers/fixtures/uneven-date-data.d.ts +9 -0
  212. package/dist/src/test-helpers/fixtures/uneven-date-data.d.ts.map +1 -0
  213. package/dist/src/test-helpers/fixtures/uneven-date-data.js +3032 -0
  214. package/dist/src/test-helpers/fixtures/uneven-date-data.js.map +1 -0
  215. package/dist/src/test-helpers/index.d.ts +4 -0
  216. package/dist/src/test-helpers/index.d.ts.map +1 -0
  217. package/dist/src/test-helpers/index.js +4 -0
  218. package/dist/src/test-helpers/index.js.map +1 -0
  219. package/dist/src/utils/elasticsearch.d.ts +25 -0
  220. package/dist/src/utils/elasticsearch.d.ts.map +1 -0
  221. package/dist/src/utils/elasticsearch.js +132 -0
  222. package/dist/src/utils/elasticsearch.js.map +1 -0
  223. package/dist/src/utils/index.d.ts +3 -0
  224. package/dist/src/utils/index.d.ts.map +1 -0
  225. package/dist/src/utils/index.js +3 -0
  226. package/dist/src/utils/index.js.map +1 -0
  227. package/dist/src/utils/validation.d.ts +3 -0
  228. package/dist/src/utils/validation.d.ts.map +1 -0
  229. package/dist/src/utils/validation.js +9 -0
  230. package/dist/src/utils/validation.js.map +1 -0
  231. package/package.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ <!-- THIS FILE IS AUTO-GENERATED, EDIT docs/packages/opensearch-client/overview.md -->
2
+
3
+ # Opensearch Client
4
+
5
+ > A Node.js facade client for opensearch & elasticsearch.
6
+
7
+ This is a package within the [Teraslice](https://github.com/terascope/teraslice) monorepo. See our [documentation](https://terascope.github.io/teraslice/docs/packages/opensearch-client/overview) for more information or the [issues](https://github.com/terascope/teraslice/issues?q=is%3Aopen+is%3Aissue+label%3Apkg%2Fopensearch-client) associated with this package
8
+
9
+ ## Contributing
10
+
11
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
12
+
13
+ Please make sure to update tests as appropriate.
14
+
15
+ ## License
16
+
17
+ [MIT](./LICENSE) licensed.
@@ -0,0 +1,233 @@
1
+ import { ClientParams, ClientResponse, ClientMetadata } from '@terascope/types';
2
+ export declare class Client {
3
+ private client;
4
+ private distributionMeta;
5
+ constructor(client: any, distributionMeta: ClientMetadata);
6
+ get __meta(): ClientMetadata;
7
+ bulk(params: ClientParams.BulkParams): Promise<ClientResponse.BulkResponse>;
8
+ /**
9
+ * creates a new record, can throw if record already exists
10
+ * @param CountParams
11
+ */
12
+ create(params: ClientParams.CreateParams): Promise<ClientResponse.CreateResponse>;
13
+ /**
14
+ * indexes a new record
15
+ * @param CountParams
16
+ */
17
+ index(params: ClientParams.IndexParams): Promise<ClientResponse.IndexResponse>;
18
+ /**
19
+ * updates a record, or can upsert a record
20
+ * @param CountParams
21
+ */
22
+ update(params: ClientParams.UpdateParams): Promise<ClientResponse.UpdateResponse>;
23
+ /**
24
+ * Gets the number of matches for a search query or
25
+ * if no query provided the count for docs in an index
26
+ * @param CountParams
27
+ */
28
+ count(params: ClientParams.CountParams): Promise<ClientResponse.CountResponse>;
29
+ get cluster(): {
30
+ getSettings(params?: ClientParams.ClusterGetSettingsParams): Promise<ClientResponse.ClusterGetSettingsResponse>;
31
+ health(params?: ClientParams.ClusterHealthParams): Promise<ClientResponse.ClusterHealthResponse>;
32
+ };
33
+ get cat(): {
34
+ indices(params?: ClientParams.CatIndicesParams): Promise<ClientResponse.CatIndicesResponse>;
35
+ };
36
+ get nodes(): {
37
+ stats(params?: ClientParams.NodesStatsParams): Promise<ClientResponse.NodesStatsResponse>;
38
+ info(params?: ClientParams.NodesInfoParams): Promise<ClientResponse.NodesInfoResponse>;
39
+ };
40
+ /**
41
+ * Deletes a specific record, requires an index and id.
42
+ * @param RequestParams.delete
43
+ */
44
+ delete(params: ClientParams.DeleteParams): Promise<ClientResponse.DeleteResponse>;
45
+ /**
46
+ * Deletes documents that match the specified query.
47
+ * @param RequestParams.DeleteByQuery
48
+ * @returns count or Elasticsearch task_id
49
+ */
50
+ deleteByQuery(params: ClientParams.DeleteByQueryParams): Promise<ClientResponse.DeleteByQueryResponse>;
51
+ /**
52
+ * Check that the document id exists in the specified index.
53
+ * @param ExistsParams
54
+ * @returns boolean
55
+ */
56
+ exists(params: ClientParams.ExistsParams): Promise<ClientResponse.ExistsResponse>;
57
+ /**
58
+ * Retrieves the specified JSON document from an index or an empty doc if no doc id is found
59
+ * @param ClientParams.GetParams
60
+ * @returns Object
61
+ */
62
+ get<T = Record<string, unknown>>(params: ClientParams.GetParams): Promise<ClientResponse.GetResponse<T>>;
63
+ /**
64
+ * Returns info about the cluster the client is connected to
65
+ * @returns object with cluster info
66
+ */
67
+ info(): Promise<ClientResponse.InfoResponse>;
68
+ /**
69
+ * Returns true or false based on whether the cluster is running.
70
+ * @returns Boolean
71
+ */
72
+ ping(): Promise<boolean>;
73
+ /**
74
+ * Returns search hits that match the query defined in the request.
75
+ * @param SearchParams
76
+ * @returns {Record<string,any>[]}
77
+ */
78
+ search<T = Record<string, unknown>>(params: ClientParams.SearchParams): Promise<ClientResponse.SearchResponse<T>>;
79
+ /**
80
+ * The multi search execution of several searches within the same API request
81
+ * @param MSearchParams
82
+ * @returns {Record<string,any>[]}
83
+ */
84
+ msearch(params: ClientParams.MSearchParams): Promise<ClientResponse.MSearchResponse>;
85
+ /**
86
+ * The multi get execution of multiple-get searches from a single API request
87
+ * @param MGetParams
88
+ * @returns {Record<string,any>[]}
89
+ */
90
+ mget(params: ClientParams.MGetParams): Promise<ClientResponse.MGetResponse>;
91
+ /**
92
+ * Re-Index data to a new index
93
+ * @param ReIndexParams
94
+ * @returns Report of re-indexing task or task id if wait_for_completion is false
95
+ */
96
+ reindex(params: ClientParams.ReindexParams): Promise<ClientResponse.ReindexResponse>;
97
+ get indices(): {
98
+ /**
99
+ * Creates a new index.
100
+ * @param IndicesCreateParams
101
+ * @returns IndicesCreateResponse
102
+ */
103
+ create(params: ClientParams.IndicesCreateParams): Promise<ClientResponse.IndicesCreateResponse>;
104
+ /**
105
+ * Deletes one or more indices.
106
+ * @param IndicesDeleteParams
107
+ * @returns
108
+ */
109
+ delete(params: ClientParams.IndicesDeleteParams): Promise<ClientResponse.IndicesDeleteResponse>;
110
+ /**
111
+ * Checks if a data stream, index, or alias exists.
112
+ * @param IndicesExistsParams
113
+ * @returns boolean
114
+ */
115
+ exists(params: ClientParams.IndicesExistsParams): Promise<ClientResponse.IndicesExistsResponse>;
116
+ /**
117
+ * Returns information about one or more indices
118
+ * @param IndicesGetParams
119
+ * @returns
120
+ */
121
+ get(params: ClientParams.IndicesGetParams): Promise<ClientResponse.IndicesGetResponse>;
122
+ /**
123
+ * Uploads index mapping template
124
+ * @param IndicesPutTemplateParams
125
+ * @returns IndicesPutTemplateResponse
126
+ */
127
+ putTemplate(params: ClientParams.IndicesPutTemplateParams): Promise<ClientResponse.IndicesPutTemplateResponse>;
128
+ /**
129
+ * Deletes index templates
130
+ * @param IndicesDeleteTemplateParams
131
+ * @returns IndicesDeleteTemplateResponse
132
+ */
133
+ deleteTemplate(params: ClientParams.IndicesDeleteTemplateParams): Promise<ClientResponse.IndicesDeleteTemplateResponse>;
134
+ /**
135
+ * Returns true if template exists
136
+ * @param IndicesExistsTemplateParams
137
+ * @returns boolean
138
+ */
139
+ existsTemplate(params: ClientParams.IndicesExistsTemplateParams): Promise<ClientResponse.IndicesExistsTemplateResponse>;
140
+ /**
141
+ * Returns template
142
+ * @param IndicesGetTemplateParams
143
+ * @returns template
144
+ */
145
+ getTemplate(params: ClientParams.IndicesGetTemplateParams): Promise<ClientResponse.IndicesGetTemplateResponse>;
146
+ /**
147
+ * Returns index template
148
+ * @param IndicesGetIndexTemplateParams
149
+ * @returns IndicesGetIndexTemplateResponse
150
+ * not supported by elasticsearch version 6
151
+ * same params as IndicesGetTemplateParams
152
+ */
153
+ getIndexTemplate(params: ClientParams.IndicesGetIndexTemplateParams): Promise<ClientResponse.IndicesGetIndexTemplateResponse>;
154
+ /**
155
+ * Retrieves mapping definitions for one or more indices
156
+ * @param IndicesGetMappingParams
157
+ * @returns IndicesGetMappingResponse
158
+ */
159
+ getMapping(params: ClientParams.IndicesGetMappingParams): Promise<ClientResponse.IndicesGetMappingResponse>;
160
+ /**
161
+ * Adds new fields to an existing index or edit the search settings of existing fields.
162
+ * @param IndicesPutMappingParams
163
+ * @returns IndicesPutMappingResponse
164
+ */
165
+ putMapping(params: ClientParams.IndicesPutMappingParams): Promise<ClientResponse.IndicesPutMappingResponse>;
166
+ /**
167
+ * Retrieves mapping definitions for one or more fields.
168
+ * @param IndicesGetFieldMappingParams
169
+ * @response IndicesGetFieldMappingResponse
170
+ */
171
+ getFieldMapping(params: ClientParams.IndicesGetFieldMappingParams): Promise<ClientResponse.IndicesGetFieldMappingResponse>;
172
+ /**
173
+ * Returns setting information for one or more indices
174
+ * @param IndicesGetSettingsParams
175
+ * @returns IndicesGetSettingsResponse
176
+ */
177
+ getSettings(params?: ClientParams.IndicesGetSettingsParams): Promise<ClientResponse.IndicesGetSettingsResponse>;
178
+ /**
179
+ * Changes a dynamic index setting in real time.
180
+ * @param IndicesPutSettingsParams
181
+ * @returns IndicesPutSettingsResponse
182
+ */
183
+ putSettings(params: ClientParams.IndicesPutSettingsParams): Promise<ClientResponse.IndicesPutSettingsResponse>;
184
+ /**
185
+ * Makes a recent operation performed on one or more indices available for search.
186
+ * @param IndicesRefreshParams
187
+ * @returns IndicesRefreshResponse
188
+ * can be an empty query
189
+ */
190
+ refresh(params?: ClientParams.IndicesRefreshParams): Promise<ClientResponse.IndicesRefreshResponse>;
191
+ /**
192
+ * Returns information about shard recoveries for one or more indices
193
+ * @param IndicesRecoveryParams
194
+ * @returns IndicesRecoveryResponse
195
+ * can be an empty query
196
+ */
197
+ recovery(params?: ClientParams.IndicesRecoveryParams): Promise<ClientResponse.IndicesRecoveryResponse>;
198
+ /**
199
+ * Validates a query without executing it.
200
+ * @param IndicesValidateQueryParams
201
+ * @returns IndicesValidateQueryResponse
202
+ */
203
+ validateQuery(params: ClientParams.IndicesValidateQueryParams): Promise<ClientResponse.IndicesValidateQueryResponse>;
204
+ /**
205
+ * Returns statistics for one or more indices
206
+ * @param IndicesStatsParams
207
+ * @returns IndicesStatsResponse
208
+ */
209
+ stats(params: ClientParams.IndicesStats): Promise<ClientResponse.IndicesStatsResponse>;
210
+ };
211
+ get tasks(): {
212
+ /**
213
+ * Cancels a currently running task
214
+ * @param TasksCancelParams
215
+ * @returns TasksCancelResponse
216
+ */
217
+ cancel(params: ClientParams.TasksCancelParams): Promise<ClientResponse.TasksCancelResponse>;
218
+ /**
219
+ * Gets information about a running task
220
+ * @param TasksGetParams
221
+ * @returns TasksGetResponse
222
+ */
223
+ get(params: ClientParams.TasksGetParams): Promise<ClientResponse.TasksGetResponse>;
224
+ /**
225
+ * Returns information about the tasks currently executing in the cluster.
226
+ * @param TasksListParams
227
+ * @returns TasksListResponse
228
+ */
229
+ list(params: ClientParams.TasksListParams): Promise<ClientResponse.TasksListResponse>;
230
+ };
231
+ private _removeBody;
232
+ }
233
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGhF,qBAAa,MAAM;IACf,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