@dxos/echo-protocol 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/index.mjs +33 -27
- 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 +11 -1
- package/dist/types/src/document-structure.d.ts.map +1 -1
- package/dist/types/src/echo-feed-codec.d.ts.map +1 -1
- package/dist/types/src/query/ast.d.ts +63 -34
- 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/document-structure.ts +12 -0
- package/src/query/ast.ts +38 -6
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.765dc60934",
|
|
4
4
|
"description": "Core ECHO APIs.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
@@ -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
28
|
"effect": "3.20.0",
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/protocols": "0.8.4-main.
|
|
36
|
-
"@dxos/
|
|
29
|
+
"@dxos/invariant": "0.8.4-main.765dc60934",
|
|
30
|
+
"@dxos/crypto": "0.8.4-main.765dc60934",
|
|
31
|
+
"@dxos/util": "0.8.4-main.765dc60934",
|
|
32
|
+
"@dxos/protocols": "0.8.4-main.765dc60934",
|
|
33
|
+
"@dxos/keys": "0.8.4-main.765dc60934"
|
|
37
34
|
},
|
|
38
35
|
"publishConfig": {
|
|
39
36
|
"access": "public"
|
|
@@ -230,6 +230,18 @@ export type ObjectMeta = {
|
|
|
230
230
|
* NOTE: Optional for backwards compatibilty.
|
|
231
231
|
*/
|
|
232
232
|
tags?: string[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Fully-qualified registry key for the object (FQN format, e.g. `org.example.type.foo`).
|
|
236
|
+
* Identifies the canonical registry entry the object instance was created from.
|
|
237
|
+
*/
|
|
238
|
+
key?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Semantic version of the registry entry the object was created from.
|
|
242
|
+
* Must be a valid semver string (e.g. `1.2.3`).
|
|
243
|
+
*/
|
|
244
|
+
version?: string;
|
|
233
245
|
};
|
|
234
246
|
|
|
235
247
|
/**
|
package/src/query/ast.ts
CHANGED
|
@@ -42,6 +42,17 @@ const FilterObject_ = Schema.Struct({
|
|
|
42
42
|
*/
|
|
43
43
|
foreignKeys: Schema.optional(Schema.Array(ForeignKey)),
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Match objects whose meta `key` equals this fully-qualified registry key (FQN format).
|
|
47
|
+
*/
|
|
48
|
+
metaKey: Schema.optional(Schema.String),
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Semver range matched against the object's meta `version`.
|
|
52
|
+
* Only consulted when {@link metaKey} is set. Objects with no `version` do not satisfy a version-constrained filter.
|
|
53
|
+
*/
|
|
54
|
+
metaVersion: Schema.optional(Schema.String),
|
|
55
|
+
|
|
45
56
|
// NOTE: Make sure to update `FilterStep.isNoop` if you change this.
|
|
46
57
|
});
|
|
47
58
|
export interface FilterObject extends Schema.Schema.Type<typeof FilterObject_> {}
|
|
@@ -166,6 +177,21 @@ const FilterOr_ = Schema.Struct({
|
|
|
166
177
|
export interface FilterOr extends Schema.Schema.Type<typeof FilterOr_> {}
|
|
167
178
|
export const FilterOr: Schema.Schema<FilterOr> = FilterOr_;
|
|
168
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Filter objects that are children of the specified parents.
|
|
182
|
+
* With transitive=true (default), matches grandchildren and beyond.
|
|
183
|
+
*/
|
|
184
|
+
const FilterChildOf_ = Schema.Struct({
|
|
185
|
+
type: Schema.Literal('child-of'),
|
|
186
|
+
/** Parent DXNs to match children of. */
|
|
187
|
+
parents: Schema.Array(DXN.Schema),
|
|
188
|
+
/** Whether to match transitively (grandchildren, etc.). Defaults to true. */
|
|
189
|
+
transitive: Schema.Boolean,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
export interface FilterChildOf extends Schema.Schema.Type<typeof FilterChildOf_> {}
|
|
193
|
+
export const FilterChildOf: Schema.Schema<FilterChildOf> = FilterChildOf_;
|
|
194
|
+
|
|
169
195
|
/**
|
|
170
196
|
* Union of filters.
|
|
171
197
|
*/
|
|
@@ -178,6 +204,7 @@ export const Filter = Schema.Union(
|
|
|
178
204
|
FilterRange,
|
|
179
205
|
FilterTimestamp,
|
|
180
206
|
FilterTextSearch,
|
|
207
|
+
FilterChildOf,
|
|
181
208
|
FilterNot,
|
|
182
209
|
FilterAnd,
|
|
183
210
|
FilterOr,
|
|
@@ -409,6 +436,11 @@ export const QueryOptions = Schema.Struct({
|
|
|
409
436
|
* Nested select statements will use this option to filter deleted objects.
|
|
410
437
|
*/
|
|
411
438
|
deleted: Schema.optional(Schema.Literal('include', 'exclude', 'only')),
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Diagnostics-only label for logs / tooling (not used by execution semantics).
|
|
442
|
+
*/
|
|
443
|
+
debugLabel: Schema.optional(Schema.String),
|
|
412
444
|
});
|
|
413
445
|
|
|
414
446
|
export interface QueryOptions extends Schema.Schema.Type<typeof QueryOptions> {}
|
|
@@ -420,21 +452,21 @@ export const Scope = Schema.Struct({
|
|
|
420
452
|
/**
|
|
421
453
|
* The nested select statemets will select from the given spaces.
|
|
422
454
|
*
|
|
423
|
-
* NOTE: Spaces and
|
|
455
|
+
* NOTE: Spaces and feeds are unioned together if both are specified.
|
|
424
456
|
*/
|
|
425
457
|
spaceIds: Schema.optional(Schema.Array(Schema.String)),
|
|
426
458
|
|
|
427
459
|
/**
|
|
428
|
-
* If true, the nested select statements will select from all
|
|
460
|
+
* If true, the nested select statements will select from all feeds in the spaces specified by `spaceIds`.
|
|
429
461
|
*/
|
|
430
|
-
|
|
462
|
+
allFeedsFromSpaces: Schema.optional(Schema.Boolean),
|
|
431
463
|
|
|
432
464
|
/**
|
|
433
|
-
* The nested select statemets will select from the given
|
|
465
|
+
* The nested select statemets will select from the given feeds (by underlying queue DXN).
|
|
434
466
|
*
|
|
435
|
-
* NOTE: Spaces and
|
|
467
|
+
* NOTE: Spaces and feeds are unioned together if both are specified.
|
|
436
468
|
*/
|
|
437
|
-
|
|
469
|
+
feeds: Schema.optional(Schema.Array(DXN.Schema)),
|
|
438
470
|
});
|
|
439
471
|
export interface Scope extends Schema.Schema.Type<typeof Scope> {}
|
|
440
472
|
|