@dxos/protocols 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65

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/protocols",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.d05673bc65",
4
4
  "description": "Protobuf definitions for DXOS protocols.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -64,19 +64,19 @@
64
64
  ],
65
65
  "dependencies": {
66
66
  "@bufbuild/protobuf": "2.11.0",
67
- "@dxos/codec-protobuf": "0.8.4-main.c85a9c8dae",
68
- "@dxos/invariant": "0.8.4-main.c85a9c8dae",
69
- "@dxos/effect": "0.8.4-main.c85a9c8dae",
70
- "@dxos/errors": "0.8.4-main.c85a9c8dae",
71
- "@dxos/keys": "0.8.4-main.c85a9c8dae",
72
- "@dxos/util": "0.8.4-main.c85a9c8dae",
73
- "@dxos/timeframe": "0.8.4-main.c85a9c8dae"
67
+ "@dxos/codec-protobuf": "0.8.4-main.d05673bc65",
68
+ "@dxos/errors": "0.8.4-main.d05673bc65",
69
+ "@dxos/effect": "0.8.4-main.d05673bc65",
70
+ "@dxos/invariant": "0.8.4-main.d05673bc65",
71
+ "@dxos/keys": "0.8.4-main.d05673bc65",
72
+ "@dxos/util": "0.8.4-main.d05673bc65",
73
+ "@dxos/timeframe": "0.8.4-main.d05673bc65"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@bufbuild/buf": "1.65.0",
77
77
  "@bufbuild/protoc-gen-es": "2.11.0",
78
78
  "effect": "3.19.16",
79
- "@dxos/protobuf-compiler": "0.8.4-main.c85a9c8dae"
79
+ "@dxos/protobuf-compiler": "0.8.4-main.d05673bc65"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "effect": "3.19.16"
@@ -12,7 +12,7 @@ export {
12
12
  type SyncQueueRequest,
13
13
  } from './proto/gen/dxos/client/services.js';
14
14
 
15
- export const KEY_QUEUE_POSITION = 'dxos.org/key/queue-position';
15
+ export const KEY_QUEUE_POSITION = 'org.dxos.key.queue-position';
16
16
 
17
17
  import * as Schema from 'effect/Schema';
18
18
 
@@ -6,6 +6,7 @@ import { type SpaceId } from '@dxos/keys';
6
6
 
7
7
  import type * as FeedProtocol from '../FeedProtocol';
8
8
  import { type CreateDocumentRequest, type CreateDocumentResponse } from '../proto/gen/dxos/echo/service';
9
+ import { type QueryRequest, type QueryResponse } from '../proto/gen/dxos/echo/query';
9
10
 
10
11
  /*
11
12
 
@@ -68,36 +69,33 @@ export interface Env {
68
69
  *
69
70
  * NOTE: Currently unused in functions.
70
71
  */
71
- export interface ExecutionContext {}
72
+ export interface TraceContext {}
72
73
 
73
74
  /**
74
75
  * Database API for other CF services like functions.
75
76
  */
76
77
  export interface DataService {
77
- getSpaceMeta(ctx: ExecutionContext, spaceId: SpaceId): Promise<RpcResult<SpaceMeta | undefined>>;
78
- getDocument(ctx: ExecutionContext, spaceId: SpaceId, documentId: string): Promise<RpcResult<RawDocument | undefined>>;
78
+ getSpaceMeta(ctx: TraceContext, spaceId: SpaceId): Promise<RpcResult<SpaceMeta | undefined>>;
79
+ getDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string): Promise<RpcResult<RawDocument | undefined>>;
79
80
 
80
- query(ctx: ExecutionContext, request: QueryRequest): Promise<RpcResult<QueryResponse>>;
81
- queryDocuments(ctx: ExecutionContext, request: QueryRequest): Promise<RpcResult<QueryDocumentsResponse>>;
82
- queryReferences(ctx: ExecutionContext, request: QueryReferencesRequest): Promise<RpcResult<QueryReferencesResponse>>;
83
-
84
- createDocument(ctx: ExecutionContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
81
+ execQuery(ctx: TraceContext, request: QueryRequest): Promise<RpcResult<QueryResponse>>;
82
+ createDocument(ctx: TraceContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
85
83
 
86
84
  // TODO(burdon): Update? Return DocumentEntry?
87
- changeDocument(ctx: ExecutionContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
85
+ changeDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
88
86
  }
89
87
 
90
88
  export interface QueueService {
91
89
  queryQueue: (
92
- ctx: ExecutionContext,
90
+ ctx: TraceContext,
93
91
  request: FeedProtocol.QueryQueueRequest,
94
92
  ) => Promise<RpcResult<FeedProtocol.QueryResult>>;
95
93
  insertIntoQueue: (
96
- ctx: ExecutionContext,
94
+ ctx: TraceContext,
97
95
  request: FeedProtocol.InsertIntoQueueRequest,
98
96
  ) => Promise<RpcResult<RpcDisposable>>;
99
97
  deleteFromQueue: (
100
- ctx: ExecutionContext,
98
+ ctx: TraceContext,
101
99
  request: FeedProtocol.DeleteFromQueueRequest,
102
100
  ) => Promise<RpcResult<RpcDisposable>>;
103
101
  }
@@ -125,20 +123,6 @@ export type SpaceMeta = {
125
123
  rootDocumentId: string;
126
124
  };
127
125
 
128
- export type QueryRequest = {
129
- spaceId: string;
130
- type?: string;
131
- where?: Record<string, any>;
132
- objectIds?: string[];
133
- cursor?: string;
134
- limit?: number;
135
- };
136
-
137
- export type QueryResponse = {
138
- results: ObjectSnapshot[];
139
- cursor?: string;
140
- };
141
-
142
126
  /**
143
127
  * TODO(yaroslav): make Indexer return EchoObject after create() can properly reconstruct an object
144
128
  * from this structure (meta, id and type aren't handled properly)
@@ -59,7 +59,7 @@ message Module {
59
59
  optional string id = 8; // TODO(burdon): Ensured FQ (e.g., 'dxos.app.xxx')
60
60
  optional string name = 1; // TODO(burdon): Replace with id (or key?)
61
61
  optional string type = 2; // TODO(burdon): Define namespace (e.g.,
62
- // 'dxos.org/type/frame' vs. 'dxos.type.frame')
62
+ // 'org.dxos.type.frame')
63
63
 
64
64
  // TODO(burdon): Developer info message.
65
65