@webiny/api-elasticsearch 0.0.0-mt-2 → 0.0.0-unstable.085ff6572f

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 (107) hide show
  1. package/client.js +20 -24
  2. package/client.js.map +1 -0
  3. package/compression.js +0 -17
  4. package/compression.js.map +1 -0
  5. package/cursors.d.ts +3 -2
  6. package/cursors.js +5 -11
  7. package/cursors.js.map +1 -0
  8. package/index.d.ts +14 -2
  9. package/index.js +146 -13
  10. package/index.js.map +1 -0
  11. package/indexConfiguration/base.d.ts +6 -0
  12. package/indexConfiguration/base.js +40 -0
  13. package/indexConfiguration/base.js.map +1 -0
  14. package/indexConfiguration/common.d.ts +9 -0
  15. package/indexConfiguration/common.js +41 -0
  16. package/indexConfiguration/common.js.map +1 -0
  17. package/indexConfiguration/index.d.ts +3 -0
  18. package/indexConfiguration/index.js +38 -0
  19. package/indexConfiguration/index.js.map +1 -0
  20. package/indexConfiguration/japanese.d.ts +6 -0
  21. package/indexConfiguration/japanese.js +119 -0
  22. package/indexConfiguration/japanese.js.map +1 -0
  23. package/indices.d.ts +9 -0
  24. package/indices.js +28 -0
  25. package/indices.js.map +1 -0
  26. package/limit.js +0 -8
  27. package/limit.js.map +1 -0
  28. package/normalize.js +11 -12
  29. package/normalize.js.map +1 -0
  30. package/operators.d.ts +5 -14
  31. package/operators.js +35 -32
  32. package/operators.js.map +1 -0
  33. package/package.json +16 -16
  34. package/plugins/GzipCompression.d.ts +6 -1
  35. package/plugins/GzipCompression.js +10 -17
  36. package/plugins/GzipCompression.js.map +1 -0
  37. package/plugins/definition/CompressionPlugin.d.ts +1 -1
  38. package/plugins/definition/CompressionPlugin.js +1 -6
  39. package/plugins/definition/CompressionPlugin.js.map +1 -0
  40. package/plugins/definition/ElasticsearchBodyModifierPlugin.js +1 -10
  41. package/plugins/definition/ElasticsearchBodyModifierPlugin.js.map +1 -0
  42. package/plugins/definition/ElasticsearchFieldPlugin.d.ts +9 -15
  43. package/plugins/definition/ElasticsearchFieldPlugin.js +24 -71
  44. package/plugins/definition/ElasticsearchFieldPlugin.js.map +1 -0
  45. package/plugins/definition/ElasticsearchIndexPlugin.d.ts +18 -0
  46. package/plugins/definition/ElasticsearchIndexPlugin.js +36 -0
  47. package/plugins/definition/ElasticsearchIndexPlugin.js.map +1 -0
  48. package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.d.ts +5 -1
  49. package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.js +10 -7
  50. package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.js.map +1 -0
  51. package/plugins/definition/ElasticsearchQueryModifierPlugin.js +1 -10
  52. package/plugins/definition/ElasticsearchQueryModifierPlugin.js.map +1 -0
  53. package/plugins/definition/ElasticsearchSortModifierPlugin.js +1 -10
  54. package/plugins/definition/ElasticsearchSortModifierPlugin.js.map +1 -0
  55. package/plugins/definition/index.d.ts +7 -0
  56. package/plugins/definition/index.js +82 -0
  57. package/plugins/definition/index.js.map +1 -0
  58. package/plugins/index.d.ts +2 -0
  59. package/plugins/index.js +27 -0
  60. package/plugins/index.js.map +1 -0
  61. package/plugins/operator/andIn.js +4 -15
  62. package/plugins/operator/andIn.js.map +1 -0
  63. package/plugins/operator/between.js +8 -17
  64. package/plugins/operator/between.js.map +1 -0
  65. package/plugins/operator/contains.js +2 -11
  66. package/plugins/operator/contains.js.map +1 -0
  67. package/plugins/operator/equal.js +29 -14
  68. package/plugins/operator/equal.js.map +1 -0
  69. package/plugins/operator/gt.js +2 -10
  70. package/plugins/operator/gt.js.map +1 -0
  71. package/plugins/operator/gte.js +2 -10
  72. package/plugins/operator/gte.js.map +1 -0
  73. package/plugins/operator/in.js +7 -22
  74. package/plugins/operator/in.js.map +1 -0
  75. package/plugins/operator/index.d.ts +3 -0
  76. package/plugins/operator/index.js +33 -26
  77. package/plugins/operator/index.js.map +1 -0
  78. package/plugins/operator/japanese/contains.d.ts +8 -0
  79. package/plugins/operator/japanese/contains.js +47 -0
  80. package/plugins/operator/japanese/contains.js.map +1 -0
  81. package/plugins/operator/lt.js +2 -10
  82. package/plugins/operator/lt.js.map +1 -0
  83. package/plugins/operator/lte.js +2 -10
  84. package/plugins/operator/lte.js.map +1 -0
  85. package/plugins/operator/not.js +21 -11
  86. package/plugins/operator/not.js.map +1 -0
  87. package/plugins/operator/notBetween.js +7 -16
  88. package/plugins/operator/notBetween.js.map +1 -0
  89. package/plugins/operator/notContains.js +2 -11
  90. package/plugins/operator/notContains.js.map +1 -0
  91. package/plugins/operator/notIn.js +4 -13
  92. package/plugins/operator/notIn.js.map +1 -0
  93. package/plugins/operator/notStartsWith.d.ts +7 -0
  94. package/plugins/operator/notStartsWith.js +30 -0
  95. package/plugins/operator/notStartsWith.js.map +1 -0
  96. package/plugins/operator/startsWith.d.ts +7 -0
  97. package/plugins/operator/startsWith.js +30 -0
  98. package/plugins/operator/startsWith.js.map +1 -0
  99. package/sort.d.ts +4 -3
  100. package/sort.js +10 -16
  101. package/sort.js.map +1 -0
  102. package/types.d.ts +164 -4
  103. package/types.js +11 -2
  104. package/types.js.map +1 -0
  105. package/where.d.ts +2 -2
  106. package/where.js +9 -26
  107. package/where.js.map +1 -0
