@dxos/echo-query 0.8.4-main.c85a9c8dae → 0.8.4-main.cb12b3f963
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 +216 -18
- package/dist/lib/neutral/index.mjs.map +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/query-lite/index.d.ts +519 -434
- package/dist/query-lite/index.d.ts.map +1 -1
- package/dist/query-lite/index.js +162 -29
- package/dist/query-lite/index.js.map +1 -1
- package/dist/types/src/parser/gen/index.d.ts.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/src/sandbox/query-sandbox.d.ts +1 -1
- package/dist/types/src/sandbox/query-sandbox.d.ts.map +1 -1
- package/dist/types/src/sandbox/quickjs.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -16
- package/src/parser/query-builder.ts +269 -9
- package/src/parser/query.test.ts +144 -31
- package/src/query-lite/query-lite.ts +234 -38
- package/src/sandbox/query-sandbox.test.ts +10 -10
- package/src/sandbox/query-sandbox.ts +1 -1
|
@@ -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
|
*/
|
|
@@ -7874,8 +7874,8 @@ type QueueSubspaceTag = (typeof QueueSubspaceTags)[keyof typeof QueueSubspaceTag
|
|
|
7874
7874
|
* dxn:echo:<space key>:<echo id>
|
|
7875
7875
|
* dxn:echo:BA25QRC2FEWCSAMRP4RZL65LWJ7352CKE:01J00J9B45YHYSGZQTQMSKMGJ6
|
|
7876
7876
|
* dxn:echo:@:01J00J9B45YHYSGZQTQMSKMGJ6
|
|
7877
|
-
* dxn:type:dxos.
|
|
7878
|
-
* dxn:plugin:dxos.
|
|
7877
|
+
* dxn:type:org.dxos.type.calendar
|
|
7878
|
+
* dxn:plugin:org.dxos.agent.plugin.functions
|
|
7879
7879
|
* ```
|
|
7880
7880
|
*/
|
|
7881
7881
|
declare class DXN {
|
|
@@ -7912,11 +7912,11 @@ declare class DXN {
|
|
|
7912
7912
|
static parse(dxn: string): DXN;
|
|
7913
7913
|
static tryParse(dxn: string): DXN | undefined;
|
|
7914
7914
|
/**
|
|
7915
|
-
* @example `dxn:type:example.
|
|
7915
|
+
* @example `dxn:type:com.example.type.person`
|
|
7916
7916
|
*/
|
|
7917
7917
|
static fromTypename(typename: string): DXN;
|
|
7918
7918
|
/**
|
|
7919
|
-
* @example `dxn:type:example.
|
|
7919
|
+
* @example `dxn:type:com.example.type.person:0.1.0`
|
|
7920
7920
|
*/
|
|
7921
7921
|
static fromTypenameAndVersion(typename: string, version: string): DXN;
|
|
7922
7922
|
/**
|
|
@@ -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<
|
|
8037
|
+
props: Record$<SchemaClass<string, string, never>, suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, 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<
|
|
8129
|
+
filter: suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, 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<
|
|
8138
|
+
filters: Array$<suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, 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<
|
|
8147
|
+
filters: Array$<suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, 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<
|
|
8174
|
+
filter: suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, never>;
|
|
8150
8175
|
}>;
|
|
8151
8176
|
interface QuerySelectClause extends Schema.Type<typeof QuerySelectClause_> {}
|
|
8152
8177
|
declare const QuerySelectClause: Schema<QuerySelectClause>;
|
|
@@ -8155,8 +8180,8 @@ declare const QuerySelectClause: Schema<QuerySelectClause>;
|
|
|
8155
8180
|
*/
|
|
8156
8181
|
declare const QueryFilterClause_: Struct<{
|
|
8157
8182
|
type: Literal<["filter"]>;
|
|
8158
|
-
selection: suspend<
|
|
8159
|
-
filter: suspend<
|
|
8183
|
+
selection: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8184
|
+
filter: suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, never>;
|
|
8160
8185
|
}>;
|
|
8161
8186
|
interface QueryFilterClause extends Schema.Type<typeof QueryFilterClause_> {}
|
|
8162
8187
|
declare const QueryFilterClause: Schema<QueryFilterClause>;
|
|
@@ -8165,7 +8190,7 @@ declare const QueryFilterClause: Schema<QueryFilterClause>;
|
|
|
8165
8190
|
*/
|
|
8166
8191
|
declare const QueryReferenceTraversalClause_: Struct<{
|
|
8167
8192
|
type: Literal<["reference-traversal"]>;
|
|
8168
|
-
anchor: suspend<
|
|
8193
|
+
anchor: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8169
8194
|
property: typeof String$;
|
|
8170
8195
|
}>;
|
|
8171
8196
|
interface QueryReferenceTraversalClause extends Schema.Type<typeof QueryReferenceTraversalClause_> {}
|
|
@@ -8175,7 +8200,7 @@ declare const QueryReferenceTraversalClause: Schema<QueryReferenceTraversalClaus
|
|
|
8175
8200
|
*/
|
|
8176
8201
|
declare const QueryIncomingReferencesClause_: Struct<{
|
|
8177
8202
|
type: Literal<["incoming-references"]>;
|
|
8178
|
-
anchor: suspend<
|
|
8203
|
+
anchor: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8179
8204
|
/**
|
|
8180
8205
|
* Property path where the reference is located.
|
|
8181
8206
|
* If null, matches references from any property.
|
|
@@ -8190,14 +8215,14 @@ declare const QueryIncomingReferencesClause: Schema<QueryIncomingReferencesClaus
|
|
|
8190
8215
|
*/
|
|
8191
8216
|
declare const QueryRelationClause_: Struct<{
|
|
8192
8217
|
type: Literal<["relation"]>;
|
|
8193
|
-
anchor: suspend<
|
|
8218
|
+
anchor: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8194
8219
|
/**
|
|
8195
8220
|
* outgoing: anchor is the source of the relation.
|
|
8196
8221
|
* incoming: anchor is the target of the relation.
|
|
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<
|
|
8225
|
+
filter: optional<suspend<FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, FilterAnd | FilterChildOf | FilterCompare | FilterContains | FilterIn | FilterNot | FilterObject | FilterOr | FilterRange | FilterTag | FilterTextSearch | FilterTimestamp, never>>;
|
|
8201
8226
|
}>;
|
|
8202
8227
|
interface QueryRelationClause extends Schema.Type<typeof QueryRelationClause_> {}
|
|
8203
8228
|
declare const QueryRelationClause: Schema<QueryRelationClause>;
|
|
@@ -8206,7 +8231,7 @@ declare const QueryRelationClause: Schema<QueryRelationClause>;
|
|
|
8206
8231
|
*/
|
|
8207
8232
|
declare const QueryRelationTraversalClause_: Struct<{
|
|
8208
8233
|
type: Literal<["relation-traversal"]>;
|
|
8209
|
-
anchor: suspend<
|
|
8234
|
+
anchor: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8210
8235
|
direction: Literal<["source", "target", "both"]>;
|
|
8211
8236
|
}>;
|
|
8212
8237
|
interface QueryRelationTraversalClause extends Schema.Type<typeof QueryRelationTraversalClause_> {}
|
|
@@ -8216,7 +8241,7 @@ declare const QueryRelationTraversalClause: Schema<QueryRelationTraversalClause>
|
|
|
8216
8241
|
*/
|
|
8217
8242
|
declare const QueryHierarchyTraversalClause_: Struct<{
|
|
8218
8243
|
type: Literal<["hierarchy-traversal"]>;
|
|
8219
|
-
anchor: suspend<
|
|
8244
|
+
anchor: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8220
8245
|
/**
|
|
8221
8246
|
* to-parent: traverse from child to parent.
|
|
8222
8247
|
* to-children: traverse from parent to children.
|
|
@@ -8230,7 +8255,7 @@ declare const QueryHierarchyTraversalClause: Schema<QueryHierarchyTraversalClaus
|
|
|
8230
8255
|
*/
|
|
8231
8256
|
declare const QueryUnionClause_: Struct<{
|
|
8232
8257
|
type: Literal<["union"]>;
|
|
8233
|
-
queries: Array$<suspend<
|
|
8258
|
+
queries: Array$<suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>>;
|
|
8234
8259
|
}>;
|
|
8235
8260
|
interface QueryUnionClause extends Schema.Type<typeof QueryUnionClause_> {}
|
|
8236
8261
|
declare const QueryUnionClause: Schema<QueryUnionClause>;
|
|
@@ -8239,8 +8264,8 @@ declare const QueryUnionClause: Schema<QueryUnionClause>;
|
|
|
8239
8264
|
*/
|
|
8240
8265
|
declare const QuerySetDifferenceClause_: Struct<{
|
|
8241
8266
|
type: Literal<["set-difference"]>;
|
|
8242
|
-
source: suspend<
|
|
8243
|
-
exclude: suspend<
|
|
8267
|
+
source: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8268
|
+
exclude: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8244
8269
|
}>;
|
|
8245
8270
|
interface QuerySetDifferenceClause extends Schema.Type<typeof QuerySetDifferenceClause_> {}
|
|
8246
8271
|
declare const QuerySetDifferenceClause: Schema<QuerySetDifferenceClause>;
|
|
@@ -8264,7 +8289,7 @@ declare const Order$1: Schema<Order$1>;
|
|
|
8264
8289
|
*/
|
|
8265
8290
|
declare const QueryOrderClause_: Struct<{
|
|
8266
8291
|
type: Literal<["order"]>;
|
|
8267
|
-
query: suspend<
|
|
8292
|
+
query: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8268
8293
|
order: Array$<Schema<{
|
|
8269
8294
|
readonly kind: "natural";
|
|
8270
8295
|
} | {
|
|
@@ -8292,11 +8317,13 @@ declare const QueryOrderClause: Schema<QueryOrderClause>;
|
|
|
8292
8317
|
*/
|
|
8293
8318
|
declare const QueryOptionsClause_: Struct<{
|
|
8294
8319
|
type: Literal<["options"]>;
|
|
8295
|
-
query: suspend<
|
|
8320
|
+
query: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8296
8321
|
options: suspend<{
|
|
8297
|
-
readonly deleted?: "
|
|
8322
|
+
readonly deleted?: "exclude" | "include" | "only" | undefined;
|
|
8323
|
+
readonly debugLabel?: string | undefined;
|
|
8298
8324
|
}, {
|
|
8299
|
-
readonly
|
|
8325
|
+
readonly debugLabel?: string | undefined;
|
|
8326
|
+
readonly deleted?: "exclude" | "include" | "only" | undefined;
|
|
8300
8327
|
}, never>;
|
|
8301
8328
|
}>;
|
|
8302
8329
|
interface QueryOptionsClause extends Schema.Type<typeof QueryOptionsClause_> {}
|
|
@@ -8306,26 +8333,26 @@ declare const QueryOptionsClause: Schema<QueryOptionsClause>;
|
|
|
8306
8333
|
*/
|
|
8307
8334
|
declare const QueryLimitClause_: Struct<{
|
|
8308
8335
|
type: Literal<["limit"]>;
|
|
8309
|
-
query: suspend<
|
|
8336
|
+
query: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8310
8337
|
limit: typeof Number$;
|
|
8311
8338
|
}>;
|
|
8312
8339
|
interface QueryLimitClause extends Schema.Type<typeof QueryLimitClause_> {}
|
|
8313
8340
|
declare const QueryLimitClause: Schema<QueryLimitClause>;
|
|
8314
8341
|
declare const QueryFromClause_: Struct<{
|
|
8315
8342
|
type: Literal<["from"]>;
|
|
8316
|
-
query: suspend<
|
|
8343
|
+
query: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8317
8344
|
from: Union<[TaggedStruct<"scope", {
|
|
8318
8345
|
scope: suspend<{
|
|
8319
8346
|
readonly spaceIds?: readonly string[] | undefined;
|
|
8320
8347
|
readonly allQueuesFromSpaces?: boolean | undefined;
|
|
8321
8348
|
readonly queues?: readonly string[] | undefined;
|
|
8322
8349
|
}, {
|
|
8323
|
-
readonly spaceIds?: readonly string[] | undefined;
|
|
8324
8350
|
readonly allQueuesFromSpaces?: boolean | undefined;
|
|
8325
8351
|
readonly queues?: readonly string[] | undefined;
|
|
8352
|
+
readonly spaceIds?: readonly string[] | undefined;
|
|
8326
8353
|
}, never>;
|
|
8327
8354
|
}>, TaggedStruct<"query", {
|
|
8328
|
-
query: suspend<
|
|
8355
|
+
query: suspend<QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause, never>;
|
|
8329
8356
|
}>]>;
|
|
8330
8357
|
}>;
|
|
8331
8358
|
interface QueryFromClause extends Schema.Type<typeof QueryFromClause_> {}
|
|
@@ -8338,6 +8365,10 @@ declare const QueryOptions: Struct<{
|
|
|
8338
8365
|
* Nested select statements will use this option to filter deleted objects.
|
|
8339
8366
|
*/
|
|
8340
8367
|
deleted: optional<Literal<["include", "exclude", "only"]>>;
|
|
8368
|
+
/**
|
|
8369
|
+
* Diagnostics-only label for logs / tooling (not used by execution semantics).
|
|
8370
|
+
*/
|
|
8371
|
+
debugLabel: optional<typeof String$>;
|
|
8341
8372
|
}>;
|
|
8342
8373
|
interface QueryOptions extends Schema.Type<typeof QueryOptions> {}
|
|
8343
8374
|
/**
|
|
@@ -8372,7 +8403,7 @@ type JsonPath = string & {
|
|
|
8372
8403
|
*/
|
|
8373
8404
|
declare const JsonPath: Schema<JsonPath>;
|
|
8374
8405
|
//#endregion
|
|
8375
|
-
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.
|
|
8406
|
+
//#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
8407
|
declare global {
|
|
8377
8408
|
interface ErrorConstructor {
|
|
8378
8409
|
stackTraceLimit: number;
|
|
@@ -8383,7 +8414,7 @@ declare global {
|
|
|
8383
8414
|
* @category Constructors
|
|
8384
8415
|
*/
|
|
8385
8416
|
//#endregion
|
|
8386
|
-
//#region ../../../../node_modules/.pnpm/@effect-atom+atom@0.5.1_@effect+experimental@0.58.0_@effect+platform@0.94.4_effect@3.
|
|
8417
|
+
//#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
8418
|
declare global {
|
|
8388
8419
|
interface ErrorConstructor {
|
|
8389
8420
|
stackTraceLimit: number;
|
|
@@ -8394,7 +8425,23 @@ declare global {
|
|
|
8394
8425
|
* @category Constructors
|
|
8395
8426
|
*/
|
|
8396
8427
|
//#endregion
|
|
8397
|
-
//#region ../echo/dist/types/src/internal/
|
|
8428
|
+
//#region ../echo/dist/types/src/internal/Entity/entity.d.ts
|
|
8429
|
+
type EchoTypeSchemaProps<T$1, ExtraFields = {}> = Simplify$1<AnyEntity & ToMutable<T$1> & ExtraFields>;
|
|
8430
|
+
interface EchoTypeSchema<Self extends Schema.Any, ExtraFields = {}, K$1 extends EntityKind = EntityKind, Fields extends Struct.Fields = Struct.Fields> extends TypeMeta, AnnotableClass<EchoTypeSchema<Self, ExtraFields, K$1, Fields>, EchoTypeSchemaProps<Schema.Type<Self>, ExtraFields>, EchoTypeSchemaProps<Schema.Encoded<Self>, ExtraFields>, Schema.Context<Self>> {
|
|
8431
|
+
/**
|
|
8432
|
+
* Schema kind key that marks this as an ECHO schema and indicates its kind.
|
|
8433
|
+
* Makes EchoTypeSchema satisfy the Type.AnyObj or Type.Relation.Any type.
|
|
8434
|
+
*/
|
|
8435
|
+
readonly [SchemaKindId]: K$1;
|
|
8436
|
+
/**
|
|
8437
|
+
* The fields defined in the original struct schema.
|
|
8438
|
+
* Allows accessing field definitions for introspection.
|
|
8439
|
+
*/
|
|
8440
|
+
readonly fields: Fields;
|
|
8441
|
+
instanceOf(value: unknown): boolean;
|
|
8442
|
+
}
|
|
8443
|
+
//#endregion
|
|
8444
|
+
//#region ../echo/dist/types/src/internal/JsonSchema/json-schema-type.d.ts
|
|
8398
8445
|
/**
|
|
8399
8446
|
* Describes a schema for the JSON-schema objects stored in ECHO.
|
|
8400
8447
|
* Contains extensions for ECHO (e.g., references).
|
|
@@ -8427,7 +8474,7 @@ declare const _JsonSchemaType: Struct<{
|
|
|
8427
8474
|
* Typename of this schema.
|
|
8428
8475
|
* Only on schema representing an ECHO object.
|
|
8429
8476
|
*
|
|
8430
|
-
* @example 'example.
|
|
8477
|
+
* @example 'com.example.type.my-type'
|
|
8431
8478
|
*/
|
|
8432
8479
|
typename: optional<typeof String$>;
|
|
8433
8480
|
/**
|
|
@@ -8606,7 +8653,7 @@ declare const _JsonSchemaType: Struct<{
|
|
|
8606
8653
|
interface JsonSchemaType extends Schema.Type<typeof _JsonSchemaType> {}
|
|
8607
8654
|
declare const JsonSchemaType: Schema<JsonSchemaType>;
|
|
8608
8655
|
//#endregion
|
|
8609
|
-
//#region ../echo/dist/types/src/internal/
|
|
8656
|
+
//#region ../echo/dist/types/src/internal/Ref/ref.d.ts
|
|
8610
8657
|
declare const RefTypeId: unique symbol;
|
|
8611
8658
|
/**
|
|
8612
8659
|
* Reference Schema.
|
|
@@ -8675,6 +8722,15 @@ interface Ref<T$1> extends Pipeable {
|
|
|
8675
8722
|
* @returns Promise that will resolves with the target object or undefined if the object is not loaded locally.
|
|
8676
8723
|
*/
|
|
8677
8724
|
tryLoad(): Promise<T$1 | undefined>;
|
|
8725
|
+
/**
|
|
8726
|
+
* Subscribe to the ref's resolution event.
|
|
8727
|
+
* The callback fires when the target object becomes available in the working set
|
|
8728
|
+
* (e.g. when its document is loaded after sibling-client mutation).
|
|
8729
|
+
* Note: the resolver only schedules a notification when the target is requested
|
|
8730
|
+
* via {@link target} while it is not yet loaded.
|
|
8731
|
+
* @returns Function that unsubscribes the callback.
|
|
8732
|
+
*/
|
|
8733
|
+
onResolved(callback: () => void): () => void;
|
|
8678
8734
|
/**
|
|
8679
8735
|
* Do not inline the target object in the reference.
|
|
8680
8736
|
* Makes .target unavailable unless the reference is connected to a database context.
|
|
@@ -8724,175 +8780,264 @@ interface RefResolver {
|
|
|
8724
8780
|
resolveSchema(dxn: DXN): Promise<Schema.AnyNoContext | undefined>;
|
|
8725
8781
|
}
|
|
8726
8782
|
//#endregion
|
|
8727
|
-
//#region ../echo/dist/types/src/
|
|
8728
|
-
type EchoTypeSchemaProps<T$1, ExtraFields = {}> = Simplify$1<AnyEntity & ToMutable<T$1> & ExtraFields>;
|
|
8729
|
-
interface EchoTypeSchema<Self extends Schema.Any, ExtraFields = {}, K$1 extends EntityKind = EntityKind, Fields extends Struct.Fields = Struct.Fields> extends TypeMeta, AnnotableClass<EchoTypeSchema<Self, ExtraFields, K$1, Fields>, EchoTypeSchemaProps<Schema.Type<Self>, ExtraFields>, EchoTypeSchemaProps<Schema.Encoded<Self>, ExtraFields>, Schema.Context<Self>> {
|
|
8730
|
-
/**
|
|
8731
|
-
* Schema kind key that marks this as an ECHO schema and indicates its kind.
|
|
8732
|
-
* Makes EchoTypeSchema satisfy the Type.AnyObj or Type.Relation.Any type.
|
|
8733
|
-
*/
|
|
8734
|
-
readonly [SchemaKindId]: K$1;
|
|
8735
|
-
/**
|
|
8736
|
-
* The fields defined in the original struct schema.
|
|
8737
|
-
* Allows accessing field definitions for introspection.
|
|
8738
|
-
*/
|
|
8739
|
-
readonly fields: Fields;
|
|
8740
|
-
instanceOf(value: unknown): boolean;
|
|
8741
|
-
}
|
|
8742
|
-
declare namespace Filter_d_exports {
|
|
8743
|
-
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 };
|
|
8744
|
-
}
|
|
8745
|
-
interface Filter<T$1> {
|
|
8746
|
-
'~Filter': {
|
|
8747
|
-
value: Contravariant<T$1>;
|
|
8748
|
-
};
|
|
8749
|
-
ast: Filter$1;
|
|
8750
|
-
}
|
|
8751
|
-
type Props<T$1> = { [K in keyof T$1 & string]?: Filter<T$1[K]> | T$1[K] };
|
|
8752
|
-
type Any$3 = Filter<any>;
|
|
8753
|
-
type Type$2<F extends Any$3> = F extends Filter<infer T> ? T : never;
|
|
8754
|
-
declare class FilterClass implements Any$3 {
|
|
8755
|
-
readonly ast: Filter$1;
|
|
8756
|
-
private static 'variance';
|
|
8757
|
-
constructor(ast: Filter$1);
|
|
8758
|
-
'~Filter': {
|
|
8759
|
-
value: Contravariant<any>;
|
|
8760
|
-
};
|
|
8761
|
-
}
|
|
8762
|
-
declare const is$1: (value: unknown) => value is Any$3;
|
|
8763
|
-
/** Construct a filter from an ast. */
|
|
8764
|
-
declare const fromAst$1: (ast: Filter$1) => Any$3;
|
|
8765
|
-
/**
|
|
8766
|
-
* Filter that matches all objects.
|
|
8767
|
-
*/
|
|
8768
|
-
declare const everything: () => FilterClass;
|
|
8769
|
-
/**
|
|
8770
|
-
* Filter that matches no objects.
|
|
8771
|
-
*/
|
|
8772
|
-
declare const nothing: () => FilterClass;
|
|
8773
|
-
declare const id: (...ids: ObjectId[]) => Any$3;
|
|
8774
|
-
/**
|
|
8775
|
-
* Filter by type.
|
|
8776
|
-
*/
|
|
8777
|
-
declare const type$2: <S$1 extends Schema.All>(schema: S$1 | string, props?: Props<Schema.Type<S$1>>) => Filter<Schema.Type<S$1>>;
|
|
8778
|
-
/**
|
|
8779
|
-
* Filter by non-qualified typename.
|
|
8780
|
-
*/
|
|
8781
|
-
declare const typename$1: (typename: string) => Any$3;
|
|
8782
|
-
/**
|
|
8783
|
-
* Filter by fully qualified type DXN.
|
|
8784
|
-
*/
|
|
8785
|
-
declare const typeDXN: (dxn: DXN) => Any$3;
|
|
8786
|
-
/**
|
|
8787
|
-
* Filter by tag.
|
|
8788
|
-
*/
|
|
8789
|
-
declare const tag: (tag: string) => Any$3;
|
|
8790
|
-
/**
|
|
8791
|
-
* Filter by properties.
|
|
8792
|
-
*/
|
|
8793
|
-
declare const props: <T$1>(props: Props<T$1>) => Filter<T$1>;
|
|
8794
|
-
type TextSearchOptions = {
|
|
8795
|
-
type?: 'full-text' | 'vector';
|
|
8796
|
-
};
|
|
8797
|
-
/**
|
|
8798
|
-
* Full-text or vector search.
|
|
8799
|
-
*/
|
|
8800
|
-
declare const text: (text: string, options?: TextSearchOptions) => Any$3;
|
|
8801
|
-
/**
|
|
8802
|
-
* Filter by foreign keys.
|
|
8803
|
-
*/
|
|
8804
|
-
declare const foreignKeys: <S$1 extends Schema.All>(schema: S$1 | string, keys: ForeignKey[]) => Filter<Schema.Type<S$1>>;
|
|
8805
|
-
/**
|
|
8806
|
-
* Predicate for property to be equal to the provided value.
|
|
8807
|
-
*/
|
|
8808
|
-
declare const eq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8809
|
-
/**
|
|
8810
|
-
* Predicate for property to be not equal to the provided value.
|
|
8811
|
-
*/
|
|
8812
|
-
declare const neq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8813
|
-
/**
|
|
8814
|
-
* Predicate for property to be greater than the provided value.
|
|
8815
|
-
*/
|
|
8816
|
-
declare const gt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8817
|
-
/**
|
|
8818
|
-
* Predicate for property to be greater than or equal to the provided value.
|
|
8819
|
-
*/
|
|
8820
|
-
declare const gte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8821
|
-
/**
|
|
8822
|
-
* Predicate for property to be less than the provided value.
|
|
8823
|
-
*/
|
|
8824
|
-
declare const lt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8825
|
-
/**
|
|
8826
|
-
* Predicate for property to be less than or equal to the provided value.
|
|
8827
|
-
*/
|
|
8828
|
-
declare const lte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
8829
|
-
/**
|
|
8830
|
-
* Predicate for property to be in the provided array.
|
|
8831
|
-
* @param values - Values to check against.
|
|
8832
|
-
*/
|
|
8833
|
-
declare const in$: <T$1>(...values: T$1[]) => Filter<T$1 | undefined>;
|
|
8783
|
+
//#region ../echo/dist/types/src/Ref.d.ts
|
|
8834
8784
|
/**
|
|
8835
|
-
*
|
|
8836
|
-
*
|
|
8785
|
+
* Instance type for a reference.
|
|
8786
|
+
*
|
|
8787
|
+
* Reference can point to any object or relation.
|
|
8788
|
+
* References are lazy loaded.
|
|
8789
|
+
*
|
|
8790
|
+
* `ref.dxn` is the DXN of the referenced object.
|
|
8791
|
+
*
|
|
8792
|
+
* @example
|
|
8793
|
+
* ```ts
|
|
8794
|
+
* const taskRef: Ref<Task> = Ref.make(task);
|
|
8795
|
+
*
|
|
8796
|
+
* await taskRef.load(); // Returns Promise<Task>
|
|
8797
|
+
* yield* Database.load(taskRef); // Effectful version.
|
|
8798
|
+
*
|
|
8799
|
+
* database.makeRef(dxn); // Create a ref from a DXN.
|
|
8800
|
+
* ```
|
|
8837
8801
|
*/
|
|
8838
|
-
|
|
8802
|
+
type Ref$1<T$1> = Ref<T$1>;
|
|
8803
|
+
type Unknown$2 = Ref<Unknown$1>;
|
|
8839
8804
|
/**
|
|
8840
|
-
*
|
|
8841
|
-
*
|
|
8842
|
-
*
|
|
8805
|
+
* Factory function to create a Ref schema for the given target schema.
|
|
8806
|
+
* Use this in schema definitions to declare reference fields.
|
|
8807
|
+
*
|
|
8808
|
+
* @example
|
|
8809
|
+
* ```ts
|
|
8810
|
+
* const Task = Schema.Struct({
|
|
8811
|
+
* assignee: Ref.Ref(Person), // Creates a Ref schema
|
|
8812
|
+
* }).pipe(Type.object({ typename: 'Task', version: '0.1.0' }));
|
|
8813
|
+
* ```
|
|
8843
8814
|
*/
|
|
8844
|
-
declare const
|
|
8815
|
+
declare const Ref$1: <S$1 extends Schema.Any>(schema: S$1) => RefSchema<Schema.Type<S$1>>;
|
|
8845
8816
|
/**
|
|
8846
|
-
*
|
|
8817
|
+
* TypeScript type for a Ref schema.
|
|
8818
|
+
* This is the type of the SCHEMA itself, not the runtime ref instance.
|
|
8819
|
+
* For the instance type, use `Ref.Ref<T>` from the Ref module.
|
|
8820
|
+
*
|
|
8821
|
+
* @example
|
|
8822
|
+
* ```ts
|
|
8823
|
+
* // Schema type annotation (rarely needed, usually inferred):
|
|
8824
|
+
* const refSchema: Ref.RefSchema<typeof Task> = Ref.Ref(Task);
|
|
8825
|
+
*
|
|
8826
|
+
* // Instance type annotation (use Ref.Ref instead):
|
|
8827
|
+
* const refInstance: Ref.Ref<Task> = Ref.make(task);
|
|
8828
|
+
* ```
|
|
8847
8829
|
*/
|
|
8848
|
-
|
|
8830
|
+
interface RefSchema<T$1 extends Unknown> extends RefSchema$1<T$1> {}
|
|
8849
8831
|
/**
|
|
8850
|
-
*
|
|
8832
|
+
* Extract reference target.
|
|
8851
8833
|
*/
|
|
8852
|
-
|
|
8834
|
+
type Target<R$1 extends Unknown$2> = R$1 extends Ref<infer T> ? T : never;
|
|
8853
8835
|
/**
|
|
8854
|
-
*
|
|
8836
|
+
* Reference resolver.
|
|
8855
8837
|
*/
|
|
8856
|
-
|
|
8838
|
+
type Resolver = RefResolver;
|
|
8857
8839
|
//#endregion
|
|
8858
|
-
//#region ../echo/dist/types/src/
|
|
8859
|
-
type Endpoints$1<Source, Target$1> = {
|
|
8860
|
-
[Source]: Source;
|
|
8861
|
-
[Target$1]: Target$1;
|
|
8862
|
-
};
|
|
8840
|
+
//#region ../echo/dist/types/src/internal/Obj/typed-object.d.ts
|
|
8863
8841
|
/**
|
|
8864
|
-
*
|
|
8842
|
+
* Definition for an object type that can be stored in an ECHO database.
|
|
8843
|
+
* Implements effect schema to define object properties.
|
|
8844
|
+
* Has a typename and version.
|
|
8845
|
+
*
|
|
8846
|
+
* In contrast to {@link EchoSchema} this definition is not recorded in the database.
|
|
8847
|
+
*
|
|
8848
|
+
* @deprecated Use `Type.AnyObj` from `@dxos/echo` instead.
|
|
8865
8849
|
*/
|
|
8866
|
-
|
|
8850
|
+
interface TypedObject<A$1 = any, I$1 = any> extends TypeMeta, Schema<A$1, I$1> {}
|
|
8867
8851
|
/**
|
|
8868
|
-
*
|
|
8852
|
+
* Typed object that could be used as a prototype in class definitions.
|
|
8853
|
+
* This is an internal API type.
|
|
8854
|
+
*
|
|
8855
|
+
* @deprecated Use `Type.AnyObj` from `@dxos/echo` instead.
|
|
8869
8856
|
*/
|
|
8870
|
-
|
|
8857
|
+
interface TypedObjectPrototype<A$1 = any, I$1 = any> extends TypedObject<A$1, I$1> {
|
|
8858
|
+
/** Type constructor. */
|
|
8859
|
+
new (): AnyEntity & A$1;
|
|
8860
|
+
}
|
|
8871
8861
|
//#endregion
|
|
8872
|
-
//#region ../echo/dist/types/src/Type.d.ts
|
|
8873
|
-
/**
|
|
8874
|
-
* Dynamic type that can be constructed, mutated, and persisted in the ECHO database.
|
|
8875
|
-
*/
|
|
8876
|
-
declare const RuntimeType: typeof EchoSchema;
|
|
8862
|
+
//#region ../echo/dist/types/src/internal/Type/persistent-schema.d.ts
|
|
8877
8863
|
/**
|
|
8878
|
-
*
|
|
8864
|
+
* Persistent representation of a schema.
|
|
8879
8865
|
*/
|
|
8880
|
-
|
|
8866
|
+
declare const PersistentSchema: EchoObjectSchema<Struct<{
|
|
8867
|
+
name: optional<typeof String$>;
|
|
8868
|
+
typename: refine<string, typeof String$>;
|
|
8869
|
+
version: refine<string, typeof String$>;
|
|
8870
|
+
jsonSchema: Schema<JsonSchemaType, JsonSchemaType, never>;
|
|
8871
|
+
}>, Readonly<{
|
|
8872
|
+
name: optional<typeof String$>;
|
|
8873
|
+
typename: refine<string, typeof String$>;
|
|
8874
|
+
version: refine<string, typeof String$>;
|
|
8875
|
+
jsonSchema: Schema<JsonSchemaType, JsonSchemaType, never>;
|
|
8876
|
+
}>>;
|
|
8877
|
+
interface PersistentSchema extends Schema.Type<typeof PersistentSchema> {}
|
|
8878
|
+
//#endregion
|
|
8879
|
+
//#region ../echo/dist/types/src/internal/Type/echo-schema.d.ts
|
|
8881
8880
|
/**
|
|
8882
|
-
*
|
|
8883
|
-
* The value indicates the entity kind (Object or Relation).
|
|
8881
|
+
* Base schema type.
|
|
8884
8882
|
*/
|
|
8885
|
-
|
|
8886
|
-
readonly
|
|
8887
|
-
|
|
8883
|
+
interface BaseSchema<A$1 = any, I$1 = any> extends TypedObject<A$1, I$1> {
|
|
8884
|
+
get readonly(): boolean;
|
|
8885
|
+
get mutable(): EchoSchema<A$1, I$1>;
|
|
8886
|
+
get snapshot(): Schema<A$1, I$1>;
|
|
8887
|
+
get jsonSchema(): JsonSchemaType;
|
|
8888
|
+
}
|
|
8889
|
+
declare const EchoSchema_base: TypedObjectPrototype<any, any>;
|
|
8888
8890
|
/**
|
|
8889
|
-
*
|
|
8890
|
-
*
|
|
8891
|
-
*
|
|
8891
|
+
* Represents a schema that is persisted in the ECHO database.
|
|
8892
|
+
* Schema can me mutable or readonly (specified by the {@link EchoSchema.readonly} field).
|
|
8893
|
+
*
|
|
8894
|
+
* Schema that can be modified at runtime via the API.
|
|
8895
|
+
* Is an instance of effect-schema (`Schema.Schema.AnyNoContext`) so it can be used in the same way as a regular schema.
|
|
8896
|
+
* IMPORTANT: The schema AST will change reactively when the schema is updated, including synced updates from remote peers.
|
|
8897
|
+
*
|
|
8898
|
+
* The class constructor is a schema instance itself, and can be used in the echo object definitions:
|
|
8892
8899
|
*
|
|
8893
8900
|
* @example
|
|
8894
8901
|
* ```ts
|
|
8895
|
-
*
|
|
8902
|
+
* export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'com.example.type.table', version: '0.1.0' })){
|
|
8903
|
+
* title: Schema.String,
|
|
8904
|
+
* schema: Schema.optional(ref(EchoSchema)),
|
|
8905
|
+
* props: Schema.mutable(S.Array(TablePropSchema)),
|
|
8906
|
+
* }) {}
|
|
8907
|
+
* ```
|
|
8908
|
+
*
|
|
8909
|
+
* The ECHO API will translate any references to PersistentSchema objects to be resolved as EchoSchema objects.
|
|
8910
|
+
*/
|
|
8911
|
+
declare class EchoSchema<A$1 = any, I$1 = any> extends EchoSchema_base implements BaseSchema<A$1, I$1> {
|
|
8912
|
+
private readonly _persistentSchema;
|
|
8913
|
+
private _schema;
|
|
8914
|
+
private _isDirty;
|
|
8915
|
+
/**
|
|
8916
|
+
* Schema kind key that marks this as an ECHO schema.
|
|
8917
|
+
* Makes EchoSchema satisfy the Type.AnyObj type.
|
|
8918
|
+
*/
|
|
8919
|
+
readonly [SchemaKindId]: EntityKind.Object;
|
|
8920
|
+
constructor(_persistentSchema: PersistentSchema);
|
|
8921
|
+
get [TypeId$1](): {
|
|
8922
|
+
_A: (_: any) => any;
|
|
8923
|
+
_I: (_: any) => any;
|
|
8924
|
+
_R: (_: never) => never;
|
|
8925
|
+
};
|
|
8926
|
+
get Type(): A$1;
|
|
8927
|
+
get Encoded(): I$1;
|
|
8928
|
+
get Context(): never;
|
|
8929
|
+
get ast(): AST;
|
|
8930
|
+
get annotations(): (annotations: Annotations.GenericSchema<any>) => Schema<any, any, never>;
|
|
8931
|
+
get pipe(): Schema.AnyNoContext['pipe'];
|
|
8932
|
+
get kind(): EntityKind.Object;
|
|
8933
|
+
get typename(): string;
|
|
8934
|
+
get version(): string;
|
|
8935
|
+
get readonly(): boolean;
|
|
8936
|
+
/**
|
|
8937
|
+
* Returns an immutable schema snapshot of the current state of the schema.
|
|
8938
|
+
*/
|
|
8939
|
+
get snapshot(): Schema.AnyNoContext;
|
|
8940
|
+
/**
|
|
8941
|
+
* Returns the JSON schema for the schema.
|
|
8942
|
+
*/
|
|
8943
|
+
get jsonSchema(): JsonSchemaType;
|
|
8944
|
+
/**
|
|
8945
|
+
* Returns a mutable schema.
|
|
8946
|
+
*/
|
|
8947
|
+
get mutable(): EchoSchema;
|
|
8948
|
+
/**
|
|
8949
|
+
* Id of the ECHO object containing the schema.
|
|
8950
|
+
*/
|
|
8951
|
+
get id(): ObjectId;
|
|
8952
|
+
/**
|
|
8953
|
+
* Short name of the schema.
|
|
8954
|
+
*/
|
|
8955
|
+
get name(): string | undefined;
|
|
8956
|
+
get [SchemaMetaSymbol](): SchemaMeta;
|
|
8957
|
+
/**
|
|
8958
|
+
* Reference to the underlying persistent schema object.
|
|
8959
|
+
*/
|
|
8960
|
+
get persistentSchema(): PersistentType;
|
|
8961
|
+
getProperties(): PropertySignature$1[];
|
|
8962
|
+
/**
|
|
8963
|
+
* @throws Error if the schema is readonly.
|
|
8964
|
+
*/
|
|
8965
|
+
updateTypename(typename: string): void;
|
|
8966
|
+
/**
|
|
8967
|
+
* @throws Error if the schema is readonly.
|
|
8968
|
+
*/
|
|
8969
|
+
addFields(fields: Struct.Fields): void;
|
|
8970
|
+
/**
|
|
8971
|
+
* @throws Error if the schema is readonly.
|
|
8972
|
+
*/
|
|
8973
|
+
updateFields(fields: Struct.Fields): void;
|
|
8974
|
+
/**
|
|
8975
|
+
* @throws Error if the schema is readonly.
|
|
8976
|
+
*/
|
|
8977
|
+
updateFieldPropertyName({
|
|
8978
|
+
before,
|
|
8979
|
+
after
|
|
8980
|
+
}: {
|
|
8981
|
+
before: PropertyKey;
|
|
8982
|
+
after: PropertyKey;
|
|
8983
|
+
}): void;
|
|
8984
|
+
/**
|
|
8985
|
+
* @throws Error if the schema is readonly.
|
|
8986
|
+
*/
|
|
8987
|
+
removeFields(fieldNames: string[]): void;
|
|
8988
|
+
/**
|
|
8989
|
+
* Wrapper for Obj.update that handles the change context for the persistent schema.
|
|
8990
|
+
*/
|
|
8991
|
+
private _change;
|
|
8992
|
+
/**
|
|
8993
|
+
* Called by DatabaseSchemaRegistry on update.
|
|
8994
|
+
*/
|
|
8995
|
+
_invalidate(): void;
|
|
8996
|
+
/**
|
|
8997
|
+
* Rebuilds this schema if it is dirty.
|
|
8998
|
+
*/
|
|
8999
|
+
_rebuild(): void;
|
|
9000
|
+
_getSchema(): Schema.AnyNoContext;
|
|
9001
|
+
}
|
|
9002
|
+
//#endregion
|
|
9003
|
+
//#region ../echo/dist/types/src/Relation.d.ts
|
|
9004
|
+
type Endpoints$1<Source, Target$1> = {
|
|
9005
|
+
[Source]: Source;
|
|
9006
|
+
[Target$1]: Target$1;
|
|
9007
|
+
};
|
|
9008
|
+
/**
|
|
9009
|
+
* Get relation source type.
|
|
9010
|
+
*/
|
|
9011
|
+
type SourceOf<A$1> = A$1 extends Endpoints$1<infer S, infer _T> ? S : never;
|
|
9012
|
+
/**
|
|
9013
|
+
* Get relation target type.
|
|
9014
|
+
*/
|
|
9015
|
+
type TargetOf<A$1> = A$1 extends Endpoints$1<infer _S, infer T> ? T : never;
|
|
9016
|
+
//#endregion
|
|
9017
|
+
//#region ../echo/dist/types/src/Type.d.ts
|
|
9018
|
+
/**
|
|
9019
|
+
* Dynamic type that can be constructed, mutated, and persisted in the ECHO database.
|
|
9020
|
+
*/
|
|
9021
|
+
declare const RuntimeType: typeof EchoSchema;
|
|
9022
|
+
/**
|
|
9023
|
+
* Dynamic type that can be constructed, mutated, and persisted in the ECHO database.
|
|
9024
|
+
*/
|
|
9025
|
+
type RuntimeType = EchoSchema;
|
|
9026
|
+
/**
|
|
9027
|
+
* Type that marks a schema as an ECHO schema.
|
|
9028
|
+
* The value indicates the entity kind (Object or Relation).
|
|
9029
|
+
*/
|
|
9030
|
+
type EchoSchemaKind<K$1 extends EntityKind = EntityKind> = {
|
|
9031
|
+
readonly [SchemaKindId]: K$1;
|
|
9032
|
+
};
|
|
9033
|
+
/**
|
|
9034
|
+
* TypeScript type for an ECHO object schema.
|
|
9035
|
+
* `T` is the instance type produced by the schema.
|
|
9036
|
+
* `Fields` is the optional struct fields type for introspection.
|
|
9037
|
+
*
|
|
9038
|
+
* @example
|
|
9039
|
+
* ```ts
|
|
9040
|
+
* const PersonSchema: Type.Obj<Person> = Schema.Struct({
|
|
8896
9041
|
* name: Schema.String,
|
|
8897
9042
|
* }).pipe(Type.object({ typename: 'Person', version: '0.1.0' }));
|
|
8898
9043
|
*
|
|
@@ -8962,7 +9107,7 @@ type OfShape<Props$1> = BaseObj & Props$1;
|
|
|
8962
9107
|
* NOTE: This is a TypeScript type only, not a schema.
|
|
8963
9108
|
* To validate that a value is an ECHO object, use `Schema.is(Type.Obj)`.
|
|
8964
9109
|
*/
|
|
8965
|
-
interface Unknown$
|
|
9110
|
+
interface Unknown$1 extends BaseObj {}
|
|
8966
9111
|
/**
|
|
8967
9112
|
* Runtime Effect schema for any ECHO object.
|
|
8968
9113
|
* Use for validation, parsing, or as a reference target for collections.
|
|
@@ -8984,70 +9129,155 @@ interface Unknown$2 extends BaseObj {}
|
|
|
8984
9129
|
* }).pipe(Type.object({ typename: 'Collection', version: '0.1.0' }));
|
|
8985
9130
|
* ```
|
|
8986
9131
|
*/
|
|
8987
|
-
declare const Unknown$
|
|
9132
|
+
declare const Unknown$1: Obj$1<Unknown$1>;
|
|
8988
9133
|
/**
|
|
8989
9134
|
* JSON-encoded properties for objects.
|
|
8990
9135
|
*/
|
|
8991
9136
|
interface BaseObjJson {
|
|
8992
9137
|
id: string;
|
|
8993
9138
|
}
|
|
8994
|
-
|
|
8995
|
-
|
|
9139
|
+
declare namespace Filter_d_exports {
|
|
9140
|
+
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 };
|
|
9141
|
+
}
|
|
9142
|
+
interface Filter<T$1> {
|
|
9143
|
+
'~Filter': {
|
|
9144
|
+
value: Covariant<T$1>;
|
|
9145
|
+
};
|
|
9146
|
+
ast: Filter$1;
|
|
9147
|
+
}
|
|
9148
|
+
type Props<T$1> = { [K in keyof T$1 & string]?: Filter<T$1[K]> | T$1[K] };
|
|
9149
|
+
type Any$3 = Filter<any>;
|
|
9150
|
+
type Type$2<F extends Any$3> = F extends Filter<infer T> ? T : never;
|
|
9151
|
+
declare class FilterClass implements Any$3 {
|
|
9152
|
+
readonly ast: Filter$1;
|
|
9153
|
+
private static 'variance';
|
|
9154
|
+
constructor(ast: Filter$1);
|
|
9155
|
+
'~Filter': {
|
|
9156
|
+
value: Covariant<any>;
|
|
9157
|
+
};
|
|
9158
|
+
}
|
|
9159
|
+
declare const is$1: (value: unknown) => value is Any$3;
|
|
9160
|
+
/** Construct a filter from an ast. */
|
|
9161
|
+
declare const fromAst$1: (ast: Filter$1) => Any$3;
|
|
8996
9162
|
/**
|
|
8997
|
-
*
|
|
8998
|
-
*
|
|
8999
|
-
* Reference can point to any object or relation.
|
|
9000
|
-
* References are lazy loaded.
|
|
9001
|
-
*
|
|
9002
|
-
* `ref.dxn` is the DXN of the referenced object.
|
|
9003
|
-
*
|
|
9004
|
-
* @example
|
|
9005
|
-
* ```ts
|
|
9006
|
-
* const taskRef: Ref<Task> = Ref.make(task);
|
|
9007
|
-
*
|
|
9008
|
-
* await taskRef.load(); // Returns Promise<Task>
|
|
9009
|
-
* yield* Database.load(taskRef); // Effectful version.
|
|
9010
|
-
*
|
|
9011
|
-
* database.makeRef(dxn); // Create a ref from a DXN.
|
|
9012
|
-
* ```
|
|
9163
|
+
* Filter that matches all objects.
|
|
9013
9164
|
*/
|
|
9014
|
-
|
|
9015
|
-
type Unknown$1 = Ref<Unknown$2>;
|
|
9165
|
+
declare const everything: () => FilterClass;
|
|
9016
9166
|
/**
|
|
9017
|
-
*
|
|
9018
|
-
* Use this in schema definitions to declare reference fields.
|
|
9019
|
-
*
|
|
9020
|
-
* @example
|
|
9021
|
-
* ```ts
|
|
9022
|
-
* const Task = Schema.Struct({
|
|
9023
|
-
* assignee: Ref.Ref(Person), // Creates a Ref schema
|
|
9024
|
-
* }).pipe(Type.object({ typename: 'Task', version: '0.1.0' }));
|
|
9025
|
-
* ```
|
|
9167
|
+
* Filter that matches no objects.
|
|
9026
9168
|
*/
|
|
9027
|
-
declare const
|
|
9169
|
+
declare const nothing: () => FilterClass;
|
|
9170
|
+
declare const id: (...ids: ObjectId[]) => Any$3;
|
|
9028
9171
|
/**
|
|
9029
|
-
*
|
|
9030
|
-
* This is the type of the SCHEMA itself, not the runtime ref instance.
|
|
9031
|
-
* For the instance type, use `Ref.Ref<T>` from the Ref module.
|
|
9032
|
-
*
|
|
9033
|
-
* @example
|
|
9034
|
-
* ```ts
|
|
9035
|
-
* // Schema type annotation (rarely needed, usually inferred):
|
|
9036
|
-
* const refSchema: Ref.RefSchema<typeof Task> = Ref.Ref(Task);
|
|
9037
|
-
*
|
|
9038
|
-
* // Instance type annotation (use Ref.Ref instead):
|
|
9039
|
-
* const refInstance: Ref.Ref<Task> = Ref.make(task);
|
|
9040
|
-
* ```
|
|
9172
|
+
* Filter by type.
|
|
9041
9173
|
*/
|
|
9042
|
-
|
|
9174
|
+
declare const type$2: <S$1 extends Schema.All>(schema: S$1 | string, props?: Props<Schema.Type<S$1>>) => Filter<Schema.Type<S$1>>;
|
|
9043
9175
|
/**
|
|
9044
|
-
*
|
|
9176
|
+
* Filter by non-qualified typename.
|
|
9045
9177
|
*/
|
|
9046
|
-
|
|
9178
|
+
declare const typename$1: (typename: string) => Any$3;
|
|
9047
9179
|
/**
|
|
9048
|
-
*
|
|
9180
|
+
* Filter by fully qualified type DXN.
|
|
9049
9181
|
*/
|
|
9050
|
-
|
|
9182
|
+
declare const typeDXN: (dxn: DXN) => Any$3;
|
|
9183
|
+
/**
|
|
9184
|
+
* Filter by tag.
|
|
9185
|
+
*/
|
|
9186
|
+
declare const tag: (tag: string) => Any$3;
|
|
9187
|
+
/**
|
|
9188
|
+
* Filter by properties.
|
|
9189
|
+
*/
|
|
9190
|
+
declare const props: <T$1>(props: Props<T$1>) => Filter<T$1>;
|
|
9191
|
+
type TextSearchOptions = {
|
|
9192
|
+
type?: 'full-text' | 'vector';
|
|
9193
|
+
};
|
|
9194
|
+
/**
|
|
9195
|
+
* Full-text or vector search.
|
|
9196
|
+
*/
|
|
9197
|
+
declare const text: (text: string, options?: TextSearchOptions) => Any$3;
|
|
9198
|
+
/**
|
|
9199
|
+
* Filter by foreign keys.
|
|
9200
|
+
*/
|
|
9201
|
+
declare const foreignKeys: <S$1 extends Schema.All>(schema: S$1 | string, keys: ForeignKey[]) => Filter<Schema.Type<S$1>>;
|
|
9202
|
+
/**
|
|
9203
|
+
* Predicate for property to be equal to the provided value.
|
|
9204
|
+
*/
|
|
9205
|
+
declare const eq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9206
|
+
/**
|
|
9207
|
+
* Predicate for property to be not equal to the provided value.
|
|
9208
|
+
*/
|
|
9209
|
+
declare const neq: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9210
|
+
/**
|
|
9211
|
+
* Predicate for property to be greater than the provided value.
|
|
9212
|
+
*/
|
|
9213
|
+
declare const gt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9214
|
+
/**
|
|
9215
|
+
* Predicate for property to be greater than or equal to the provided value.
|
|
9216
|
+
*/
|
|
9217
|
+
declare const gte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9218
|
+
/**
|
|
9219
|
+
* Predicate for property to be less than the provided value.
|
|
9220
|
+
*/
|
|
9221
|
+
declare const lt: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9222
|
+
/**
|
|
9223
|
+
* Predicate for property to be less than or equal to the provided value.
|
|
9224
|
+
*/
|
|
9225
|
+
declare const lte: <T$1>(value: T$1) => Filter<T$1 | undefined>;
|
|
9226
|
+
/**
|
|
9227
|
+
* Predicate for property to be in the provided array.
|
|
9228
|
+
* @param values - Values to check against.
|
|
9229
|
+
*/
|
|
9230
|
+
declare const in$: <T$1>(...values: T$1[]) => Filter<T$1>;
|
|
9231
|
+
/**
|
|
9232
|
+
* Predicate for an array property to contain the provided value.
|
|
9233
|
+
* @param value - Value to check against.
|
|
9234
|
+
*/
|
|
9235
|
+
declare const contains: <T$1>(value: T$1) => Filter<readonly T$1[] | undefined>;
|
|
9236
|
+
/**
|
|
9237
|
+
* Predicate for property to be in the provided range.
|
|
9238
|
+
* @param from - Start of the range (inclusive).
|
|
9239
|
+
* @param to - End of the range (exclusive).
|
|
9240
|
+
*/
|
|
9241
|
+
declare const between: <T$1>(from: T$1, to: T$1) => Filter<T$1>;
|
|
9242
|
+
type TimeRange = {
|
|
9243
|
+
after?: Date | number;
|
|
9244
|
+
before?: Date | number;
|
|
9245
|
+
};
|
|
9246
|
+
/**
|
|
9247
|
+
* Filter objects by updatedAt timestamp.
|
|
9248
|
+
*/
|
|
9249
|
+
declare const updated: (range: TimeRange) => Any$3;
|
|
9250
|
+
/**
|
|
9251
|
+
* Filter objects by createdAt timestamp.
|
|
9252
|
+
*/
|
|
9253
|
+
declare const created: (range: TimeRange) => Any$3;
|
|
9254
|
+
type ChildOfOptions = {
|
|
9255
|
+
/** Whether to match transitively (grandchildren, etc.). Defaults to true. */
|
|
9256
|
+
transitive?: boolean;
|
|
9257
|
+
};
|
|
9258
|
+
/**
|
|
9259
|
+
* Filter objects that are children of the specified parent(s).
|
|
9260
|
+
* Accepts ECHO objects, Refs, or arrays of either.
|
|
9261
|
+
* Refs are resolved to DXNs without loading; objects use {@link Obj.getDXN}.
|
|
9262
|
+
* With transitive=true (default), also matches grandchildren and beyond.
|
|
9263
|
+
*/
|
|
9264
|
+
declare const childOf: (parents: Unknown$1 | Unknown$2 | readonly (Unknown$1 | Unknown$2)[], options?: ChildOfOptions) => Any$3;
|
|
9265
|
+
/**
|
|
9266
|
+
* Negate the filter.
|
|
9267
|
+
*/
|
|
9268
|
+
declare const not: <F extends Any$3>(filter: F) => Filter<Type$2<F>>;
|
|
9269
|
+
/**
|
|
9270
|
+
* Combine filters with a logical AND.
|
|
9271
|
+
*/
|
|
9272
|
+
declare const and: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
9273
|
+
/**
|
|
9274
|
+
* Combine filters with a logical OR.
|
|
9275
|
+
*/
|
|
9276
|
+
declare const or: <Filters extends readonly Any$3[]>(...filters: Filters) => Filter<Type$2<Filters[number]>>;
|
|
9277
|
+
/**
|
|
9278
|
+
* Returns a human-readable string representation of a Filter AST.
|
|
9279
|
+
*/
|
|
9280
|
+
declare const pretty$1: (filter: Any$3) => string;
|
|
9051
9281
|
//#endregion
|
|
9052
9282
|
//#region ../echo/dist/types/src/JsonSchema.d.ts
|
|
9053
9283
|
/**
|
|
@@ -9164,7 +9394,7 @@ type Query$1 = {
|
|
|
9164
9394
|
* @default false
|
|
9165
9395
|
*
|
|
9166
9396
|
* The system schema include but are not limited to:
|
|
9167
|
-
* - dxos.
|
|
9397
|
+
* - org.dxos.type.schema
|
|
9168
9398
|
*/
|
|
9169
9399
|
includeSystem?: boolean;
|
|
9170
9400
|
};
|
|
@@ -9240,7 +9470,7 @@ interface RefResolverOptions {
|
|
|
9240
9470
|
middleware?: (obj: AnyProperties) => AnyProperties;
|
|
9241
9471
|
}
|
|
9242
9472
|
/**
|
|
9243
|
-
*
|
|
9473
|
+
* Manages cross-space database interactions.
|
|
9244
9474
|
*/
|
|
9245
9475
|
interface Hypergraph extends Queryable {
|
|
9246
9476
|
get schemaRegistry(): SchemaRegistry;
|
|
@@ -9263,6 +9493,11 @@ interface Hypergraph extends Queryable {
|
|
|
9263
9493
|
* @returns Result of `onLoad`.
|
|
9264
9494
|
*/
|
|
9265
9495
|
createRefResolver(options: RefResolverOptions): Resolver;
|
|
9496
|
+
/**
|
|
9497
|
+
* Get a database by space ID.
|
|
9498
|
+
* @returns The database for the given space ID, or undefined if not found.
|
|
9499
|
+
*/
|
|
9500
|
+
getDatabase(spaceId: SpaceId): Database | undefined;
|
|
9266
9501
|
}
|
|
9267
9502
|
//#endregion
|
|
9268
9503
|
//#region ../echo/dist/types/src/Collection.d.ts
|
|
@@ -9271,7 +9506,7 @@ interface Hypergraph extends Queryable {
|
|
|
9271
9506
|
*/
|
|
9272
9507
|
declare const Collection: Obj$1<{
|
|
9273
9508
|
readonly name?: string | undefined;
|
|
9274
|
-
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$
|
|
9509
|
+
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$1>[];
|
|
9275
9510
|
}, Struct.Fields>;
|
|
9276
9511
|
interface Collection extends Schema.Type<typeof Collection> {}
|
|
9277
9512
|
//#endregion
|
|
@@ -9281,12 +9516,13 @@ interface Collection extends Schema.Type<typeof Collection> {}
|
|
|
9281
9516
|
*
|
|
9282
9517
|
* @example
|
|
9283
9518
|
* ```ts
|
|
9284
|
-
* const feed = Obj.make(Feed.Feed, { name: 'notifications', kind: 'dxos.
|
|
9519
|
+
* const feed = Obj.make(Feed.Feed, { name: 'notifications', kind: 'org.dxos.plugin.notifications.v1' });
|
|
9285
9520
|
* ```
|
|
9286
9521
|
*/
|
|
9287
9522
|
declare const Feed: Obj$1<{
|
|
9288
|
-
readonly kind?: string | undefined;
|
|
9289
9523
|
readonly name?: string | undefined;
|
|
9524
|
+
readonly kind?: string | undefined;
|
|
9525
|
+
readonly namespace?: "data" | "trace" | undefined;
|
|
9290
9526
|
}, Struct.Fields>;
|
|
9291
9527
|
/**
|
|
9292
9528
|
* TypeScript instance type for a Feed object.
|
|
@@ -9300,8 +9536,8 @@ interface Feed extends Schema.Type<typeof Feed> {}
|
|
|
9300
9536
|
*/
|
|
9301
9537
|
declare const ViewSchema: Obj$1<{
|
|
9302
9538
|
readonly query: {
|
|
9303
|
-
readonly ast: QuerySelectClause | QueryFilterClause | QueryReferenceTraversalClause | QueryIncomingReferencesClause | QueryRelationClause | QueryRelationTraversalClause | QueryHierarchyTraversalClause | QueryUnionClause | QuerySetDifferenceClause | QueryOrderClause | QueryOptionsClause | QueryLimitClause | QueryFromClause;
|
|
9304
9539
|
readonly raw?: string | undefined;
|
|
9540
|
+
readonly ast: QueryFilterClause | QueryFromClause | QueryHierarchyTraversalClause | QueryIncomingReferencesClause | QueryLimitClause | QueryOptionsClause | QueryOrderClause | QueryReferenceTraversalClause | QueryRelationClause | QueryRelationTraversalClause | QuerySelectClause | QuerySetDifferenceClause | QueryUnionClause;
|
|
9305
9541
|
};
|
|
9306
9542
|
readonly projection: {
|
|
9307
9543
|
readonly schema?: JsonSchemaType | undefined;
|
|
@@ -9325,11 +9561,12 @@ declare const View: Obj$1<View>;
|
|
|
9325
9561
|
* Abstart set of objects, represented by a view, feed, or collection.
|
|
9326
9562
|
*/
|
|
9327
9563
|
declare const Dataset: Union<[Obj$1<{
|
|
9328
|
-
readonly kind?: string | undefined;
|
|
9329
9564
|
readonly name?: string | undefined;
|
|
9565
|
+
readonly kind?: string | undefined;
|
|
9566
|
+
readonly namespace?: "data" | "trace" | undefined;
|
|
9330
9567
|
}, Struct.Fields>, Obj$1<{
|
|
9331
9568
|
readonly name?: string | undefined;
|
|
9332
|
-
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$
|
|
9569
|
+
readonly objects: readonly Ref<OfKind<EntityKind.Object> & Unknown$1>[];
|
|
9333
9570
|
}, Struct.Fields>, Obj$1<View, Struct.Fields>]>;
|
|
9334
9571
|
type Dataset = Feed | Collection | View;
|
|
9335
9572
|
declare namespace Order_d_exports {
|
|
@@ -9350,7 +9587,7 @@ declare const property: <T$1>(property: keyof T$1 & string, direction: OrderDire
|
|
|
9350
9587
|
*/
|
|
9351
9588
|
declare const rank: <T$1>(direction?: OrderDirection) => Order<T$1>;
|
|
9352
9589
|
declare namespace Query_d_exports {
|
|
9353
|
-
export { Any$1 as Any, Query, Type$1 as Type, all, from, fromAst, is, select, type$1 as type, without };
|
|
9590
|
+
export { Any$1 as Any, Query, Type$1 as Type, all, from, fromAst, is, pretty, select, type$1 as type, without };
|
|
9354
9591
|
}
|
|
9355
9592
|
/**
|
|
9356
9593
|
* All property paths inside T that are references.
|
|
@@ -9373,7 +9610,7 @@ interface Query<T$1> {
|
|
|
9373
9610
|
* @param key - Property path inside T that is a reference or optional reference.
|
|
9374
9611
|
* @returns Query for the target of the reference.
|
|
9375
9612
|
*/
|
|
9376
|
-
'reference'<K$1 extends RefPropKey<T$1>>(key: K$1): Query<T$1[K$1] extends Unknown$
|
|
9613
|
+
'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>;
|
|
9377
9614
|
/**
|
|
9378
9615
|
* Find objects referencing this object.
|
|
9379
9616
|
* @param target - Schema of the referencing object. If not provided, matches any type.
|
|
@@ -9498,6 +9735,10 @@ interface Query<T$1> {
|
|
|
9498
9735
|
* Add options to a query.
|
|
9499
9736
|
*/
|
|
9500
9737
|
'options'(options: QueryOptions): Query<T$1>;
|
|
9738
|
+
/**
|
|
9739
|
+
* Attach a diagnostic label for logs and tooling (execution semantics unchanged).
|
|
9740
|
+
*/
|
|
9741
|
+
'debugLabel'(label: string): Query<T$1>;
|
|
9501
9742
|
}
|
|
9502
9743
|
type Any$1 = Query<any>;
|
|
9503
9744
|
type Type$1<Q extends Any$1> = Q extends Query<infer T> ? T : never;
|
|
@@ -9518,7 +9759,10 @@ declare const select: <F extends Any$3>(filter: F) => Query<Type$2<F>>;
|
|
|
9518
9759
|
*
|
|
9519
9760
|
* Shorthand for: `Query.select(Filter.type(schema, predicates))`.
|
|
9520
9761
|
*/
|
|
9521
|
-
declare const type$1:
|
|
9762
|
+
declare const type$1: {
|
|
9763
|
+
<S$1 extends Schema.All>(schema: S$1, predicates?: Props<Schema.Type<S$1>>): Query<Schema.Type<S$1>>;
|
|
9764
|
+
(schema: string, predicates?: Props<unknown>): Query<any>;
|
|
9765
|
+
};
|
|
9522
9766
|
/**
|
|
9523
9767
|
* Combine results of multiple queries.
|
|
9524
9768
|
* @param queries - Queries to combine.
|
|
@@ -9539,9 +9783,13 @@ declare const without: <T$1>(source: Query<T$1>, exclude: Query<T$1>) => Query<T
|
|
|
9539
9783
|
* @param source - Data source: database, feed, 'all-accessible-spaces', or another query.
|
|
9540
9784
|
* @returns Query scoped to the given source.
|
|
9541
9785
|
*/
|
|
9542
|
-
declare const from: (source: Database | Database[] | Feed | Feed[] | Any$1 | Scope |
|
|
9786
|
+
declare const from: (source: Database | Database[] | Feed | Feed[] | Any$1 | Scope | 'all-accessible-spaces', options?: {
|
|
9543
9787
|
includeFeeds?: boolean;
|
|
9544
9788
|
}) => Any$1;
|
|
9789
|
+
/**
|
|
9790
|
+
* Returns a human-readable string representation of a Query AST.
|
|
9791
|
+
*/
|
|
9792
|
+
declare const pretty: (query: Any$1) => string;
|
|
9545
9793
|
//#endregion
|
|
9546
9794
|
//#region ../echo/dist/types/src/Database.d.ts
|
|
9547
9795
|
/**
|
|
@@ -9580,7 +9828,7 @@ type FlushOptions = {
|
|
|
9580
9828
|
disk?: boolean;
|
|
9581
9829
|
/**
|
|
9582
9830
|
* Wait for pending index updates.
|
|
9583
|
-
* @default
|
|
9831
|
+
* @default true
|
|
9584
9832
|
*/
|
|
9585
9833
|
indexes?: boolean;
|
|
9586
9834
|
/**
|
|
@@ -9606,7 +9854,7 @@ interface Database extends Queryable {
|
|
|
9606
9854
|
/**
|
|
9607
9855
|
* Return object by local ID.
|
|
9608
9856
|
*/
|
|
9609
|
-
getObjectById<T$1 extends Unknown$
|
|
9857
|
+
getObjectById<T$1 extends Unknown$1 = OfShape<AnyProperties>>(id: string, opts?: GetObjectByIdOptions): T$1 | undefined;
|
|
9610
9858
|
/**
|
|
9611
9859
|
* Query objects.
|
|
9612
9860
|
*/
|
|
@@ -9636,7 +9884,7 @@ interface Database extends Queryable {
|
|
|
9636
9884
|
}
|
|
9637
9885
|
declare const Database: Schema<Database>;
|
|
9638
9886
|
//#endregion
|
|
9639
|
-
//#region ../echo/dist/types/src/internal/
|
|
9887
|
+
//#region ../echo/dist/types/src/internal/Entity/object.d.ts
|
|
9640
9888
|
/**
|
|
9641
9889
|
* Object schema type with kind marker.
|
|
9642
9890
|
*/
|
|
@@ -9651,169 +9899,6 @@ declare const EchoObjectSchema: {
|
|
|
9651
9899
|
}) => EchoObjectSchema<Self, Fields>;
|
|
9652
9900
|
};
|
|
9653
9901
|
//#endregion
|
|
9654
|
-
//#region ../echo/dist/types/src/internal/object/typed-object.d.ts
|
|
9655
|
-
/**
|
|
9656
|
-
* Definition for an object type that can be stored in an ECHO database.
|
|
9657
|
-
* Implements effect schema to define object properties.
|
|
9658
|
-
* Has a typename and version.
|
|
9659
|
-
*
|
|
9660
|
-
* In contrast to {@link EchoSchema} this definition is not recorded in the database.
|
|
9661
|
-
*
|
|
9662
|
-
* @deprecated Use `Type.AnyObj` from `@dxos/echo` instead.
|
|
9663
|
-
*/
|
|
9664
|
-
interface TypedObject<A$1 = any, I$1 = any> extends TypeMeta, Schema<A$1, I$1> {}
|
|
9665
|
-
/**
|
|
9666
|
-
* Typed object that could be used as a prototype in class definitions.
|
|
9667
|
-
* This is an internal API type.
|
|
9668
|
-
*
|
|
9669
|
-
* @deprecated Use `Type.AnyObj` from `@dxos/echo` instead.
|
|
9670
|
-
*/
|
|
9671
|
-
interface TypedObjectPrototype<A$1 = any, I$1 = any> extends TypedObject<A$1, I$1> {
|
|
9672
|
-
/** Type constructor. */
|
|
9673
|
-
new (): AnyEntity & A$1;
|
|
9674
|
-
}
|
|
9675
|
-
//#endregion
|
|
9676
|
-
//#region ../echo/dist/types/src/internal/schema/persistent-schema.d.ts
|
|
9677
|
-
/**
|
|
9678
|
-
* Persistent representation of a schema.
|
|
9679
|
-
*/
|
|
9680
|
-
declare const PersistentSchema: EchoObjectSchema<Struct<{
|
|
9681
|
-
name: optional<typeof String$>;
|
|
9682
|
-
typename: refine<string, typeof String$>;
|
|
9683
|
-
version: refine<string, typeof String$>;
|
|
9684
|
-
jsonSchema: Schema<JsonSchemaType, JsonSchemaType, never>;
|
|
9685
|
-
}>, Readonly<{
|
|
9686
|
-
name: optional<typeof String$>;
|
|
9687
|
-
typename: refine<string, typeof String$>;
|
|
9688
|
-
version: refine<string, typeof String$>;
|
|
9689
|
-
jsonSchema: Schema<JsonSchemaType, JsonSchemaType, never>;
|
|
9690
|
-
}>>;
|
|
9691
|
-
interface PersistentSchema extends Schema.Type<typeof PersistentSchema> {}
|
|
9692
|
-
//#endregion
|
|
9693
|
-
//#region ../echo/dist/types/src/internal/schema/echo-schema.d.ts
|
|
9694
|
-
/**
|
|
9695
|
-
* Base schema type.
|
|
9696
|
-
*/
|
|
9697
|
-
interface BaseSchema<A$1 = any, I$1 = any> extends TypedObject<A$1, I$1> {
|
|
9698
|
-
get readonly(): boolean;
|
|
9699
|
-
get mutable(): EchoSchema<A$1, I$1>;
|
|
9700
|
-
get snapshot(): Schema<A$1, I$1>;
|
|
9701
|
-
get jsonSchema(): JsonSchemaType;
|
|
9702
|
-
}
|
|
9703
|
-
declare const EchoSchema_base: TypedObjectPrototype<any, any>;
|
|
9704
|
-
/**
|
|
9705
|
-
* Represents a schema that is persisted in the ECHO database.
|
|
9706
|
-
* Schema can me mutable or readonly (specified by the {@link EchoSchema.readonly} field).
|
|
9707
|
-
*
|
|
9708
|
-
* Schema that can be modified at runtime via the API.
|
|
9709
|
-
* Is an instance of effect-schema (`Schema.Schema.AnyNoContext`) so it can be used in the same way as a regular schema.
|
|
9710
|
-
* IMPORTANT: The schema AST will change reactively when the schema is updated, including synced updates from remote peers.
|
|
9711
|
-
*
|
|
9712
|
-
* The class constructor is a schema instance itself, and can be used in the echo object definitions:
|
|
9713
|
-
*
|
|
9714
|
-
* @example
|
|
9715
|
-
* ```ts
|
|
9716
|
-
* export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'example.org/type/Table', version: '0.1.0' })){
|
|
9717
|
-
* title: Schema.String,
|
|
9718
|
-
* schema: Schema.optional(ref(EchoSchema)),
|
|
9719
|
-
* props: Schema.mutable(S.Array(TablePropSchema)),
|
|
9720
|
-
* }) {}
|
|
9721
|
-
* ```
|
|
9722
|
-
*
|
|
9723
|
-
* The ECHO API will translate any references to PersistentSchema objects to be resolved as EchoSchema objects.
|
|
9724
|
-
*/
|
|
9725
|
-
declare class EchoSchema<A$1 = any, I$1 = any> extends EchoSchema_base implements BaseSchema<A$1, I$1> {
|
|
9726
|
-
private readonly _persistentSchema;
|
|
9727
|
-
private _schema;
|
|
9728
|
-
private _isDirty;
|
|
9729
|
-
/**
|
|
9730
|
-
* Schema kind key that marks this as an ECHO schema.
|
|
9731
|
-
* Makes EchoSchema satisfy the Type.AnyObj type.
|
|
9732
|
-
*/
|
|
9733
|
-
readonly [SchemaKindId]: EntityKind.Object;
|
|
9734
|
-
constructor(_persistentSchema: PersistentSchema);
|
|
9735
|
-
get [TypeId$1](): {
|
|
9736
|
-
_A: (_: any) => any;
|
|
9737
|
-
_I: (_: any) => any;
|
|
9738
|
-
_R: (_: never) => never;
|
|
9739
|
-
};
|
|
9740
|
-
get Type(): A$1;
|
|
9741
|
-
get Encoded(): I$1;
|
|
9742
|
-
get Context(): never;
|
|
9743
|
-
get ast(): AST;
|
|
9744
|
-
get annotations(): (annotations: Annotations.GenericSchema<any>) => Schema<any, any, never>;
|
|
9745
|
-
get pipe(): Schema.AnyNoContext['pipe'];
|
|
9746
|
-
get kind(): EntityKind.Object;
|
|
9747
|
-
get typename(): string;
|
|
9748
|
-
get version(): string;
|
|
9749
|
-
get readonly(): boolean;
|
|
9750
|
-
/**
|
|
9751
|
-
* Returns an immutable schema snapshot of the current state of the schema.
|
|
9752
|
-
*/
|
|
9753
|
-
get snapshot(): Schema.AnyNoContext;
|
|
9754
|
-
/**
|
|
9755
|
-
* Returns the JSON schema for the schema.
|
|
9756
|
-
*/
|
|
9757
|
-
get jsonSchema(): JsonSchemaType;
|
|
9758
|
-
/**
|
|
9759
|
-
* Returns a mutable schema.
|
|
9760
|
-
*/
|
|
9761
|
-
get mutable(): EchoSchema;
|
|
9762
|
-
/**
|
|
9763
|
-
* Id of the ECHO object containing the schema.
|
|
9764
|
-
*/
|
|
9765
|
-
get id(): ObjectId;
|
|
9766
|
-
/**
|
|
9767
|
-
* Short name of the schema.
|
|
9768
|
-
*/
|
|
9769
|
-
get name(): string | undefined;
|
|
9770
|
-
get [SchemaMetaSymbol](): SchemaMeta;
|
|
9771
|
-
/**
|
|
9772
|
-
* Reference to the underlying persistent schema object.
|
|
9773
|
-
*/
|
|
9774
|
-
get persistentSchema(): PersistentType;
|
|
9775
|
-
getProperties(): PropertySignature$1[];
|
|
9776
|
-
/**
|
|
9777
|
-
* @throws Error if the schema is readonly.
|
|
9778
|
-
*/
|
|
9779
|
-
updateTypename(typename: string): void;
|
|
9780
|
-
/**
|
|
9781
|
-
* @throws Error if the schema is readonly.
|
|
9782
|
-
*/
|
|
9783
|
-
addFields(fields: Struct.Fields): void;
|
|
9784
|
-
/**
|
|
9785
|
-
* @throws Error if the schema is readonly.
|
|
9786
|
-
*/
|
|
9787
|
-
updateFields(fields: Struct.Fields): void;
|
|
9788
|
-
/**
|
|
9789
|
-
* @throws Error if the schema is readonly.
|
|
9790
|
-
*/
|
|
9791
|
-
updateFieldPropertyName({
|
|
9792
|
-
before,
|
|
9793
|
-
after
|
|
9794
|
-
}: {
|
|
9795
|
-
before: PropertyKey;
|
|
9796
|
-
after: PropertyKey;
|
|
9797
|
-
}): void;
|
|
9798
|
-
/**
|
|
9799
|
-
* @throws Error if the schema is readonly.
|
|
9800
|
-
*/
|
|
9801
|
-
removeFields(fieldNames: string[]): void;
|
|
9802
|
-
/**
|
|
9803
|
-
* Wrapper for Obj.change that handles the change context for the persistent schema.
|
|
9804
|
-
*/
|
|
9805
|
-
private _change;
|
|
9806
|
-
/**
|
|
9807
|
-
* Called by DatabaseSchemaRegistry on update.
|
|
9808
|
-
*/
|
|
9809
|
-
_invalidate(): void;
|
|
9810
|
-
/**
|
|
9811
|
-
* Rebuilds this schema if it is dirty.
|
|
9812
|
-
*/
|
|
9813
|
-
_rebuild(): void;
|
|
9814
|
-
_getSchema(): Schema.AnyNoContext;
|
|
9815
|
-
}
|
|
9816
|
-
//#endregion
|
|
9817
9902
|
//#region ../echo/dist/types/src/Entity.d.ts
|
|
9818
9903
|
declare const KindId$1: "~@dxos/echo/Kind";
|
|
9819
9904
|
type KindId$1 = typeof KindId;
|
|
@@ -9832,7 +9917,7 @@ interface OfKind<K$1 extends Kind> {
|
|
|
9832
9917
|
*/
|
|
9833
9918
|
interface Unknown extends OfKind<Kind> {}
|
|
9834
9919
|
//#endregion
|
|
9835
|
-
//#region ../echo/dist/types/src/internal/types/base.d.ts
|
|
9920
|
+
//#region ../echo/dist/types/src/internal/common/types/base.d.ts
|
|
9836
9921
|
/**
|
|
9837
9922
|
* Base type for all data objects (reactive, ECHO, and other raw objects).
|
|
9838
9923
|
* NOTE: This describes the base type for all database objects.
|
|
@@ -9847,17 +9932,17 @@ interface AnyEntity {
|
|
|
9847
9932
|
readonly id: ObjectId;
|
|
9848
9933
|
}
|
|
9849
9934
|
//#endregion
|
|
9850
|
-
//#region ../echo/dist/types/src/internal/types/entity.d.ts
|
|
9935
|
+
//#region ../echo/dist/types/src/internal/common/types/entity.d.ts
|
|
9851
9936
|
/**
|
|
9852
9937
|
* String key used to identify the kind of an entity instance (object or relation).
|
|
9853
9938
|
*/
|
|
9854
|
-
declare const KindId:
|
|
9939
|
+
declare const KindId: '~@dxos/echo/Kind';
|
|
9855
9940
|
type KindId = typeof KindId;
|
|
9856
9941
|
/**
|
|
9857
9942
|
* String key used to identify the kind of a schema (object schema or relation schema).
|
|
9858
9943
|
* Parallels KindId which identifies instance kinds.
|
|
9859
9944
|
*/
|
|
9860
|
-
declare const SchemaKindId:
|
|
9945
|
+
declare const SchemaKindId: '~@dxos/echo/SchemaKind';
|
|
9861
9946
|
type SchemaKindId = typeof SchemaKindId;
|
|
9862
9947
|
/**
|
|
9863
9948
|
* Kinds of entities stored in ECHO: objects and relations.
|
|
@@ -9867,7 +9952,7 @@ declare enum EntityKind {
|
|
|
9867
9952
|
Relation = "relation",
|
|
9868
9953
|
}
|
|
9869
9954
|
//#endregion
|
|
9870
|
-
//#region ../echo/dist/types/src/internal/
|
|
9955
|
+
//#region ../echo/dist/types/src/internal/Annotation/annotations.d.ts
|
|
9871
9956
|
declare const TypeMeta: Struct<{
|
|
9872
9957
|
typename: refine<string, typeof String$>;
|
|
9873
9958
|
version: refine<string, typeof String$>;
|