@elastic/esql 0.0.1

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.

Potentially problematic release.


This version of @elastic/esql might be problematic. Click here for more details.

Files changed (212) hide show
  1. package/LICENCE.txt +93 -0
  2. package/NOTICE.txt +5 -0
  3. package/README.md +167 -0
  4. package/lib/__tests__/fixtures.d.ts +4 -0
  5. package/lib/__tests__/fixtures.d.ts.map +1 -0
  6. package/lib/ast/builder/builder.d.ts +87 -0
  7. package/lib/ast/builder/builder.d.ts.map +1 -0
  8. package/lib/ast/builder/index.d.ts +3 -0
  9. package/lib/ast/builder/index.d.ts.map +1 -0
  10. package/lib/ast/builder/types.d.ts +18 -0
  11. package/lib/ast/builder/types.d.ts.map +1 -0
  12. package/lib/ast/grouping.d.ts +70 -0
  13. package/lib/ast/grouping.d.ts.map +1 -0
  14. package/lib/ast/index.d.ts +9 -0
  15. package/lib/ast/index.d.ts.map +1 -0
  16. package/lib/ast/is.d.ts +49 -0
  17. package/lib/ast/is.d.ts.map +1 -0
  18. package/lib/ast/location.d.ts +7 -0
  19. package/lib/ast/location.d.ts.map +1 -0
  20. package/lib/ast/mutate/commands/from/index.d.ts +4 -0
  21. package/lib/ast/mutate/commands/from/index.d.ts.map +1 -0
  22. package/lib/ast/mutate/commands/from/metadata.d.ts +63 -0
  23. package/lib/ast/mutate/commands/from/metadata.d.ts.map +1 -0
  24. package/lib/ast/mutate/commands/from/sources.d.ts +9 -0
  25. package/lib/ast/mutate/commands/from/sources.d.ts.map +1 -0
  26. package/lib/ast/mutate/commands/index.d.ts +9 -0
  27. package/lib/ast/mutate/commands/index.d.ts.map +1 -0
  28. package/lib/ast/mutate/commands/join/index.d.ts +17 -0
  29. package/lib/ast/mutate/commands/join/index.d.ts.map +1 -0
  30. package/lib/ast/mutate/commands/limit/index.d.ts +56 -0
  31. package/lib/ast/mutate/commands/limit/index.d.ts.map +1 -0
  32. package/lib/ast/mutate/commands/rerank/index.d.ts +41 -0
  33. package/lib/ast/mutate/commands/rerank/index.d.ts.map +1 -0
  34. package/lib/ast/mutate/commands/sort/index.d.ts +117 -0
  35. package/lib/ast/mutate/commands/sort/index.d.ts.map +1 -0
  36. package/lib/ast/mutate/commands/stats/index.d.ts +17 -0
  37. package/lib/ast/mutate/commands/stats/index.d.ts.map +1 -0
  38. package/lib/ast/mutate/commands/where/index.d.ts +48 -0
  39. package/lib/ast/mutate/commands/where/index.d.ts.map +1 -0
  40. package/lib/ast/mutate/generic/commands/args/index.d.ts +14 -0
  41. package/lib/ast/mutate/generic/commands/args/index.d.ts.map +1 -0
  42. package/lib/ast/mutate/generic/commands/index.d.ts +54 -0
  43. package/lib/ast/mutate/generic/commands/index.d.ts.map +1 -0
  44. package/lib/ast/mutate/generic/commands/options/index.d.ts +38 -0
  45. package/lib/ast/mutate/generic/commands/options/index.d.ts.map +1 -0
  46. package/lib/ast/mutate/generic/index.d.ts +2 -0
  47. package/lib/ast/mutate/generic/index.d.ts.map +1 -0
  48. package/lib/ast/mutate/index.d.ts +5 -0
  49. package/lib/ast/mutate/index.d.ts.map +1 -0
  50. package/lib/ast/mutate/types.d.ts +2 -0
  51. package/lib/ast/mutate/types.d.ts.map +1 -0
  52. package/lib/ast/mutate/util.d.ts +20 -0
  53. package/lib/ast/mutate/util.d.ts.map +1 -0
  54. package/lib/ast/visitor/contexts.d.ts +176 -0
  55. package/lib/ast/visitor/contexts.d.ts.map +1 -0
  56. package/lib/ast/visitor/global_visitor_context.d.ts +77 -0
  57. package/lib/ast/visitor/global_visitor_context.d.ts.map +1 -0
  58. package/lib/ast/visitor/index.d.ts +5 -0
  59. package/lib/ast/visitor/index.d.ts.map +1 -0
  60. package/lib/ast/visitor/types.d.ts +104 -0
  61. package/lib/ast/visitor/types.d.ts.map +1 -0
  62. package/lib/ast/visitor/utils.d.ts +26 -0
  63. package/lib/ast/visitor/utils.d.ts.map +1 -0
  64. package/lib/ast/visitor/visitor.d.ts +79 -0
  65. package/lib/ast/visitor/visitor.d.ts.map +1 -0
  66. package/lib/ast/walker/helpers.d.ts +23 -0
  67. package/lib/ast/walker/helpers.d.ts.map +1 -0
  68. package/lib/ast/walker/index.d.ts +2 -0
  69. package/lib/ast/walker/index.d.ts.map +1 -0
  70. package/lib/ast/walker/walker.d.ts +266 -0
  71. package/lib/ast/walker/walker.d.ts.map +1 -0
  72. package/lib/composer/composer_query.d.ts +684 -0
  73. package/lib/composer/composer_query.d.ts.map +1 -0
  74. package/lib/composer/esql.d.ts +25 -0
  75. package/lib/composer/esql.d.ts.map +1 -0
  76. package/lib/composer/index.d.ts +8 -0
  77. package/lib/composer/index.d.ts.map +1 -0
  78. package/lib/composer/parameter_hole.d.ts +11 -0
  79. package/lib/composer/parameter_hole.d.ts.map +1 -0
  80. package/lib/composer/query/index.d.ts +2 -0
  81. package/lib/composer/query/index.d.ts.map +1 -0
  82. package/lib/composer/query/query.d.ts +54 -0
  83. package/lib/composer/query/query.d.ts.map +1 -0
  84. package/lib/composer/synth/command.d.ts +7 -0
  85. package/lib/composer/synth/command.d.ts.map +1 -0
  86. package/lib/composer/synth/expression.d.ts +6 -0
  87. package/lib/composer/synth/expression.d.ts.map +1 -0
  88. package/lib/composer/synth/header.d.ts +7 -0
  89. package/lib/composer/synth/header.d.ts.map +1 -0
  90. package/lib/composer/synth/holes.d.ts +27 -0
  91. package/lib/composer/synth/holes.d.ts.map +1 -0
  92. package/lib/composer/synth/index.d.ts +7 -0
  93. package/lib/composer/synth/index.d.ts.map +1 -0
  94. package/lib/composer/synth/nodes.d.ts +104 -0
  95. package/lib/composer/synth/nodes.d.ts.map +1 -0
  96. package/lib/composer/synth/query.d.ts +7 -0
  97. package/lib/composer/synth/query.d.ts.map +1 -0
  98. package/lib/composer/synth/synth_literal_fragment.d.ts +19 -0
  99. package/lib/composer/synth/synth_literal_fragment.d.ts.map +1 -0
  100. package/lib/composer/synth/synth_node.d.ts +19 -0
  101. package/lib/composer/synth/synth_node.d.ts.map +1 -0
  102. package/lib/composer/synth/tag.d.ts +4 -0
  103. package/lib/composer/synth/tag.d.ts.map +1 -0
  104. package/lib/composer/synth/types.d.ts +65 -0
  105. package/lib/composer/synth/types.d.ts.map +1 -0
  106. package/lib/composer/types.d.ts +218 -0
  107. package/lib/composer/types.d.ts.map +1 -0
  108. package/lib/composer/util.d.ts +24 -0
  109. package/lib/composer/util.d.ts.map +1 -0
  110. package/lib/debug/index.d.ts +2 -0
  111. package/lib/debug/index.d.ts.map +1 -0
  112. package/lib/debug/print_ast.d.ts +60 -0
  113. package/lib/debug/print_ast.d.ts.map +1 -0
  114. package/lib/embedded_languages/index.d.ts +2 -0
  115. package/lib/embedded_languages/index.d.ts.map +1 -0
  116. package/lib/embedded_languages/promql/ast/builder/builder.d.ts +52 -0
  117. package/lib/embedded_languages/promql/ast/builder/builder.d.ts.map +1 -0
  118. package/lib/embedded_languages/promql/ast/builder/index.d.ts +3 -0
  119. package/lib/embedded_languages/promql/ast/builder/index.d.ts.map +1 -0
  120. package/lib/embedded_languages/promql/ast/builder/types.d.ts +12 -0
  121. package/lib/embedded_languages/promql/ast/builder/types.d.ts.map +1 -0
  122. package/lib/embedded_languages/promql/ast/is.d.ts +3 -0
  123. package/lib/embedded_languages/promql/ast/is.d.ts.map +1 -0
  124. package/lib/embedded_languages/promql/ast/traversal.d.ts +3 -0
  125. package/lib/embedded_languages/promql/ast/traversal.d.ts.map +1 -0
  126. package/lib/embedded_languages/promql/ast/walker/index.d.ts +3 -0
  127. package/lib/embedded_languages/promql/ast/walker/index.d.ts.map +1 -0
  128. package/lib/embedded_languages/promql/ast/walker/types.d.ts +93 -0
  129. package/lib/embedded_languages/promql/ast/walker/types.d.ts.map +1 -0
  130. package/lib/embedded_languages/promql/ast/walker/walker.d.ts +43 -0
  131. package/lib/embedded_languages/promql/ast/walker/walker.d.ts.map +1 -0
  132. package/lib/embedded_languages/promql/index.d.ts +8 -0
  133. package/lib/embedded_languages/promql/index.d.ts.map +1 -0
  134. package/lib/embedded_languages/promql/parser/cst_to_ast_converter.d.ts +48 -0
  135. package/lib/embedded_languages/promql/parser/cst_to_ast_converter.d.ts.map +1 -0
  136. package/lib/embedded_languages/promql/parser/index.d.ts +4 -0
  137. package/lib/embedded_languages/promql/parser/index.d.ts.map +1 -0
  138. package/lib/embedded_languages/promql/parser/parser.d.ts +65 -0
  139. package/lib/embedded_languages/promql/parser/parser.d.ts.map +1 -0
  140. package/lib/embedded_languages/promql/parser/promql_error_listener.d.ts +11 -0
  141. package/lib/embedded_languages/promql/parser/promql_error_listener.d.ts.map +1 -0
  142. package/lib/embedded_languages/promql/pretty_print/basic_pretty_printer.d.ts +65 -0
  143. package/lib/embedded_languages/promql/pretty_print/basic_pretty_printer.d.ts.map +1 -0
  144. package/lib/embedded_languages/promql/pretty_print/helpers.d.ts +34 -0
  145. package/lib/embedded_languages/promql/pretty_print/helpers.d.ts.map +1 -0
  146. package/lib/embedded_languages/promql/pretty_print/index.d.ts +2 -0
  147. package/lib/embedded_languages/promql/pretty_print/index.d.ts.map +1 -0
  148. package/lib/embedded_languages/promql/types.d.ts +355 -0
  149. package/lib/embedded_languages/promql/types.d.ts.map +1 -0
  150. package/lib/index.d.ts +7 -0
  151. package/lib/index.d.ts.map +1 -0
  152. package/lib/index.js +63055 -0
  153. package/lib/index.js.map +1 -0
  154. package/lib/index.mjs +62941 -0
  155. package/lib/index.mjs.map +1 -0
  156. package/lib/parser/antlr/esql_lexer.d.ts +223 -0
  157. package/lib/parser/antlr/esql_lexer.d.ts.map +1 -0
  158. package/lib/parser/antlr/esql_parser.d.ts +1847 -0
  159. package/lib/parser/antlr/esql_parser.d.ts.map +1 -0
  160. package/lib/parser/antlr/esql_parser_listener.d.ts +1634 -0
  161. package/lib/parser/antlr/esql_parser_listener.d.ts.map +1 -0
  162. package/lib/parser/antlr/lexer_config.d.ts +13 -0
  163. package/lib/parser/antlr/lexer_config.d.ts.map +1 -0
  164. package/lib/parser/antlr/parser_config.d.ts +7 -0
  165. package/lib/parser/antlr/parser_config.d.ts.map +1 -0
  166. package/lib/parser/antlr/promql_lexer.d.ts +71 -0
  167. package/lib/parser/antlr/promql_lexer.d.ts.map +1 -0
  168. package/lib/parser/antlr/promql_parser.d.ts +441 -0
  169. package/lib/parser/antlr/promql_parser.d.ts.map +1 -0
  170. package/lib/parser/antlr/promql_parser_listener.d.ts +354 -0
  171. package/lib/parser/antlr/promql_parser_listener.d.ts.map +1 -0
  172. package/lib/parser/core/constants.d.ts +8 -0
  173. package/lib/parser/core/constants.d.ts.map +1 -0
  174. package/lib/parser/core/cst_to_ast_converter.d.ts +262 -0
  175. package/lib/parser/core/cst_to_ast_converter.d.ts.map +1 -0
  176. package/lib/parser/core/decorations.d.ts +29 -0
  177. package/lib/parser/core/decorations.d.ts.map +1 -0
  178. package/lib/parser/core/esql_error_listener.d.ts +8 -0
  179. package/lib/parser/core/esql_error_listener.d.ts.map +1 -0
  180. package/lib/parser/core/helpers.d.ts +9 -0
  181. package/lib/parser/core/helpers.d.ts.map +1 -0
  182. package/lib/parser/core/parser.d.ts +136 -0
  183. package/lib/parser/core/parser.d.ts.map +1 -0
  184. package/lib/parser/core/tokens.d.ts +45 -0
  185. package/lib/parser/core/tokens.d.ts.map +1 -0
  186. package/lib/parser/core/types.d.ts +69 -0
  187. package/lib/parser/core/types.d.ts.map +1 -0
  188. package/lib/parser/index.d.ts +4 -0
  189. package/lib/parser/index.d.ts.map +1 -0
  190. package/lib/pretty_print/__tests__/fixtures.d.ts +5 -0
  191. package/lib/pretty_print/__tests__/fixtures.d.ts.map +1 -0
  192. package/lib/pretty_print/basic_pretty_printer.d.ts +87 -0
  193. package/lib/pretty_print/basic_pretty_printer.d.ts.map +1 -0
  194. package/lib/pretty_print/constants.d.ts +47 -0
  195. package/lib/pretty_print/constants.d.ts.map +1 -0
  196. package/lib/pretty_print/helpers.d.ts +22 -0
  197. package/lib/pretty_print/helpers.d.ts.map +1 -0
  198. package/lib/pretty_print/index.d.ts +4 -0
  199. package/lib/pretty_print/index.d.ts.map +1 -0
  200. package/lib/pretty_print/leaf_printer.d.ts +19 -0
  201. package/lib/pretty_print/leaf_printer.d.ts.map +1 -0
  202. package/lib/pretty_print/utils.d.ts +7 -0
  203. package/lib/pretty_print/utils.d.ts.map +1 -0
  204. package/lib/pretty_print/wrapping_pretty_printer.d.ts +113 -0
  205. package/lib/pretty_print/wrapping_pretty_printer.d.ts.map +1 -0
  206. package/lib/types.d.ts +523 -0
  207. package/lib/types.d.ts.map +1 -0
  208. package/lib/types.js +19 -0
  209. package/lib/types.js.map +1 -0
  210. package/lib/types.mjs +1 -0
  211. package/lib/types.mjs.map +1 -0
  212. package/package.json +98 -0
