@dxos/echo-query 0.8.4-main.40e3dcdf1b → 0.8.4-main.422d1c7879
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/lib/neutral/index.mjs +200 -7
- package/dist/lib/neutral/index.mjs.map +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/query-lite/index.d.ts +273 -203
- package/dist/query-lite/index.d.ts.map +1 -1
- package/dist/query-lite/index.js +148 -31
- package/dist/query-lite/index.js.map +1 -1
- package/dist/types/src/parser/query-builder.d.ts +7 -0
- package/dist/types/src/parser/query-builder.d.ts.map +1 -1
- package/dist/types/src/query-lite/query-lite.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -16
- package/src/parser/query-builder.ts +254 -7
- package/src/parser/query.test.ts +116 -3
- package/src/query-lite/query-lite.ts +218 -40
- package/src/sandbox/query-sandbox.test.ts +2 -2
|
@@ -4711,7 +4711,7 @@ declare namespace FastCheck_d_exports {
|
|
|
4711
4711
|
export { Arbitrary, ArrayConstraints$1 as ArrayConstraints, AsyncCommand, AsyncPropertyHookFunction, BigIntArrayConstraints, BigIntConstraints$1 as BigIntConstraints, BigUintConstraints, CloneValue, Command, CommandsContraints, ContextValue, DateConstraints$1 as DateConstraints, DepthContext, DepthIdentifier, DepthSize, DictionaryConstraints, DomainConstraints, DoubleConstraints, EmailAddressConstraints, ExecutionStatus, ExecutionTree, FalsyContraints, FalsyValue, Float32ArrayConstraints, Float64ArrayConstraints, FloatConstraints, GeneratorValue, GlobalAsyncPropertyHookFunction, GlobalParameters, GlobalPropertyHookFunction, IAsyncProperty, IAsyncPropertyWithHooks, ICommand, IProperty, IPropertyWithHooks, IRawProperty, IntArrayConstraints, IntegerConstraints, JsonSharedConstraints, JsonValue, LetrecLooselyTypedBuilder, LetrecLooselyTypedTie, LetrecTypedBuilder, LetrecTypedTie, LetrecValue, LoremConstraints, MaybeWeightedArbitrary, Memo, MixedCaseConstraints, ModelRunAsyncSetup, ModelRunSetup, NatConstraints, ObjectConstraints, OneOfConstraints, OneOfValue, OptionConstraints, Parameters$1 as Parameters, PreconditionFailure, PropertyFailure, PropertyHookFunction, Random, RandomType, RecordConstraints, RecordValue, RunDetails, RunDetailsCommon, RunDetailsFailureInterrupted, RunDetailsFailureProperty, RunDetailsFailureTooManySkips, RunDetailsSuccess, Scheduler, SchedulerAct, SchedulerConstraints, SchedulerReportItem, SchedulerSequenceItem, ShuffledSubarrayConstraints, Size, SizeForArbitrary, SparseArrayConstraints, Stream$1 as Stream, StringConstraints$1 as StringConstraints, StringMatchingConstraints, StringSharedConstraints, SubarrayConstraints, UnicodeJsonSharedConstraints, UniqueArrayConstraints, UniqueArrayConstraintsCustomCompare, UniqueArrayConstraintsCustomCompareSelect, UniqueArrayConstraintsRecommended, UniqueArraySharedConstraints, UuidConstraints, Value$1 as Value, VerbosityLevel, WebAuthorityConstraints, WebFragmentsConstraints, WebPathConstraints, WebQueryParametersConstraints, WebSegmentConstraints, WebUrlConstraints, WeightedArbitrary, WithAsyncToStringMethod, WithCloneMethod, WithToStringMethod, __commitHash, __type, __version, anything, array, ascii, asciiString, assert, asyncDefaultReportMessage, asyncModelRun, asyncProperty, asyncStringify, asyncToStringMethod, base64, base64String, bigInt, bigInt64Array, bigIntN, bigUint, bigUint64Array, bigUintN, boolean, char, char16bits, check, clone, cloneIfNeeded, cloneMethod, commands, compareBooleanFunc, compareFunc, configureGlobal, constant, constantFrom, context, createDepthIdentifier, date, defaultReportMessage, dictionary, domain, double, emailAddress, falsy, float, float32Array, float64Array, fullUnicode, fullUnicodeString, func, gen, getDepthContextFor, hasAsyncToStringMethod, hasCloneMethod, hasToStringMethod, hash, hexa, hexaString, infiniteStream, int16Array, int32Array, int8Array, integer, ipV4, ipV4Extended, ipV6, json, jsonValue, letrec, limitShrink, lorem, mapToConstant, maxSafeInteger, maxSafeNat, memo, mixedCase, modelRun, nat, noBias, noShrink, object, oneof, option, pre, property$1 as property, readConfigureGlobal, record, resetConfigureGlobal, sample, scheduledModelRun, scheduler, schedulerFor, shuffledSubarray, sparseArray, statistics, stream, string, string16bits, stringMatching, stringOf, stringify, subarray, toStringMethod, tuple, uint16Array, uint32Array, uint8Array, uint8ClampedArray, ulid, unicode, unicodeJson, unicodeJsonValue, unicodeString, uniqueArray, uuid, uuidV, webAuthority, webFragments, webPath, webQueryParameters, webSegment, webUrl };
|
|
4712
4712
|
}
|
|
4713
4713
|
//#endregion
|
|
4714
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4714
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Arbitrary.d.ts
|
|
4715
4715
|
/**
|
|
4716
4716
|
* @category model
|
|
4717
4717
|
* @since 3.10.0
|
|
@@ -4756,7 +4756,7 @@ interface DateConstraints {
|
|
|
4756
4756
|
readonly constraints: DateConstraints$1;
|
|
4757
4757
|
}
|
|
4758
4758
|
//#endregion
|
|
4759
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4759
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Types.d.ts
|
|
4760
4760
|
/**
|
|
4761
4761
|
* A utility type that transforms a union type `T` into an intersection type.
|
|
4762
4762
|
*
|
|
@@ -4851,7 +4851,7 @@ declare namespace Contravariant {
|
|
|
4851
4851
|
*/
|
|
4852
4852
|
type NoExcessProperties<T$1, U$1> = T$1 & { readonly [K in Exclude<keyof U$1, keyof T$1>]: never };
|
|
4853
4853
|
//#endregion
|
|
4854
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4854
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Equivalence.d.ts
|
|
4855
4855
|
/**
|
|
4856
4856
|
* @category type class
|
|
4857
4857
|
* @since 2.0.0
|
|
@@ -4860,7 +4860,7 @@ interface Equivalence<in A$1> {
|
|
|
4860
4860
|
(self: A$1, that: A$1): boolean;
|
|
4861
4861
|
}
|
|
4862
4862
|
//#endregion
|
|
4863
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4863
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Hash.d.ts
|
|
4864
4864
|
/**
|
|
4865
4865
|
* @since 2.0.0
|
|
4866
4866
|
* @category models
|
|
@@ -4869,7 +4869,7 @@ interface Hash {
|
|
|
4869
4869
|
[symbol](): number;
|
|
4870
4870
|
}
|
|
4871
4871
|
//#endregion
|
|
4872
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4872
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Equal.d.ts
|
|
4873
4873
|
/**
|
|
4874
4874
|
* @since 2.0.0
|
|
4875
4875
|
* @category models
|
|
@@ -4878,7 +4878,7 @@ interface Equal extends Hash {
|
|
|
4878
4878
|
[symbol](that: Equal): boolean;
|
|
4879
4879
|
}
|
|
4880
4880
|
//#endregion
|
|
4881
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4881
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Pipeable.d.ts
|
|
4882
4882
|
/**
|
|
4883
4883
|
* @since 2.0.0
|
|
4884
4884
|
* @category Models
|
|
@@ -4908,7 +4908,7 @@ interface Pipeable {
|
|
|
4908
4908
|
pipe<A$1, B$1 = never, C = never, D = never, E$1 = never, F = never, G = never, H$1 = never, I$1 = never, J = never, K$1 = never, L$1 = never, M = never, N = never, O = never, P$1 = never, Q = never, R$1 = never, S$1 = never, T$1 = never, U$1 = never>(this: A$1, ab: (_: A$1) => B$1, bc: (_: B$1) => C, cd: (_: C) => D, de: (_: D) => E$1, ef: (_: E$1) => F, fg: (_: F) => G, gh: (_: G) => H$1, hi: (_: H$1) => I$1, ij: (_: I$1) => J, jk: (_: J) => K$1, kl: (_: K$1) => L$1, lm: (_: L$1) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P$1, pq: (_: P$1) => Q, qr: (_: Q) => R$1, rs: (_: R$1) => S$1, st: (_: S$1) => T$1, tu: (_: T$1) => U$1): U$1;
|
|
4909
4909
|
}
|
|
4910
4910
|
//#endregion
|
|
4911
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4911
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Unify.d.ts
|
|
4912
4912
|
/**
|
|
4913
4913
|
* @since 2.0.0
|
|
4914
4914
|
*/
|
|
@@ -4937,7 +4937,7 @@ declare const ignoreSymbol: unique symbol;
|
|
|
4937
4937
|
*/
|
|
4938
4938
|
type ignoreSymbol = typeof ignoreSymbol;
|
|
4939
4939
|
//#endregion
|
|
4940
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4940
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Utils.d.ts
|
|
4941
4941
|
/**
|
|
4942
4942
|
* @since 3.0.6
|
|
4943
4943
|
*/
|
|
@@ -4954,7 +4954,7 @@ declare class YieldWrap<T$1> {
|
|
|
4954
4954
|
[YieldWrapTypeId](): T$1;
|
|
4955
4955
|
}
|
|
4956
4956
|
//#endregion
|
|
4957
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
4957
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Option.d.ts
|
|
4958
4958
|
/**
|
|
4959
4959
|
* The `Option` data type represents optional values. An `Option<A>` can either
|
|
4960
4960
|
* be `Some<A>`, containing a value of type `A`, or `None`, representing the
|
|
@@ -5055,7 +5055,7 @@ declare namespace Option {
|
|
|
5055
5055
|
*/
|
|
5056
5056
|
interface OptionUnifyIgnore {}
|
|
5057
5057
|
//#endregion
|
|
5058
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5058
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Context.d.ts
|
|
5059
5059
|
/**
|
|
5060
5060
|
* @since 2.0.0
|
|
5061
5061
|
* @category symbol
|
|
@@ -5180,7 +5180,7 @@ interface Context$1<in Services> extends Equal, Pipeable, Inspectable {
|
|
|
5180
5180
|
*/
|
|
5181
5181
|
declare const Tag$2: <const Id$1 extends string>(id: Id$1) => <Self, Shape>() => TagClass<Self, Id$1, Shape>;
|
|
5182
5182
|
//#endregion
|
|
5183
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5183
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Sink.d.ts
|
|
5184
5184
|
/**
|
|
5185
5185
|
* @since 2.0.0
|
|
5186
5186
|
* @category symbols
|
|
@@ -5236,7 +5236,7 @@ declare namespace Sink {
|
|
|
5236
5236
|
}
|
|
5237
5237
|
}
|
|
5238
5238
|
//#endregion
|
|
5239
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5239
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/STM.d.ts
|
|
5240
5240
|
/**
|
|
5241
5241
|
* @since 2.0.0
|
|
5242
5242
|
* @category symbols
|
|
@@ -5355,7 +5355,7 @@ declare namespace STM {
|
|
|
5355
5355
|
}
|
|
5356
5356
|
}
|
|
5357
5357
|
//#endregion
|
|
5358
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5358
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Stream.d.ts
|
|
5359
5359
|
/**
|
|
5360
5360
|
* @since 2.0.0
|
|
5361
5361
|
* @category symbols
|
|
@@ -5468,7 +5468,7 @@ declare namespace Stream {
|
|
|
5468
5468
|
type DynamicTupleOf<T$1, N extends number, R$1 extends Array<unknown>> = R$1["length"] extends N ? R$1 : DynamicTupleOf<T$1, N, [T$1, ...R$1]>;
|
|
5469
5469
|
}
|
|
5470
5470
|
//#endregion
|
|
5471
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5471
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Channel.d.ts
|
|
5472
5472
|
/**
|
|
5473
5473
|
* @since 2.0.0
|
|
5474
5474
|
* @category symbols
|
|
@@ -5562,7 +5562,7 @@ declare namespace Channel {
|
|
|
5562
5562
|
}
|
|
5563
5563
|
}
|
|
5564
5564
|
//#endregion
|
|
5565
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5565
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Cause.d.ts
|
|
5566
5566
|
/**
|
|
5567
5567
|
* A unique symbol identifying the `NoSuchElementException` type.
|
|
5568
5568
|
*
|
|
@@ -5702,7 +5702,7 @@ declare const NoSuchElementException: new (message?: string | undefined) => NoSu
|
|
|
5702
5702
|
*/
|
|
5703
5703
|
declare const UnknownException: new (error: unknown, message?: string | undefined) => UnknownException;
|
|
5704
5704
|
//#endregion
|
|
5705
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5705
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Effect.d.ts
|
|
5706
5706
|
/**
|
|
5707
5707
|
* @since 2.0.0
|
|
5708
5708
|
* @category Symbols
|
|
@@ -5932,7 +5932,7 @@ declare const Tag$1: <const Id$1 extends string>(id: Id$1) => <Self, Type$5 exte
|
|
|
5932
5932
|
use: <X>(body: (_: Type$5) => X) => [X] extends [Effect<infer A, infer E, infer R>] ? Effect<A, E, R | Self> : [X] extends [PromiseLike<infer A>] ? Effect<A, UnknownException, Self> : Effect<X, never, Self>;
|
|
5933
5933
|
};
|
|
5934
5934
|
//#endregion
|
|
5935
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5935
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Inspectable.d.ts
|
|
5936
5936
|
/**
|
|
5937
5937
|
* @since 2.0.0
|
|
5938
5938
|
* @category models
|
|
@@ -5943,7 +5943,7 @@ interface Inspectable {
|
|
|
5943
5943
|
[NodeInspectSymbol](): unknown;
|
|
5944
5944
|
}
|
|
5945
5945
|
//#endregion
|
|
5946
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
5946
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Either.d.ts
|
|
5947
5947
|
/**
|
|
5948
5948
|
* @category models
|
|
5949
5949
|
* @since 2.0.0
|
|
@@ -6021,7 +6021,7 @@ declare namespace Either {
|
|
|
6021
6021
|
type Right<T$1 extends Either<any, any>> = [T$1] extends [Either<infer _A, infer _E>] ? _A : never;
|
|
6022
6022
|
}
|
|
6023
6023
|
//#endregion
|
|
6024
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
6024
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Array.d.ts
|
|
6025
6025
|
/**
|
|
6026
6026
|
* @category models
|
|
6027
6027
|
* @since 2.0.0
|
|
@@ -6033,7 +6033,7 @@ type NonEmptyReadonlyArray<A$1> = readonly [A$1, ...Array<A$1>];
|
|
|
6033
6033
|
*/
|
|
6034
6034
|
type NonEmptyArray<A$1> = [A$1, ...Array<A$1>];
|
|
6035
6035
|
//#endregion
|
|
6036
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
6036
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/SchemaAST.d.ts
|
|
6037
6037
|
/**
|
|
6038
6038
|
* @category model
|
|
6039
6039
|
* @since 3.10.0
|
|
@@ -6845,7 +6845,7 @@ declare class TypeLiteralTransformation {
|
|
|
6845
6845
|
constructor(propertySignatureTransformations: ReadonlyArray<PropertySignatureTransformation$1>);
|
|
6846
6846
|
}
|
|
6847
6847
|
//#endregion
|
|
6848
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
6848
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/ParseResult.d.ts
|
|
6849
6849
|
/**
|
|
6850
6850
|
* `ParseIssue` is a type that represents the different types of errors that can occur when decoding/encoding a value.
|
|
6851
6851
|
*
|
|
@@ -7017,7 +7017,7 @@ declare class Forbidden {
|
|
|
7017
7017
|
constructor(ast: AST, actual: unknown, message?: string | undefined);
|
|
7018
7018
|
}
|
|
7019
7019
|
//#endregion
|
|
7020
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
7020
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Pretty.d.ts
|
|
7021
7021
|
/**
|
|
7022
7022
|
* @category model
|
|
7023
7023
|
* @since 3.10.0
|
|
@@ -7031,7 +7031,7 @@ interface Pretty<To> {
|
|
|
7031
7031
|
*/
|
|
7032
7032
|
type PrettyAnnotation<A$1, TypeParameters extends ReadonlyArray<any> = readonly []> = (...pretties: { readonly [K in keyof TypeParameters]: Pretty<TypeParameters[K]> }) => Pretty<A$1>;
|
|
7033
7033
|
//#endregion
|
|
7034
|
-
//#region ../../../../node_modules/.pnpm/effect@3.
|
|
7034
|
+
//#region ../../../../node_modules/.pnpm/effect@3.20.0/node_modules/effect/dist/dts/Schema.d.ts
|
|
7035
7035
|
/**
|
|
7036
7036
|
* @since 3.10.0
|
|
7037
7037
|
*/
|
|
@@ -8034,7 +8034,7 @@ declare const FilterObject_: Struct<{
|
|
|
8034
8034
|
* Filter by property.
|
|
8035
8035
|
* Must not include object ID.
|
|
8036
8036
|
*/
|
|
8037
|
-
props: Record$<SchemaClass<string, string, never>, suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8037
|
+
props: Record$<SchemaClass<string, string, never>, suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8038
8038
|
/**
|
|
8039
8039
|
* Objects that have any of the given foreign keys.
|
|
8040
8040
|
*/
|
|
@@ -8099,6 +8099,18 @@ declare const FilterRange_: Struct<{
|
|
|
8099
8099
|
}>;
|
|
8100
8100
|
interface FilterRange extends Schema.Type<typeof FilterRange_> {}
|
|
8101
8101
|
declare const FilterRange: Schema<FilterRange>;
|
|
8102
|
+
/**
|
|
8103
|
+
* Filter by system timestamp (createdAt / updatedAt).
|
|
8104
|
+
* Timestamps are unix milliseconds stored in the object meta index.
|
|
8105
|
+
*/
|
|
8106
|
+
declare const FilterTimestamp_: Struct<{
|
|
8107
|
+
type: Literal<["timestamp"]>;
|
|
8108
|
+
field: Literal<["createdAt", "updatedAt"]>;
|
|
8109
|
+
operator: Literal<["gt", "gte", "lt", "lte"]>;
|
|
8110
|
+
value: typeof Number$;
|
|
8111
|
+
}>;
|
|
8112
|
+
interface FilterTimestamp extends Schema.Type<typeof FilterTimestamp_> {}
|
|
8113
|
+
declare const FilterTimestamp: Schema<FilterTimestamp>;
|
|
8102
8114
|
/**
|
|
8103
8115
|
* Text search.
|
|
8104
8116
|
*/
|
|
@@ -8114,7 +8126,7 @@ declare const FilterTextSearch: Schema<FilterTextSearch>;
|
|
|
8114
8126
|
*/
|
|
8115
8127
|
declare const FilterNot_: Struct<{
|
|
8116
8128
|
type: Literal<["not"]>;
|
|
8117
|
-
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>;
|
|
8129
|
+
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>;
|
|
8118
8130
|
}>;
|
|
8119
8131
|
interface FilterNot extends Schema.Type<typeof FilterNot_> {}
|
|
8120
8132
|
declare const FilterNot: Schema<FilterNot>;
|
|
@@ -8123,7 +8135,7 @@ declare const FilterNot: Schema<FilterNot>;
|
|
|
8123
8135
|
*/
|
|
8124
8136
|
declare const FilterAnd_: Struct<{
|
|
8125
8137
|
type: Literal<["and"]>;
|
|
8126
|
-
filters: Array$<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8138
|
+
filters: Array$<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8127
8139
|
}>;
|
|
8128
8140
|
interface FilterAnd extends Schema.Type<typeof FilterAnd_> {}
|
|
8129
8141
|
declare const FilterAnd: Schema<FilterAnd>;
|
|
@@ -8132,21 +8144,34 @@ declare const FilterAnd: Schema<FilterAnd>;
|
|
|
8132
8144
|
*/
|
|
8133
8145
|
declare const FilterOr_: Struct<{
|
|
8134
8146
|
type: Literal<["or"]>;
|
|
8135
|
-
filters: Array$<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8147
|
+
filters: Array$<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8136
8148
|
}>;
|
|
8137
8149
|
interface FilterOr extends Schema.Type<typeof FilterOr_> {}
|
|
8138
8150
|
declare const FilterOr: Schema<FilterOr>;
|
|
8151
|
+
/**
|
|
8152
|
+
* Filter objects that are children of the specified parents.
|
|
8153
|
+
* With transitive=true (default), matches grandchildren and beyond.
|
|
8154
|
+
*/
|
|
8155
|
+
declare const FilterChildOf_: Struct<{
|
|
8156
|
+
type: Literal<["child-of"]>;
|
|
8157
|
+
/** Parent DXNs to match children of. */
|
|
8158
|
+
parents: Array$<refine<string, typeof NonEmptyString>>;
|
|
8159
|
+
/** Whether to match transitively (grandchildren, etc.). Defaults to true. */
|
|
8160
|
+
transitive: typeof Boolean$;
|
|
8161
|
+
}>;
|
|
8162
|
+
interface FilterChildOf extends Schema.Type<typeof FilterChildOf_> {}
|
|
8163
|
+
declare const FilterChildOf: Schema<FilterChildOf>;
|
|
8139
8164
|
/**
|
|
8140
8165
|
* Union of filters.
|
|
8141
8166
|
*/
|
|
8142
|
-
declare const Filter$1: Union<[Schema<FilterObject, FilterObject, never>, Schema<FilterCompare, FilterCompare, never>, Schema<FilterIn, FilterIn, never>, Schema<FilterContains, FilterContains, never>, Schema<FilterTag, FilterTag, never>, Schema<FilterRange, FilterRange, never>, Schema<FilterTextSearch, FilterTextSearch, never>, Schema<FilterNot, FilterNot, never>, Schema<FilterAnd, FilterAnd, never>, Schema<FilterOr, FilterOr, never>]>;
|
|
8167
|
+
declare const Filter$1: Union<[Schema<FilterObject, FilterObject, never>, Schema<FilterCompare, FilterCompare, never>, Schema<FilterIn, FilterIn, never>, Schema<FilterContains, FilterContains, never>, Schema<FilterTag, FilterTag, never>, Schema<FilterRange, FilterRange, never>, Schema<FilterTimestamp, FilterTimestamp, never>, Schema<FilterTextSearch, FilterTextSearch, never>, Schema<FilterChildOf, FilterChildOf, never>, Schema<FilterNot, FilterNot, never>, Schema<FilterAnd, FilterAnd, never>, Schema<FilterOr, FilterOr, never>]>;
|
|
8143
8168
|
type Filter$1 = Schema.Type<typeof Filter$1>;
|
|
8144
8169
|
/**
|
|
8145
8170
|
* Query objects by type, id, and/or predicates.
|
|
8146
8171
|
*/
|
|
8147
8172
|
declare const QuerySelectClause_: Struct<{
|
|
8148
8173
|
type: Literal<["select"]>;
|
|
8149
|
-
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>;
|
|
8174
|
+
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>;
|
|
8150
8175
|
}>;
|
|
8151
8176
|
interface QuerySelectClause extends Schema.Type<typeof QuerySelectClause_> {}
|
|
8152
8177
|
declare const QuerySelectClause: Schema<QuerySelectClause>;
|
|
@@ -8156,7 +8181,7 @@ declare const QuerySelectClause: Schema<QuerySelectClause>;
|
|
|
8156
8181
|
declare const QueryFilterClause_: Struct<{
|
|
8157
8182
|
type: Literal<["filter"]>;
|
|
8158
8183
|
selection: suspend<QuerySelectClause | QueryFilterClause | QueryReferenceTraversalClause | QueryIncomingReferencesClause | QueryRelationClause | QueryRelationTraversalClause | QueryHierarchyTraversalClause | QueryUnionClause | QuerySetDifferenceClause | QueryOrderClause | QueryOptionsClause | QueryLimitClause | QueryFromClause, QuerySelectClause | QueryFilterClause | QueryReferenceTraversalClause | QueryIncomingReferencesClause | QueryRelationClause | QueryRelationTraversalClause | QueryHierarchyTraversalClause | QueryUnionClause | QuerySetDifferenceClause | QueryOrderClause | QueryOptionsClause | QueryLimitClause | QueryFromClause, never>;
|
|
8159
|
-
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>;
|
|
8184
|
+
filter: suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>;
|
|
8160
8185
|
}>;
|
|
8161
8186
|
interface QueryFilterClause extends Schema.Type<typeof QueryFilterClause_> {}
|
|
8162
8187
|
declare const QueryFilterClause: Schema<QueryFilterClause>;
|
|
@@ -8197,7 +8222,7 @@ declare const QueryRelationClause_: Struct<{
|
|
|
8197
8222
|
* both: anchor is either the source or target of the relation.
|
|
8198
8223
|
*/
|
|
8199
8224
|
direction: Literal<["outgoing", "incoming", "both"]>;
|
|
8200
|
-
filter: optional<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTextSearch | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8225
|
+
filter: optional<suspend<FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, FilterObject | FilterCompare | FilterIn | FilterContains | FilterTag | FilterRange | FilterTimestamp | FilterTextSearch | FilterChildOf | FilterNot | FilterAnd | FilterOr, never>>;
|
|
8201
8226
|
}>;
|
|
8202
8227
|
interface QueryRelationClause extends Schema.Type<typeof QueryRelationClause_> {}
|
|
8203
8228
|
declare const QueryRelationClause: Schema<QueryRelationClause>;
|
|
@@ -8372,7 +8397,7 @@ type JsonPath = string & {
|
|
|
8372
8397
|
*/
|
|
8373
8398
|
declare const JsonPath: Schema<JsonPath>;
|
|
8374
8399
|
//#endregion
|
|
8375
|
-
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.
|
|
8400
|
+
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.20_0d92fe5e7b61f71046b89ef5357c0767/node_modules/@effect-atom/atom/dist/dts/AtomHttpApi.d.ts
|
|
8376
8401
|
declare global {
|
|
8377
8402
|
interface ErrorConstructor {
|
|
8378
8403
|
stackTraceLimit: number;
|
|
@@ -8383,7 +8408,7 @@ declare global {
|
|
|
8383
8408
|
* @category Constructors
|
|
8384
8409
|
*/
|
|
8385
8410
|
//#endregion
|
|
8386
|
-
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.
|
|
8411
|
+
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.20_0d92fe5e7b61f71046b89ef5357c0767/node_modules/@effect-atom/atom/dist/dts/AtomRpc.d.ts
|
|
8387
8412
|
declare global {
|
|
8388
8413
|
interface ErrorConstructor {
|
|
8389
8414
|
stackTraceLimit: number;
|
|
@@ -8409,121 +8434,6 @@ interface EchoTypeSchema<Self extends Schema.Any, ExtraFields = {}, K$1 extends
|
|
|
8409
8434
|
readonly fields: Fields;
|
|
8410
8435
|
instanceOf(value: unknown): boolean;
|
|
8411
8436
|
}
|
|
8412
|
-
declare namespace Filter_d_exports {
|
|
8413
|
-
export { Any$3 as Any, Filter, Props, TextSearchOptions, Type$2 as Type, and, between, contains, eq, everything, foreignKeys, fromAst$1 as fromAst, gt, gte, id, in$ as in, is$1 as is, lt, lte, neq, not, nothing, or, props, tag, text, type$2 as type, typeDXN, typename$1 as typename };
|
|
8414
|
-
}
|
|
8415
|
-
interface Filter<T$1> {
|
|
8416
|
-
'~Filter': {
|
|
8417
|
-
value: Contravariant<T$1>;
|
|
8418
|
-
};
|
|
8419
|
-
ast: Filter$1;
|
|
8420
|
-
}
|
|
8421
|
-
type Props<T$1> = { [K in keyof T$1 & string]?: Filter<T$1[K]> | T$1[K] };
|
|
8422
|
-
type Any$3 = Filter<any>;
|
|
8423
|
-
type Type$2<F extends Any$3> = F extends Filter<infer T> ? T : never;
|
|
8424
|
-
declare class FilterClass implements Any$3 {
|
|
8425
|
-
readonly ast: Filter$1;
|
|
8426
|
-
private static 'variance';
|
|
8427
|
-
constructor(ast: Filter$1);
|
|
8428
|
-
'~Filter': {
|
|
8429
|
-
value: Contravariant<any>;
|
|
8430
|
-
};
|
|
8431
|
-
}
|
|
8432
|
-
declare const is$1: (value: unknown) => value is Any$3;
|
|
8433
|
-
/** Construct a filter from an ast. */
|
|
8434
|
-
declare const fromAst$1: (ast: Filter$1) => Any$3;
|
|
8435
|
-
/**
|
|
8436
|
-
* Filter that matches all objects.
|
|
8437
|
-
*/
|
|
8438
|
-
declare const everything: () => FilterClass;
|
|
8439
|
-
/**
|
|
8440
|
-
* Filter that matches no objects.
|
|
8441
|
-
*/
|
|
8442
|
-
declare const nothing: () => FilterClass;
|
|
8443
|
-
declare const id: (...ids: ObjectId[]) => Any$3;
|
|
8444
|
-
/**
|
|
8445
|
-
* Filter by type.
|
|
8446
|
-
*/
|
|
8447
|
-
declare const type$2: <S$1 extends Schema.All>(schema: S$1 | string, props?: Props<Schema.Type<S$1>>) => Filter<Schema.Type<S$1>>;
|
|
8448
|
-
/**
|
|
8449
|
-
* Filter by non-qualified typename.
|
|
8450
|
-
*/
|
|
8451
|
-
declare const typename$1: (typename: string) => Any$3;
|
|
8452
|
-
/**
|
|
8453
|
-
* Filter by fully qualified type DXN.
|
|
8454
|
-
*/
|
|
8455
|
-
declare const typeDXN: (dxn: DXN) => Any$3;
|
|
8456
|
-
/**
|
|
8457
|
-
* Filter by tag.
|
|
8458
|
-
*/
|
|
8459
|
-
declare const tag: (tag: string) => Any$3;
|
|
8460
|
-
/**
|
|
8461
|
-
* Filter by properties.
|
|
8462
|
-
*/
|
|
8463
|
-
declare const props: <T$1>(props: Props<T$1>) => Filter<T$1>;
|
|
8464
|
-
type TextSearchOptions = {
|
|
8465
|
-
type?: 'full-text' | 'vector';
|
|
8466
|
-
};
|
|
8467
|
-
/**
|
|
8468
|
-
* Full-text or vector search.
|
|
8469
|
-
*/
|
|
8470
|
-
declare const text: (text: string, options?: TextSearchOptions) => Any$3;
|
|
8471
|
-
/**
|
|
8472
|
-
* Filter by foreign keys.
|
|
8473
|
-
*/
|
|
8474
|
-
declare const foreignKeys: <S$1 extends Schema.All>(schema: S$1 | string, keys: ForeignKey[]) => Filter<Schema.Type<S$1>>;
|
|
8475
|
-
/**
|
|
8476
|
-
* Predicate for property to be equal to the provided value.
|
|
8477
|
-
*/
|
|
8478
|
-
declare const eq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8479
|
-
/**
|
|
8480
|
-
* Predicate for property to be not equal to the provided value.
|
|
8481
|
-
*/
|
|
8482
|
-
declare const neq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8483
|
-
/**
|
|
8484
|
-
* Predicate for property to be greater than the provided value.
|
|
8485
|
-
*/
|
|
8486
|
-
declare const gt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8487
|
-
/**
|
|
8488
|
-
* Predicate for property to be greater than or equal to the provided value.
|
|
8489
|
-
*/
|
|
8490
|
-
declare const gte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8491
|
-
/**
|
|
8492
|
-
* Predicate for property to be less than the provided value.
|
|
8493
|
-
*/
|
|
8494
|
-
declare const lt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8495
|
-
/**
|
|
8496
|
-
* Predicate for property to be less than or equal to the provided value.
|
|
8497
|
-
*/
|
|
8498
|
-
declare const lte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8499
|
-
/**
|
|
8500
|
-
* Predicate for property to be in the provided array.
|
|
8501
|
-
* @param values - Values to check against.
|
|
8502
|
-
*/
|
|
8503
|
-
declare const in$: <T$1>(...values: T$1[]) => Filter<T$1 | undefined>;
|
|
8504
|
-
/**
|
|
8505
|
-
* Predicate for an array property to contain the provided value.
|
|
8506
|
-
* @param value - Value to check against.
|
|
8507
|
-
*/
|
|
8508
|
-
declare const contains: <T$1>(value: T$1) => Filter<readonly T$1[] | undefined>;
|
|
8509
|
-
/**
|
|
8510
|
-
* Predicate for property to be in the provided range.
|
|
8511
|
-
* @param from - Start of the range (inclusive).
|
|
8512
|
-
* @param to - End of the range (exclusive).
|
|
8513
|
-
*/
|
|
8514
|
-
declare const between: <T$1>(from: T$1, to: T$1) => Filter<unknown>;
|
|
8515
|
-
/**
|
|
8516
|
-
* Negate the filter.
|
|
8517
|
-
*/
|
|
8518
|
-
declare const not: <F extends Any$3>(filter: F) => Filter<Type$2<F>>;
|
|
8519
|
-
/**
|
|
8520
|
-
* Combine filters with a logical AND.
|
|
8521
|
-
*/
|
|
8522
|
-
declare const and: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
8523
|
-
/**
|
|
8524
|
-
* Combine filters with a logical OR.
|
|
8525
|
-
*/
|
|
8526
|
-
declare const or: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
8527
8437
|
//#endregion
|
|
8528
8438
|
//#region ../echo/dist/types/src/internal/JsonSchema/json-schema-type.d.ts
|
|
8529
8439
|
/**
|
|
@@ -8806,6 +8716,15 @@ interface Ref<T$1> extends Pipeable {
|
|
|
8806
8716
|
* @returns Promise that will resolves with the target object or undefined if the object is not loaded locally.
|
|
8807
8717
|
*/
|
|
8808
8718
|
tryLoad(): Promise<T$1 | undefined>;
|
|
8719
|
+
/**
|
|
8720
|
+
* Subscribe to the ref's resolution event.
|
|
8721
|
+
* The callback fires when the target object becomes available in the working set
|
|
8722
|
+
* (e.g. when its document is loaded after sibling-client mutation).
|
|
8723
|
+
* Note: the resolver only schedules a notification when the target is requested
|
|
8724
|
+
* via {@link target} while it is not yet loaded.
|
|
8725
|
+
* @returns Function that unsubscribes the callback.
|
|
8726
|
+
*/
|
|
8727
|
+
onResolved(callback: () => void): () => void;
|
|
8809
8728
|
/**
|
|
8810
8729
|
* Do not inline the target object in the reference.
|
|
8811
8730
|
* Makes .target unavailable unless the reference is connected to a database context.
|
|
@@ -8855,6 +8774,63 @@ interface RefResolver {
|
|
|
8855
8774
|
resolveSchema(dxn: DXN): Promise<Schema.AnyNoContext | undefined>;
|
|
8856
8775
|
}
|
|
8857
8776
|
//#endregion
|
|
8777
|
+
//#region ../echo/dist/types/src/Ref.d.ts
|
|
8778
|
+
/**
|
|
8779
|
+
* Instance type for a reference.
|
|
8780
|
+
*
|
|
8781
|
+
* Reference can point to any object or relation.
|
|
8782
|
+
* References are lazy loaded.
|
|
8783
|
+
*
|
|
8784
|
+
* `ref.dxn` is the DXN of the referenced object.
|
|
8785
|
+
*
|
|
8786
|
+
* @example
|
|
8787
|
+
* ```ts
|
|
8788
|
+
* const taskRef: Ref<Task> = Ref.make(task);
|
|
8789
|
+
*
|
|
8790
|
+
* await taskRef.load(); // Returns Promise<Task>
|
|
8791
|
+
* yield* Database.load(taskRef); // Effectful version.
|
|
8792
|
+
*
|
|
8793
|
+
* database.makeRef(dxn); // Create a ref from a DXN.
|
|
8794
|
+
* ```
|
|
8795
|
+
*/
|
|
8796
|
+
type Ref$1<T$1> = Ref<T$1>;
|
|
8797
|
+
type Unknown$2 = Ref<Unknown$1>;
|
|
8798
|
+
/**
|
|
8799
|
+
* Factory function to create a Ref schema for the given target schema.
|
|
8800
|
+
* Use this in schema definitions to declare reference fields.
|
|
8801
|
+
*
|
|
8802
|
+
* @example
|
|
8803
|
+
* ```ts
|
|
8804
|
+
* const Task = Schema.Struct({
|
|
8805
|
+
* assignee: Ref.Ref(Person), // Creates a Ref schema
|
|
8806
|
+
* }).pipe(Type.object({ typename: 'Task', version: '0.1.0' }));
|
|
8807
|
+
* ```
|
|
8808
|
+
*/
|
|
8809
|
+
declare const Ref$1: <S$1 extends Schema.Any>(schema: S$1) => RefSchema<Schema.Type<S$1>>;
|
|
8810
|
+
/**
|
|
8811
|
+
* TypeScript type for a Ref schema.
|
|
8812
|
+
* This is the type of the SCHEMA itself, not the runtime ref instance.
|
|
8813
|
+
* For the instance type, use `Ref.Ref<T>` from the Ref module.
|
|
8814
|
+
*
|
|
8815
|
+
* @example
|
|
8816
|
+
* ```ts
|
|
8817
|
+
* // Schema type annotation (rarely needed, usually inferred):
|
|
8818
|
+
* const refSchema: Ref.RefSchema<typeof Task> = Ref.Ref(Task);
|
|
8819
|
+
*
|
|
8820
|
+
* // Instance type annotation (use Ref.Ref instead):
|
|
8821
|
+
* const refInstance: Ref.Ref<Task> = Ref.make(task);
|
|
8822
|
+
* ```
|
|
8823
|
+
*/
|
|
8824
|
+
interface RefSchema<T$1 extends Unknown> extends RefSchema$1<T$1> {}
|
|
8825
|
+
/**
|
|
8826
|
+
* Extract reference target.
|
|
8827
|
+
*/
|
|
8828
|
+
type Target<R$1 extends Unknown$2> = R$1 extends Ref<infer T> ? T : never;
|
|
8829
|
+
/**
|
|
8830
|
+
* Reference resolver.
|
|
8831
|
+
*/
|
|
8832
|
+
type Resolver = RefResolver;
|
|
8833
|
+
//#endregion
|
|
8858
8834
|
//#region ../echo/dist/types/src/internal/Obj/typed-object.d.ts
|
|
8859
8835
|
/**
|
|
8860
8836
|
* Definition for an object type that can be stored in an ECHO database.
|
|
@@ -9125,7 +9101,7 @@ type OfShape<Props$1> = BaseObj & Props$1;
|
|
|
9125
9101
|
* NOTE: This is a TypeScript type only, not a schema.
|
|
9126
9102
|
* To validate that a value is an ECHO object, use `Schema.is(Type.Obj)`.
|
|
9127
9103
|
*/
|
|
9128
|
-
interface Unknown$
|
|
9104
|
+
interface Unknown$1 extends BaseObj {}
|
|
9129
9105
|
/**
|
|
9130
9106
|
* Runtime Effect schema for any ECHO object.
|
|
9131
9107
|
* Use for validation, parsing, or as a reference target for collections.
|
|
@@ -9147,70 +9123,155 @@ interface Unknown$2 extends BaseObj {}
|
|
|
9147
9123
|
* }).pipe(Type.object({ typename: 'Collection', version: '0.1.0' }));
|
|
9148
9124
|
* ```
|
|
9149
9125
|
*/
|
|
9150
|
-
declare const Unknown$
|
|
9126
|
+
declare const Unknown$1: Obj$1<Unknown$1>;
|
|
9151
9127
|
/**
|
|
9152
9128
|
* JSON-encoded properties for objects.
|
|
9153
9129
|
*/
|
|
9154
9130
|
interface BaseObjJson {
|
|
9155
9131
|
id: string;
|
|
9156
9132
|
}
|
|
9157
|
-
|
|
9158
|
-
|
|
9133
|
+
declare namespace Filter_d_exports {
|
|
9134
|
+
export { Any$3 as Any, ChildOfOptions, Filter, Props, TextSearchOptions, Type$2 as Type, and, between, childOf, contains, created, eq, everything, foreignKeys, fromAst$1 as fromAst, gt, gte, id, in$ as in, is$1 as is, lt, lte, neq, not, nothing, or, pretty$1 as pretty, props, tag, text, type$2 as type, typeDXN, typename$1 as typename, updated };
|
|
9135
|
+
}
|
|
9136
|
+
interface Filter<T$1> {
|
|
9137
|
+
'~Filter': {
|
|
9138
|
+
value: Covariant<T$1>;
|
|
9139
|
+
};
|
|
9140
|
+
ast: Filter$1;
|
|
9141
|
+
}
|
|
9142
|
+
type Props<T$1> = { [K in keyof T$1 & string]?: Filter<T$1[K]> | T$1[K] };
|
|
9143
|
+
type Any$3 = Filter<any>;
|
|
9144
|
+
type Type$2<F extends Any$3> = F extends Filter<infer T> ? T : never;
|
|
9145
|
+
declare class FilterClass implements Any$3 {
|
|
9146
|
+
readonly ast: Filter$1;
|
|
9147
|
+
private static 'variance';
|
|
9148
|
+
constructor(ast: Filter$1);
|
|
9149
|
+
'~Filter': {
|
|
9150
|
+
value: Covariant<any>;
|
|
9151
|
+
};
|
|
9152
|
+
}
|
|
9153
|
+
declare const is$1: (value: unknown) => value is Any$3;
|
|
9154
|
+
/** Construct a filter from an ast. */
|
|
9155
|
+
declare const fromAst$1: (ast: Filter$1) => Any$3;
|
|
9159
9156
|
/**
|
|
9160
|
-
*
|
|
9161
|
-
*
|
|
9162
|
-
* Reference can point to any object or relation.
|
|
9163
|
-
* References are lazy loaded.
|
|
9164
|
-
*
|
|
9165
|
-
* `ref.dxn` is the DXN of the referenced object.
|
|
9166
|
-
*
|
|
9167
|
-
* @example
|
|
9168
|
-
* ```ts
|
|
9169
|
-
* const taskRef: Ref<Task> = Ref.make(task);
|
|
9170
|
-
*
|
|
9171
|
-
* await taskRef.load(); // Returns Promise<Task>
|
|
9172
|
-
* yield* Database.load(taskRef); // Effectful version.
|
|
9173
|
-
*
|
|
9174
|
-
* database.makeRef(dxn); // Create a ref from a DXN.
|
|
9175
|
-
* ```
|
|
9157
|
+
* Filter that matches all objects.
|
|
9176
9158
|
*/
|
|
9177
|
-
|
|
9178
|
-
type Unknown$1 = Ref<Unknown$2>;
|
|
9159
|
+
declare const everything: () => FilterClass;
|
|
9179
9160
|
/**
|
|
9180
|
-
*
|
|
9181
|
-
* Use this in schema definitions to declare reference fields.
|
|
9182
|
-
*
|
|
9183
|
-
* @example
|
|
9184
|
-
* ```ts
|
|
9185
|
-
* const Task = Schema.Struct({
|
|
9186
|
-
* assignee: Ref.Ref(Person), // Creates a Ref schema
|
|
9187
|
-
* }).pipe(Type.object({ typename: 'Task', version: '0.1.0' }));
|
|
9188
|
-
* ```
|
|
9161
|
+
* Filter that matches no objects.
|
|
9189
9162
|
*/
|
|
9190
|
-
declare const
|
|
9163
|
+
declare const nothing: () => FilterClass;
|
|
9164
|
+
declare const id: (...ids: ObjectId[]) => Any$3;
|
|
9191
9165
|
/**
|
|
9192
|
-
*
|
|
9193
|
-
* This is the type of the SCHEMA itself, not the runtime ref instance.
|
|
9194
|
-
* For the instance type, use `Ref.Ref<T>` from the Ref module.
|
|
9195
|
-
*
|
|
9196
|
-
* @example
|
|
9197
|
-
* ```ts
|
|
9198
|
-
* // Schema type annotation (rarely needed, usually inferred):
|
|
9199
|
-
* const refSchema: Ref.RefSchema<typeof Task> = Ref.Ref(Task);
|
|
9200
|
-
*
|
|
9201
|
-
* // Instance type annotation (use Ref.Ref instead):
|
|
9202
|
-
* const refInstance: Ref.Ref<Task> = Ref.make(task);
|
|
9203
|
-
* ```
|
|
9166
|
+
* Filter by type.
|
|
9204
9167
|
*/
|
|
9205
|
-
|
|
9168
|
+
declare const type$2: <S$1 extends Schema.All>(schema: S$1 | string, props?: Props<Schema.Type<S$1>>) => Filter<Schema.Type<S$1>>;
|
|
9206
9169
|
/**
|
|
9207
|
-
*
|
|
9170
|
+
* Filter by non-qualified typename.
|
|
9208
9171
|
*/
|
|
9209
|
-
|
|
9172
|
+
declare const typename$1: (typename: string) => Any$3;
|
|
9210
9173
|
/**
|
|
9211
|
-
*
|
|
9174
|
+
* Filter by fully qualified type DXN.
|
|
9212
9175
|
*/
|
|
9213
|
-
|
|
9176
|
+
declare const typeDXN: (dxn: DXN) => Any$3;
|
|
9177
|
+
/**
|
|
9178
|
+
* Filter by tag.
|
|
9179
|
+
*/
|
|
9180
|
+
declare const tag: (tag: string) => Any$3;
|
|
9181
|
+
/**
|
|
9182
|
+
* Filter by properties.
|
|
9183
|
+
*/
|
|
9184
|
+
declare const props: <T$1>(props: Props<T$1>) => Filter<T$1>;
|
|
9185
|
+
type TextSearchOptions = {
|
|
9186
|
+
type?: 'full-text' | 'vector';
|
|
9187
|
+
};
|
|
9188
|
+
/**
|
|
9189
|
+
* Full-text or vector search.
|
|
9190
|
+
*/
|
|
9191
|
+
declare const text: (text: string, options?: TextSearchOptions) => Any$3;
|
|
9192
|
+
/**
|
|
9193
|
+
* Filter by foreign keys.
|
|
9194
|
+
*/
|
|
9195
|
+
declare const foreignKeys: <S$1 extends Schema.All>(schema: S$1 | string, keys: ForeignKey[]) => Filter<Schema.Type<S$1>>;
|
|
9196
|
+
/**
|
|
9197
|
+
* Predicate for property to be equal to the provided value.
|
|
9198
|
+
*/
|
|
9199
|
+
declare const eq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9200
|
+
/**
|
|
9201
|
+
* Predicate for property to be not equal to the provided value.
|
|
9202
|
+
*/
|
|
9203
|
+
declare const neq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9204
|
+
/**
|
|
9205
|
+
* Predicate for property to be greater than the provided value.
|
|
9206
|
+
*/
|
|
9207
|
+
declare const gt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9208
|
+
/**
|
|
9209
|
+
* Predicate for property to be greater than or equal to the provided value.
|
|
9210
|
+
*/
|
|
9211
|
+
declare const gte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9212
|
+
/**
|
|
9213
|
+
* Predicate for property to be less than the provided value.
|
|
9214
|
+
*/
|
|
9215
|
+
declare const lt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9216
|
+
/**
|
|
9217
|
+
* Predicate for property to be less than or equal to the provided value.
|
|
9218
|
+
*/
|
|
9219
|
+
declare const lte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9220
|
+
/**
|
|
9221
|
+
* Predicate for property to be in the provided array.
|
|
9222
|
+
* @param values - Values to check against.
|
|
9223
|
+
*/
|
|
9224
|
+
declare const in$: <T$1>(...values: T$1[]) => Filter<T$1>;
|
|
9225
|
+
/**
|
|
9226
|
+
* Predicate for an array property to contain the provided value.
|
|
9227
|
+
* @param value - Value to check against.
|
|
9228
|
+
*/
|
|
9229
|
+
declare const contains: <T$1>(value: T$1) => Filter<readonly T$1[] | undefined>;
|
|
9230
|
+
/**
|
|
9231
|
+
* Predicate for property to be in the provided range.
|
|
9232
|
+
* @param from - Start of the range (inclusive).
|
|
9233
|
+
* @param to - End of the range (exclusive).
|
|
9234
|
+
*/
|
|
9235
|
+
declare const between: <T$1>(from: T$1, to: T$1) => Filter<T$1>;
|
|
9236
|
+
type TimeRange = {
|
|
9237
|
+
after?: Date | number;
|
|
9238
|
+
before?: Date | number;
|
|
9239
|
+
};
|
|
9240
|
+
/**
|
|
9241
|
+
* Filter objects by updatedAt timestamp.
|
|
9242
|
+
*/
|
|
9243
|
+
declare const updated: (range: TimeRange) => Any$3;
|
|
9244
|
+
/**
|
|
9245
|
+
* Filter objects by createdAt timestamp.
|
|
9246
|
+
*/
|
|
9247
|
+
declare const created: (range: TimeRange) => Any$3;
|
|
9248
|
+
type ChildOfOptions = {
|
|
9249
|
+
/** Whether to match transitively (grandchildren, etc.). Defaults to true. */
|
|
9250
|
+
transitive?: boolean;
|
|
9251
|
+
};
|
|
9252
|
+
/**
|
|
9253
|
+
* Filter objects that are children of the specified parent(s).
|
|
9254
|
+
* Accepts ECHO objects, Refs, or arrays of either.
|
|
9255
|
+
* Refs are resolved to DXNs without loading; objects use {@link Obj.getDXN}.
|
|
9256
|
+
* With transitive=true (default), also matches grandchildren and beyond.
|
|
9257
|
+
*/
|
|
9258
|
+
declare const childOf: (parents: Unknown$1 | Unknown$2 | readonly (Unknown$1 | Unknown$2)[], options?: ChildOfOptions) => Any$3;
|
|
9259
|
+
/**
|
|
9260
|
+
* Negate the filter.
|
|
9261
|
+
*/
|
|
9262
|
+
declare const not: <F extends Any$3>(filter: F) => Filter<Type$2<F>>;
|
|
9263
|
+
/**
|
|
9264
|
+
* Combine filters with a logical AND.
|
|
9265
|
+
*/
|
|
9266
|
+
declare const and: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
9267
|
+
/**
|
|
9268
|
+
* Combine filters with a logical OR.
|
|
9269
|
+
*/
|
|
9270
|
+
declare const or: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
9271
|
+
/**
|
|
9272
|
+
* Returns a human-readable string representation of a Filter AST.
|
|
9273
|
+
*/
|
|
9274
|
+
declare const pretty$1: (filter: Any$3) => string;
|
|
9214
9275
|
//#endregion
|
|
9215
9276
|
//#region ../echo/dist/types/src/JsonSchema.d.ts
|
|
9216
9277
|
/**
|
|
@@ -9439,7 +9500,7 @@ interface Hypergraph extends Queryable {
|
|
|
9439
9500
|
*/
|
|
9440
9501
|
declare const Collection: Obj$1<{
|
|
9441
9502
|
readonly name?: string | undefined;
|
|
9442
|
-
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$
|
|
9503
|
+
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$1>[];
|
|
9443
9504
|
}, Struct.Fields>;
|
|
9444
9505
|
interface Collection extends Schema.Type<typeof Collection> {}
|
|
9445
9506
|
//#endregion
|
|
@@ -9455,6 +9516,7 @@ interface Collection extends Schema.Type<typeof Collection> {}
|
|
|
9455
9516
|
declare const Feed: Obj$1<{
|
|
9456
9517
|
readonly kind?: string | undefined;
|
|
9457
9518
|
readonly name?: string | undefined;
|
|
9519
|
+
readonly namespace?: "data" | "trace" | undefined;
|
|
9458
9520
|
}, Struct.Fields>;
|
|
9459
9521
|
/**
|
|
9460
9522
|
* TypeScript instance type for a Feed object.
|
|
@@ -9495,9 +9557,10 @@ declare const View: Obj$1<View>;
|
|
|
9495
9557
|
declare const Dataset: Union<[Obj$1<{
|
|
9496
9558
|
readonly kind?: string | undefined;
|
|
9497
9559
|
readonly name?: string | undefined;
|
|
9560
|
+
readonly namespace?: "data" | "trace" | undefined;
|
|
9498
9561
|
}, Struct.Fields>, Obj$1<{
|
|
9499
9562
|
readonly name?: string | undefined;
|
|
9500
|
-
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$
|
|
9563
|
+
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$1>[];
|
|
9501
9564
|
}, Struct.Fields>, Obj$1<View, Struct.Fields>]>;
|
|
9502
9565
|
type Dataset = Feed | Collection | View;
|
|
9503
9566
|
declare namespace Order_d_exports {
|
|
@@ -9518,7 +9581,7 @@ declare const property: <T$1>(property: keyof T$1 & string, direction: OrderDire
|
|
|
9518
9581
|
*/
|
|
9519
9582
|
declare const rank: <T$1>(direction?: OrderDirection) => Order<T$1>;
|
|
9520
9583
|
declare namespace Query_d_exports {
|
|
9521
|
-
export { Any$1 as Any, Query, Type$1 as Type, all, from, fromAst, is, select, type$1 as type, without };
|
|
9584
|
+
export { Any$1 as Any, Query, Type$1 as Type, all, from, fromAst, is, pretty, select, type$1 as type, without };
|
|
9522
9585
|
}
|
|
9523
9586
|
/**
|
|
9524
9587
|
* All property paths inside T that are references.
|
|
@@ -9541,7 +9604,7 @@ interface Query<T$1> {
|
|
|
9541
9604
|
* @param key - Property path inside T that is a reference or optional reference.
|
|
9542
9605
|
* @returns Query for the target of the reference.
|
|
9543
9606
|
*/
|
|
9544
|
-
'reference'<K$1 extends RefPropKey<T$1>>(key: K$1): Query<T$1[K$1] extends Unknown$
|
|
9607
|
+
'reference'<K$1 extends RefPropKey<T$1>>(key: K$1): Query<T$1[K$1] extends Unknown$2 ? Target<T$1[K$1]> : T$1[K$1] extends Unknown$2 | undefined ? Target<Exclude<T$1[K$1], undefined>> : never>;
|
|
9545
9608
|
/**
|
|
9546
9609
|
* Find objects referencing this object.
|
|
9547
9610
|
* @param target - Schema of the referencing object. If not provided, matches any type.
|
|
@@ -9686,7 +9749,10 @@ declare const select: <F extends Any$3>(filter: F) => Query<Type$2<F>>;
|
|
|
9686
9749
|
*
|
|
9687
9750
|
* Shorthand for: `Query.select(Filter.type(schema, predicates))`.
|
|
9688
9751
|
*/
|
|
9689
|
-
declare const type$1:
|
|
9752
|
+
declare const type$1: {
|
|
9753
|
+
<S$1 extends Schema.All>(schema: S$1, predicates?: Props<Schema.Type<S$1>>): Query<Schema.Type<S$1>>;
|
|
9754
|
+
(schema: string, predicates?: Props<unknown>): Query<any>;
|
|
9755
|
+
};
|
|
9690
9756
|
/**
|
|
9691
9757
|
* Combine results of multiple queries.
|
|
9692
9758
|
* @param queries - Queries to combine.
|
|
@@ -9710,6 +9776,10 @@ declare const without: <T$1>(source: Query<T$1>, exclude: Query<T$1>) => Query<T
|
|
|
9710
9776
|
declare const from: (source: Database | Database[] | Feed | Feed[] | Any$1 | Scope | "all-accessible-spaces", options?: {
|
|
9711
9777
|
includeFeeds?: boolean;
|
|
9712
9778
|
}) => Any$1;
|
|
9779
|
+
/**
|
|
9780
|
+
* Returns a human-readable string representation of a Query AST.
|
|
9781
|
+
*/
|
|
9782
|
+
declare const pretty: (query: Any$1) => string;
|
|
9713
9783
|
//#endregion
|
|
9714
9784
|
//#region ../echo/dist/types/src/Database.d.ts
|
|
9715
9785
|
/**
|
|
@@ -9774,7 +9844,7 @@ interface Database extends Queryable {
|
|
|
9774
9844
|
/**
|
|
9775
9845
|
* Return object by local ID.
|
|
9776
9846
|
*/
|
|
9777
|
-
getObjectById<T$1 extends Unknown$
|
|
9847
|
+
getObjectById<T$1 extends Unknown$1 = OfShape<AnyProperties>>(id: string, opts?: GetObjectByIdOptions): T$1 | undefined;
|
|
9778
9848
|
/**
|
|
9779
9849
|
* Query objects.
|
|
9780
9850
|
*/
|