package/client.js CHANGED
@@ -1,47 +1,43 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createElasticsearchClient = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
-
14
10
  var _elasticsearch = require("@elastic/elasticsearch");
15
-
16
11
  var _awsSdk = _interopRequireDefault(require("aws-sdk"));
17
-
12
+ var _error = _interopRequireDefault(require("@webiny/error"));
18
13
  var _awsElasticsearchConnector = _interopRequireDefault(require("aws-elasticsearch-connector"));
19
-
20
14
  const _excluded = ["endpoint", "node"];
21
-
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
23
-
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
25
-
26
15
  const createElasticsearchClient = options => {
27
16
  const {
28
- endpoint,
29
- node
30
- } = options,
31
- rest = (0, _objectWithoutProperties2.default)(options, _excluded);
32
-
33
- const clientOptions = _objectSpread({
17
+ endpoint,
18
+ node
19
+ } = options,
20
+ rest = (0, _objectWithoutProperties2.default)(options, _excluded);
21
+ const clientOptions = (0, _objectSpread2.default)({
34
22
  node: endpoint || node
35
23
  }, rest);
36
-
37
24
  if (!clientOptions.auth) {
38
25
  /**
39
26
  * If no `auth` configuration is present, we setup AWS connector.
40
27
  */
41
28
  Object.assign(clientOptions, (0, _awsElasticsearchConnector.default)(_awsSdk.default.config));
42
29
  }
43
-
44
- return new _elasticsearch.Client(clientOptions);
30
+ try {
31
+ return new _elasticsearch.Client(clientOptions);
32
+ } catch (ex) {
33
+ const data = (0, _objectSpread2.default)((0, _objectSpread2.default)({
34
+ error: ex,
35
+ node: endpoint || node
36
+ }, rest), {}, {
37
+ auth: undefined
38
+ });
39
+ console.log((0, _objectSpread2.default)({}, data));
40
+ throw new _error.default("Could not connect to Elasticsearch.", "ELASTICSEARCH_CLIENT_ERROR", data);
41
+ }
45
42
  };
46
-
47
43
  exports.createElasticsearchClient = createElasticsearchClient;
package/client.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createElasticsearchClient","options","endpoint","node","rest","clientOptions","auth","Object","assign","createAwsElasticsearchConnector","AWS","config","Client","ex","data","error","undefined","console","log","WebinyError"],"sources":["client.ts"],"sourcesContent":["import { Client, ClientOptions } from \"@elastic/elasticsearch\";\nimport AWS from \"aws-sdk\";\nimport WebinyError from \"@webiny/error\";\n/**\n * Package aws-elasticsearch-connector does not have types.\n */\n// @ts-ignore\nimport createAwsElasticsearchConnector from \"aws-elasticsearch-connector\";\n\nexport interface ElasticsearchClientOptions extends ClientOptions {\n endpoint?: string;\n}\n\nexport const createElasticsearchClient = (options: ElasticsearchClientOptions) => {\n const { endpoint, node, ...rest } = options;\n\n const clientOptions: ClientOptions = {\n node: endpoint || node,\n ...rest\n };\n\n if (!clientOptions.auth) {\n /**\n * If no `auth` configuration is present, we setup AWS connector.\n */\n Object.assign(clientOptions, createAwsElasticsearchConnector(AWS.config));\n }\n\n try {\n return new Client(clientOptions);\n } catch (ex) {\n const data = {\n error: ex,\n node: endpoint || node,\n ...rest,\n auth: undefined\n };\n console.log({\n ...data\n });\n throw new WebinyError(\n \"Could not connect to Elasticsearch.\",\n \"ELASTICSEARCH_CLIENT_ERROR\",\n data\n );\n }\n};\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AAKA;AAA0E;AAMnE,MAAMA,yBAAyB,GAAIC,OAAmC,IAAK;EAC9E,MAAM;MAAEC,QAAQ;MAAEC;IAAc,CAAC,GAAGF,OAAO;IAAhBG,IAAI,0CAAKH,OAAO;EAE3C,MAAMI,aAA4B;IAC9BF,IAAI,EAAED,QAAQ,IAAIC;EAAI,GACnBC,IAAI,CACV;EAED,IAAI,CAACC,aAAa,CAACC,IAAI,EAAE;IACrB;AACR;AACA;IACQC,MAAM,CAACC,MAAM,CAACH,aAAa,EAAE,IAAAI,kCAA+B,EAACC,eAAG,CAACC,MAAM,CAAC,CAAC;EAC7E;EAEA,IAAI;IACA,OAAO,IAAIC,qBAAM,CAACP,aAAa,CAAC;EACpC,CAAC,CAAC,OAAOQ,EAAE,EAAE;IACT,MAAMC,IAAI;MACNC,KAAK,EAAEF,EAAE;MACTV,IAAI,EAAED,QAAQ,IAAIC;IAAI,GACnBC,IAAI;MACPE,IAAI,EAAEU;IAAS,EAClB;IACDC,OAAO,CAACC,GAAG,iCACJJ,IAAI,EACT;IACF,MAAM,IAAIK,cAAW,CACjB,qCAAqC,EACrC,4BAA4B,EAC5BL,IAAI,CACP;EACL;AACJ,CAAC;AAAC"}
package/compression.js CHANGED
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.decompress = exports.compress = void 0;
7
-
8
7
  var _CompressionPlugin = require("./plugins/definition/CompressionPlugin");