@@ -0,0 +1,113 @@
1
+ import { BinaryExpressionGroup } from '../ast/grouping';
2
+ import type { ESQLAstBaseItem, ESQLAstQueryExpression } from '../types';
3
+ import { Visitor } from '../ast/visitor';
4
+ import type { BasicPrettyPrinterOptions } from './basic_pretty_printer';
5
+ interface Input {
6
+ indent: string;
7
+ remaining: number;
8
+ /**
9
+ * Passed between adjacent binary expressions to flatten them into a single
10
+ * vertical list.
11
+ *
12
+ * For example, a list like this:
13
+ *
14
+ * ```
15
+ * 1 + 2 + 3 + 4
16
+ * ```
17
+ *
18
+ * Is flatted into a single list:
19
+ *
20
+ * ```
21
+ * 1 +
22
+ * 2 +
23
+ * 3 +
24
+ * 4
25
+ * ```
26
+ */
27
+ flattenBinExpOfType?: BinaryExpressionGroup;
28
+ /**
29
+ * Suffix text to append to the formatted output, before single-line
30
+ * line-breaking comments. Essentially, this is trailing punctuation, which
31
+ * has to be printed at the very end of the line, but before any
32
+ * line-terminating single line comment, e.g consider the comma below:
33
+ *
34
+ * [
35
+ * 1 + 1 /** comment 1 *\ /** comment 2 *\ , // comment 3
36
+ * 3
37
+ * ]
38
+ */
39
+ suffix?: string;
40
+ }
41
+ export interface WrappingPrettyPrinterOptions extends BasicPrettyPrinterOptions {
42
+ /**
43
+ * Initial indentation string inserted before the whole query. Defaults to an
44
+ * empty string.
45
+ */
46
+ indent?: string;
47
+ /**
48
+ * Tabbing string inserted before new level of nesting. Defaults to two spaces.
49
+ */
50
+ tab?: string;
51
+ /**
52
+ * Tabbing string inserted before a pipe, when `multiline` is `true`.
53
+ */
54
+ pipeTab?: string;
55
+ /**
56
+ * Tabbing string inserted before command arguments, when they are broken into
57
+ * multiple lines. Defaults to four spaces.
58
+ */
59
+ commandTab?: string;
60
+ /**
61
+ * Whether to force multiline formatting. Defaults to `false`. If set to
62
+ * `false`, it will try to fit the query into a single line.
63
+ */
64
+ multiline?: boolean;
65
+ /**
66
+ * Expected width of the output. Defaults to 80 characters. Text will be
67
+ * wrapped to fit this width.
68
+ */
69
+ wrap?: number;
70
+ }
71
+ export declare class WrappingPrettyPrinter {
72
+ static readonly print: (query: ESQLAstQueryExpression, opts?: WrappingPrettyPrinterOptions) => string;
73
+ protected readonly opts: Omit<Required<WrappingPrettyPrinterOptions>, 'mapRepresentation'> & Pick<WrappingPrettyPrinterOptions, 'mapRepresentation'>;
74
+ constructor(opts?: WrappingPrettyPrinterOptions);
75
+ protected keyword(word: string): string;
76
+ private printBinaryOperatorExpression;
77
+ /**
78
+ * Prints node children as a list, separated by commas. If the list is too
79
+ * long, it will be broken into multiple lines, otherwise it will be all
80
+ * printed on a single line.
81
+ *
82
+ * The breaking into two lines happens in two stages, first the list is simply
83
+ * wrapped into multiple lines, where the wrapping happens just before the
84
+ * list element that is too long to fit into the remaining space.
85
+ *
86
+ * Alternatively, if the first ("wrapping") approach results in some line
87
+ * still exceeding the maximum line length, or if some line in the middle of
88
+ * the list (not the last line) contains only a single element, then the list
89
+ * is "broken" into multiple lines, where each line contains a single
90
+ * element.
91
+ *
92
+ * To summarize:
93
+ *
94
+ * 1. First try to print the list in a single line, if it fits.
95
+ * 2. If it doesn't fit, try to WRAP the list into multiple lines.
96
+ * 3. If the WRAP doesn't succeed, then BREAK the list into element-per-line
97
+ * format.
98
+ *
99
+ * @param ctx The node which contains the children to be printed.
100
+ * @param inp Expression visitor input arguments.
101
+ * @returns Expression visitor output.
102
+ */
103
+ private printChildrenList;
104
+ protected printTopDecorations(indent: string, node: ESQLAstBaseItem): string;
105
+ protected decorateWithComments({ indent, suffix }: Input, node: ESQLAstBaseItem, txt: string, indented?: boolean): {
106
+ txt: string;
107
+ indented: boolean;
108
+ };
109
+ protected readonly visitor: Visitor;
110
+ print(query: ESQLAstQueryExpression): any;
111
+ }
112
+ export {};
113
+ //# sourceMappingURL=wrapping_pretty_printer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapping_pretty_printer.d.ts","sourceRoot":"","sources":["../../src/pretty_print/wrapping_pretty_printer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAW,MAAM,UAAU,CAAC;AAQjF,OAAO,EAAyB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAUxE,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CAAC,EAAE,qBAAqB,CAAC;IAE5C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAcD,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC7E;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,qBAAqB;IAChC,gBAAuB,KAAK,GAC1B,OAAO,sBAAsB,EAC7B,OAAO,4BAA4B,KAClC,MAAM,CAGP;IAEF,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,mBAAmB,CAAC,GACxF,IAAI,CAAC,4BAA4B,EAAE,mBAAmB,CAAC,CAAC;gBAE9C,IAAI,GAAE,4BAAiC;IAkBnD,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM;IAM9B,OAAO,CAAC,6BAA6B;IAgHrC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,iBAAiB;IA+JzB,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,MAAM;IAkB5E,SAAS,CAAC,oBAAoB,CAC5B,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EACzB,IAAI,EAAE,eAAe,EACrB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,OAAe,GACxB;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE;IAgErC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAggBR;IAEpB,KAAK,CAAC,KAAK,EAAE,sBAAsB;CAG3C"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,523 @@
1
+ import type { PromQLAstQueryExpression } from './embedded_languages/promql/types';
2
+ /**
3
+ * @deprecated A full query AST is represented by {@link ESQLAstQueryExpression} type.
4
+ */
5
+ export type ESQLAst = ESQLAstCommand[];
6
+ export type ESQLAstCommand = ESQLCommand | ESQLAstJoinCommand | ESQLAstChangePointCommand | ESQLAstRerankCommand | ESQLAstCompletionCommand | ESQLAstFuseCommand | ESQLAstForkCommand;
7
+ export type ESQLAstAllCommands = ESQLAstCommand | ESQLAstHeaderCommand;
8
+ export type ESQLAstNode = ESQLAstCommand | ESQLAstHeaderCommand | ESQLAstExpression | ESQLAstItem;
9
+ /**
10
+ * Represents an *expression* in the AST.
11
+ */
12
+ export type ESQLAstExpression = ESQLSingleAstItem;
13
+ export type ESQLSingleAstItem = ESQLAstQueryExpression | ESQLFunction | ESQLCommandOption | ESQLSource | ESQLParens | ESQLColumn | ESQLDatePeriodLiteral | ESQLTimeDurationLiteral | ESQLList | ESQLLiteral | ESQLIdentifier | ESQLInlineCast | ESQLOrderExpression | ESQLUnknownItem | ESQLMap | ESQLMapEntry | PromQLAstQueryExpression;
14
+ /**
15
+ * A field is either an index field `this.is.field`, or it is a field assignment
16
+ * `new_field = 123`, in which case it is a binary expression with "=" operator.
17
+ *
18
+ * Also, a field can be specified as a parameter.
19
+ *
20
+ * ```
21
+ * EVAL this.is.a.nested.field
22
+ * EVAL new_field = 123
23
+ * EVAL ?param
24
+ * EVAL ?param = 123
25
+ * ```
26
+ */
27
+ export type ESQLAstField = ESQLColumn | ESQLBinaryExpression | ESQLAstExpression | ESQLParam;
28
+ /**
29
+ * An array of AST nodes represents different things in different contexts.
30
+ * For example, in command top level arguments it is treated as an "assignment expression".
31
+ */
32
+ export type ESQLAstItem = ESQLSingleAstItem | ESQLAstItem[];
33
+ export type ESQLAstNodeWithArgs = ESQLCommand | ESQLCommandOption | ESQLFunction;
34
+ export type ESQLAstNodeWithChildren = ESQLAstNodeWithArgs | ESQLList;
35
+ /**
36
+ * *Proper* are nodes which are objects with `type` property, once we get rid
37
+ * of the nodes which are plain arrays, all nodes will be *proper* and we can
38
+ * remove this type.
39
+ */
40
+ export type ESQLProperNode = ESQLAstExpression | ESQLAstCommand | ESQLAstHeaderCommand;
41
+ export interface ESQLLocation {
42
+ min: number;
43
+ max: number;
44
+ }
45
+ export interface ESQLAstBaseItem<Name = string> {
46
+ name: Name;
47
+ text: string;
48
+ location: ESQLLocation;
49
+ incomplete: boolean;
50
+ formatting?: ESQLAstNodeFormatting;
51
+ }
52
+ /**
53
+ * Contains optional formatting information used by the pretty printer.
54
+ */
55
+ export interface ESQLAstNodeFormatting {
56
+ top?: ESQLAstComment[];
57
+ left?: ESQLAstCommentMultiLine[];
58
+ right?: ESQLAstCommentMultiLine[];
59
+ rightSingleLine?: ESQLAstCommentSingleLine;
60
+ bottom?: ESQLAstComment[];
61
+ }
62
+ export interface ESQLCommand<Name = string> extends ESQLAstBaseItem<Name> {
63
+ type: 'command';
64
+ /**
65
+ * The subtype of the command. For example, the `JOIN` command can be: (1)
66
+ * LOOKUP JOIN, (2) LEFT JOIN, (3) RIGHT JOIN.
67
+ */
68
+ commandType?: string;
69
+ args: ESQLAstItem[];
70
+ }
71
+ export interface ESQLAstJoinCommand extends ESQLCommand<'join'> {
72
+ commandType: 'lookup' | 'left' | 'right';
73
+ }
74
+ export interface ESQLAstChangePointCommand extends ESQLCommand<'change_point'> {
75
+ value: ESQLColumn;
76
+ key?: ESQLColumn;
77
+ target?: {
78
+ type: ESQLColumn;
79
+ pvalue: ESQLColumn;
80
+ };
81
+ }
82
+ export interface ESQLAstCompletionCommand extends ESQLCommand<'completion'> {
83
+ prompt: ESQLAstExpression;
84
+ inferenceId: ESQLLiteral;
85
+ targetField?: ESQLColumn;
86
+ }
87
+ export interface ESQLAstFuseCommand extends ESQLCommand<'fuse'> {
88
+ fuseType?: ESQLIdentifier;
89
+ }
90
+ export interface ESQLAstRerankCommand extends ESQLCommand<'rerank'> {
91
+ query: ESQLLiteral;
92
+ fields: ESQLAstField[];
93
+ targetField?: ESQLColumn;
94
+ inferenceId: ESQLLiteral | undefined;
95
+ }
96
+ export interface ESQLAstForkCommand extends ESQLCommand<'fork'> {
97
+ args: ESQLForkParens[];
98
+ }
99
+ export interface ESQLAstMmrCommand extends ESQLCommand<'mmr'> {
100
+ queryVector?: ESQLSingleAstItem;
101
+ diversifyField: ESQLSingleAstItem;
102
+ limit: ESQLSingleAstItem;
103
+ namedParameters?: ESQLSingleAstItem;
104
+ }
105
+ /**
106
+ * Represents a PROMQL command.
107
+ *
108
+ * ```
109
+ * PROMQL query
110
+ * PROMQL ( name = )? ( query )
111
+ * PROMQL key1=value1 key2=value2... query
112
+ * PROMQL key1=value1 key2=value2... ( name = )? ( query )
113
+ * ```
114
+ *
115
+ * - Optional params use assignment syntax: "key = value"
116
+ * - Optional `name` assignment before parentheses: name = ( query )
117
+ * - Query can be specified without parentheses
118
+ */
119
+ export interface ESQLAstPromqlCommand extends ESQLCommand<'promql'> {
120
+ params?: ESQLMap;
121
+ query?: ESQLAstPromqlCommandQuery;
122
+ args: ESQLAstPromqlCommandArgs;
123
+ }
124
+ export type ESQLAstPromqlCommandArgs =
125
+ /** With params map and query */
126
+ [params: ESQLMap, query: ESQLAstPromqlCommandQuery]
127
+ /** Query only, without params */
128
+ | [query: ESQLAstPromqlCommandQuery]
129
+ /** Below versions are in case the command is `.incomplete: true`. */
130
+ | [params: ESQLMap] | [];
131
+ export type ESQLAstPromqlCommandQuery =
132
+ /** query */
133
+ ESQLAstPromqlQuery
134
+ /** ( query ) */
135
+ | ESQLParens
136
+ /** name = ( query ) */
137
+ | ESQLBinaryExpression<'='>;
138
+ /**
139
+ * This will be replaced in the future with a proper PROMQL query AST.
140
+ * For now, we just represent the query as an "unknown" node.
141
+ */
142
+ export type ESQLAstPromqlQuery = PromQLAstQueryExpression;
143
+ /**
144
+ * Represents a header pseudo-command, such as SET.
145
+ *
146
+ * Example:
147
+ *
148
+ * ```
149
+ * SET setting1 = "value1", setting2 = "value2";
150
+ * ```
151
+ */
152
+ export interface ESQLAstHeaderCommand<Name extends string = string, Arg = ESQLAstExpression> extends ESQLAstBaseItem {
153
+ type: 'header-command';
154
+ /** Name of the command */
155
+ name: Name;
156
+ /**
157
+ * Represents the arguments for the command. It has to be a list, because
158
+ * even the SET command was initially designed to accept multiple
159
+ * assignments.
160
+ *
161
+ * Example:
162
+ *
163
+ * ```
164
+ * SET setting1 = "value1", setting2 = "value2"
165
+ * ```
166
+ */
167
+ args: Arg[];
168
+ }
169
+ export type ESQLAstSetHeaderCommand = ESQLAstHeaderCommand<'set', ESQLBinaryExpression<BinaryExpressionAssignmentOperator>>;
170
+ export type ESQLIdentifierOrParam = ESQLIdentifier | ESQLParamLiteral;
171
+ export interface ESQLCommandOption extends ESQLAstBaseItem {
172
+ type: 'option';
173
+ args: ESQLAstItem[];
174
+ }
175
+ export interface ESQLAstQueryExpression extends ESQLAstBaseItem<''> {
176
+ type: 'query';
177
+ header?: ESQLAstHeaderCommand[];
178
+ commands: ESQLAstCommand[];
179
+ }
180
+ /**
181
+ * We coalesce all function calls and expressions into a single "function"
182
+ * node type. This subtype is used to distinguish between different types
183
+ * of function calls and expressions.
184
+ *
185
+ * - `variadic-call` is a function call with any number of arguments: fn(a, b, c, ...)
186
+ * - `unary-expression` is a unary expression: -a, +a, NOT a, ...
187
+ * - `binary-expression` is a binary expression: a + b, a - b, a * b, ...
188
+ */
189
+ export type FunctionSubtype = 'variadic-call' | 'unary-expression' | 'postfix-unary-expression' | 'binary-expression';
190
+ export interface ESQLFunction<Subtype extends FunctionSubtype = FunctionSubtype, Name extends string = string> extends ESQLAstBaseItem<Name> {
191
+ type: 'function';
192
+ /**
193
+ * Default is 'variadic-call'.
194
+ */
195
+ subtype?: Subtype;
196
+ /**
197
+ * A node representing the function or operator being called.
198
+ */
199
+ operator?: ESQLIdentifier | ESQLParamLiteral;
200
+ args: ESQLAstItem[];
201
+ }
202
+ export interface ESQLFunctionCallExpression extends ESQLFunction<'variadic-call'> {
203
+ subtype: 'variadic-call';
204
+ args: ESQLAstItem[];
205
+ }
206
+ export interface ESQLUnaryExpression<Name extends string = string> extends ESQLFunction<'unary-expression', Name> {
207
+ subtype: 'unary-expression';
208
+ args: [ESQLAstItem];
209
+ }
210
+ export interface ESQLPostfixUnaryExpression<Name extends string = string> extends ESQLFunction<'postfix-unary-expression', Name> {
211
+ subtype: 'postfix-unary-expression';
212
+ args: [ESQLAstItem];
213
+ }
214
+ /**
215
+ * Represents an order expression used in SORT commands.
216
+ *
217
+ * ```
218
+ * ... | SORT field ASC NULLS FIRST
219
+ * ```
220
+ */
221
+ export interface ESQLOrderExpression extends ESQLAstBaseItem {
222
+ type: 'order';
223
+ order: '' | 'ASC' | 'DESC';
224
+ nulls: '' | 'NULLS FIRST' | 'NULLS LAST';
225
+ args: [field: ESQLAstItem];
226
+ }
227
+ export interface ESQLBinaryExpression<Name extends BinaryExpressionOperator = BinaryExpressionOperator> extends ESQLFunction<'binary-expression', Name> {
228
+ subtype: 'binary-expression';
229
+ args: [ESQLAstItem, ESQLAstItem];
230
+ }
231
+ export type BinaryExpressionOperator = BinaryExpressionArithmeticOperator | BinaryExpressionAssignmentOperator | BinaryExpressionComparisonOperator | BinaryExpressionRegexOperator | BinaryExpressionRenameOperator | BinaryExpressionWhereOperator | BinaryExpressionMatchOperator | BinaryExpressionIn | BinaryExpressionLogical;
232
+ export type BinaryExpressionArithmeticOperator = '+' | '-' | '*' | '/' | '%';
233
+ export type BinaryExpressionAssignmentOperator = '=';
234
+ export type BinaryExpressionComparisonOperator = '==' | '=~' | '!=' | '<' | '<=' | '>' | '>=';
235
+ export type BinaryExpressionRegexOperator = 'like' | 'not like' | 'rlike' | 'not rlike';
236
+ export type BinaryExpressionRenameOperator = 'as';
237
+ export type BinaryExpressionWhereOperator = 'where';
238
+ export type BinaryExpressionMatchOperator = ':';
239
+ export type BinaryExpressionIn = 'in' | 'not in';
240
+ export type BinaryExpressionLogical = 'and' | 'or';
241
+ export interface ESQLInlineCast<ValueType = ESQLAstItem> extends ESQLAstBaseItem {
242
+ type: 'inlineCast';
243
+ value: ValueType;
244
+ castType: string;
245
+ }
246
+ /**
247
+ * This node represents something the AST generator
248
+ * didn't recognize in the ANTLR parse tree.
249
+ *
250
+ * It can show up if the AST generator code is out of sync
251
+ * with the ANTLR grammar or if there is some idiosyncrasy
252
+ * or bug in the parse tree.
253
+ *
254
+ * These nodes can be ignored for the purpose of validation
255
+ * and autocomplete, but they may be helpful in detecting bugs.
256
+ */
257
+ export interface ESQLUnknownItem extends ESQLAstBaseItem {
258
+ type: 'unknown';
259
+ }
260
+ export interface ESQLSource extends ESQLAstBaseItem {
261
+ type: 'source';
262
+ sourceType: 'index' | 'policy';
263
+ /**
264
+ * Represents the prefix part of the source identifier. Empty string if not
265
+ * present. Used in index pattern as the cluster identifier or as "mode" in
266
+ * enrich policy.
267
+ *
268
+ * ```
269
+ * FROM [<prefix>:]<index>
270
+ * ```
271
+ */
272
+ prefix?: ESQLStringLiteral | undefined;
273
+ /**
274
+ * Represents the index part of the source identifier. Unescaped and unquoted.
275
+ *
276
+ * ```
277
+ * FROM [<cluster>:]<index>
278
+ * ```
279
+ */
280
+ index?: ESQLStringLiteral | undefined;
281
+ /**
282
+ * Represents the selector (component) part of the source identifier.
283
+ *
284
+ * ```
285
+ * FROM <index>[::<selector>]
286
+ * ```
287
+ */
288
+ selector?: ESQLStringLiteral | undefined;
289
+ }
290
+ /**
291
+ * Represents any expression wrapped in parentheses.
292
+ *
293
+ * ```
294
+ * FROM ( <query> )
295
+ * ```
296
+ */
297
+ export interface ESQLParens extends ESQLAstBaseItem {
298
+ type: 'parens';
299
+ child: ESQLAstExpression;
300
+ }
301
+ export interface ESQLForkParens extends ESQLParens {
302
+ child: ESQLAstQueryExpression;
303
+ }
304
+ export interface ESQLColumn extends ESQLAstBaseItem {
305
+ type: 'column';
306
+ /**
307
+ * Optional qualifier for the column, e.g. index name or alias.
308
+ *
309
+ * @example
310
+ *
311
+ * ```esql
312
+ * [index].[column]
313
+ * [index].[nested.column.part]
314
+ * ```
315
+ *
316
+ * `index` is the qualifier.
317
+ */
318
+ qualifier?: ESQLIdentifier;
319
+ /**
320
+ * A ES|QL column name can be composed of multiple parts,
321
+ * e.g: part1.part2.`part``3️⃣`.?param. Where parts can be quoted, or not
322
+ * quoted, or even be a parameter.
323
+ *
324
+ * The args list contains the parts of the column name.
325
+ */
326
+ args: Array<ESQLIdentifier | ESQLParam>;
327
+ /**
328
+ * An identifier can be composed of multiple parts, e.g: part1.part2.`part``3️⃣`.
329
+ * This property contains the parsed unquoted parts of the identifier.
330
+ * For example: `['part1', 'part2', 'part`3️⃣']`.
331
+ */
332
+ parts: string[];
333
+ /**
334
+ * @deprecated
335
+ *
336
+ * An identifier can be composed of multiple parts, e.g: part1.part2.`part3️⃣`
337
+ *
338
+ * Each part can be quoted or not quoted independently. A single `quoted`
339
+ * property is not enough to represent the identifier. Use `parts` instead.
340
+ */
341
+ quoted: boolean;
342
+ }
343
+ /**
344
+ * Represents list-like structures where elements are separated by commas.
345
+ *
346
+ * *Literal lists* use square brackets and can contain only
347
+ * string, number, or boolean literals and all elements must be of the same
348
+ * type:
349
+ *
350
+ * ```
351
+ * [1, 2, 3]
352
+ * ```
353
+ *
354
+ * *Tuple lists* use round brackets and can contain any type of expression.
355
+ * Tuple list are used in the `IN` expression:
356
+ *
357
+ * ```
358
+ * a IN ("abc", "def")
359
+ * ```
360
+ */
361
+ export interface ESQLList extends ESQLAstBaseItem {
362
+ type: 'list';
363
+ /**
364
+ * Represents various types of lists in ES|QL language.
365
+ *
366
+ * - `literal` - a literal list using square brackets, e.g. `[1, 2, 3]`
367
+ * - `tuple` - a tuple list using round brackets, e.g. `(a, b, c)`
368
+ * - `bare` - a bare list without any enclosing brackets, e.g. `a, b, c`
369
+ *
370
+ * @default 'literal'
371
+ */
372
+ subtype?: 'literal' | 'tuple' | 'bare';
373
+ values: ESQLAstExpression[];
374
+ }
375
+ /**
376
+ * Represents a ES|QL "map" object, a list of key-value pairs. Can have different
377
+ * *representation* styles, such as "map" or "listpairs". The representation
378
+ * style affects how the map is pretty-printed.
379
+ */
380
+ export interface ESQLMap extends ESQLAstBaseItem {
381
+ type: 'map';
382
+ entries: ESQLMapEntry[];
383
+ /**
384
+ * Specifies how the key-value pairs are represented.
385
+ *
386
+ * @default 'map'
387
+ *
388
+ * `map` example:
389
+ *
390
+ * ```
391
+ * { "key1": "value1", "key2": "value2" }
392
+ * ```
393
+ *
394
+ * `listpairs` example:
395
+ *
396
+ * ```
397
+ * key1 value1 key2 value2
398
+ * ```
399
+ *
400
+ * `assignment` example:
401
+ *
402
+ * ```
403
+ * key1=value1 key2=value2
404
+ * ```
405
+ */
406
+ representation?: 'map' | 'listpairs' | 'assignment';
407
+ }
408
+ /**
409
+ * Represents a key-value pair in a ES|QL map object.
410
+ */
411
+ export interface ESQLMapEntry extends ESQLAstBaseItem {
412
+ type: 'map-entry';
413
+ key: ESQLAstExpression;
414
+ value: ESQLAstExpression;
415
+ }
416
+ export type ESQLNumericLiteralType = 'double' | 'integer';
417
+ export type ESQLLiteral = ESQLDecimalLiteral | ESQLIntegerLiteral | ESQLBooleanLiteral | ESQLNullLiteral | ESQLStringLiteral | ESQLTimeDurationLiteral | ESQLDatePeriodLiteral | ESQLParamLiteral<string>;
418
+ export interface ESQLNumericLiteral<T extends ESQLNumericLiteralType> extends ESQLAstBaseItem {
419
+ type: 'literal';
420
+ literalType: T;
421
+ value: number;
422
+ }
423
+ export type ESQLDecimalLiteral = ESQLNumericLiteral<'double'>;
424
+ export type ESQLIntegerLiteral = ESQLNumericLiteral<'integer'>;
425
+ export interface ESQLBooleanLiteral extends ESQLAstBaseItem {
426
+ type: 'literal';
427
+ literalType: 'boolean';
428
+ value: string;
429
+ }
430
+ export interface ESQLNullLiteral extends ESQLAstBaseItem {
431
+ type: 'literal';
432
+ literalType: 'null';
433
+ value: string;
434
+ }
435
+ export interface ESQLStringLiteral extends ESQLAstBaseItem {
436
+ type: 'literal';
437
+ literalType: 'keyword';
438
+ value: string;
439
+ valueUnquoted: string;
440
+ /**
441
+ * Whether the string was parsed as "unqouted" and/or can be pretty-printed
442
+ * unquoted, i.e. in the source text it did not have any quotes (not single ",
443
+ * not triple """) quotes. This happens in FROM command source parsing, the
444
+ * cluster and selector can be unquoted strings:
445
+ *
446
+ * ```
447
+ * FROM <cluster>:index:<selector>
448
+ * ```
449
+ */
450
+ unquoted?: boolean;
451
+ }
452
+ export interface ESQLBaseTimeSpanLiteral<T extends 'time_duration' | 'date_period'> extends ESQLAstBaseItem {
453
+ type: 'literal';
454
+ literalType: T;
455
+ value: string;
456
+ unit: string;
457
+ quantity: number;
458
+ }
459
+ export type ESQLDatePeriodLiteral = ESQLBaseTimeSpanLiteral<'date_period'>;
460
+ export type ESQLTimeDurationLiteral = ESQLBaseTimeSpanLiteral<'time_duration'>;
461
+ export type ESQLTimeSpanLiteral = ESQLDatePeriodLiteral | ESQLTimeDurationLiteral;
462
+ export interface ESQLParamLiteral<ParamType extends string = string, ParamKind extends ESQLParamKinds = ESQLParamKinds> extends ESQLAstBaseItem {
463
+ type: 'literal';
464
+ literalType: 'param';
465
+ paramKind: ParamKind;
466
+ paramType: ParamType;
467
+ value: string | number;
468
+ }
469
+ export type ESQLParamKinds = '?' | '??';
470
+ /**
471
+ * *Unnamed* parameter is not named, just a question mark "?".
472
+ *
473
+ * @internal
474
+ */
475
+ export type ESQLUnnamedParamLiteral<ParamKind extends ESQLParamKinds = ESQLParamKinds> = ESQLParamLiteral<'unnamed', ParamKind>;
476
+ /**
477
+ * *Named* parameter is a question mark followed by a name "?name".
478
+ *
479
+ * @internal
480
+ */
481
+ export interface ESQLNamedParamLiteral<ParamKind extends ESQLParamKinds = ESQLParamKinds> extends ESQLParamLiteral<'named', ParamKind> {
482
+ value: string;
483
+ }
484
+ /**
485
+ * *Positional* parameter is a question mark followed by a number "?1".
486
+ *
487
+ * @internal
488
+ */
489
+ export interface ESQLPositionalParamLiteral<ParamKind extends ESQLParamKinds = ESQLParamKinds> extends ESQLParamLiteral<'positional', ParamKind> {
490
+ value: number;
491
+ }
492
+ export type ESQLParam = ESQLUnnamedParamLiteral | ESQLNamedParamLiteral | ESQLPositionalParamLiteral;
493
+ export interface ESQLIdentifier extends ESQLAstBaseItem {
494
+ type: 'identifier';
495
+ }
496
+ export interface ESQLMessage {
497
+ type: 'error' | 'warning';
498
+ text: string;
499
+ location: ESQLLocation;
500
+ code: string;
501
+ errorType?: 'semantic';
502
+ requiresCallback?: 'getColumnsFor' | 'getSources' | 'getPolicies' | 'getJoinIndices' | string;
503
+ underlinedWarning?: boolean;
504
+ }
505
+ export interface EditorError {
506
+ startLineNumber: number;
507
+ endLineNumber: number;
508
+ startColumn: number;
509
+ endColumn: number;
510
+ message: string;
511
+ code: string;
512
+ severity: 'error' | 'warning' | number;
513
+ }
514
+ export interface ESQLAstGenericComment<SubType extends 'single-line' | 'multi-line'> {
515
+ type: 'comment';
516
+ subtype: SubType;
517
+ text: string;
518
+ location?: ESQLLocation;
519
+ }
520
+ export type ESQLAstCommentSingleLine = ESQLAstGenericComment<'single-line'>;
521
+ export type ESQLAstCommentMultiLine = ESQLAstGenericComment<'multi-line'>;
522
+ export type ESQLAstComment = ESQLAstCommentSingleLine | ESQLAstCommentMultiLine;
523
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;AAEvC,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,kBAAkB,GAClB,yBAAyB,GACzB,oBAAoB,GACpB,wBAAwB,GACxB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,oBAAoB,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAElD,MAAM,MAAM,iBAAiB,GACzB,sBAAsB,GACtB,YAAY,GACZ,iBAAiB,GACjB,UAAU,GACV,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,uBAAuB,GACvB,QAAQ,GACR,WAAW,GACX,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,OAAO,GACP,YAAY,GACZ,wBAA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,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,gBAAgB,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,aAAa,GAAG,gBAAgB,GAAG,MAAM,CAAC;IAC9F,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,qBAAqB,CAAC,OAAO,SAAS,aAAa,GAAG,YAAY;IACjF,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG,uBAAuB,CAAC"}
package/lib/types.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.js.map