@dxos/echo-protocol 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/echo-protocol",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.cb12b3f963",
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.c85a9c8dae",
33
- "@dxos/invariant": "0.8.4-main.c85a9c8dae",
34
- "@dxos/protocols": "0.8.4-main.c85a9c8dae",
35
- "@dxos/util": "0.8.4-main.c85a9c8dae",
36
- "@dxos/keys": "0.8.4-main.c85a9c8dae"
28
+ "effect": "3.20.0",
29
+ "@dxos/protocols": "0.8.4-main.cb12b3f963",
30
+ "@dxos/crypto": "0.8.4-main.cb12b3f963",
31
+ "@dxos/keys": "0.8.4-main.cb12b3f963",
32
+ "@dxos/invariant": "0.8.4-main.cb12b3f963",
33
+ "@dxos/util": "0.8.4-main.cb12b3f963"
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> {}