@dxos/protocols 0.6.1-main.e05b43b → 0.6.1-main.e8ba54c

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAgEhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAqjB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,i14GAAi14G,CAAC,CAAC,CAAC;AAC144G,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/proto/gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAgEhE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AA2jB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,wk6GAAwk6G,CAAC,CAAC,CAAC;AACjo6G,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAkB,UAAU,EAAE,aAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/protocols",
3
- "version": "0.6.1-main.e05b43b",
3
+ "version": "0.6.1-main.e8ba54c",
4
4
  "description": "Protobuf definitions for DXOS protocols.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -34,11 +34,11 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@effect/schema": "^0.67.16",
37
- "@dxos/invariant": "0.6.1-main.e05b43b",
38
- "@dxos/keys": "0.6.1-main.e05b43b",
39
- "@dxos/codec-protobuf": "0.6.1-main.e05b43b",
40
- "@dxos/timeframe": "0.6.1-main.e05b43b",
41
- "@dxos/util": "0.6.1-main.e05b43b"
37
+ "@dxos/codec-protobuf": "0.6.1-main.e8ba54c",
38
+ "@dxos/invariant": "0.6.1-main.e8ba54c",
39
+ "@dxos/keys": "0.6.1-main.e8ba54c",
40
+ "@dxos/util": "0.6.1-main.e8ba54c",
41
+ "@dxos/timeframe": "0.6.1-main.e8ba54c"
42
42
  },
43
43
  "devDependencies": {
44
44
  "glob": "~7.1.6"
@@ -75,6 +75,31 @@ message SyncRepoResponse {
75
75
  optional bytes sync_message = 1;
76
76
  }
77
77
 
78
+ message DocHeadsList {
79
+ message Entry {
80
+ string document_id = 1;
81
+ repeated string heads = 2;
82
+ }
83
+
84
+ repeated Entry entries = 1;
85
+ }
86
+
87
+ message GetDocumentHeadsRequest {
88
+ repeated string document_ids = 1;
89
+ }
90
+
91
+ message GetDocumentHeadsResponse {
92
+ DocHeadsList heads = 1;
93
+ }
94
+
95
+ message WaitUntilHeadsReplicatedRequest {
96
+ DocHeadsList heads = 1;
97
+ }
98
+
99
+ message ReIndexHeadsRequest {
100
+ repeated string document_ids = 1;
101
+ }
102
+
78
103
  service DataService {
79
104
  rpc Subscribe(SubscribeRequest) returns (stream EchoEvent);
80
105
  rpc Write(WriteRequest) returns (MutationReceipt); // TODO(burdon): Rename SubmitMutation.
@@ -85,4 +110,14 @@ service DataService {
85
110
  rpc GetHostInfo(google.protobuf.Empty) returns (HostInfo);
86
111
  rpc SyncRepo(SyncRepoRequest) returns (stream SyncRepoResponse);
87
112
  rpc SendSyncMessage(SyncRepoRequest) returns (google.protobuf.Empty); // TODO(dmaretskyi): Bidirectional streams.
113
+ rpc GetDocumentHeads(GetDocumentHeadsRequest) returns (GetDocumentHeadsResponse);
114
+
115
+ /// Wait until the we have the specified changes on the worker locally. Does not take into account the index or client.
116
+ rpc WaitUntilHeadsReplicated(WaitUntilHeadsReplicatedRequest) returns (google.protobuf.Empty);
117
+
118
+ /// Update heads index for selected docuemnts.
119
+ rpc ReIndexHeads(ReIndexHeadsRequest) returns (google.protobuf.Empty);
120
+
121
+ /// Wait for any pending index updates.
122
+ rpc UpdateIndexes(google.protobuf.Empty) returns (google.protobuf.Empty);
88
123
  }
@@ -187,6 +187,51 @@ export interface SyncRepoResponse {
187
187
  */
188
188
  syncMessage?: Uint8Array;
189
189
  }
190
+ /**
191
+ * Defined in:
192
+ * {@link file://./../../../dxos/echo/service.proto}
193
+ */
194
+ export interface DocHeadsList {
195
+ entries?: DocHeadsList.Entry[];
196
+ }
197
+ export namespace DocHeadsList {
198
+ /**
199
+ * Defined in:
200
+ * {@link file://./../../../dxos/echo/service.proto}
201
+ */
202
+ export interface Entry {
203
+ documentId: string;
204
+ heads?: string[];
205
+ }
206
+ }
207
+ /**
208
+ * Defined in:
209
+ * {@link file://./../../../dxos/echo/service.proto}
210
+ */
211
+ export interface GetDocumentHeadsRequest {
212
+ documentIds?: string[];
213
+ }
214
+ /**
215
+ * Defined in:
216
+ * {@link file://./../../../dxos/echo/service.proto}
217
+ */
218
+ export interface GetDocumentHeadsResponse {
219
+ heads: DocHeadsList;
220
+ }
221
+ /**
222
+ * Defined in:
223
+ * {@link file://./../../../dxos/echo/service.proto}
224
+ */
225
+ export interface WaitUntilHeadsReplicatedRequest {
226
+ heads: DocHeadsList;
227
+ }
228
+ /**
229
+ * Defined in:
230
+ * {@link file://./../../../dxos/echo/service.proto}
231
+ */
232
+ export interface ReIndexHeadsRequest {
233
+ documentIds?: string[];
234
+ }
190
235
  /**
191
236
  * Defined in:
192
237
  * {@link file://./../../../dxos/echo/service.proto}
@@ -198,4 +243,17 @@ export interface DataService {
198
243
  getHostInfo: (request: void, options?: RequestOptions) => Promise<HostInfo>;
199
244
  syncRepo: (request: SyncRepoRequest, options?: RequestOptions) => Stream<SyncRepoResponse>;
200
245
  sendSyncMessage: (request: SyncRepoRequest, options?: RequestOptions) => Promise<void>;
246
+ getDocumentHeads: (request: GetDocumentHeadsRequest, options?: RequestOptions) => Promise<GetDocumentHeadsResponse>;
247
+ /**
248
+ * Wait until the we have the specified changes on the worker locally. Does not take into account the index or client.
249
+ */
250
+ waitUntilHeadsReplicated: (request: WaitUntilHeadsReplicatedRequest, options?: RequestOptions) => Promise<void>;
251
+ /**
252
+ * Update heads index for selected docuemnts.
253
+ */
254
+ reIndexHeads: (request: ReIndexHeadsRequest, options?: RequestOptions) => Promise<void>;
255
+ /**
256
+ * Wait for any pending index updates.
257
+ */
258
+ updateIndexes: (request: void, options?: RequestOptions) => Promise<void>;
201
259
  }