9
-
10
8
  /**
11
9
  * Get the compression plugins, in reverse order, because we want to use the last one added - first.
12
10
  */
@@ -16,53 +14,38 @@ const getCompressionPlugins = plugins => {
16
14
  /**
17
15
  * Method to compress the elasticsearch data that is going to be stored into the DynamoDB table that is meant for elasticsearch.
18
16
  */
19
-
20
-
21
17
  const compress = async (pluginsContainer, data) => {
22
18
  const plugins = getCompressionPlugins(pluginsContainer);
23
-
24
19
  if (plugins.length === 0) {
25
20
  console.log("No compression plugins");
26
21
  return data;
27
22
  }
28
-
29
23
  for (const plugin of plugins) {
30
24
  if (plugin.canCompress(data) === false) {
31
25
  continue;
32
26
  }
33
-
34
27
  return await plugin.compress(data);
35
28
  }
36
29
  /**
37
30
  * Possibly no plugins that can compress, just return the data.
38
31
  */
39
-
40
-
41
32
  return data;
42
33
  };
43
-
44
34
  exports.compress = compress;
45
-
46
35
  const decompress = async (pluginsContainer, data) => {
47
36
  const plugins = getCompressionPlugins(pluginsContainer);
48
-
49
37
  if (plugins.length === 0) {
50
38
  return data;
51
39
  }
52
-
53
40
  for (const plugin of plugins) {
54
41
  if (plugin.canDecompress(data) === false) {
55
42
  continue;
56
43
  }
57
-
58
44
  return await plugin.decompress(data);
59
45
  }
60
46
  /**
61
47
  * Possibly no plugins that can decompress, just return the data.
62
48
  */
63
-
64
-
65
49
  return data;
66
50
  };
67
-
68
51
  exports.decompress = decompress;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getCompressionPlugins","plugins","byType","CompressionPlugin","type","reverse","compress","pluginsContainer","data","length","console","log","plugin","canCompress","decompress","canDecompress"],"sources":["compression.ts"],"sourcesContent":["import { CompressionPlugin } from \"~/plugins/definition/CompressionPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\n/**\n * Get the compression plugins, in reverse order, because we want to use the last one added - first.\n */\nconst getCompressionPlugins = (plugins: PluginsContainer): CompressionPlugin[] => {\n return plugins.byType<CompressionPlugin>(CompressionPlugin.type).reverse();\n};\n/**\n * Method to compress the elasticsearch data that is going to be stored into the DynamoDB table that is meant for elasticsearch.\n */\nexport const compress = async (\n pluginsContainer: PluginsContainer,\n data: Record<string, any>\n): Promise<Record<string, any>> => {\n const plugins = getCompressionPlugins(pluginsContainer);\n if (plugins.length === 0) {\n console.log(\"No compression plugins\");\n return data;\n }\n for (const plugin of plugins) {\n if (plugin.canCompress(data) === false) {\n continue;\n }\n return await plugin.compress(data);\n }\n /**\n * Possibly no plugins that can compress, just return the data.\n */\n return data;\n};\n\nexport const decompress = async (\n pluginsContainer: PluginsContainer,\n data: Record<string, any>\n): Promise<Record<string, any>> => {\n const plugins = getCompressionPlugins(pluginsContainer);\n if (plugins.length === 0) {\n return data;\n }\n for (const plugin of plugins) {\n if (plugin.canDecompress(data) === false) {\n continue;\n }\n return await plugin.decompress(data);\n }\n /**\n * Possibly no plugins that can decompress, just return the data.\n */\n return data;\n};\n"],"mappings":";;;;;;AAAA;AAGA;AACA;AACA;AACA,MAAMA,qBAAqB,GAAIC,OAAyB,IAA0B;EAC9E,OAAOA,OAAO,CAACC,MAAM,CAAoBC,oCAAiB,CAACC,IAAI,CAAC,CAACC,OAAO,EAAE;AAC9E,CAAC;AACD;AACA;AACA;AACO,MAAMC,QAAQ,GAAG,OACpBC,gBAAkC,EAClCC,IAAyB,KACM;EAC/B,MAAMP,OAAO,GAAGD,qBAAqB,CAACO,gBAAgB,CAAC;EACvD,IAAIN,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;IACtBC,OAAO,CAACC,GAAG,CAAC,wBAAwB,CAAC;IACrC,OAAOH,IAAI;EACf;EACA,KAAK,MAAMI,MAAM,IAAIX,OAAO,EAAE;IAC1B,IAAIW,MAAM,CAACC,WAAW,CAACL,IAAI,CAAC,KAAK,KAAK,EAAE;MACpC;IACJ;IACA,OAAO,MAAMI,MAAM,CAACN,QAAQ,CAACE,IAAI,CAAC;EACtC;EACA;AACJ;AACA;EACI,OAAOA,IAAI;AACf,CAAC;AAAC;AAEK,MAAMM,UAAU,GAAG,OACtBP,gBAAkC,EAClCC,IAAyB,KACM;EAC/B,MAAMP,OAAO,GAAGD,qBAAqB,CAACO,gBAAgB,CAAC;EACvD,IAAIN,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;IACtB,OAAOD,IAAI;EACf;EACA,KAAK,MAAMI,MAAM,IAAIX,OAAO,EAAE;IAC1B,IAAIW,MAAM,CAACG,aAAa,CAACP,IAAI,CAAC,KAAK,KAAK,EAAE;MACtC;IACJ;IACA,OAAO,MAAMI,MAAM,CAACE,UAAU,CAACN,IAAI,CAAC;EACxC;EACA;AACJ;AACA;EACI,OAAOA,IAAI;AACf,CAAC;AAAC"}
