trilean 1.13.12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +1 -1
  2. package/dist/evaluator-operations.js +24 -4
  3. package/dist-cli/trilean.mjs +25 -5
  4. package/package.json +10 -20
  5. package/schemas/trilean.schema.json +1 -1
  6. package/dist/builtin-functions.cjs +0 -242
  7. package/dist/builtin-functions.d.cts +0 -13
  8. package/dist/complex-division.cjs +0 -47
  9. package/dist/complex-division.d.cts +0 -23
  10. package/dist/complex.cjs +0 -35
  11. package/dist/complex.d.cts +0 -23
  12. package/dist/computed-value.cjs +0 -80
  13. package/dist/computed-value.d.cts +0 -48
  14. package/dist/derived-aggregates.cjs +0 -73
  15. package/dist/derived-aggregates.d.cts +0 -9
  16. package/dist/derived-connectives.cjs +0 -39
  17. package/dist/derived-connectives.d.cts +0 -14
  18. package/dist/derived-patterns.cjs +0 -93
  19. package/dist/derived-patterns.d.cts +0 -4
  20. package/dist/derived-values.cjs +0 -23
  21. package/dist/derived-values.d.cts +0 -7
  22. package/dist/dist-ed78Tuwe.js +0 -1612
  23. package/dist/dist-ySX7cb5d.cjs +0 -1612
  24. package/dist/duration-order.cjs +0 -83
  25. package/dist/duration-order.d.cts +0 -21
  26. package/dist/evaluate-document.cjs +0 -92
  27. package/dist/evaluate-document.d.cts +0 -42
  28. package/dist/evaluation.cjs +0 -47
  29. package/dist/evaluation.d.cts +0 -29
  30. package/dist/evaluator-budget.cjs +0 -37
  31. package/dist/evaluator-budget.d.cts +0 -22
  32. package/dist/evaluator-collection.cjs +0 -33
  33. package/dist/evaluator-collection.d.cts +0 -21
  34. package/dist/evaluator-compiled.cjs +0 -310
  35. package/dist/evaluator-compiled.d.cts +0 -18
  36. package/dist/evaluator-effect.cjs +0 -57
  37. package/dist/evaluator-effect.d.cts +0 -40
  38. package/dist/evaluator-factory.cjs +0 -31
  39. package/dist/evaluator-factory.d.cts +0 -34
  40. package/dist/evaluator-literals.cjs +0 -42
  41. package/dist/evaluator-literals.d.cts +0 -8
  42. package/dist/evaluator-operations.cjs +0 -440
  43. package/dist/evaluator-operations.d.cts +0 -27
  44. package/dist/evaluator-test-helpers.cjs +0 -15030
  45. package/dist/evaluator-test-helpers.d.cts +0 -10
  46. package/dist/evaluator-test-helpers.d.ts +0 -10
  47. package/dist/evaluator-test-helpers.js +0 -14902
  48. package/dist/evaluator.cjs +0 -228
  49. package/dist/evaluator.d.cts +0 -12
  50. package/dist/functions.cjs +0 -4
  51. package/dist/functions.d.cts +0 -12
  52. package/dist/index.cjs +0 -97
  53. package/dist/index.d.cts +0 -18
  54. package/dist/input-resolvers.cjs +0 -109
  55. package/dist/input-resolvers.d.cts +0 -22
  56. package/dist/integer-power.cjs +0 -19
  57. package/dist/integer-power.d.cts +0 -11
  58. package/dist/json-value.cjs +0 -12
  59. package/dist/json-value.d.cts +0 -8
  60. package/dist/plain-record.cjs +0 -7
  61. package/dist/plain-record.d.cts +0 -2
  62. package/dist/resolvers.cjs +0 -0
  63. package/dist/resolvers.d.cts +0 -54
  64. package/dist/tree.cjs +0 -332
  65. package/dist/tree.d.cts +0 -446
package/dist/tree.d.cts DELETED
@@ -1,446 +0,0 @@
1
- import { JsonValue } from "./json-value.cjs";
2
- import { z } from "zod";
3
- export declare const ComparisonOperatorSchema: z.ZodEnum<{
4
- gt: "gt";
5
- gte: "gte";
6
- lt: "lt";
7
- lte: "lte";
8
- eq: "eq";
9
- neq: "neq";
10
- }>;
11
- export type ComparisonOperator = z.infer<typeof ComparisonOperatorSchema>;
12
- export declare const TextComparisonOperatorSchema: z.ZodEnum<{
13
- equals: "equals";
14
- notEquals: "notEquals";
15
- matches: "matches";
16
- notMatches: "notMatches";
17
- portableMatches: "portableMatches";
18
- portableNotMatches: "portableNotMatches";
19
- }>;
20
- export type TextComparisonOperator = z.infer<typeof TextComparisonOperatorSchema>;
21
- export declare const MembershipOperatorSchema: z.ZodEnum<{
22
- in: "in";
23
- notIn: "notIn";
24
- }>;
25
- export type MembershipOperator = z.infer<typeof MembershipOperatorSchema>;
26
- export declare const ArithmeticOperatorSchema: z.ZodEnum<{
27
- add: "add";
28
- subtract: "subtract";
29
- multiply: "multiply";
30
- divide: "divide";
31
- power: "power";
32
- modulo: "modulo";
33
- }>;
34
- export type ArithmeticOperator = z.infer<typeof ArithmeticOperatorSchema>;
35
- export declare const HitPolicySchema: z.ZodEnum<{
36
- first: "first";
37
- unique: "unique";
38
- }>;
39
- export type HitPolicy = z.infer<typeof HitPolicySchema>;
40
- export declare const NotNodeSchema: z.ZodObject<{
41
- kind: z.ZodLiteral<"not">;
42
- operand: typeof PredicateNodeSchema;
43
- }, z.core.$strip>;
44
- export type NotNode = z.infer<typeof NotNodeSchema>;
45
- export declare const AndNodeSchema: z.ZodObject<{
46
- kind: z.ZodLiteral<"and">;
47
- left: typeof PredicateNodeSchema;
48
- right: typeof PredicateNodeSchema;
49
- }, z.core.$strip>;
50
- export type AndNode = z.infer<typeof AndNodeSchema>;
51
- export declare const OrNodeSchema: z.ZodObject<{
52
- kind: z.ZodLiteral<"or">;
53
- left: typeof PredicateNodeSchema;
54
- right: typeof PredicateNodeSchema;
55
- }, z.core.$strip>;
56
- export type OrNode = z.infer<typeof OrNodeSchema>;
57
- export declare const AllOfNodeSchema: z.ZodObject<{
58
- kind: z.ZodLiteral<"allOf">;
59
- operands: z.ZodArray<typeof PredicateNodeSchema>;
60
- }, z.core.$strip>;
61
- export type AllOfNode = z.infer<typeof AllOfNodeSchema>;
62
- export declare const AnyOfNodeSchema: z.ZodObject<{
63
- kind: z.ZodLiteral<"anyOf">;
64
- operands: z.ZodArray<typeof PredicateNodeSchema>;
65
- }, z.core.$strip>;
66
- export type AnyOfNode = z.infer<typeof AnyOfNodeSchema>;
67
- export declare const CompareNodeSchema: z.ZodObject<{
68
- kind: z.ZodLiteral<"compare">;
69
- op: z.ZodEnum<{
70
- gt: "gt";
71
- gte: "gte";
72
- lt: "lt";
73
- lte: "lte";
74
- eq: "eq";
75
- neq: "neq";
76
- }>;
77
- left: typeof ExpressionNodeSchema;
78
- right: typeof ExpressionNodeSchema;
79
- }, z.core.$strip>;
80
- export type CompareNode = z.infer<typeof CompareNodeSchema>;
81
- export declare const TextCompareNodeSchema: z.ZodObject<{
82
- kind: z.ZodLiteral<"textCompare">;
83
- op: z.ZodEnum<{
84
- equals: "equals";
85
- notEquals: "notEquals";
86
- matches: "matches";
87
- notMatches: "notMatches";
88
- portableMatches: "portableMatches";
89
- portableNotMatches: "portableNotMatches";
90
- }>;
91
- left: typeof ExpressionNodeSchema;
92
- right: typeof ExpressionNodeSchema;
93
- }, z.core.$strip>;
94
- export type TextCompareNode = z.infer<typeof TextCompareNodeSchema>;
95
- export declare const MemberOfNodeSchema: z.ZodObject<{
96
- kind: z.ZodLiteral<"memberOf">;
97
- op: z.ZodEnum<{
98
- in: "in";
99
- notIn: "notIn";
100
- }>;
101
- operand: typeof ExpressionNodeSchema;
102
- candidates: z.ZodArray<typeof ExpressionNodeSchema>;
103
- }, z.core.$strip>;
104
- export type MemberOfNode = z.infer<typeof MemberOfNodeSchema>;
105
- export declare const ExistsNodeSchema: z.ZodObject<{
106
- kind: z.ZodLiteral<"exists">;
107
- operand: typeof ExpressionNodeSchema;
108
- }, z.core.$strip>;
109
- export type ExistsNode = z.infer<typeof ExistsNodeSchema>;
110
- export declare const SomeNodeSchema: z.ZodObject<{
111
- kind: z.ZodLiteral<"some">;
112
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
113
- item: typeof PredicateNodeSchema;
114
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
115
- }, z.core.$strip>;
116
- export type SomeNode = z.infer<typeof SomeNodeSchema>;
117
- export declare const EveryNodeSchema: z.ZodObject<{
118
- kind: z.ZodLiteral<"every">;
119
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
120
- item: typeof PredicateNodeSchema;
121
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
122
- }, z.core.$strip>;
123
- export type EveryNode = z.infer<typeof EveryNodeSchema>;
124
- /** Shared by both trees -- the only node kind valid in both PredicateNodeSchema's and ExpressionNodeSchema's own discriminated unions, appended as the last member of each below. Declared once, here, ahead of the predicate union that needs it first; the expression union further down references this exact same schema object again rather than declaring its own copy. See the `treeReference` section of README.md. */
125
- export declare const TreeReferenceNodeSchema: z.ZodObject<{
126
- kind: z.ZodLiteral<"treeReference">;
127
- key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
128
- }, z.core.$strip>;
129
- export type TreeReferenceNode = z.infer<typeof TreeReferenceNodeSchema>;
130
- export declare const PredicateNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
- kind: z.ZodLiteral<"not">;
132
- operand: typeof PredicateNodeSchema;
133
- }, z.core.$strip>, z.ZodObject<{
134
- kind: z.ZodLiteral<"and">;
135
- left: typeof PredicateNodeSchema;
136
- right: typeof PredicateNodeSchema;
137
- }, z.core.$strip>, z.ZodObject<{
138
- kind: z.ZodLiteral<"or">;
139
- left: typeof PredicateNodeSchema;
140
- right: typeof PredicateNodeSchema;
141
- }, z.core.$strip>, z.ZodObject<{
142
- kind: z.ZodLiteral<"allOf">;
143
- operands: z.ZodArray<typeof PredicateNodeSchema>;
144
- }, z.core.$strip>, z.ZodObject<{
145
- kind: z.ZodLiteral<"anyOf">;
146
- operands: z.ZodArray<typeof PredicateNodeSchema>;
147
- }, z.core.$strip>, z.ZodObject<{
148
- kind: z.ZodLiteral<"compare">;
149
- op: z.ZodEnum<{
150
- gt: "gt";
151
- gte: "gte";
152
- lt: "lt";
153
- lte: "lte";
154
- eq: "eq";
155
- neq: "neq";
156
- }>;
157
- left: typeof ExpressionNodeSchema;
158
- right: typeof ExpressionNodeSchema;
159
- }, z.core.$strip>, z.ZodObject<{
160
- kind: z.ZodLiteral<"textCompare">;
161
- op: z.ZodEnum<{
162
- equals: "equals";
163
- notEquals: "notEquals";
164
- matches: "matches";
165
- notMatches: "notMatches";
166
- portableMatches: "portableMatches";
167
- portableNotMatches: "portableNotMatches";
168
- }>;
169
- left: typeof ExpressionNodeSchema;
170
- right: typeof ExpressionNodeSchema;
171
- }, z.core.$strip>, z.ZodObject<{
172
- kind: z.ZodLiteral<"memberOf">;
173
- op: z.ZodEnum<{
174
- in: "in";
175
- notIn: "notIn";
176
- }>;
177
- operand: typeof ExpressionNodeSchema;
178
- candidates: z.ZodArray<typeof ExpressionNodeSchema>;
179
- }, z.core.$strip>, z.ZodObject<{
180
- kind: z.ZodLiteral<"exists">;
181
- operand: typeof ExpressionNodeSchema;
182
- }, z.core.$strip>, z.ZodObject<{
183
- kind: z.ZodLiteral<"some">;
184
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
185
- item: typeof PredicateNodeSchema;
186
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
187
- }, z.core.$strip>, z.ZodObject<{
188
- kind: z.ZodLiteral<"every">;
189
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
190
- item: typeof PredicateNodeSchema;
191
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
192
- }, z.core.$strip>, z.ZodObject<{
193
- kind: z.ZodLiteral<"treeReference">;
194
- key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
195
- }, z.core.$strip>], "kind">;
196
- export type PredicateNode = z.infer<typeof PredicateNodeSchema>;
197
- export declare const NumberLiteralNodeSchema: z.ZodObject<{
198
- kind: z.ZodLiteral<"numberLiteral">;
199
- value: z.ZodNumber;
200
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
201
- }, z.core.$strip>;
202
- export type NumberLiteralNode = z.infer<typeof NumberLiteralNodeSchema>;
203
- export declare const TextLiteralNodeSchema: z.ZodObject<{
204
- kind: z.ZodLiteral<"textLiteral">;
205
- value: z.ZodString;
206
- }, z.core.$strip>;
207
- export type TextLiteralNode = z.infer<typeof TextLiteralNodeSchema>;
208
- export declare const BooleanLiteralNodeSchema: z.ZodObject<{
209
- kind: z.ZodLiteral<"booleanLiteral">;
210
- value: z.ZodBoolean;
211
- }, z.core.$strip>;
212
- export type BooleanLiteralNode = z.infer<typeof BooleanLiteralNodeSchema>;
213
- export declare const InstantLiteralNodeSchema: z.ZodObject<{
214
- kind: z.ZodLiteral<"instantLiteral">;
215
- value: z.ZodString;
216
- }, z.core.$strip>;
217
- export type InstantLiteralNode = z.infer<typeof InstantLiteralNodeSchema>;
218
- export declare const DurationLiteralNodeSchema: z.ZodObject<{
219
- kind: z.ZodLiteral<"durationLiteral">;
220
- value: z.ZodNumber;
221
- unit: z.ZodEnum<{
222
- ms: "ms";
223
- s: "s";
224
- min: "min";
225
- h: "h";
226
- d: "d";
227
- }>;
228
- }, z.core.$strip>;
229
- export type DurationLiteralNode = z.infer<typeof DurationLiteralNodeSchema>;
230
- /**
231
- * The wire-format literal accepts either of the two authoring forms real-world complex data arrives in, discriminated structurally rather than by a `form` tag: rectangular (`re`/`im`), matching the `complex` computed-value kind's own single canonical representation exactly (see the "Complex values" section of README.md), or polar (`magnitude`/`phase`, in radians), for the domains that reason that way natively and would otherwise have to hand-compute the conversion before ever constructing the tree. `strictObject` on both members is what makes the two forms mutually exclusive on the wire -- a plain `object` would silently strip an unrecognised field rather than reject a payload that mixes both.
232
- *
233
- * The evaluator normalises whichever form was authored into the single rectangular `ComputedValue` immediately on evaluation (see `literalValue` in evaluator-literals.ts), so nothing downstream of that -- arithmetic, `compare`, `memberOf`, `negate` -- ever sees a polar value; they keep consuming the one canonical `complex` shape unchanged.
234
- */
235
- export declare const ComplexRectangularLiteralNodeSchema: z.ZodObject<{
236
- kind: z.ZodLiteral<"complexLiteral">;
237
- re: z.ZodNumber;
238
- im: z.ZodNumber;
239
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
240
- }, z.core.$strict>;
241
- export type ComplexRectangularLiteralNode = z.infer<typeof ComplexRectangularLiteralNodeSchema>;
242
- export declare const ComplexPolarLiteralNodeSchema: z.ZodObject<{
243
- kind: z.ZodLiteral<"complexLiteral">;
244
- magnitude: z.ZodNumber;
245
- phase: z.ZodNumber;
246
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
247
- }, z.core.$strict>;
248
- export type ComplexPolarLiteralNode = z.infer<typeof ComplexPolarLiteralNodeSchema>;
249
- /** Both literal forms share the one literal `kind: "complexLiteral"` value, which is exactly why this is a plain `z.union` rather than a `z.discriminatedUnion` -- `z.discriminatedUnion` requires a unique discriminant literal per member and throws ("Duplicate discriminator value") the moment two members share one. `ExpressionNodeSchema` below folds this plain union in alongside its own discriminated union of every other kind, rather than trying to host it as a normal member. */
250
- export declare const ComplexLiteralNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
251
- kind: z.ZodLiteral<"complexLiteral">;
252
- re: z.ZodNumber;
253
- im: z.ZodNumber;
254
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
255
- }, z.core.$strict>, z.ZodObject<{
256
- kind: z.ZodLiteral<"complexLiteral">;
257
- magnitude: z.ZodNumber;
258
- phase: z.ZodNumber;
259
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
260
- }, z.core.$strict>]>;
261
- export type ComplexLiteralNode = z.infer<typeof ComplexLiteralNodeSchema>;
262
- export declare const ReferenceNodeSchema: z.ZodObject<{
263
- kind: z.ZodLiteral<"reference">;
264
- key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
265
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
266
- }, z.core.$strip>;
267
- export type ReferenceNode = z.infer<typeof ReferenceNodeSchema>;
268
- export declare const ArithmeticNodeSchema: z.ZodObject<{
269
- kind: z.ZodLiteral<"arithmetic">;
270
- op: z.ZodEnum<{
271
- add: "add";
272
- subtract: "subtract";
273
- multiply: "multiply";
274
- divide: "divide";
275
- power: "power";
276
- modulo: "modulo";
277
- }>;
278
- left: typeof ExpressionNodeSchema;
279
- right: typeof ExpressionNodeSchema;
280
- }, z.core.$strip>;
281
- export type ArithmeticNode = z.infer<typeof ArithmeticNodeSchema>;
282
- export declare const NegateNodeSchema: z.ZodObject<{
283
- kind: z.ZodLiteral<"negate">;
284
- operand: typeof ExpressionNodeSchema;
285
- }, z.core.$strip>;
286
- export type NegateNode = z.infer<typeof NegateNodeSchema>;
287
- export declare const CallNodeSchema: z.ZodObject<{
288
- kind: z.ZodLiteral<"call">;
289
- fn: z.ZodString;
290
- args: z.ZodArray<typeof ExpressionNodeSchema>;
291
- }, z.core.$strip>;
292
- export type CallNode = z.infer<typeof CallNodeSchema>;
293
- export declare const LookupNodeSchema: z.ZodObject<{
294
- kind: z.ZodLiteral<"lookup">;
295
- table: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
296
- keys: z.ZodArray<typeof ExpressionNodeSchema>;
297
- }, z.core.$strip>;
298
- export type LookupNode = z.infer<typeof LookupNodeSchema>;
299
- export declare const ConditionalCaseSchema: z.ZodObject<{
300
- when: typeof PredicateNodeSchema;
301
- then: typeof ExpressionNodeSchema;
302
- }, z.core.$strip>;
303
- export type ConditionalCase = z.infer<typeof ConditionalCaseSchema>;
304
- export declare const ConditionalNodeSchema: z.ZodObject<{
305
- kind: z.ZodLiteral<"conditional">;
306
- hitPolicy: z.ZodOptional<z.ZodEnum<{
307
- first: "first";
308
- unique: "unique";
309
- }>>;
310
- cases: z.ZodArray<typeof ConditionalCaseSchema>;
311
- fallback: typeof ExpressionNodeSchema;
312
- }, z.core.$strip>;
313
- export type ConditionalNode = z.infer<typeof ConditionalNodeSchema>;
314
- export declare const FoldCombinerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
315
- mode: z.ZodLiteral<"max">;
316
- item: typeof ExpressionNodeSchema;
317
- }, z.core.$strip>, z.ZodObject<{
318
- mode: z.ZodLiteral<"min">;
319
- item: typeof ExpressionNodeSchema;
320
- }, z.core.$strip>, z.ZodObject<{
321
- mode: z.ZodLiteral<"reduce">;
322
- initial: typeof ExpressionNodeSchema;
323
- combine: typeof ExpressionNodeSchema;
324
- }, z.core.$strip>], "mode">;
325
- export type FoldCombiner = z.infer<typeof FoldCombinerSchema>;
326
- export declare const FoldNodeSchema: z.ZodObject<{
327
- kind: z.ZodLiteral<"fold">;
328
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
329
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
330
- combiner: z.ZodDiscriminatedUnion<[z.ZodObject<{
331
- mode: z.ZodLiteral<"max">;
332
- item: typeof ExpressionNodeSchema;
333
- }, z.core.$strip>, z.ZodObject<{
334
- mode: z.ZodLiteral<"min">;
335
- item: typeof ExpressionNodeSchema;
336
- }, z.core.$strip>, z.ZodObject<{
337
- mode: z.ZodLiteral<"reduce">;
338
- initial: typeof ExpressionNodeSchema;
339
- combine: typeof ExpressionNodeSchema;
340
- }, z.core.$strip>], "mode">;
341
- }, z.core.$strip>;
342
- export type FoldNode = z.infer<typeof FoldNodeSchema>;
343
- export declare const AccumulatorNodeSchema: z.ZodObject<{
344
- kind: z.ZodLiteral<"accumulator">;
345
- }, z.core.$strip>;
346
- export type AccumulatorNode = z.infer<typeof AccumulatorNodeSchema>;
347
- export declare const DelegateNodeSchema: z.ZodObject<{
348
- kind: z.ZodLiteral<"delegate">;
349
- system: z.ZodString;
350
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
351
- }, z.core.$strip>;
352
- export type DelegateNode = z.infer<typeof DelegateNodeSchema>;
353
- export declare const ExpressionNodeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
354
- kind: z.ZodLiteral<"numberLiteral">;
355
- value: z.ZodNumber;
356
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
357
- }, z.core.$strip>, z.ZodObject<{
358
- kind: z.ZodLiteral<"textLiteral">;
359
- value: z.ZodString;
360
- }, z.core.$strip>, z.ZodObject<{
361
- kind: z.ZodLiteral<"booleanLiteral">;
362
- value: z.ZodBoolean;
363
- }, z.core.$strip>, z.ZodObject<{
364
- kind: z.ZodLiteral<"instantLiteral">;
365
- value: z.ZodString;
366
- }, z.core.$strip>, z.ZodObject<{
367
- kind: z.ZodLiteral<"durationLiteral">;
368
- value: z.ZodNumber;
369
- unit: z.ZodEnum<{
370
- ms: "ms";
371
- s: "s";
372
- min: "min";
373
- h: "h";
374
- d: "d";
375
- }>;
376
- }, z.core.$strip>, z.ZodObject<{
377
- kind: z.ZodLiteral<"reference">;
378
- key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
379
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
380
- }, z.core.$strip>, z.ZodObject<{
381
- kind: z.ZodLiteral<"arithmetic">;
382
- op: z.ZodEnum<{
383
- add: "add";
384
- subtract: "subtract";
385
- multiply: "multiply";
386
- divide: "divide";
387
- power: "power";
388
- modulo: "modulo";
389
- }>;
390
- left: typeof ExpressionNodeSchema;
391
- right: typeof ExpressionNodeSchema;
392
- }, z.core.$strip>, z.ZodObject<{
393
- kind: z.ZodLiteral<"negate">;
394
- operand: typeof ExpressionNodeSchema;
395
- }, z.core.$strip>, z.ZodObject<{
396
- kind: z.ZodLiteral<"call">;
397
- fn: z.ZodString;
398
- args: z.ZodArray<typeof ExpressionNodeSchema>;
399
- }, z.core.$strip>, z.ZodObject<{
400
- kind: z.ZodLiteral<"lookup">;
401
- table: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
402
- keys: z.ZodArray<typeof ExpressionNodeSchema>;
403
- }, z.core.$strip>, z.ZodObject<{
404
- kind: z.ZodLiteral<"conditional">;
405
- hitPolicy: z.ZodOptional<z.ZodEnum<{
406
- first: "first";
407
- unique: "unique";
408
- }>>;
409
- cases: z.ZodArray<typeof ConditionalCaseSchema>;
410
- fallback: typeof ExpressionNodeSchema;
411
- }, z.core.$strip>, z.ZodObject<{
412
- kind: z.ZodLiteral<"fold">;
413
- collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
414
- filter: z.ZodOptional<typeof PredicateNodeSchema>;
415
- combiner: z.ZodDiscriminatedUnion<[z.ZodObject<{
416
- mode: z.ZodLiteral<"max">;
417
- item: typeof ExpressionNodeSchema;
418
- }, z.core.$strip>, z.ZodObject<{
419
- mode: z.ZodLiteral<"min">;
420
- item: typeof ExpressionNodeSchema;
421
- }, z.core.$strip>, z.ZodObject<{
422
- mode: z.ZodLiteral<"reduce">;
423
- initial: typeof ExpressionNodeSchema;
424
- combine: typeof ExpressionNodeSchema;
425
- }, z.core.$strip>], "mode">;
426
- }, z.core.$strip>, z.ZodObject<{
427
- kind: z.ZodLiteral<"accumulator">;
428
- }, z.core.$strip>, z.ZodObject<{
429
- kind: z.ZodLiteral<"delegate">;
430
- system: z.ZodString;
431
- payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
432
- }, z.core.$strip>, z.ZodObject<{
433
- kind: z.ZodLiteral<"treeReference">;
434
- key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
435
- }, z.core.$strip>], "kind">, z.ZodUnion<readonly [z.ZodObject<{
436
- kind: z.ZodLiteral<"complexLiteral">;
437
- re: z.ZodNumber;
438
- im: z.ZodNumber;
439
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
440
- }, z.core.$strict>, z.ZodObject<{
441
- kind: z.ZodLiteral<"complexLiteral">;
442
- magnitude: z.ZodNumber;
443
- phase: z.ZodNumber;
444
- unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
445
- }, z.core.$strict>]>]>;
446
- export type ExpressionNode = z.infer<typeof ExpressionNodeSchema>;