@dxos/echo-protocol 0.8.4-main.5ad4a44 → 0.8.4-main.66e292d

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.5ad4a44",
3
+ "version": "0.8.4-main.66e292d",
4
4
  "description": "Core ECHO APIs.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -27,11 +27,11 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "effect": "3.18.3",
30
- "@dxos/crypto": "0.8.4-main.5ad4a44",
31
- "@dxos/invariant": "0.8.4-main.5ad4a44",
32
- "@dxos/keys": "0.8.4-main.5ad4a44",
33
- "@dxos/protocols": "0.8.4-main.5ad4a44",
34
- "@dxos/util": "0.8.4-main.5ad4a44"
30
+ "@dxos/crypto": "0.8.4-main.66e292d",
31
+ "@dxos/invariant": "0.8.4-main.66e292d",
32
+ "@dxos/util": "0.8.4-main.66e292d",
33
+ "@dxos/protocols": "0.8.4-main.66e292d",
34
+ "@dxos/keys": "0.8.4-main.66e292d"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -221,6 +221,7 @@ export type ObjectMeta = {
221
221
 
222
222
  /**
223
223
  * Tags.
224
+ * An array of DXNs of Tag objects within the space.
224
225
  *
225
226
  * NOTE: Optional for backwards compatibilty.
226
227
  */
package/src/query/ast.ts CHANGED
@@ -10,7 +10,7 @@ import { DXN, ObjectId } from '@dxos/keys';
10
10
  import { ForeignKey } from '../foreign-key';
11
11
 
12
12
  const TypenameSpecifier = Schema.Union(DXN.Schema, Schema.Null).annotations({
13
- description: 'DXN or null. Null means any type will match',
13
+ description: 'DXN or null; null matches any type',
14
14
  });
15
15
 
16
16
  // NOTE: This pattern with 3 definitions per schema is need to make the types opaque, and circular references in AST to not cause compiler errors.
@@ -75,7 +75,9 @@ const FilterContains_ = Schema.Struct({
75
75
  type: Schema.Literal('contains'),
76
76
  value: Schema.Any,
77
77
  });
78
+
78
79
  export interface FilterContains extends Schema.Schema.Type<typeof FilterContains_> {}
80
+
79
81
  /**
80
82
  * Predicate for an array property to contain the provided value.
81
83
  * Nested objects are matched using strict structural matching.
@@ -89,6 +91,7 @@ const FilterTag_ = Schema.Struct({
89
91
  type: Schema.Literal('tag'),
90
92
  tag: Schema.String, // TODO(burdon): Make OR-collection?
91
93
  });
94
+
92
95
  export interface FilterTag extends Schema.Schema.Type<typeof FilterTag_> {}
93
96
  export const FilterTag: Schema.Schema<FilterTag> = FilterTag_;
94
97
 
@@ -100,6 +103,7 @@ const FilterRange_ = Schema.Struct({
100
103
  from: Schema.Any,
101
104
  to: Schema.Any,
102
105
  });
106
+
103
107
  export interface FilterRange extends Schema.Schema.Type<typeof FilterRange_> {}
104
108
  export const FilterRange: Schema.Schema<FilterRange> = FilterRange_;
105
109
 
@@ -111,6 +115,7 @@ const FilterTextSearch_ = Schema.Struct({
111
115
  text: Schema.String,
112
116
  searchKind: Schema.optional(Schema.Literal('full-text', 'vector')),
113
117
  });
118
+
114
119
  export interface FilterTextSearch extends Schema.Schema.Type<typeof FilterTextSearch_> {}
115
120
  export const FilterTextSearch: Schema.Schema<FilterTextSearch> = FilterTextSearch_;
116
121
 
@@ -121,6 +126,7 @@ const FilterNot_ = Schema.Struct({
121
126
  type: Schema.Literal('not'),
122
127
  filter: Schema.suspend(() => Filter),
123
128
  });
129
+
124
130
  export interface FilterNot extends Schema.Schema.Type<typeof FilterNot_> {}
125
131
  export const FilterNot: Schema.Schema<FilterNot> = FilterNot_;
126
132
 
@@ -131,6 +137,7 @@ const FilterAnd_ = Schema.Struct({
131
137
  type: Schema.Literal('and'),
132
138
  filters: Schema.Array(Schema.suspend(() => Filter)),
133
139
  });
140
+
134
141
  export interface FilterAnd extends Schema.Schema.Type<typeof FilterAnd_> {}
135
142
  export const FilterAnd: Schema.Schema<FilterAnd> = FilterAnd_;
136
143
 
@@ -141,6 +148,7 @@ const FilterOr_ = Schema.Struct({
141
148
  type: Schema.Literal('or'),
142
149
  filters: Schema.Array(Schema.suspend(() => Filter)),
143
150
  });
151
+
144
152
  export interface FilterOr extends Schema.Schema.Type<typeof FilterOr_> {}
145
153
  export const FilterOr: Schema.Schema<FilterOr> = FilterOr_;
146
154
 
@@ -159,6 +167,7 @@ export const Filter = Schema.Union(
159
167
  FilterAnd,
160
168
  FilterOr,
161
169
  ).annotations({ identifier: 'dxos.org/schema/Filter' });
170
+
162
171
  export type Filter = Schema.Schema.Type<typeof Filter>;
163
172
 
164
173
  /**
@@ -168,6 +177,7 @@ const QuerySelectClause_ = Schema.Struct({
168
177
  type: Schema.Literal('select'),
169
178
  filter: Schema.suspend(() => Filter),
170
179
  });
180
+
171
181
  export interface QuerySelectClause extends Schema.Schema.Type<typeof QuerySelectClause_> {}
172
182
  export const QuerySelectClause: Schema.Schema<QuerySelectClause> = QuerySelectClause_;
173
183
 
@@ -179,6 +189,7 @@ const QueryFilterClause_ = Schema.Struct({
179
189
  selection: Schema.suspend(() => Query),
180
190
  filter: Schema.suspend(() => Filter),
181
191
  });
192
+
182
193
  export interface QueryFilterClause extends Schema.Schema.Type<typeof QueryFilterClause_> {}
183
194
  export const QueryFilterClause: Schema.Schema<QueryFilterClause> = QueryFilterClause_;
184
195
 
@@ -190,6 +201,7 @@ const QueryReferenceTraversalClause_ = Schema.Struct({
190
201
  anchor: Schema.suspend(() => Query),
191
202
  property: Schema.String, // TODO(dmaretskyi): Change to EscapedPropPath.
192
203
  });
204
+
193
205
  export interface QueryReferenceTraversalClause extends Schema.Schema.Type<typeof QueryReferenceTraversalClause_> {}
194
206
  export const QueryReferenceTraversalClause: Schema.Schema<QueryReferenceTraversalClause> =
195
207
  QueryReferenceTraversalClause_;
@@ -203,6 +215,7 @@ const QueryIncomingReferencesClause_ = Schema.Struct({
203
215
  property: Schema.String,
204
216
  typename: TypenameSpecifier,
205
217
  });
218
+
206
219
  export interface QueryIncomingReferencesClause extends Schema.Schema.Type<typeof QueryIncomingReferencesClause_> {}
207
220
  export const QueryIncomingReferencesClause: Schema.Schema<QueryIncomingReferencesClause> =
208
221
  QueryIncomingReferencesClause_;
@@ -221,6 +234,7 @@ const QueryRelationClause_ = Schema.Struct({
221
234
  direction: Schema.Literal('outgoing', 'incoming', 'both'),
222
235
  filter: Schema.optional(Schema.suspend(() => Filter)),
223
236
  });
237
+
224
238
  export interface QueryRelationClause extends Schema.Schema.Type<typeof QueryRelationClause_> {}
225
239
  export const QueryRelationClause: Schema.Schema<QueryRelationClause> = QueryRelationClause_;
226
240
 
@@ -232,6 +246,7 @@ const QueryRelationTraversalClause_ = Schema.Struct({
232
246
  anchor: Schema.suspend(() => Query),
233
247
  direction: Schema.Literal('source', 'target', 'both'),
234
248
  });
249
+
235
250
  export interface QueryRelationTraversalClause extends Schema.Schema.Type<typeof QueryRelationTraversalClause_> {}
236
251
  export const QueryRelationTraversalClause: Schema.Schema<QueryRelationTraversalClause> = QueryRelationTraversalClause_;
237
252
 
@@ -242,6 +257,7 @@ const QueryUnionClause_ = Schema.Struct({
242
257
  type: Schema.Literal('union'),
243
258
  queries: Schema.Array(Schema.suspend(() => Query)),
244
259
  });
260
+
245
261
  export interface QueryUnionClause extends Schema.Schema.Type<typeof QueryUnionClause_> {}
246
262
  export const QueryUnionClause: Schema.Schema<QueryUnionClause> = QueryUnionClause_;
247
263
 
@@ -253,6 +269,7 @@ const QuerySetDifferenceClause_ = Schema.Struct({
253
269
  source: Schema.suspend(() => Query),
254
270
  exclude: Schema.suspend(() => Query),
255
271
  });
272
+
256
273
  export interface QuerySetDifferenceClause extends Schema.Schema.Type<typeof QuerySetDifferenceClause_> {}
257
274
  export const QuerySetDifferenceClause: Schema.Schema<QuerySetDifferenceClause> = QuerySetDifferenceClause_;
258
275
 
@@ -270,6 +287,7 @@ const Order_ = Schema.Union(
270
287
  direction: OrderDirection,
271
288
  }),
272
289
  );
290
+
273
291
  export type Order = Schema.Schema.Type<typeof Order_>;
274
292
  export const Order: Schema.Schema<Order> = Order_;
275
293
 
@@ -282,6 +300,7 @@ const QueryOrderClause_ = Schema.Struct({
282
300
  query: Schema.suspend(() => Query),
283
301
  order: Schema.Array(Order),
284
302
  });
303
+
285
304
  export interface QueryOrderClause extends Schema.Schema.Type<typeof QueryOrderClause_> {}
286
305
  export const QueryOrderClause: Schema.Schema<QueryOrderClause> = QueryOrderClause_;
287
306
 
@@ -293,6 +312,7 @@ const QueryOptionsClause_ = Schema.Struct({
293
312
  query: Schema.suspend(() => Query),
294
313
  options: Schema.suspend(() => QueryOptions),
295
314
  });
315
+
296
316
  export interface QueryOptionsClause extends Schema.Schema.Type<typeof QueryOptionsClause_> {}
297
317
  export const QueryOptionsClause: Schema.Schema<QueryOptionsClause> = QueryOptionsClause_;
298
318
 
@@ -332,6 +352,7 @@ export const QueryOptions = Schema.Struct({
332
352
  */
333
353
  deleted: Schema.optional(Schema.Literal('include', 'exclude', 'only')),
334
354
  });
355
+
335
356
  export interface QueryOptions extends Schema.Schema.Type<typeof QueryOptions> {}
336
357
 
337
358
  export const visit = (query: Query, visitor: (node: Query) => void) => {