package/cursors.d.ts CHANGED
@@ -1,9 +1,10 @@
1
+ import { PrimitiveValue } from "./types";
1
2
  /**
2
3
  * Encode a received cursor value into something that can be passed on to the user.
3
4
  */
4
- export declare const encodeCursor: (cursor?: string | string[]) => string | undefined;
5
+ export declare const encodeCursor: (cursor?: string | string[] | null) => string | undefined;
5
6
  /**
6
7
  * Decode a received value into a Elasticsearch cursor.
7
8
  * If no value is received or is not decodable, return undefined.
8
9
  */
9
- export declare const decodeCursor: (cursor?: string) => string[] | string | undefined;
10
+ export declare const decodeCursor: (cursor?: string | null) => PrimitiveValue[] | undefined;
package/cursors.js CHANGED
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.encodeCursor = exports.decodeCursor = void 0;
7
-
8
7
  /**
9
8
  * Encode a received cursor value into something that can be passed on to the user.
10
9
  */
@@ -12,38 +11,33 @@ const encodeCursor = cursor => {
12
11
  if (!cursor) {
13
12
  return undefined;
14
13
  }
15
-
16
14
  cursor = Array.isArray(cursor) ? cursor.map(encodeURIComponent) : encodeURIComponent(cursor);
17
-
18
15
  try {
19
16
  return Buffer.from(JSON.stringify(cursor)).toString("base64");
20
17
  } catch (ex) {
21
18
  console.error(ex.message);
22
19
  }
23
-
24
20
  return undefined;
25
21
  };
26
22
  /**
27
23
  * Decode a received value into a Elasticsearch cursor.
28
24
  * If no value is received or is not decodable, return undefined.
29
25
  */
30
-
31
-
32
26
  exports.encodeCursor = encodeCursor;
33
-
34
27
  const decodeCursor = cursor => {
35
28
  if (!cursor) {
36
29
  return undefined;
37
30
  }
38
-
39
31
  try {
40
32
  const value = JSON.parse(Buffer.from(cursor, "base64").toString("ascii"));
41
- return Array.isArray(value) ? value.map(decodeURIComponent) : decodeURIComponent(value);
33
+ if (Array.isArray(value)) {
34
+ return value.map(decodeURIComponent);
35
+ }
36
+ const decoded = decodeURIComponent(value);
37
+ return decoded ? [decoded] : undefined;
42
38
  } catch (ex) {
43
39
  console.error(ex.message);
44
40
  }
45
-
46
41
  return undefined;
47
42
  };
48
-
49
43
  exports.decodeCursor = decodeCursor;
