@dxos/protocols 0.6.1-main.ff751ec → 0.6.1

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;AAwjB7C,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,uj5GAAuj5G,CAAC,CAAC,CAAC;AAChn5G,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.ff751ec",
3
+ "version": "0.6.1",
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/codec-protobuf": "0.6.1-main.ff751ec",
38
- "@dxos/invariant": "0.6.1-main.ff751ec",
39
- "@dxos/keys": "0.6.1-main.ff751ec",
40
- "@dxos/util": "0.6.1-main.ff751ec",
41
- "@dxos/timeframe": "0.6.1-main.ff751ec"
37
+ "@dxos/codec-protobuf": "0.6.1",
38
+ "@dxos/keys": "0.6.1",
39
+ "@dxos/timeframe": "0.6.1",
40
+ "@dxos/util": "0.6.1",
41
+ "@dxos/invariant": "0.6.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "glob": "~7.1.6"
@@ -75,17 +75,29 @@ 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
+
78
87
  message GetDocumentHeadsRequest {
79
88
  repeated string document_ids = 1;
80
89
  }
81
90
 
82
91
  message GetDocumentHeadsResponse {
83
- message DocState {
84
- string document_id = 1;
85
- repeated string heads = 2;
86
- }
92
+ DocHeadsList heads = 1;
93
+ }
94
+
95
+ message WaitUntilHeadsReplicatedRequest {
96
+ DocHeadsList heads = 1;
97
+ }
87
98
 
88
- repeated DocState states = 1;
99
+ message ReIndexHeadsRequest {
100
+ repeated string document_ids = 1;
89
101
  }
90
102
 
91
103
  service DataService {
@@ -99,4 +111,13 @@ service DataService {
99
111
  rpc SyncRepo(SyncRepoRequest) returns (stream SyncRepoResponse);
100
112
  rpc SendSyncMessage(SyncRepoRequest) returns (google.protobuf.Empty); // TODO(dmaretskyi): Bidirectional streams.
101
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);
102
123
  }
@@ -187,6 +187,23 @@ 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
+ }
190
207
  /**
191
208
  * Defined in:
192
209
  * {@link file://./../../../dxos/echo/service.proto}
@@ -199,17 +216,21 @@ export interface GetDocumentHeadsRequest {
199
216
  * {@link file://./../../../dxos/echo/service.proto}
200
217
  */
201
218
  export interface GetDocumentHeadsResponse {
202
- states?: GetDocumentHeadsResponse.DocState[];
219
+ heads: DocHeadsList;
203
220
  }
204
- export namespace GetDocumentHeadsResponse {
205
- /**
206
- * Defined in:
207
- * {@link file://./../../../dxos/echo/service.proto}
208
- */
209
- export interface DocState {
210
- documentId: string;
211
- heads?: string[];
212
- }
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[];
213
234
  }
214
235
  /**
215
236
  * Defined in:
@@ -223,4 +244,16 @@ export interface DataService {
223
244
  syncRepo: (request: SyncRepoRequest, options?: RequestOptions) => Stream<SyncRepoResponse>;
224
245
  sendSyncMessage: (request: SyncRepoRequest, options?: RequestOptions) => Promise<void>;
225
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>;
226
259
  }