@dxos/echo-protocol 0.8.4-main.4a85c3132b → 0.8.4-main.4f23b4e393

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/echo-protocol",
3
- "version": "0.8.4-main.4a85c3132b",
3
+ "version": "0.8.4-main.4f23b4e393",
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.19.16",
32
- "@dxos/crypto": "0.8.4-main.4a85c3132b",
33
- "@dxos/invariant": "0.8.4-main.4a85c3132b",
34
- "@dxos/keys": "0.8.4-main.4a85c3132b",
35
- "@dxos/protocols": "0.8.4-main.4a85c3132b",
36
- "@dxos/util": "0.8.4-main.4a85c3132b"
28
+ "effect": "3.20.0",
29
+ "@dxos/invariant": "0.8.4-main.4f23b4e393",
30
+ "@dxos/crypto": "0.8.4-main.4f23b4e393",
31
+ "@dxos/keys": "0.8.4-main.4f23b4e393",
32
+ "@dxos/protocols": "0.8.4-main.4f23b4e393",
33
+ "@dxos/util": "0.8.4-main.4f23b4e393"
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,11 +191,13 @@ 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,
169
- ).annotations({ identifier: 'dxos.org/schema/Filter' });
200
+ ).annotations({ identifier: 'org.dxos.schema.filter' });
170
201
 
171
202
  export type Filter = Schema.Schema.Type<typeof Filter>;
172
203
 
@@ -384,7 +415,7 @@ const Query_ = Schema.Union(
384
415
  QueryOptionsClause,
385
416
  QueryLimitClause,
386
417
  QueryFromClause,
387
- ).annotations({ identifier: 'dxos.org/schema/Query' });
418
+ ).annotations({ identifier: 'org.dxos.schema.query' });
388
419
 
389
420
  export type Query = Schema.Schema.Type<typeof Query_>;
390
421
  export const Query: Schema.Schema<Query> = Query_;
@@ -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> {}
@@ -405,21 +441,21 @@ export const Scope = Schema.Struct({
405
441
  /**
406
442
  * The nested select statemets will select from the given spaces.
407
443
  *
408
- * NOTE: Spaces and queues are unioned together if both are specified.
444
+ * NOTE: Spaces and feeds are unioned together if both are specified.
409
445
  */
410
446
  spaceIds: Schema.optional(Schema.Array(Schema.String)),
411
447
 
412
448
  /**
413
- * If true, the nested select statements will select from all queues in the spaces specified by `spaceIds`.
449
+ * If true, the nested select statements will select from all feeds in the spaces specified by `spaceIds`.
414
450
  */
415
- allQueuesFromSpaces: Schema.optional(Schema.Boolean),
451
+ allFeedsFromSpaces: Schema.optional(Schema.Boolean),
416
452
 
417
453
  /**
418
- * The nested select statemets will select from the given queues.
454
+ * The nested select statemets will select from the given feeds (by underlying queue DXN).
419
455
  *
420
- * NOTE: Spaces and queues are unioned together if both are specified.
456
+ * NOTE: Spaces and feeds are unioned together if both are specified.
421
457
  */
422
- queues: Schema.optional(Schema.Array(DXN.Schema)),
458
+ feeds: Schema.optional(Schema.Array(DXN.Schema)),
423
459
  });
424
460
  export interface Scope extends Schema.Schema.Type<typeof Scope> {}
425
461