package/cursors.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["encodeCursor","cursor","undefined","Array","isArray","map","encodeURIComponent","Buffer","from","JSON","stringify","toString","ex","console","error","message","decodeCursor","value","parse","decodeURIComponent","decoded"],"sources":["cursors.ts"],"sourcesContent":["import { PrimitiveValue } from \"~/types\";\n\n/**\n * Encode a received cursor value into something that can be passed on to the user.\n */\nexport const encodeCursor = (cursor?: string | string[] | null): string | undefined => {\n if (!cursor) {\n return undefined;\n }\n\n cursor = Array.isArray(cursor) ? cursor.map(encodeURIComponent) : encodeURIComponent(cursor);\n\n try {\n return Buffer.from(JSON.stringify(cursor)).toString(\"base64\");\n } catch (ex) {\n console.error(ex.message);\n }\n return undefined;\n};\n/**\n * Decode a received value into a Elasticsearch cursor.\n * If no value is received or is not decodable, return undefined.\n */\nexport const decodeCursor = (cursor?: string | null): PrimitiveValue[] | undefined => {\n if (!cursor) {\n return undefined;\n }\n try {\n const value = JSON.parse(Buffer.from(cursor, \"base64\").toString(\"ascii\"));\n if (Array.isArray(value)) {\n return value.map(decodeURIComponent);\n }\n const decoded = decodeURIComponent(value);\n return decoded ? [decoded] : undefined;\n } catch (ex) {\n console.error(ex.message);\n }\n return undefined;\n};\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACO,MAAMA,YAAY,GAAIC,MAAiC,IAAyB;EACnF,IAAI,CAACA,MAAM,EAAE;IACT,OAAOC,SAAS;EACpB;EAEAD,MAAM,GAAGE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,CAACI,GAAG,CAACC,kBAAkB,CAAC,GAAGA,kBAAkB,CAACL,MAAM,CAAC;EAE5F,IAAI;IACA,OAAOM,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,SAAS,CAACT,MAAM,CAAC,CAAC,CAACU,QAAQ,CAAC,QAAQ,CAAC;EACjE,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,KAAK,CAACF,EAAE,CAACG,OAAO,CAAC;EAC7B;EACA,OAAOb,SAAS;AACpB,CAAC;AACD;AACA;AACA;AACA;AAHA;AAIO,MAAMc,YAAY,GAAIf,MAAsB,IAAmC;EAClF,IAAI,CAACA,MAAM,EAAE;IACT,OAAOC,SAAS;EACpB;EACA,IAAI;IACA,MAAMe,KAAK,GAAGR,IAAI,CAACS,KAAK,CAACX,MAAM,CAACC,IAAI,CAACP,MAAM,EAAE,QAAQ,CAAC,CAACU,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzE,IAAIR,KAAK,CAACC,OAAO,CAACa,KAAK,CAAC,EAAE;MACtB,OAAOA,KAAK,CAACZ,GAAG,CAACc,kBAAkB,CAAC;IACxC;IACA,MAAMC,OAAO,GAAGD,kBAAkB,CAACF,KAAK,CAAC;IACzC,OAAOG,OAAO,GAAG,CAACA,OAAO,CAAC,GAAGlB,SAAS;EAC1C,CAAC,CAAC,OAAOU,EAAE,EAAE;IACTC,OAAO,CAACC,KAAK,CAACF,EAAE,CAACG,OAAO,CAAC;EAC7B;EACA,OAAOb,SAAS;AACpB,CAAC;AAAC"}
package/index.d.ts CHANGED
@@ -1,9 +1,21 @@
1
1
  import { ElasticsearchContext } from "./types";
2
- import { ContextPlugin } from "@webiny/handler/plugins/ContextPlugin";
2
+ import { ContextPlugin } from "@webiny/api";
3
3
  import { ElasticsearchClientOptions } from "./client";
4
4
  import { Client } from "@elastic/elasticsearch";
5
- declare const _default: (params: ElasticsearchClientOptions | Client) => ContextPlugin<ElasticsearchContext>;
5
+ export * from "./indexConfiguration";
6
+ export * from "./plugins";
7
+ export * from "./sort";
8
+ export * from "./indices";
9
+ export * from "./where";
10
+ export * from "./limit";
11
+ export * from "./normalize";
12
+ export * from "./compression";
13
+ export * from "./operators";
14
+ export * from "./cursors";
15
+ export * from "./client";
16
+ export { createGzipCompression } from "./plugins/GzipCompression";
6
17
  /**
7
18
  * We must accept either Elasticsearch client or options that create the client.
8
19
  */
20
+ declare const _default: (params: ElasticsearchClientOptions | Client) => ContextPlugin<ElasticsearchContext>;
9
21
  export default _default;
package/index.js CHANGED
@@ -1,38 +1,171 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
7
+ var _exportNames = {
8
+ createGzipCompression: true
9
+ };
10
+ Object.defineProperty(exports, "createGzipCompression", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _GzipCompression.createGzipCompression;
14
+ }
15
+ });
8
16
  exports.default = void 0;
9
-
10
- var _ContextPlugin = require("@webiny/handler/plugins/ContextPlugin");
11
-
12
17
  var _error = _interopRequireDefault(require("@webiny/error"));
13
-
18
+ var _api = require("@webiny/api");
14
19
  var _client = require("./client");
15
-
20
+ Object.keys(_client).forEach(function (key) {
21
+ if (key === "default" || key === "__esModule") return;
22
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23
+ if (key in exports && exports[key] === _client[key]) return;
24
+ Object.defineProperty(exports, key, {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _client[key];
28
+ }
29
+ });
30
+ });
16
31
  var _operators = require("./operators");
17
-
32
+ Object.keys(_operators).forEach(function (key) {
33
+ if (key === "default" || key === "__esModule") return;
34
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
35
+ if (key in exports && exports[key] === _operators[key]) return;
36
+ Object.defineProperty(exports, key, {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _operators[key];
40
+ }
41
+ });
42
+ });
18
43
  var _elasticsearch = require("@elastic/elasticsearch");
19
-
44
+ var _indexConfiguration = require("./indexConfiguration");
45
+ Object.keys(_indexConfiguration).forEach(function (key) {
46
+ if (key === "default" || key === "__esModule") return;
47
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
48
+ if (key in exports && exports[key] === _indexConfiguration[key]) return;
49
+ Object.defineProperty(exports, key, {
50
+ enumerable: true,
51
+ get: function () {
52
+ return _indexConfiguration[key];
53
+ }
54
+ });
55
+ });
56
+ var _plugins = require("./plugins");
57
+ Object.keys(_plugins).forEach(function (key) {
58
+ if (key === "default" || key === "__esModule") return;
59
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
60
+ if (key in exports && exports[key] === _plugins[key]) return;
61
+ Object.defineProperty(exports, key, {
62
+ enumerable: true,
63
+ get: function () {
64
+ return _plugins[key];
65
+ }
66
+ });
67
+ });
68
+ var _sort = require("./sort");
69
+ Object.keys(_sort).forEach(function (key) {
70
+ if (key === "default" || key === "__esModule") return;
71
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
72
+ if (key in exports && exports[key] === _sort[key]) return;
73
+ Object.defineProperty(exports, key, {
74
+ enumerable: true,
75
+ get: function () {
76
+ return _sort[key];
77
+ }
78
+ });
79
+ });
80
+ var _indices = require("./indices");
81
+ Object.keys(_indices).forEach(function (key) {
82
+ if (key === "default" || key === "__esModule") return;
83
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
84
+ if (key in exports && exports[key] === _indices[key]) return;
85
+ Object.defineProperty(exports, key, {
86
+ enumerable: true,
87
+ get: function () {
88
+ return _indices[key];
89
+ }
90
+ });
91
+ });
92
+ var _where = require("./where");
93
+ Object.keys(_where).forEach(function (key) {
94
+ if (key === "default" || key === "__esModule") return;
95
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
96
+ if (key in exports && exports[key] === _where[key]) return;
97
+ Object.defineProperty(exports, key, {
98
+ enumerable: true,
99
+ get: function () {
100
+ return _where[key];
101
+ }
102
+ });
103
+ });
104
+ var _limit = require("./limit");
105
+ Object.keys(_limit).forEach(function (key) {
106
+ if (key === "default" || key === "__esModule") return;
107
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
108
+ if (key in exports && exports[key] === _limit[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _limit[key];
113
+ }
114
+ });
115
+ });
116
+ var _normalize = require("./normalize");
117
+ Object.keys(_normalize).forEach(function (key) {
118
+ if (key === "default" || key === "__esModule") return;
119
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
120
+ if (key in exports && exports[key] === _normalize[key]) return;
121
+ Object.defineProperty(exports, key, {
122
+ enumerable: true,
123
+ get: function () {
124
+ return _normalize[key];
125
+ }
126
+ });
127
+ });
128
+ var _compression = require("./compression");
129
+ Object.keys(_compression).forEach(function (key) {
130
+ if (key === "default" || key === "__esModule") return;
131
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
132
+ if (key in exports && exports[key] === _compression[key]) return;
133
+ Object.defineProperty(exports, key, {
134
+ enumerable: true,
135
+ get: function () {
136
+ return _compression[key];
137
+ }
138
+ });
139
+ });
140
+ var _cursors = require("./cursors");
141
+ Object.keys(_cursors).forEach(function (key) {
142
+ if (key === "default" || key === "__esModule") return;
143
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
144
+ if (key in exports && exports[key] === _cursors[key]) return;
145
+ Object.defineProperty(exports, key, {
146
+ enumerable: true,
147
+ get: function () {
148
+ return _cursors[key];
149
+ }
150
+ });
151
+ });
152
+ var _GzipCompression = require("./plugins/GzipCompression");
153
+ /**
154
+ * TODO File should contain only exports from other files.
155
+ */
20
156
  /**
21
157
  * We must accept either Elasticsearch client or options that create the client.
22
158
  */
