@dxos/echo-protocol 0.8.4-main.d05673bc65 → 0.8.4-main.e00bdcdb52
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 +25 -20
- package/dist/lib/neutral/index.mjs.map +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/types/src/document-structure.d.ts +1 -1
- package/dist/types/src/echo-feed-codec.d.ts.map +1 -1
- package/dist/types/src/query/ast.d.ts +58 -25
- package/dist/types/src/query/ast.d.ts.map +1 -1
- package/dist/types/src/reference.d.ts.map +1 -1
- package/dist/types/src/space-id.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -10
- package/src/query/ast.ts +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/echo-protocol",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.e00bdcdb52",
|
|
4
4
|
"description": "Core ECHO APIs.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -20,20 +20,17 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"types": "dist/types/src/index.d.ts",
|
|
23
|
-
"typesVersions": {
|
|
24
|
-
"*": {}
|
|
25
|
-
},
|
|
26
23
|
"files": [
|
|
27
24
|
"dist",
|
|
28
25
|
"src"
|
|
29
26
|
],
|
|
30
27
|
"dependencies": {
|
|
31
|
-
"effect": "3.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/keys": "0.8.4-main.
|
|
35
|
-
"@dxos/protocols": "0.8.4-main.
|
|
36
|
-
"@dxos/util": "0.8.4-main.
|
|
28
|
+
"effect": "3.20.0",
|
|
29
|
+
"@dxos/invariant": "0.8.4-main.e00bdcdb52",
|
|
30
|
+
"@dxos/crypto": "0.8.4-main.e00bdcdb52",
|
|
31
|
+
"@dxos/keys": "0.8.4-main.e00bdcdb52",
|
|
32
|
+
"@dxos/protocols": "0.8.4-main.e00bdcdb52",
|
|
33
|
+
"@dxos/util": "0.8.4-main.e00bdcdb52"
|
|
37
34
|
},
|
|
38
35
|
"publishConfig": {
|
|
39
36
|
"access": "public"
|
package/src/query/ast.ts
CHANGED
|
@@ -107,6 +107,20 @@ const FilterRange_ = Schema.Struct({
|
|
|
107
107
|
export interface FilterRange extends Schema.Schema.Type<typeof FilterRange_> {}
|
|
108
108
|
export const FilterRange: Schema.Schema<FilterRange> = FilterRange_;
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Filter by system timestamp (createdAt / updatedAt).
|
|
112
|
+
* Timestamps are unix milliseconds stored in the object meta index.
|
|
113
|
+
*/
|
|
114
|
+
const FilterTimestamp_ = Schema.Struct({
|
|
115
|
+
type: Schema.Literal('timestamp'),
|
|
116
|
+
field: Schema.Literal('createdAt', 'updatedAt'),
|
|
117
|
+
operator: Schema.Literal('gt', 'gte', 'lt', 'lte'),
|
|
118
|
+
value: Schema.Number,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
export interface FilterTimestamp extends Schema.Schema.Type<typeof FilterTimestamp_> {}
|
|
122
|
+
export const FilterTimestamp: Schema.Schema<FilterTimestamp> = FilterTimestamp_;
|
|
123
|
+
|
|
110
124
|
/**
|
|
111
125
|
* Text search.
|
|
112
126
|
*/
|
|
@@ -152,6 +166,21 @@ const FilterOr_ = Schema.Struct({
|
|
|
152
166
|
export interface FilterOr extends Schema.Schema.Type<typeof FilterOr_> {}
|
|
153
167
|
export const FilterOr: Schema.Schema<FilterOr> = FilterOr_;
|
|
154
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Filter objects that are children of the specified parents.
|
|
171
|
+
* With transitive=true (default), matches grandchildren and beyond.
|
|
172
|
+
*/
|
|
173
|
+
const FilterChildOf_ = Schema.Struct({
|
|
174
|
+
type: Schema.Literal('child-of'),
|
|
175
|
+
/** Parent DXNs to match children of. */
|
|
176
|
+
parents: Schema.Array(DXN.Schema),
|
|
177
|
+
/** Whether to match transitively (grandchildren, etc.). Defaults to true. */
|
|
178
|
+
transitive: Schema.Boolean,
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export interface FilterChildOf extends Schema.Schema.Type<typeof FilterChildOf_> {}
|
|
182
|
+
export const FilterChildOf: Schema.Schema<FilterChildOf> = FilterChildOf_;
|
|
183
|
+
|
|
155
184
|
/**
|
|
156
185
|
* Union of filters.
|
|
157
186
|
*/
|
|
@@ -162,7 +191,9 @@ export const Filter = Schema.Union(
|
|
|
162
191
|
FilterContains,
|
|
163
192
|
FilterTag,
|
|
164
193
|
FilterRange,
|
|
194
|
+
FilterTimestamp,
|
|
165
195
|
FilterTextSearch,
|
|
196
|
+
FilterChildOf,
|
|
166
197
|
FilterNot,
|
|
167
198
|
FilterAnd,
|
|
168
199
|
FilterOr,
|
|
@@ -394,6 +425,11 @@ export const QueryOptions = Schema.Struct({
|
|
|
394
425
|
* Nested select statements will use this option to filter deleted objects.
|
|
395
426
|
*/
|
|
396
427
|
deleted: Schema.optional(Schema.Literal('include', 'exclude', 'only')),
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Diagnostics-only label for logs / tooling (not used by execution semantics).
|
|
431
|
+
*/
|
|
432
|
+
debugLabel: Schema.optional(Schema.String),
|
|
397
433
|
});
|
|
398
434
|
|
|
399
435
|
export interface QueryOptions extends Schema.Schema.Type<typeof QueryOptions> {}
|