@dxos/protocols 0.6.7 → 0.6.8-main.046e6cf

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.
Files changed (86) hide show
  1. package/dist/cjs/src/buf/index.d.ts +1 -0
  2. package/dist/cjs/src/buf/index.d.ts.map +1 -1
  3. package/dist/cjs/src/buf/index.js +3 -1
  4. package/dist/cjs/src/buf/index.js.map +1 -1
  5. package/dist/cjs/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +17 -16
  6. package/dist/cjs/src/buf/proto/gen/dxos/echo/filter_pb.d.ts.map +1 -1
  7. package/dist/cjs/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
  8. package/dist/cjs/src/buf/proto/gen/dxos/echo/filter_pb.js.map +1 -1
  9. package/dist/cjs/src/buf/proto/gen/dxos/echo/query_pb.d.ts +38 -5
  10. package/dist/cjs/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  11. package/dist/cjs/src/buf/proto/gen/dxos/echo/query_pb.js +24 -2
  12. package/dist/cjs/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  13. package/dist/cjs/src/buf/proto/gen/dxos/echo/service_pb.d.ts +4 -0
  14. package/dist/cjs/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  15. package/dist/cjs/src/buf/proto/gen/dxos/echo/service_pb.js +1 -1
  16. package/dist/cjs/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  17. package/dist/cjs/src/errors/base-errors.d.ts.map +1 -1
  18. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +185 -185
  19. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  20. package/dist/cjs/src/proto/gen/dxos/client/services.js +68 -68
  21. package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
  22. package/dist/cjs/src/proto/gen/dxos/echo/filter.d.ts +13 -12
  23. package/dist/cjs/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
  24. package/dist/cjs/src/proto/gen/dxos/echo/filter.js.map +1 -1
  25. package/dist/cjs/src/proto/gen/dxos/echo/query.d.ts +20 -1
  26. package/dist/cjs/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  27. package/dist/cjs/src/proto/gen/dxos/echo/query.js +10 -0
  28. package/dist/cjs/src/proto/gen/dxos/echo/query.js.map +1 -1
  29. package/dist/cjs/src/proto/gen/dxos/echo/service.d.ts +1 -0
  30. package/dist/cjs/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  31. package/dist/cjs/src/proto/gen/index.d.ts +1 -0
  32. package/dist/cjs/src/proto/gen/index.d.ts.map +1 -1
  33. package/dist/cjs/src/proto/gen/index.js +1 -1
  34. package/dist/cjs/src/proto/gen/index.js.map +1 -1
  35. package/dist/cjs/src/proto/substitutions.d.ts +2 -5
  36. package/dist/cjs/src/proto/substitutions.d.ts.map +1 -1
  37. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  38. package/dist/esm/src/buf/index.d.ts +1 -0
  39. package/dist/esm/src/buf/index.d.ts.map +1 -1
  40. package/dist/esm/src/buf/index.js +1 -0
  41. package/dist/esm/src/buf/index.js.map +1 -1
  42. package/dist/esm/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +17 -16
  43. package/dist/esm/src/buf/proto/gen/dxos/echo/filter_pb.d.ts.map +1 -1
  44. package/dist/esm/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
  45. package/dist/esm/src/buf/proto/gen/dxos/echo/filter_pb.js.map +1 -1
  46. package/dist/esm/src/buf/proto/gen/dxos/echo/query_pb.d.ts +38 -5
  47. package/dist/esm/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
  48. package/dist/esm/src/buf/proto/gen/dxos/echo/query_pb.js +24 -2
  49. package/dist/esm/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
  50. package/dist/esm/src/buf/proto/gen/dxos/echo/service_pb.d.ts +4 -0
  51. package/dist/esm/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
  52. package/dist/esm/src/buf/proto/gen/dxos/echo/service_pb.js +1 -1
  53. package/dist/esm/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
  54. package/dist/esm/src/errors/base-errors.d.ts.map +1 -1
  55. package/dist/esm/src/proto/gen/dxos/client/services.d.ts +185 -185
  56. package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  57. package/dist/esm/src/proto/gen/dxos/client/services.js +67 -67
  58. package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
  59. package/dist/esm/src/proto/gen/dxos/echo/filter.d.ts +13 -12
  60. package/dist/esm/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
  61. package/dist/esm/src/proto/gen/dxos/echo/filter.js.map +1 -1
  62. package/dist/esm/src/proto/gen/dxos/echo/query.d.ts +20 -1
  63. package/dist/esm/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
  64. package/dist/esm/src/proto/gen/dxos/echo/query.js +9 -1
  65. package/dist/esm/src/proto/gen/dxos/echo/query.js.map +1 -1
  66. package/dist/esm/src/proto/gen/dxos/echo/service.d.ts +1 -0
  67. package/dist/esm/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  68. package/dist/esm/src/proto/gen/index.d.ts +1 -0
  69. package/dist/esm/src/proto/gen/index.d.ts.map +1 -1
  70. package/dist/esm/src/proto/gen/index.js +1 -1
  71. package/dist/esm/src/proto/gen/index.js.map +1 -1
  72. package/dist/esm/src/proto/substitutions.d.ts +2 -4
  73. package/dist/esm/src/proto/substitutions.d.ts.map +1 -1
  74. package/package.json +6 -6
  75. package/src/buf/index.ts +2 -0
  76. package/src/buf/proto/gen/dxos/echo/filter_pb.ts +19 -18
  77. package/src/buf/proto/gen/dxos/echo/query_pb.ts +48 -8
  78. package/src/buf/proto/gen/dxos/echo/service_pb.ts +6 -1
  79. package/src/proto/dxos/echo/filter.proto +22 -16
  80. package/src/proto/dxos/echo/query.proto +14 -1
  81. package/src/proto/dxos/echo/service.proto +1 -0
  82. package/src/proto/gen/dxos/client/services.ts +185 -185
  83. package/src/proto/gen/dxos/echo/filter.ts +13 -12
  84. package/src/proto/gen/dxos/echo/query.ts +20 -1
  85. package/src/proto/gen/dxos/echo/service.ts +1 -0
  86. package/src/proto/gen/index.ts +2 -1
