trilean 1.6.2 → 1.6.3
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.
- package/dist/complex.d.cts +5 -6
- package/dist/complex.d.ts +5 -6
- package/dist/derived-aggregates.d.cts +5 -6
- package/dist/derived-aggregates.d.ts +5 -6
- package/dist/derived-connectives.d.cts +10 -11
- package/dist/derived-connectives.d.ts +10 -11
- package/dist/derived-patterns.d.cts +4 -5
- package/dist/derived-patterns.d.ts +4 -5
- package/dist/derived-values.d.cts +2 -3
- package/dist/derived-values.d.ts +2 -3
- package/dist/evaluation.d.cts +7 -8
- package/dist/evaluation.d.ts +7 -8
- package/dist/evaluator-budget.d.cts +6 -7
- package/dist/evaluator-budget.d.ts +6 -7
- package/dist/evaluator-collection.d.cts +5 -6
- package/dist/evaluator-collection.d.ts +5 -6
- package/dist/evaluator-factory.d.cts +3 -4
- package/dist/evaluator-factory.d.ts +3 -4
- package/dist/evaluator-indeterminacy-helpers.d.cts +26 -27
- package/dist/evaluator-indeterminacy-helpers.d.ts +26 -27
- package/dist/evaluator-operations.d.cts +10 -11
- package/dist/evaluator-operations.d.ts +10 -11
- package/dist/evaluator-test-helpers.d.cts +6 -7
- package/dist/evaluator-test-helpers.d.ts +6 -7
- package/dist/evaluator.d.cts +3 -4
- package/dist/evaluator.d.ts +3 -4
- package/dist/functions.d.cts +3 -4
- package/dist/functions.d.ts +3 -4
- package/dist/resolvers.d.cts +5 -6
- package/dist/resolvers.d.ts +5 -6
- package/dist/tree.d.cts +77 -78
- package/dist/tree.d.ts +77 -78
- package/package.json +3 -3
- package/schemas/trilean.schema.json +1 -1
package/dist/tree.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as JsonValue } from "./json-value-B1Hjjjri.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/tree.d.ts
|
|
4
|
-
declare const ComparisonOperatorSchema: z.ZodEnum<{
|
|
4
|
+
export declare const ComparisonOperatorSchema: z.ZodEnum<{
|
|
5
5
|
gt: "gt";
|
|
6
6
|
gte: "gte";
|
|
7
7
|
lt: "lt";
|
|
@@ -9,8 +9,8 @@ declare const ComparisonOperatorSchema: z.ZodEnum<{
|
|
|
9
9
|
eq: "eq";
|
|
10
10
|
neq: "neq";
|
|
11
11
|
}>;
|
|
12
|
-
type ComparisonOperator = z.infer<typeof ComparisonOperatorSchema>;
|
|
13
|
-
declare const TextComparisonOperatorSchema: z.ZodEnum<{
|
|
12
|
+
export type ComparisonOperator = z.infer<typeof ComparisonOperatorSchema>;
|
|
13
|
+
export declare const TextComparisonOperatorSchema: z.ZodEnum<{
|
|
14
14
|
equals: "equals";
|
|
15
15
|
notEquals: "notEquals";
|
|
16
16
|
matches: "matches";
|
|
@@ -18,13 +18,13 @@ declare const TextComparisonOperatorSchema: z.ZodEnum<{
|
|
|
18
18
|
portableMatches: "portableMatches";
|
|
19
19
|
portableNotMatches: "portableNotMatches";
|
|
20
20
|
}>;
|
|
21
|
-
type TextComparisonOperator = z.infer<typeof TextComparisonOperatorSchema>;
|
|
22
|
-
declare const MembershipOperatorSchema: z.ZodEnum<{
|
|
21
|
+
export type TextComparisonOperator = z.infer<typeof TextComparisonOperatorSchema>;
|
|
22
|
+
export declare const MembershipOperatorSchema: z.ZodEnum<{
|
|
23
23
|
in: "in";
|
|
24
24
|
notIn: "notIn";
|
|
25
25
|
}>;
|
|
26
|
-
type MembershipOperator = z.infer<typeof MembershipOperatorSchema>;
|
|
27
|
-
declare const ArithmeticOperatorSchema: z.ZodEnum<{
|
|
26
|
+
export type MembershipOperator = z.infer<typeof MembershipOperatorSchema>;
|
|
27
|
+
export declare const ArithmeticOperatorSchema: z.ZodEnum<{
|
|
28
28
|
add: "add";
|
|
29
29
|
subtract: "subtract";
|
|
30
30
|
multiply: "multiply";
|
|
@@ -32,40 +32,40 @@ declare const ArithmeticOperatorSchema: z.ZodEnum<{
|
|
|
32
32
|
power: "power";
|
|
33
33
|
modulo: "modulo";
|
|
34
34
|
}>;
|
|
35
|
-
type ArithmeticOperator = z.infer<typeof ArithmeticOperatorSchema>;
|
|
36
|
-
declare const HitPolicySchema: z.ZodEnum<{
|
|
35
|
+
export type ArithmeticOperator = z.infer<typeof ArithmeticOperatorSchema>;
|
|
36
|
+
export declare const HitPolicySchema: z.ZodEnum<{
|
|
37
37
|
first: "first";
|
|
38
38
|
unique: "unique";
|
|
39
39
|
}>;
|
|
40
|
-
type HitPolicy = z.infer<typeof HitPolicySchema>;
|
|
41
|
-
declare const NotNodeSchema: z.ZodObject<{
|
|
40
|
+
export type HitPolicy = z.infer<typeof HitPolicySchema>;
|
|
41
|
+
export declare const NotNodeSchema: z.ZodObject<{
|
|
42
42
|
kind: z.ZodLiteral<"not">;
|
|
43
43
|
operand: typeof PredicateNodeSchema;
|
|
44
44
|
}, z.core.$strip>;
|
|
45
|
-
type NotNode = z.infer<typeof NotNodeSchema>;
|
|
46
|
-
declare const AndNodeSchema: z.ZodObject<{
|
|
45
|
+
export type NotNode = z.infer<typeof NotNodeSchema>;
|
|
46
|
+
export declare const AndNodeSchema: z.ZodObject<{
|
|
47
47
|
kind: z.ZodLiteral<"and">;
|
|
48
48
|
left: typeof PredicateNodeSchema;
|
|
49
49
|
right: typeof PredicateNodeSchema;
|
|
50
50
|
}, z.core.$strip>;
|
|
51
|
-
type AndNode = z.infer<typeof AndNodeSchema>;
|
|
52
|
-
declare const OrNodeSchema: z.ZodObject<{
|
|
51
|
+
export type AndNode = z.infer<typeof AndNodeSchema>;
|
|
52
|
+
export declare const OrNodeSchema: z.ZodObject<{
|
|
53
53
|
kind: z.ZodLiteral<"or">;
|
|
54
54
|
left: typeof PredicateNodeSchema;
|
|
55
55
|
right: typeof PredicateNodeSchema;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
|
-
type OrNode = z.infer<typeof OrNodeSchema>;
|
|
58
|
-
declare const AllOfNodeSchema: z.ZodObject<{
|
|
57
|
+
export type OrNode = z.infer<typeof OrNodeSchema>;
|
|
58
|
+
export declare const AllOfNodeSchema: z.ZodObject<{
|
|
59
59
|
kind: z.ZodLiteral<"allOf">;
|
|
60
60
|
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
61
61
|
}, z.core.$strip>;
|
|
62
|
-
type AllOfNode = z.infer<typeof AllOfNodeSchema>;
|
|
63
|
-
declare const AnyOfNodeSchema: z.ZodObject<{
|
|
62
|
+
export type AllOfNode = z.infer<typeof AllOfNodeSchema>;
|
|
63
|
+
export declare const AnyOfNodeSchema: z.ZodObject<{
|
|
64
64
|
kind: z.ZodLiteral<"anyOf">;
|
|
65
65
|
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
66
66
|
}, z.core.$strip>;
|
|
67
|
-
type AnyOfNode = z.infer<typeof AnyOfNodeSchema>;
|
|
68
|
-
declare const CompareNodeSchema: z.ZodObject<{
|
|
67
|
+
export type AnyOfNode = z.infer<typeof AnyOfNodeSchema>;
|
|
68
|
+
export declare const CompareNodeSchema: z.ZodObject<{
|
|
69
69
|
kind: z.ZodLiteral<"compare">;
|
|
70
70
|
op: z.ZodEnum<{
|
|
71
71
|
gt: "gt";
|
|
@@ -78,8 +78,8 @@ declare const CompareNodeSchema: z.ZodObject<{
|
|
|
78
78
|
left: typeof ExpressionNodeSchema;
|
|
79
79
|
right: typeof ExpressionNodeSchema;
|
|
80
80
|
}, z.core.$strip>;
|
|
81
|
-
type CompareNode = z.infer<typeof CompareNodeSchema>;
|
|
82
|
-
declare const TextCompareNodeSchema: z.ZodObject<{
|
|
81
|
+
export type CompareNode = z.infer<typeof CompareNodeSchema>;
|
|
82
|
+
export declare const TextCompareNodeSchema: z.ZodObject<{
|
|
83
83
|
kind: z.ZodLiteral<"textCompare">;
|
|
84
84
|
op: z.ZodEnum<{
|
|
85
85
|
equals: "equals";
|
|
@@ -92,8 +92,8 @@ declare const TextCompareNodeSchema: z.ZodObject<{
|
|
|
92
92
|
left: typeof ExpressionNodeSchema;
|
|
93
93
|
right: typeof ExpressionNodeSchema;
|
|
94
94
|
}, z.core.$strip>;
|
|
95
|
-
type TextCompareNode = z.infer<typeof TextCompareNodeSchema>;
|
|
96
|
-
declare const MemberOfNodeSchema: z.ZodObject<{
|
|
95
|
+
export type TextCompareNode = z.infer<typeof TextCompareNodeSchema>;
|
|
96
|
+
export declare const MemberOfNodeSchema: z.ZodObject<{
|
|
97
97
|
kind: z.ZodLiteral<"memberOf">;
|
|
98
98
|
op: z.ZodEnum<{
|
|
99
99
|
in: "in";
|
|
@@ -102,33 +102,33 @@ declare const MemberOfNodeSchema: z.ZodObject<{
|
|
|
102
102
|
operand: typeof ExpressionNodeSchema;
|
|
103
103
|
candidates: z.ZodArray<typeof ExpressionNodeSchema>;
|
|
104
104
|
}, z.core.$strip>;
|
|
105
|
-
type MemberOfNode = z.infer<typeof MemberOfNodeSchema>;
|
|
106
|
-
declare const ExistsNodeSchema: z.ZodObject<{
|
|
105
|
+
export type MemberOfNode = z.infer<typeof MemberOfNodeSchema>;
|
|
106
|
+
export declare const ExistsNodeSchema: z.ZodObject<{
|
|
107
107
|
kind: z.ZodLiteral<"exists">;
|
|
108
108
|
operand: typeof ExpressionNodeSchema;
|
|
109
109
|
}, z.core.$strip>;
|
|
110
|
-
type ExistsNode = z.infer<typeof ExistsNodeSchema>;
|
|
111
|
-
declare const SomeNodeSchema: z.ZodObject<{
|
|
110
|
+
export type ExistsNode = z.infer<typeof ExistsNodeSchema>;
|
|
111
|
+
export declare const SomeNodeSchema: z.ZodObject<{
|
|
112
112
|
kind: z.ZodLiteral<"some">;
|
|
113
113
|
collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
114
114
|
item: typeof PredicateNodeSchema;
|
|
115
115
|
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
116
116
|
}, z.core.$strip>;
|
|
117
|
-
type SomeNode = z.infer<typeof SomeNodeSchema>;
|
|
118
|
-
declare const EveryNodeSchema: z.ZodObject<{
|
|
117
|
+
export type SomeNode = z.infer<typeof SomeNodeSchema>;
|
|
118
|
+
export declare const EveryNodeSchema: z.ZodObject<{
|
|
119
119
|
kind: z.ZodLiteral<"every">;
|
|
120
120
|
collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
121
121
|
item: typeof PredicateNodeSchema;
|
|
122
122
|
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
|
-
type EveryNode = z.infer<typeof EveryNodeSchema>;
|
|
124
|
+
export type EveryNode = z.infer<typeof EveryNodeSchema>;
|
|
125
125
|
/** 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. */
|
|
126
|
-
declare const TreeReferenceNodeSchema: z.ZodObject<{
|
|
126
|
+
export declare const TreeReferenceNodeSchema: z.ZodObject<{
|
|
127
127
|
kind: z.ZodLiteral<"treeReference">;
|
|
128
128
|
key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
|
-
type TreeReferenceNode = z.infer<typeof TreeReferenceNodeSchema>;
|
|
131
|
-
declare const PredicateNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
130
|
+
export type TreeReferenceNode = z.infer<typeof TreeReferenceNodeSchema>;
|
|
131
|
+
export declare const PredicateNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
132
132
|
kind: z.ZodLiteral<"not">;
|
|
133
133
|
operand: typeof PredicateNodeSchema;
|
|
134
134
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -194,29 +194,29 @@ declare const PredicateNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
194
194
|
kind: z.ZodLiteral<"treeReference">;
|
|
195
195
|
key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
196
196
|
}, z.core.$strip>], "kind">;
|
|
197
|
-
type PredicateNode = z.infer<typeof PredicateNodeSchema>;
|
|
198
|
-
declare const NumberLiteralNodeSchema: z.ZodObject<{
|
|
197
|
+
export type PredicateNode = z.infer<typeof PredicateNodeSchema>;
|
|
198
|
+
export declare const NumberLiteralNodeSchema: z.ZodObject<{
|
|
199
199
|
kind: z.ZodLiteral<"numberLiteral">;
|
|
200
200
|
value: z.ZodNumber;
|
|
201
201
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
202
202
|
}, z.core.$strip>;
|
|
203
|
-
type NumberLiteralNode = z.infer<typeof NumberLiteralNodeSchema>;
|
|
204
|
-
declare const TextLiteralNodeSchema: z.ZodObject<{
|
|
203
|
+
export type NumberLiteralNode = z.infer<typeof NumberLiteralNodeSchema>;
|
|
204
|
+
export declare const TextLiteralNodeSchema: z.ZodObject<{
|
|
205
205
|
kind: z.ZodLiteral<"textLiteral">;
|
|
206
206
|
value: z.ZodString;
|
|
207
207
|
}, z.core.$strip>;
|
|
208
|
-
type TextLiteralNode = z.infer<typeof TextLiteralNodeSchema>;
|
|
209
|
-
declare const BooleanLiteralNodeSchema: z.ZodObject<{
|
|
208
|
+
export type TextLiteralNode = z.infer<typeof TextLiteralNodeSchema>;
|
|
209
|
+
export declare const BooleanLiteralNodeSchema: z.ZodObject<{
|
|
210
210
|
kind: z.ZodLiteral<"booleanLiteral">;
|
|
211
211
|
value: z.ZodBoolean;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
|
-
type BooleanLiteralNode = z.infer<typeof BooleanLiteralNodeSchema>;
|
|
214
|
-
declare const InstantLiteralNodeSchema: z.ZodObject<{
|
|
213
|
+
export type BooleanLiteralNode = z.infer<typeof BooleanLiteralNodeSchema>;
|
|
214
|
+
export declare const InstantLiteralNodeSchema: z.ZodObject<{
|
|
215
215
|
kind: z.ZodLiteral<"instantLiteral">;
|
|
216
216
|
value: z.ZodString;
|
|
217
217
|
}, z.core.$strip>;
|
|
218
|
-
type InstantLiteralNode = z.infer<typeof InstantLiteralNodeSchema>;
|
|
219
|
-
declare const DurationLiteralNodeSchema: z.ZodObject<{
|
|
218
|
+
export type InstantLiteralNode = z.infer<typeof InstantLiteralNodeSchema>;
|
|
219
|
+
export declare const DurationLiteralNodeSchema: z.ZodObject<{
|
|
220
220
|
kind: z.ZodLiteral<"durationLiteral">;
|
|
221
221
|
value: z.ZodNumber;
|
|
222
222
|
unit: z.ZodEnum<{
|
|
@@ -227,28 +227,28 @@ declare const DurationLiteralNodeSchema: z.ZodObject<{
|
|
|
227
227
|
d: "d";
|
|
228
228
|
}>;
|
|
229
229
|
}, z.core.$strip>;
|
|
230
|
-
type DurationLiteralNode = z.infer<typeof DurationLiteralNodeSchema>;
|
|
230
|
+
export type DurationLiteralNode = z.infer<typeof DurationLiteralNodeSchema>;
|
|
231
231
|
/**
|
|
232
232
|
* 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.
|
|
233
233
|
*
|
|
234
234
|
* The evaluator normalises whichever form was authored into the single rectangular `ComputedValue` immediately on evaluation (see the `complexLiteral` case in evaluator.ts), so nothing downstream of that -- arithmetic, `compare`, `memberOf`, `negate` -- ever sees a polar value; they keep consuming the one canonical `complex` shape unchanged.
|
|
235
235
|
*/
|
|
236
|
-
declare const ComplexRectangularLiteralNodeSchema: z.ZodObject<{
|
|
236
|
+
export declare const ComplexRectangularLiteralNodeSchema: z.ZodObject<{
|
|
237
237
|
kind: z.ZodLiteral<"complexLiteral">;
|
|
238
238
|
re: z.ZodNumber;
|
|
239
239
|
im: z.ZodNumber;
|
|
240
240
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
241
241
|
}, z.core.$strict>;
|
|
242
|
-
type ComplexRectangularLiteralNode = z.infer<typeof ComplexRectangularLiteralNodeSchema>;
|
|
243
|
-
declare const ComplexPolarLiteralNodeSchema: z.ZodObject<{
|
|
242
|
+
export type ComplexRectangularLiteralNode = z.infer<typeof ComplexRectangularLiteralNodeSchema>;
|
|
243
|
+
export declare const ComplexPolarLiteralNodeSchema: z.ZodObject<{
|
|
244
244
|
kind: z.ZodLiteral<"complexLiteral">;
|
|
245
245
|
magnitude: z.ZodNumber;
|
|
246
246
|
phase: z.ZodNumber;
|
|
247
247
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
248
248
|
}, z.core.$strict>;
|
|
249
|
-
type ComplexPolarLiteralNode = z.infer<typeof ComplexPolarLiteralNodeSchema>;
|
|
249
|
+
export type ComplexPolarLiteralNode = z.infer<typeof ComplexPolarLiteralNodeSchema>;
|
|
250
250
|
/** 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. */
|
|
251
|
-
declare const ComplexLiteralNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
251
|
+
export declare const ComplexLiteralNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
252
252
|
kind: z.ZodLiteral<"complexLiteral">;
|
|
253
253
|
re: z.ZodNumber;
|
|
254
254
|
im: z.ZodNumber;
|
|
@@ -259,14 +259,14 @@ declare const ComplexLiteralNodeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
259
259
|
phase: z.ZodNumber;
|
|
260
260
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
261
261
|
}, z.core.$strict>]>;
|
|
262
|
-
type ComplexLiteralNode = z.infer<typeof ComplexLiteralNodeSchema>;
|
|
263
|
-
declare const ReferenceNodeSchema: z.ZodObject<{
|
|
262
|
+
export type ComplexLiteralNode = z.infer<typeof ComplexLiteralNodeSchema>;
|
|
263
|
+
export declare const ReferenceNodeSchema: z.ZodObject<{
|
|
264
264
|
kind: z.ZodLiteral<"reference">;
|
|
265
265
|
key: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
266
266
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
267
267
|
}, z.core.$strip>;
|
|
268
|
-
type ReferenceNode = z.infer<typeof ReferenceNodeSchema>;
|
|
269
|
-
declare const ArithmeticNodeSchema: z.ZodObject<{
|
|
268
|
+
export type ReferenceNode = z.infer<typeof ReferenceNodeSchema>;
|
|
269
|
+
export declare const ArithmeticNodeSchema: z.ZodObject<{
|
|
270
270
|
kind: z.ZodLiteral<"arithmetic">;
|
|
271
271
|
op: z.ZodEnum<{
|
|
272
272
|
add: "add";
|
|
@@ -279,30 +279,30 @@ declare const ArithmeticNodeSchema: z.ZodObject<{
|
|
|
279
279
|
left: typeof ExpressionNodeSchema;
|
|
280
280
|
right: typeof ExpressionNodeSchema;
|
|
281
281
|
}, z.core.$strip>;
|
|
282
|
-
type ArithmeticNode = z.infer<typeof ArithmeticNodeSchema>;
|
|
283
|
-
declare const NegateNodeSchema: z.ZodObject<{
|
|
282
|
+
export type ArithmeticNode = z.infer<typeof ArithmeticNodeSchema>;
|
|
283
|
+
export declare const NegateNodeSchema: z.ZodObject<{
|
|
284
284
|
kind: z.ZodLiteral<"negate">;
|
|
285
285
|
operand: typeof ExpressionNodeSchema;
|
|
286
286
|
}, z.core.$strip>;
|
|
287
|
-
type NegateNode = z.infer<typeof NegateNodeSchema>;
|
|
288
|
-
declare const CallNodeSchema: z.ZodObject<{
|
|
287
|
+
export type NegateNode = z.infer<typeof NegateNodeSchema>;
|
|
288
|
+
export declare const CallNodeSchema: z.ZodObject<{
|
|
289
289
|
kind: z.ZodLiteral<"call">;
|
|
290
290
|
fn: z.ZodString;
|
|
291
291
|
args: z.ZodArray<typeof ExpressionNodeSchema>;
|
|
292
292
|
}, z.core.$strip>;
|
|
293
|
-
type CallNode = z.infer<typeof CallNodeSchema>;
|
|
294
|
-
declare const LookupNodeSchema: z.ZodObject<{
|
|
293
|
+
export type CallNode = z.infer<typeof CallNodeSchema>;
|
|
294
|
+
export declare const LookupNodeSchema: z.ZodObject<{
|
|
295
295
|
kind: z.ZodLiteral<"lookup">;
|
|
296
296
|
table: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
297
297
|
keys: z.ZodArray<typeof ExpressionNodeSchema>;
|
|
298
298
|
}, z.core.$strip>;
|
|
299
|
-
type LookupNode = z.infer<typeof LookupNodeSchema>;
|
|
300
|
-
declare const ConditionalCaseSchema: z.ZodObject<{
|
|
299
|
+
export type LookupNode = z.infer<typeof LookupNodeSchema>;
|
|
300
|
+
export declare const ConditionalCaseSchema: z.ZodObject<{
|
|
301
301
|
when: typeof PredicateNodeSchema;
|
|
302
302
|
then: typeof ExpressionNodeSchema;
|
|
303
303
|
}, z.core.$strip>;
|
|
304
|
-
type ConditionalCase = z.infer<typeof ConditionalCaseSchema>;
|
|
305
|
-
declare const ConditionalNodeSchema: z.ZodObject<{
|
|
304
|
+
export type ConditionalCase = z.infer<typeof ConditionalCaseSchema>;
|
|
305
|
+
export declare const ConditionalNodeSchema: z.ZodObject<{
|
|
306
306
|
kind: z.ZodLiteral<"conditional">;
|
|
307
307
|
hitPolicy: z.ZodOptional<z.ZodEnum<{
|
|
308
308
|
first: "first";
|
|
@@ -311,8 +311,8 @@ declare const ConditionalNodeSchema: z.ZodObject<{
|
|
|
311
311
|
cases: z.ZodArray<typeof ConditionalCaseSchema>;
|
|
312
312
|
fallback: typeof ExpressionNodeSchema;
|
|
313
313
|
}, z.core.$strip>;
|
|
314
|
-
type ConditionalNode = z.infer<typeof ConditionalNodeSchema>;
|
|
315
|
-
declare const FoldCombinerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
314
|
+
export type ConditionalNode = z.infer<typeof ConditionalNodeSchema>;
|
|
315
|
+
export declare const FoldCombinerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
316
316
|
mode: z.ZodLiteral<"max">;
|
|
317
317
|
item: typeof ExpressionNodeSchema;
|
|
318
318
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -323,8 +323,8 @@ declare const FoldCombinerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
323
323
|
initial: typeof ExpressionNodeSchema;
|
|
324
324
|
combine: typeof ExpressionNodeSchema;
|
|
325
325
|
}, z.core.$strip>], "mode">;
|
|
326
|
-
type FoldCombiner = z.infer<typeof FoldCombinerSchema>;
|
|
327
|
-
declare const FoldNodeSchema: z.ZodObject<{
|
|
326
|
+
export type FoldCombiner = z.infer<typeof FoldCombinerSchema>;
|
|
327
|
+
export declare const FoldNodeSchema: z.ZodObject<{
|
|
328
328
|
kind: z.ZodLiteral<"fold">;
|
|
329
329
|
collection: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
330
330
|
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
@@ -340,18 +340,18 @@ declare const FoldNodeSchema: z.ZodObject<{
|
|
|
340
340
|
combine: typeof ExpressionNodeSchema;
|
|
341
341
|
}, z.core.$strip>], "mode">;
|
|
342
342
|
}, z.core.$strip>;
|
|
343
|
-
type FoldNode = z.infer<typeof FoldNodeSchema>;
|
|
344
|
-
declare const AccumulatorNodeSchema: z.ZodObject<{
|
|
343
|
+
export type FoldNode = z.infer<typeof FoldNodeSchema>;
|
|
344
|
+
export declare const AccumulatorNodeSchema: z.ZodObject<{
|
|
345
345
|
kind: z.ZodLiteral<"accumulator">;
|
|
346
346
|
}, z.core.$strip>;
|
|
347
|
-
type AccumulatorNode = z.infer<typeof AccumulatorNodeSchema>;
|
|
348
|
-
declare const DelegateNodeSchema: z.ZodObject<{
|
|
347
|
+
export type AccumulatorNode = z.infer<typeof AccumulatorNodeSchema>;
|
|
348
|
+
export declare const DelegateNodeSchema: z.ZodObject<{
|
|
349
349
|
kind: z.ZodLiteral<"delegate">;
|
|
350
350
|
system: z.ZodString;
|
|
351
351
|
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
352
352
|
}, z.core.$strip>;
|
|
353
|
-
type DelegateNode = z.infer<typeof DelegateNodeSchema>;
|
|
354
|
-
declare const ExpressionNodeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
353
|
+
export type DelegateNode = z.infer<typeof DelegateNodeSchema>;
|
|
354
|
+
export declare const ExpressionNodeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
355
355
|
kind: z.ZodLiteral<"numberLiteral">;
|
|
356
356
|
value: z.ZodNumber;
|
|
357
357
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
@@ -444,6 +444,5 @@ declare const ExpressionNodeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion
|
|
|
444
444
|
phase: z.ZodNumber;
|
|
445
445
|
unit: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
446
446
|
}, z.core.$strict>]>]>;
|
|
447
|
-
type ExpressionNode = z.infer<typeof ExpressionNodeSchema>;
|
|
448
|
-
//#endregion
|
|
449
|
-
export { AccumulatorNode, AccumulatorNodeSchema, AllOfNode, AllOfNodeSchema, AndNode, AndNodeSchema, AnyOfNode, AnyOfNodeSchema, ArithmeticNode, ArithmeticNodeSchema, ArithmeticOperator, ArithmeticOperatorSchema, BooleanLiteralNode, BooleanLiteralNodeSchema, CallNode, CallNodeSchema, CompareNode, CompareNodeSchema, ComparisonOperator, ComparisonOperatorSchema, ComplexLiteralNode, ComplexLiteralNodeSchema, ComplexPolarLiteralNode, ComplexPolarLiteralNodeSchema, ComplexRectangularLiteralNode, ComplexRectangularLiteralNodeSchema, ConditionalCase, ConditionalCaseSchema, ConditionalNode, ConditionalNodeSchema, DelegateNode, DelegateNodeSchema, DurationLiteralNode, DurationLiteralNodeSchema, EveryNode, EveryNodeSchema, ExistsNode, ExistsNodeSchema, ExpressionNode, ExpressionNodeSchema, FoldCombiner, FoldCombinerSchema, FoldNode, FoldNodeSchema, HitPolicy, HitPolicySchema, InstantLiteralNode, InstantLiteralNodeSchema, LookupNode, LookupNodeSchema, MemberOfNode, MemberOfNodeSchema, MembershipOperator, MembershipOperatorSchema, NegateNode, NegateNodeSchema, NotNode, NotNodeSchema, NumberLiteralNode, NumberLiteralNodeSchema, OrNode, OrNodeSchema, PredicateNode, PredicateNodeSchema, ReferenceNode, ReferenceNodeSchema, SomeNode, SomeNodeSchema, TextCompareNode, TextCompareNodeSchema, TextComparisonOperator, TextComparisonOperatorSchema, TextLiteralNode, TextLiteralNodeSchema, TreeReferenceNode, TreeReferenceNodeSchema };
|
|
447
|
+
export type ExpressionNode = z.infer<typeof ExpressionNodeSchema>;
|
|
448
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trilean",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Three-valued predicate and expression evaluation trees, stored as JSON and evaluated against injected resolvers, for domain logic — business rules, eligibility checks, formulas, search filters, and more — that needs to be data instead of code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"license": "MIT",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"trilean-regex": "1.0.
|
|
52
|
+
"trilean-regex": "1.0.3",
|
|
53
53
|
"zod": "^4.5.4"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"globals": "^17.11.0",
|
|
98
98
|
"prettier": "^3.9.6",
|
|
99
99
|
"publint": "^0.3.24",
|
|
100
|
-
"tsdown": "^0.
|
|
100
|
+
"tsdown": "^0.23.0",
|
|
101
101
|
"tsx": "^4.23.13",
|
|
102
102
|
"turbo": "^2.10.12",
|
|
103
103
|
"typescript": "^6.0.3",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$defs":{"ExpressionNode":{"anyOf":[{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"booleanLiteral","type":"string"},"value":{"type":"boolean"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"hitPolicy":{"enum":["first","unique"],"type":"string"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},{"anyOf":[{"additionalProperties":false,"properties":{"im":{"type":"number"},"kind":{"const":"complexLiteral","type":"string"},"re":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","re","im"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"complexLiteral","type":"string"},"magnitude":{"type":"number"},"phase":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","magnitude","phase"],"type":"object"}]}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches","portableMatches","portableNotMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.6.
|
|
1
|
+
{"$defs":{"ExpressionNode":{"anyOf":[{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"numberLiteral","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"value":{"type":"number"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"booleanLiteral","type":"string"},"value":{"type":"boolean"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"instantLiteral","type":"string"},"value":{"type":"string"}},"required":["kind","value"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"durationLiteral","type":"string"},"unit":{"enum":["ms","s","min","h","d"],"type":"string"},"value":{"type":"number"}},"required":["kind","value","unit"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"reference","type":"string"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","key"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"arithmetic","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["add","subtract","multiply","divide","power","modulo"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"negate","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"fn":{"type":"string"},"kind":{"const":"call","type":"string"}},"required":["kind","fn","args"],"type":"object"},{"additionalProperties":false,"properties":{"keys":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"lookup","type":"string"},"table":{"$ref":"#/$defs/schema0"}},"required":["kind","table","keys"],"type":"object"},{"additionalProperties":false,"properties":{"cases":{"items":{"additionalProperties":false,"properties":{"then":{"$ref":"#/$defs/ExpressionNode"},"when":{"$ref":"#/$defs/PredicateNode"}},"required":["when","then"],"type":"object"},"type":"array"},"fallback":{"$ref":"#/$defs/ExpressionNode"},"hitPolicy":{"enum":["first","unique"],"type":"string"},"kind":{"const":"conditional","type":"string"}},"required":["kind","cases","fallback"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"combiner":{"oneOf":[{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"max","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"min","type":"string"}},"required":["mode","item"],"type":"object"},{"additionalProperties":false,"properties":{"combine":{"$ref":"#/$defs/ExpressionNode"},"initial":{"$ref":"#/$defs/ExpressionNode"},"mode":{"const":"reduce","type":"string"}},"required":["mode","initial","combine"],"type":"object"}]},"filter":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"fold","type":"string"}},"required":["kind","collection","combiner"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"accumulator","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"delegate","type":"string"},"payload":{"$ref":"#/$defs/schema0"},"system":{"type":"string"}},"required":["kind","system","payload"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},{"anyOf":[{"additionalProperties":false,"properties":{"im":{"type":"number"},"kind":{"const":"complexLiteral","type":"string"},"re":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","re","im"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"complexLiteral","type":"string"},"magnitude":{"type":"number"},"phase":{"type":"number"},"unit":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["kind","magnitude","phase"],"type":"object"}]}]},"PredicateNode":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"not","type":"string"},"operand":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"and","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"or","type":"string"},"left":{"$ref":"#/$defs/PredicateNode"},"right":{"$ref":"#/$defs/PredicateNode"}},"required":["kind","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"allOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"anyOf","type":"string"},"operands":{"items":{"$ref":"#/$defs/PredicateNode"},"type":"array"}},"required":["kind","operands"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"compare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["gt","gte","lt","lte","eq","neq"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"textCompare","type":"string"},"left":{"$ref":"#/$defs/ExpressionNode"},"op":{"enum":["equals","notEquals","matches","notMatches","portableMatches","portableNotMatches"],"type":"string"},"right":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","left","right"],"type":"object"},{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/$defs/ExpressionNode"},"type":"array"},"kind":{"const":"memberOf","type":"string"},"op":{"enum":["in","notIn"],"type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","op","operand","candidates"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"exists","type":"string"},"operand":{"$ref":"#/$defs/ExpressionNode"}},"required":["kind","operand"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"some","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"collection":{"$ref":"#/$defs/schema0"},"filter":{"$ref":"#/$defs/PredicateNode"},"item":{"$ref":"#/$defs/PredicateNode"},"kind":{"const":"every","type":"string"}},"required":["kind","collection","item"],"type":"object"},{"additionalProperties":false,"properties":{"key":{"$ref":"#/$defs/schema0"},"kind":{"const":"treeReference","type":"string"}},"required":["kind","key"],"type":"object"}]},"schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/$defs/schema0"},"type":"array"},{"additionalProperties":{"$ref":"#/$defs/schema0"},"propertyNames":{"type":"string"},"type":"object"}]}},"$id":"https://cdn.jsdelivr.net/npm/trilean@1.6.3/schemas/trilean.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"$ref":"#/$defs/PredicateNode"},{"$ref":"#/$defs/ExpressionNode"}]}
|