23
159
  var _default = params => {
24
- return new _ContextPlugin.ContextPlugin(context => {
160
+ return new _api.ContextPlugin(context => {
25
161
  if (context.elasticsearch) {
26
162
  throw new _error.default("Elasticsearch client is already initialized, no need to define it again. Check your code for duplicate initializations.", "ELASTICSEARCH_ALREADY_INITIALIZED");
27
163
  }
28
164
  /**
29
165
  * Initialize the Elasticsearch client.
30
166
  */
31
-
32
-
33
167
  context.elasticsearch = params instanceof _elasticsearch.Client ? params : (0, _client.createElasticsearchClient)(params);
34
168
  context.plugins.register((0, _operators.getElasticsearchOperators)());
35
169
  });
36
170
  };
37
-
38
171
  exports.default = _default;
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["params","ContextPlugin","context","elasticsearch","WebinyError","Client","createElasticsearchClient","plugins","register","getElasticsearchOperators"],"sources":["index.ts"],"sourcesContent":["/**\n * TODO File should contain only exports from other files.\n */\nimport WebinyError from \"@webiny/error\";\nimport { ElasticsearchContext } from \"~/types\";\nimport { ContextPlugin } from \"@webiny/api\";\nimport { createElasticsearchClient, ElasticsearchClientOptions } from \"~/client\";\nimport { getElasticsearchOperators } from \"~/operators\";\nimport { Client } from \"@elastic/elasticsearch\";\n\nexport * from \"./indexConfiguration\";\nexport * from \"./plugins\";\nexport * from \"./sort\";\nexport * from \"./indices\";\nexport * from \"./where\";\nexport * from \"./limit\";\nexport * from \"./normalize\";\nexport * from \"./compression\";\nexport * from \"./operators\";\nexport * from \"./cursors\";\nexport * from \"./client\";\nexport { createGzipCompression } from \"./plugins/GzipCompression\";\n\n/**\n * We must accept either Elasticsearch client or options that create the client.\n */\nexport default (\n params: ElasticsearchClientOptions | Client\n): ContextPlugin<ElasticsearchContext> => {\n return new ContextPlugin<ElasticsearchContext>(context => {\n if (context.elasticsearch) {\n throw new WebinyError(\n \"Elasticsearch client is already initialized, no need to define it again. Check your code for duplicate initializations.\",\n \"ELASTICSEARCH_ALREADY_INITIALIZED\"\n );\n }\n /**\n * Initialize the Elasticsearch client.\n */\n context.elasticsearch =\n params instanceof Client ? params : createElasticsearchClient(params);\n\n context.plugins.register(getElasticsearchOperators());\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAGA;AAEA;AACA;AAcA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAbA;AAWA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAVA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEA;AArBA;AACA;AACA;AAqBA;AACA;AACA;AAFA,eAIIA,MAA2C,IACL;EACtC,OAAO,IAAIC,kBAAa,CAAuBC,OAAO,IAAI;IACtD,IAAIA,OAAO,CAACC,aAAa,EAAE;MACvB,MAAM,IAAIC,cAAW,CACjB,yHAAyH,EACzH,mCAAmC,CACtC;IACL;IACA;AACR;AACA;IACQF,OAAO,CAACC,aAAa,GACjBH,MAAM,YAAYK,qBAAM,GAAGL,MAAM,GAAG,IAAAM,iCAAyB,EAACN,MAAM,CAAC;IAEzEE,OAAO,CAACK,OAAO,CAACC,QAAQ,CAAC,IAAAC,oCAAyB,GAAE,CAAC;EACzD,CAAC,CAAC;AACN,CAAC;AAAA"}
@@ -0,0 +1,6 @@
1
+ import { ElasticsearchIndexRequestBody } from "../types";
2
+ interface Modifier {
3
+ (config: ElasticsearchIndexRequestBody): ElasticsearchIndexRequestBody;
4
+ }
5
+ export declare const getBaseConfiguration: (modifier?: Modifier) => ElasticsearchIndexRequestBody;
6
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBaseConfiguration = void 0;
7
+ var _common = require("./common");
8
+ const config = {
9
+ mappings: {
10
+ dynamic_templates: (0, _common.getCommonMappings)(mappings => {
11
+ return mappings.concat([{
12
+ strings: {
13
+ match_mapping_type: "string",
14
+ mapping: {
15
+ type: "text",
16
+ fields: {
17
+ keyword: {
18
+ type: "keyword",
19
+ ignore_above: 256
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }]);
25
+ }),
26
+ properties: {
27
+ rawValues: {
28
+ type: "object",
29
+ enabled: false
30
+ }
31
+ }
32
+ }
33
+ };
34
+ const getBaseConfiguration = modifier => {
35
+ if (!modifier) {
36
+ return config;
37
+ }
38
+ return modifier(config);
39
+ };
40
+ exports.getBaseConfiguration = getBaseConfiguration;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["config","mappings","dynamic_templates","getCommonMappings","concat","strings","match_mapping_type","mapping","type","fields","keyword","ignore_above","properties","rawValues","enabled","getBaseConfiguration","modifier"],"sources":["base.ts"],"sourcesContent":["import { ElasticsearchIndexRequestBody } from \"~/types\";\nimport { getCommonMappings } from \"./common\";\n\nconst config: ElasticsearchIndexRequestBody = {\n mappings: {\n dynamic_templates: getCommonMappings(mappings => {\n return mappings.concat([\n {\n strings: {\n match_mapping_type: \"string\",\n mapping: {\n type: \"text\",\n fields: {\n keyword: {\n type: \"keyword\",\n ignore_above: 256\n }\n }\n }\n }\n }\n ]);\n }),\n properties: {\n rawValues: {\n type: \"object\",\n enabled: false\n }\n }\n }\n};\n\ninterface Modifier {\n (config: ElasticsearchIndexRequestBody): ElasticsearchIndexRequestBody;\n}\nexport const getBaseConfiguration = (modifier?: Modifier) => {\n if (!modifier) {\n return config;\n }\n return modifier(config);\n};\n"],"mappings":";;;;;;AACA;AAEA,MAAMA,MAAqC,GAAG;EAC1CC,QAAQ,EAAE;IACNC,iBAAiB,EAAE,IAAAC,yBAAiB,EAACF,QAAQ,IAAI;MAC7C,OAAOA,QAAQ,CAACG,MAAM,CAAC,CACnB;QACIC,OAAO,EAAE;UACLC,kBAAkB,EAAE,QAAQ;UAC5BC,OAAO,EAAE;YACLC,IAAI,EAAE,MAAM;YACZC,MAAM,EAAE;cACJC,OAAO,EAAE;gBACLF,IAAI,EAAE,SAAS;gBACfG,YAAY,EAAE;cAClB;YACJ;UACJ;QACJ;MACJ,CAAC,CACJ,CAAC;IACN,CAAC,CAAC;IACFC,UAAU,EAAE;MACRC,SAAS,EAAE;QACPL,IAAI,EAAE,QAAQ;QACdM,OAAO,EAAE;MACb;IACJ;EACJ;AACJ,CAAC;AAKM,MAAMC,oBAAoB,GAAIC,QAAmB,IAAK;EACzD,IAAI,CAACA,QAAQ,EAAE;IACX,OAAOhB,MAAM;EACjB;EACA,OAAOgB,QAAQ,CAAChB,MAAM,CAAC;AAC3B,CAAC;AAAC"}
@@ -0,0 +1,9 @@
1
+ import { ElasticsearchIndexRequestBodyMappingsDynamicTemplate } from "../types";
2
+ interface Modifier {
3
+ (mappings: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[]): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];
4
+ }
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare const getCommonMappings: (cb?: Modifier) => ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];
9
+ export {};
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getCommonMappings = void 0;
7
+ const getDefaultMappings = () => {
8
+ return [{
9
+ dates: {
10
+ match: "^createdOn|savedOn|publishedOn$",
11
+ mapping: {
12
+ type: "date"
13
+ }
14
+ }
15
+ }, {
16
+ numbers: {
17
+ match: "number@*",
18
+ mapping: {
19
+ type: "scaled_float",
20
+ scaling_factor: 10000
21
+ }
22
+ }
23
+ }, {
24
+ booleans: {
25
+ match: "boolean@*",
26
+ mapping: {
27
+ type: "boolean"
28
+ }
29
+ }
30
+ }];
31
+ };
32
+ /**
33
+ * @internal
34
+ */
35
+ const getCommonMappings = cb => {
36
+ if (!cb) {
37
+ return getDefaultMappings();
38
+ }
39
+ return cb(getDefaultMappings());
40
+ };
41
+ exports.getCommonMappings = getCommonMappings;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getDefaultMappings","dates","match","mapping","type","numbers","scaling_factor","booleans","getCommonMappings","cb"],"sources":["common.ts"],"sourcesContent":["import { ElasticsearchIndexRequestBodyMappingsDynamicTemplate } from \"~/types\";\n\nconst getDefaultMappings = (): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[] => {\n return [\n {\n dates: {\n match: \"^createdOn|savedOn|publishedOn$\",\n mapping: {\n type: \"date\"\n }\n }\n },\n {\n numbers: {\n match: \"number@*\",\n mapping: {\n type: \"scaled_float\",\n scaling_factor: 10000\n }\n }\n },\n {\n booleans: {\n match: \"boolean@*\",\n mapping: {\n type: \"boolean\"\n }\n }\n }\n ];\n};\n\ninterface Modifier {\n (\n mappings: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[]\n ): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];\n}\n/**\n * @internal\n */\nexport const getCommonMappings = (\n cb?: Modifier\n): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[] => {\n if (!cb) {\n return getDefaultMappings();\n }\n\n return cb(getDefaultMappings());\n};\n"],"mappings":";;;;;;AAEA,MAAMA,kBAAkB,GAAG,MAA8D;EACrF,OAAO,CACH;IACIC,KAAK,EAAE;MACHC,KAAK,EAAE,iCAAiC;MACxCC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,EACD;IACIC,OAAO,EAAE;MACLH,KAAK,EAAE,UAAU;MACjBC,OAAO,EAAE;QACLC,IAAI,EAAE,cAAc;QACpBE,cAAc,EAAE;MACpB;IACJ;EACJ,CAAC,EACD;IACIC,QAAQ,EAAE;MACNL,KAAK,EAAE,WAAW;MAClBC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CACJ;AACL,CAAC;AAOD;AACA;AACA;AACO,MAAMI,iBAAiB,GAC1BC,EAAa,IAC4C;EACzD,IAAI,CAACA,EAAE,EAAE;IACL,OAAOT,kBAAkB,EAAE;EAC/B;EAEA,OAAOS,EAAE,CAACT,kBAAkB,EAAE,CAAC;AACnC,CAAC;AAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./base";
2
+ export * from "./common";
3
+ export * from "./japanese";
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _base = require("./base");
7
+ Object.keys(_base).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _base[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _base[key];
14
+ }
15
+ });
16
+ });
17
+ var _common = require("./common");
18
+ Object.keys(_common).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _common[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _common[key];
25
+ }
26
+ });
27
+ });
28
+ var _japanese = require("./japanese");
29
+ Object.keys(_japanese).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _japanese[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _japanese[key];
36
+ }
37
+ });
38
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./base\";\nexport * from \"./common\";\nexport * from \"./japanese\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,6 @@
1
+ import { ElasticsearchIndexRequestBody } from "../types";
2
+ interface Modifier {
3
+ (config: ElasticsearchIndexRequestBody): ElasticsearchIndexRequestBody;
4
+ }
5
+ export declare const getJapaneseConfiguration: (modifier?: Modifier) => ElasticsearchIndexRequestBody;
6
+ export {};