@@ -240,6 +240,191 @@ export interface LoggingService {
240
240
  queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
241
241
  queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
242
242
  }
243
+ /**
244
+ * Defined in:
245
+ * {@link file://./../../../dxos/client/invitation.proto}
246
+ */
247
+ export interface AdmissionKeypair {
248
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
249
+ /**
250
+ * Options:
251
+ * - proto3_optional = true
252
+ */
253
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
254
+ }
255
+ /**
256
+ * Runtime state of the space object.
257
+ *
258
+ * Defined in:
259
+ * {@link file://./../../../dxos/client/invitation.proto}
260
+ */
261
+ export enum SpaceState {
262
+ INVALID = 0,
263
+ SPACE_INACTIVE = 2,
264
+ SPACE_ACTIVE = 6,
265
+ SPACE_CLOSED = 1,
266
+ SPACE_CONTROL_ONLY = 7,
267
+ SPACE_INITIALIZING = 4,
268
+ SPACE_READY = 3,
269
+ SPACE_ERROR = 5,
270
+ SPACE_REQUIRES_MIGRATION = 8
271
+ }
272
+ /**
273
+ * Represents the invitation state passed between client and service.
274
+ *
275
+ * Defined in:
276
+ * {@link file://./../../../dxos/client/invitation.proto}
277
+ */
278
+ export interface Invitation {
279
+ /**
280
+ * Local identifier (random).
281
+ */
282
+ invitationId: string;
283
+ /**
284
+ * Determines the behavior of the invitation.
285
+ */
286
+ type: Invitation.Type;
287
+ /**
288
+ * Kind of access the invitation will grant.
289
+ */
290
+ kind: Invitation.Kind;
291
+ /**
292
+ * How the invitation is authenticated.
293
+ */
294
+ authMethod: Invitation.AuthMethod;
295
+ /**
296
+ * Swarm rendezvous (random).
297
+ */
298
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
299
+ /**
300
+ * Local state.
301
+ */
302
+ state: Invitation.State;
303
+ /**
304
+ * Timeout for guest to complete invitation once connected (ms).
305
+ *
306
+ * Options:
307
+ * - proto3_optional = true
308
+ */
309
+ timeout?: number;
310
+ /**
311
+ * Guest's identity.
312
+ *
313
+ * Options:
314
+ * - proto3_optional = true
315
+ */
316
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
317
+ /**
318
+ * Space to join (only present if kind is SPACE).
319
+ *
320
+ * Options:
321
+ * - proto3_optional = true
322
+ */
323
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
324
+ /**
325
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
326
+ *
327
+ * Options:
328
+ * - proto3_optional = true
329
+ */
330
+ authCode?: string;
331
+ /**
332
+ * Path or identifier to navigate to after successful authentication.
333
+ *
334
+ * Options:
335
+ * - proto3_optional = true
336
+ */
337
+ target?: string;
338
+ /**
339
+ * Host should resume invitation on startup until timeout.
340
+ *
341
+ * Options:
342
+ * - proto3_optional = true
343
+ */
344
+ persistent?: boolean;
345
+ /**
346
+ * Options:
347
+ * - proto3_optional = true
348
+ */
349
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
350
+ /**
351
+ * Options:
352
+ * - proto3_optional = true
353
+ */
354
+ lifetime?: number;
355
+ /**
356
+ * Whether an invitation can be used multiple times.
357
+ *
358
+ * Options:
359
+ * - proto3_optional = true
360
+ */
361
+ multiUse?: boolean;
362
+ /**
363
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
364
+ *
365
+ * Options:
366
+ * - proto3_optional = true
367
+ */
368
+ guestKeypair?: AdmissionKeypair;
369
+ /**
370
+ * Present on Type.DELEGATED invitations.
371
+ *
372
+ * Options:
373
+ * - proto3_optional = true
374
+ */
375
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
376
+ /**
377
+ * Role of the admitted member, defaults to ADMIN.
378
+ *
379
+ * Options:
380
+ * - proto3_optional = true
381
+ */
382
+ role?: dxos_halo_credentials.SpaceMember.Role;
383
+ }
384
+ export namespace Invitation {
385
+ /**
386
+ * Defined in:
387
+ * {@link file://./../../../dxos/client/invitation.proto}
388
+ */
389
+ export enum Type {
390
+ INTERACTIVE = 0,
391
+ DELEGATED = 1,
392
+ MULTIUSE = 2
393
+ }
394
+ /**
395
+ * Defined in:
396
+ * {@link file://./../../../dxos/client/invitation.proto}
397
+ */
398
+ export enum Kind {
399
+ DEVICE = 0,
400
+ SPACE = 1
401
+ }
402
+ /**
403
+ * Defined in:
404
+ * {@link file://./../../../dxos/client/invitation.proto}
405
+ */
406
+ export enum AuthMethod {
407
+ NONE = 0,
408
+ SHARED_SECRET = 1,
409
+ KNOWN_PUBLIC_KEY = 2
410
+ }
411
+ /**
412
+ * Defined in:
413
+ * {@link file://./../../../dxos/client/invitation.proto}
414
+ */
415
+ export enum State {
416
+ INIT = 0,
417
+ CONNECTING = 1,
418
+ CONNECTED = 2,
419
+ READY_FOR_AUTHENTICATION = 3,
420
+ AUTHENTICATING = 4,
421
+ SUCCESS = 5,
422
+ CANCELLED = 6,
423
+ TIMEOUT = 7,
424
+ ERROR = 8,
425
+ EXPIRED = 9
426
+ }
427
+ }
243
428
  /**
244
429
  * Defined in:
245
430
  * {@link file://./../../../dxos/client/services.proto}
@@ -1045,188 +1230,3 @@ export interface NetworkService {
1045
1230
  updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1046
1231
  queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1047
1232
  }
1048
- /**
1049
- * Defined in:
1050
- * {@link file://./../../../dxos/client/invitation.proto}
1051
- */
1052
- export interface AdmissionKeypair {
1053
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1054
- /**
1055
- * Options:
1056
- * - proto3_optional = true
1057
- */
1058
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1059
- }
1060
- /**
1061
- * Runtime state of the space object.
1062
- *
1063
- * Defined in:
1064
- * {@link file://./../../../dxos/client/invitation.proto}
1065
- */
1066
- export enum SpaceState {
1067
- INVALID = 0,
1068
- SPACE_INACTIVE = 2,
1069
- SPACE_ACTIVE = 6,
1070
- SPACE_CLOSED = 1,
1071
- SPACE_CONTROL_ONLY = 7,
1072
- SPACE_INITIALIZING = 4,
1073
- SPACE_READY = 3,
1074
- SPACE_ERROR = 5,
1075
- SPACE_REQUIRES_MIGRATION = 8
1076
- }
1077
- /**
1078
- * Represents the invitation state passed between client and service.
1079
- *
1080
- * Defined in:
1081
- * {@link file://./../../../dxos/client/invitation.proto}
1082
- */
1083
- export interface Invitation {
1084
- /**
1085
- * Local identifier (random).
1086
- */
1087
- invitationId: string;
1088
- /**
1089
- * Determines the behavior of the invitation.
1090
- */
1091
- type: Invitation.Type;
1092
- /**
1093
- * Kind of access the invitation will grant.
1094
- */
1095
- kind: Invitation.Kind;
1096
- /**
1097
- * How the invitation is authenticated.
1098
- */
1099
- authMethod: Invitation.AuthMethod;
1100
- /**
1101
- * Swarm rendezvous (random).
1102
- */
1103
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1104
- /**
1105
- * Local state.
1106
- */
1107
- state: Invitation.State;
1108
- /**
1109
- * Timeout for guest to complete invitation once connected (ms).
1110
- *
1111
- * Options:
1112
- * - proto3_optional = true
1113
- */
1114
- timeout?: number;
1115
- /**
1116
- * Guest's identity.
1117
- *
1118
- * Options:
1119
- * - proto3_optional = true
1120
- */
1121
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1122
- /**
1123
- * Space to join (only present if kind is SPACE).
1124
- *
1125
- * Options:
1126
- * - proto3_optional = true
1127
- */
1128
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1129
- /**
1130
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1131
- *
1132
- * Options:
1133
- * - proto3_optional = true
1134
- */
1135
- authCode?: string;
1136
- /**
1137
- * Path or identifier to navigate to after successful authentication.
1138
- *
1139
- * Options:
1140
- * - proto3_optional = true
1141
- */
1142
- target?: string;
1143
- /**
1144
- * Host should resume invitation on startup until timeout.
1145
- *
1146
- * Options:
1147
- * - proto3_optional = true
1148
- */
1149
- persistent?: boolean;
1150
- /**
1151
- * Options:
1152
- * - proto3_optional = true
1153
- */
1154
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1155
- /**
1156
- * Options:
1157
- * - proto3_optional = true
1158
- */
1159
- lifetime?: number;
1160
- /**
1161
- * Whether an invitation can be used multiple times.
1162
- *
1163
- * Options:
1164
- * - proto3_optional = true
1165
- */
1166
- multiUse?: boolean;
1167
- /**
1168
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1169
- *
1170
- * Options:
1171
- * - proto3_optional = true
1172
- */
1173
- guestKeypair?: AdmissionKeypair;
1174
- /**
1175
- * Present on Type.DELEGATED invitations.
1176
- *
1177
- * Options:
1178
- * - proto3_optional = true
1179
- */
1180
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1181
- /**
1182
- * Role of the admitted member, defaults to ADMIN.
1183
- *
1184
- * Options:
1185
- * - proto3_optional = true
1186
- */
1187
- role?: dxos_halo_credentials.SpaceMember.Role;
1188
- }
1189
- export namespace Invitation {
1190
- /**
1191
- * Defined in:
1192
- * {@link file://./../../../dxos/client/invitation.proto}
1193
- */
1194
- export enum Type {
1195
- INTERACTIVE = 0,
1196
- DELEGATED = 1,
1197
- MULTIUSE = 2
1198
- }
1199
- /**
1200
- * Defined in:
1201
- * {@link file://./../../../dxos/client/invitation.proto}
1202
- */
1203
- export enum Kind {
1204
- DEVICE = 0,
1205
- SPACE = 1
1206
- }
1207
- /**
1208
- * Defined in:
1209
- * {@link file://./../../../dxos/client/invitation.proto}
1210
- */
1211
- export enum AuthMethod {
1212
- NONE = 0,
1213
- SHARED_SECRET = 1,
1214
- KNOWN_PUBLIC_KEY = 2
1215
- }
1216
- /**
1217
- * Defined in:
1218
- * {@link file://./../../../dxos/client/invitation.proto}
1219
- */
1220
- export enum State {
1221
- INIT = 0,
1222
- CONNECTING = 1,
1223
- CONNECTED = 2,
1224
- READY_FOR_AUTHENTICATION = 3,
1225
- AUTHENTICATING = 4,
1226
- SUCCESS = 5,
1227
- CANCELLED = 6,
1228
- TIMEOUT = 7,
1229
- ERROR = 8,
1230
- EXPIRED = 9
1231
- }
1232
- }
@@ -68,6 +68,10 @@ import * as google_protobuf from "../../google/protobuf";
68
68
  * {@link file://./../../../dxos/echo/filter.proto}
69
69
  */
70
70
  export interface QueryOptions {
71
+ /**
72
+ * Query only in specific spaces.
73
+ */
74
+ spaceIds?: string[];
71
75
  /**
72
76
  * Controls how deleted items are filtered.
73
77
  *
@@ -75,17 +79,6 @@ export interface QueryOptions {
75
79
  * - proto3_optional = true
76
80
  */
77
81
  deleted?: QueryOptions.ShowDeletedOption;
78
- /**
79
- * Filter by model.
80
- * @default * Only DocumentModel.
81
- * To querty all models, use `models: ["*"]`.
82
- */
83
- models?: string[];
84
- /**
85
- * Query only in specific spaces.
86
- * @deprecated Use `spaceIds` instead.
87
- */
88
- spaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
89
82
  /**
90
83
  * Query only local spaces, or remote on agent.
91
84
  * @default `QueryOptions.DataLocation.LOCAL`
@@ -96,8 +89,16 @@ export interface QueryOptions {
96
89
  dataLocation?: QueryOptions.DataLocation;
97
90
  /**
98
91
  * Query only in specific spaces.
92
+ * @deprecated Use `spaceIds` instead.
99
93
  */
100
- spaceIds?: string[];
94
+ spaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
95
+ /**
96
+ * Filter by model.
97
+ * @default * Only DocumentModel.
98
+ * To querty all models, use `models: ["*"]`.
99
+ * @deprecated
100
+ */
101
+ models?: string[];
101
102
  }
102
103
  export namespace QueryOptions {
103
104
  /**
@@ -74,6 +74,7 @@ export interface QueryRequest {
74
74
  */
75
75
  queryId?: string;
76
76
  filter: dxos_echo_filter.Filter;
77
+ reactivity: QueryReactivity;
77
78
  }
78
79
  /**
79
80
  * Automerge heads.
@@ -94,11 +95,29 @@ export interface QueryResult {
94
95
  id: string;
95
96
  spaceId: string;
96
97
  documentId: string;
98
+ rank: number;
99
+ /**
100
+ * Options:
101
+ * - proto3_optional = true
102
+ */
103
+ documentJson?: string;
104
+ /**
105
+ * Options:
106
+ * - proto3_optional = true
107
+ */
108
+ documentAutomerge?: Uint8Array;
97
109
  /**
98
110
  * @deprecated Use spaceId.
99
111
  */
100
112
  spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
101
- rank: number;
113
+ }
114
+ /**
115
+ * Defined in:
116
+ * {@link file://./../../../dxos/echo/query.proto}
117
+ */
118
+ export enum QueryReactivity {
119
+ ONE_SHOT = 0,
120
+ REACTIVE = 1
102
121
  }
103
122
  /**
104
123
  * Defined in:
@@ -69,6 +69,7 @@ import * as google_protobuf from "../../google/protobuf";
69
69
  */
70
70
  export interface SubscribeRequest {
71
71
  subscriptionId: string;
72
+ spaceId: string;
72
73
  }
73
74
  /**
74
75
  * Defined in: