@dxos/protocols 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d

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.
@@ -67,1365 +67,1365 @@ import * as example_testing_rpc from "../../example/testing/rpc.js";
67
67
  import * as google_protobuf from "../../google/protobuf.js";
68
68
  /**
69
69
  * Defined in:
70
- * {@link file://./../../../dxos/client/services.proto}
71
- */
72
- export enum SystemStatus {
73
- INACTIVE = 0,
74
- ACTIVE = 1
75
- }
76
- /**
77
- * Defined in:
78
- * {@link file://./../../../dxos/client/services.proto}
79
- */
80
- export interface UpdateStatusRequest {
81
- status: SystemStatus;
82
- }
83
- /**
84
- * Defined in:
85
- * {@link file://./../../../dxos/client/services.proto}
70
+ * {@link file://./../../../dxos/client/invitation.proto}
86
71
  */
87
- export interface QueryStatusRequest {
72
+ export interface AdmissionKeypair {
73
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
88
74
  /**
89
75
  * Options:
90
76
  * - proto3_optional = true
91
77
  */
92
- interval?: number;
78
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
93
79
  }
94
80
  /**
81
+ * Runtime state of the space object.
82
+ *
95
83
  * Defined in:
96
- * {@link file://./../../../dxos/client/services.proto}
84
+ * {@link file://./../../../dxos/client/invitation.proto}
97
85
  */
98
- export interface QueryStatusResponse {
99
- status: SystemStatus;
86
+ export enum SpaceState {
87
+ INVALID = 0,
88
+ SPACE_INACTIVE = 2,
89
+ SPACE_ACTIVE = 6,
90
+ SPACE_CLOSED = 1,
91
+ SPACE_CONTROL_ONLY = 7,
92
+ SPACE_INITIALIZING = 4,
93
+ SPACE_READY = 3,
94
+ SPACE_ERROR = 5,
95
+ SPACE_REQUIRES_MIGRATION = 8
100
96
  }
101
97
  /**
98
+ * Represents the invitation state passed between client and service.
99
+ *
102
100
  * Defined in:
103
- * {@link file://./../../../dxos/client/services.proto}
101
+ * {@link file://./../../../dxos/client/invitation.proto}
104
102
  */
105
- export interface GetDiagnosticsRequest {
103
+ export interface Invitation {
106
104
  /**
107
- * Options:
108
- * - proto3_optional = true
105
+ * Local identifier (random).
109
106
  */
110
- keys?: GetDiagnosticsRequest.KEY_OPTION;
111
- }
112
- export namespace GetDiagnosticsRequest {
107
+ invitationId: string;
113
108
  /**
114
- * Defined in:
115
- * {@link file://./../../../dxos/client/services.proto}
109
+ * Determines the behavior of the invitation.
116
110
  */
117
- export enum KEY_OPTION {
118
- NONE = 0,
119
- TRUNCATE = 1,
120
- HUMANIZE = 2
121
- }
122
- }
123
- /**
124
- * Defined in:
125
- * {@link file://./../../../dxos/client/services.proto}
126
- */
127
- export interface GetDiagnosticsResponse {
128
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
129
- diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
130
- }
131
- /**
132
- * Defined in:
133
- * {@link file://./../../../dxos/client/services.proto}
134
- */
135
- export interface Platform {
136
- type: Platform.PLATFORM_TYPE;
111
+ type: Invitation.Type;
137
112
  /**
138
- * The User-Agent string from a browser
113
+ * Kind of access the invitation will grant.
114
+ */
115
+ kind: Invitation.Kind;
116
+ /**
117
+ * How the invitation is authenticated.
118
+ */
119
+ authMethod: Invitation.AuthMethod;
120
+ /**
121
+ * Swarm rendezvous (random).
122
+ */
123
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
124
+ /**
125
+ * Local state.
126
+ */
127
+ state: Invitation.State;
128
+ /**
129
+ * Timeout for guest to complete invitation once connected (ms).
139
130
  *
140
131
  * Options:
141
132
  * - proto3_optional = true
142
133
  */
143
- userAgent?: string;
134
+ timeout?: number;
144
135
  /**
145
- * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
136
+ * Guest's identity.
146
137
  *
147
138
  * Options:
148
139
  * - proto3_optional = true
149
140
  */
150
- platform?: string;
141
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
151
142
  /**
152
- * the Node.JS arch string, e.g. 'arm64', 'x64'
143
+ * Space to join (only present if kind is SPACE).
153
144
  *
154
145
  * Options:
155
146
  * - proto3_optional = true
156
147
  */
157
- arch?: string;
148
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
158
149
  /**
159
- * the node.js version string
150
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
160
151
  *
161
152
  * Options:
162
153
  * - proto3_optional = true
163
154
  */
164
- runtime?: string;
155
+ authCode?: string;
165
156
  /**
166
- * the number of seconds the client has been up
157
+ * Path or identifier to navigate to after successful authentication.
167
158
  *
168
159
  * Options:
169
160
  * - proto3_optional = true
170
161
  */
171
- uptime?: number;
162
+ target?: string;
172
163
  /**
173
- * e.g. NodeJS.MemoryUsage, subject to change
164
+ * Host should resume invitation on startup until timeout.
174
165
  *
175
166
  * Options:
176
167
  * - proto3_optional = true
177
168
  */
178
- memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
179
- }
180
- export namespace Platform {
181
- /**
182
- * Defined in:
183
- * {@link file://./../../../dxos/client/services.proto}
184
- */
185
- export enum PLATFORM_TYPE {
186
- BROWSER = 0,
187
- SHARED_WORKER = 1,
188
- NODE = 2
189
- }
190
- }
191
- /**
192
- * Defined in:
193
- * {@link file://./../../../dxos/client/services.proto}
194
- */
195
- export interface SystemService {
196
- /**
197
- * Get the static config of the client.
198
- */
199
- getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
169
+ persistent?: boolean;
200
170
  /**
201
- * Get the diagnostics snapshot.
171
+ * Options:
172
+ * - proto3_optional = true
202
173
  */
203
- getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
174
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
204
175
  /**
205
- * Update the status of the client. Used to re-activate an inactive client.
176
+ * Options:
177
+ * - proto3_optional = true
206
178
  */
207
- updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
179
+ lifetime?: number;
208
180
  /**
209
- * Stream the status of the client.
181
+ * Whether an invitation can be used multiple times.
182
+ *
183
+ * Options:
184
+ * - proto3_optional = true
210
185
  */
211
- queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
186
+ multiUse?: boolean;
212
187
  /**
213
- * Reset the client.
188
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
189
+ *
190
+ * Options:
191
+ * - proto3_optional = true
214
192
  */
215
- reset: (request: void, options?: RequestOptions) => Promise<void>;
193
+ guestKeypair?: AdmissionKeypair;
216
194
  /**
217
- * Get platform Information
195
+ * Present on Type.DELEGATED invitations.
196
+ *
197
+ * Options:
198
+ * - proto3_optional = true
218
199
  */
219
- getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
220
- }
221
- /**
222
- * Defined in:
223
- * {@link file://./../../../dxos/client/services.proto}
224
- */
225
- export interface Identity {
226
- did: string;
227
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
200
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
228
201
  /**
202
+ * Role of the admitted member, defaults to ADMIN.
203
+ *
229
204
  * Options:
230
205
  * - proto3_optional = true
231
206
  */
232
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
207
+ role?: dxos_halo_credentials.SpaceMember.Role;
233
208
  /**
209
+ * Id of a the space to join (only present if kind is SPACE).
210
+ *
234
211
  * Options:
235
212
  * - proto3_optional = true
236
213
  */
237
- profile?: dxos_halo_credentials.ProfileDocument;
214
+ spaceId?: string;
238
215
  }
239
- /**
240
- * Defined in:
241
- * {@link file://./../../../dxos/client/services.proto}
242
- */
243
- export interface RequestRecoveryChallengeResponse {
244
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
245
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
246
- challenge: string;
216
+ export namespace Invitation {
217
+ /**
218
+ * Defined in:
219
+ * {@link file://./../../../dxos/client/invitation.proto}
220
+ */
221
+ export enum Type {
222
+ INTERACTIVE = 0,
223
+ DELEGATED = 1,
224
+ MULTIUSE = 2
225
+ }
226
+ /**
227
+ * Defined in:
228
+ * {@link file://./../../../dxos/client/invitation.proto}
229
+ */
230
+ export enum Kind {
231
+ DEVICE = 0,
232
+ SPACE = 1
233
+ }
234
+ /**
235
+ * Defined in:
236
+ * {@link file://./../../../dxos/client/invitation.proto}
237
+ */
238
+ export enum AuthMethod {
239
+ NONE = 0,
240
+ SHARED_SECRET = 1,
241
+ KNOWN_PUBLIC_KEY = 2
242
+ }
243
+ /**
244
+ * Defined in:
245
+ * {@link file://./../../../dxos/client/invitation.proto}
246
+ */
247
+ export enum State {
248
+ INIT = 0,
249
+ CONNECTING = 1,
250
+ CONNECTED = 2,
251
+ READY_FOR_AUTHENTICATION = 3,
252
+ AUTHENTICATING = 4,
253
+ SUCCESS = 5,
254
+ CANCELLED = 6,
255
+ TIMEOUT = 7,
256
+ ERROR = 8,
257
+ EXPIRED = 9
258
+ }
247
259
  }
248
260
  /**
249
261
  * Defined in:
250
- * {@link file://./../../../dxos/client/services.proto}
262
+ * {@link file://./../../../dxos/client/logging.proto}
251
263
  */
252
- export interface RecoverIdentityRequest {
253
- recoveryCode?: string;
254
- external?: RecoverIdentityRequest.ExternalSignature;
255
- token?: string;
264
+ export interface Metrics {
265
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
266
+ values?: Metrics.KeyPair[];
256
267
  }
257
- export namespace RecoverIdentityRequest {
268
+ export namespace Metrics {
258
269
  /**
259
270
  * Defined in:
260
- * {@link file://./../../../dxos/client/services.proto}
271
+ * {@link file://./../../../dxos/client/logging.proto}
261
272
  */
262
- export interface ExternalSignature {
263
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
264
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
265
- controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
266
- signature: Uint8Array;
273
+ export interface KeyPair {
267
274
  /**
268
275
  * Options:
269
276
  * - proto3_optional = true
270
277
  */
271
- clientDataJson?: Uint8Array;
278
+ key?: string;
272
279
  /**
273
280
  * Options:
274
281
  * - proto3_optional = true
275
282
  */
276
- authenticatorData?: Uint8Array;
283
+ value?: dxos_value.Value;
284
+ /**
285
+ * Options:
286
+ * - proto3_optional = true
287
+ */
288
+ stats?: dxos_value.Stats;
277
289
  }
278
290
  }
279
291
  /**
280
292
  * Defined in:
281
- * {@link file://./../../../dxos/client/services.proto}
293
+ * {@link file://./../../../dxos/client/logging.proto}
282
294
  */
283
- export interface RecoveryCredentialData {
284
- /**
285
- * Recovery key used to validate recovery challenge signature.
286
- */
287
- recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
295
+ export interface ControlMetricsRequest {
288
296
  /**
289
- * Public key used to identify the recovery key.
297
+ * Options:
298
+ * - proto3_optional = true
290
299
  */
291
- lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
300
+ reset?: boolean;
292
301
  /**
293
- * Algorithm used to generate the recovery key.
302
+ * Options:
303
+ * - proto3_optional = true
294
304
  */
295
- algorithm: string;
305
+ record?: boolean;
296
306
  }
297
307
  /**
298
308
  * Defined in:
299
- * {@link file://./../../../dxos/client/services.proto}
309
+ * {@link file://./../../../dxos/client/logging.proto}
300
310
  */
301
- export interface CreateRecoveryCredentialRequest {
311
+ export interface ControlMetricsResponse {
302
312
  /**
303
- * If not provided, a new key will be generated.
304
- *
305
313
  * Options:
306
314
  * - proto3_optional = true
307
315
  */
308
- data?: RecoveryCredentialData;
316
+ recording?: boolean;
309
317
  }
310
318
  /**
311
319
  * Defined in:
312
- * {@link file://./../../../dxos/client/services.proto}
320
+ * {@link file://./../../../dxos/client/logging.proto}
313
321
  */
314
- export interface CreateRecoveryCredentialResponse {
322
+ export interface QueryMetricsRequest {
315
323
  /**
316
324
  * Options:
317
325
  * - proto3_optional = true
318
326
  */
319
- recoveryCode?: string;
327
+ interval?: number;
320
328
  }
321
329
  /**
322
330
  * Defined in:
323
- * {@link file://./../../../dxos/client/services.proto}
331
+ * {@link file://./../../../dxos/client/logging.proto}
324
332
  */
325
- export interface QueryIdentityResponse {
326
- /**
327
- * Options:
328
- * - proto3_optional = true
329
- */
330
- identity?: Identity;
333
+ export interface QueryMetricsResponse {
334
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
335
+ metrics: Metrics;
331
336
  }
332
337
  /**
333
338
  * Defined in:
334
- * {@link file://./../../../dxos/client/services.proto}
339
+ * {@link file://./../../../dxos/client/logging.proto}
335
340
  */
336
- export interface SignPresentationRequest {
337
- presentation: dxos_halo_credentials.Presentation;
341
+ export enum LogLevel {
342
+ NONE = 0,
343
+ TRACE = 5,
344
+ DEBUG = 10,
345
+ VERBOSE = 11,
346
+ INFO = 12,
347
+ WARN = 13,
348
+ ERROR = 14
349
+ }
350
+ /**
351
+ * Defined in:
352
+ * {@link file://./../../../dxos/client/logging.proto}
353
+ */
354
+ export interface QueryLogsRequest {
355
+ filters?: QueryLogsRequest.Filter[];
338
356
  /**
339
357
  * Options:
340
358
  * - proto3_optional = true
341
359
  */
342
- nonce?: Uint8Array;
360
+ options?: QueryLogsRequest.MatchingOptions;
361
+ }
362
+ export namespace QueryLogsRequest {
363
+ /**
364
+ * Defined in:
365
+ * {@link file://./../../../dxos/client/logging.proto}
366
+ */
367
+ export enum MatchingOptions {
368
+ NONE = 0,
369
+ INCLUSIVE = 1,
370
+ EXPLICIT = 2
371
+ }
372
+ /**
373
+ * Defined in:
374
+ * {@link file://./../../../dxos/client/logging.proto}
375
+ */
376
+ export interface Filter {
377
+ level: LogLevel;
378
+ /**
379
+ * Options:
380
+ * - proto3_optional = true
381
+ */
382
+ pattern?: string;
383
+ }
343
384
  }
344
385
  /**
345
386
  * Defined in:
346
- * {@link file://./../../../dxos/client/services.proto}
387
+ * {@link file://./../../../dxos/client/logging.proto}
347
388
  */
348
- export interface CreateIdentityRequest {
389
+ export interface LogEntry {
390
+ level: LogLevel;
391
+ message: string;
349
392
  /**
350
393
  * Options:
351
394
  * - proto3_optional = true
352
395
  */
353
- profile?: dxos_halo_credentials.ProfileDocument;
396
+ context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
354
397
  /**
355
398
  * Options:
356
399
  * - proto3_optional = true
357
400
  */
358
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
359
- }
360
- /**
361
- * Defined in:
362
- * {@link file://./../../../dxos/client/services.proto}
363
- */
364
- export interface IdentityService {
365
- createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
366
- requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
367
- recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
368
- createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
369
- queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
370
- updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
371
- signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
372
- createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
373
- }
374
- /**
375
- * Defined in:
376
- * {@link file://./../../../dxos/client/services.proto}
377
- */
378
- export enum DeviceKind {
379
- CURRENT = 0,
380
- TRUSTED = 1
381
- }
382
- /**
383
- * Defined in:
384
- * {@link file://./../../../dxos/client/services.proto}
385
- */
386
- export interface Device {
387
- deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
388
- kind: DeviceKind;
401
+ meta?: LogEntry.Meta;
389
402
  /**
390
403
  * Options:
391
404
  * - proto3_optional = true
392
405
  */
393
- profile?: dxos_halo_credentials.DeviceProfileDocument;
394
- presence: Device.PresenceState;
406
+ error?: dxos_error.Error;
407
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
395
408
  }
396
- export namespace Device {
409
+ export namespace LogEntry {
397
410
  /**
398
411
  * Defined in:
399
- * {@link file://./../../../dxos/client/services.proto}
412
+ * {@link file://./../../../dxos/client/logging.proto}
400
413
  */
401
- export enum PresenceState {
402
- OFFLINE = 0,
403
- ONLINE = 1,
404
- REMOVED = 2
414
+ export interface Meta {
415
+ file: string;
416
+ line: number;
417
+ /**
418
+ * Options:
419
+ * - proto3_optional = true
420
+ */
421
+ scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
422
+ /**
423
+ * Options:
424
+ * - proto3_optional = true
425
+ */
426
+ resourceId?: number;
405
427
  }
406
428
  }
407
429
  /**
408
430
  * Defined in:
409
- * {@link file://./../../../dxos/client/services.proto}
431
+ * {@link file://./../../../dxos/client/logging.proto}
410
432
  */
411
- export interface QueryDevicesResponse {
412
- devices?: Device[];
433
+ export interface LoggingService {
434
+ controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
435
+ queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
436
+ queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
413
437
  }
414
438
  /**
415
439
  * Defined in:
416
440
  * {@link file://./../../../dxos/client/services.proto}
417
441
  */
418
- export interface DevicesService {
419
- updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
420
- queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
442
+ export enum SystemStatus {
443
+ INACTIVE = 0,
444
+ ACTIVE = 1
421
445
  }
422
446
  /**
423
447
  * Defined in:
424
448
  * {@link file://./../../../dxos/client/services.proto}
425
449
  */
426
- export interface Contact {
427
- identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
428
- /**
429
- * Options:
430
- * - proto3_optional = true
431
- */
432
- profile?: dxos_halo_credentials.ProfileDocument;
433
- commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
450
+ export interface UpdateStatusRequest {
451
+ status: SystemStatus;
434
452
  }
435
453
  /**
436
454
  * Defined in:
437
455
  * {@link file://./../../../dxos/client/services.proto}
438
456
  */
439
- export interface ContactBook {
440
- contacts?: Contact[];
457
+ export interface QueryStatusRequest {
458
+ /**
459
+ * Options:
460
+ * - proto3_optional = true
461
+ */
462
+ interval?: number;
441
463
  }
442
464
  /**
443
465
  * Defined in:
444
466
  * {@link file://./../../../dxos/client/services.proto}
445
467
  */
446
- export interface ContactsService {
447
- getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
448
- queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
468
+ export interface QueryStatusResponse {
469
+ status: SystemStatus;
449
470
  }
450
471
  /**
451
472
  * Defined in:
452
473
  * {@link file://./../../../dxos/client/services.proto}
453
474
  */
454
- export interface SpaceMember {
455
- identity: Identity;
456
- presence: SpaceMember.PresenceState;
457
- peerStates?: dxos_mesh_presence.PeerState[];
458
- role: dxos_halo_credentials.SpaceMember.Role;
475
+ export interface GetDiagnosticsRequest {
476
+ /**
477
+ * Options:
478
+ * - proto3_optional = true
479
+ */
480
+ keys?: GetDiagnosticsRequest.KEY_OPTION;
459
481
  }
460
- export namespace SpaceMember {
482
+ export namespace GetDiagnosticsRequest {
461
483
  /**
462
484
  * Defined in:
463
485
  * {@link file://./../../../dxos/client/services.proto}
464
486
  */
465
- export enum PresenceState {
466
- OFFLINE = 0,
467
- ONLINE = 1
487
+ export enum KEY_OPTION {
488
+ NONE = 0,
489
+ TRUNCATE = 1,
490
+ HUMANIZE = 2
468
491
  }
469
492
  }
470
493
  /**
471
494
  * Defined in:
472
495
  * {@link file://./../../../dxos/client/services.proto}
473
496
  */
474
- export interface Space {
475
- id: string;
476
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
477
- state: SpaceState;
497
+ export interface GetDiagnosticsResponse {
498
+ timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
499
+ diagnostics: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
500
+ }
501
+ /**
502
+ * Defined in:
503
+ * {@link file://./../../../dxos/client/services.proto}
504
+ */
505
+ export interface Platform {
506
+ type: Platform.PLATFORM_TYPE;
478
507
  /**
508
+ * The User-Agent string from a browser
509
+ *
479
510
  * Options:
480
511
  * - proto3_optional = true
481
512
  */
482
- pipeline?: Space.PipelineState;
513
+ userAgent?: string;
483
514
  /**
515
+ * e.g process.platform from node, e.g. 'darwin', 'linux', 'win32'
516
+ *
484
517
  * Options:
485
518
  * - proto3_optional = true
486
519
  */
487
- error?: dxos_error.Error;
520
+ platform?: string;
488
521
  /**
522
+ * the Node.JS arch string, e.g. 'arm64', 'x64'
523
+ *
489
524
  * Options:
490
525
  * - proto3_optional = true
491
526
  */
492
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
493
- members?: SpaceMember[];
527
+ arch?: string;
494
528
  /**
529
+ * the node.js version string
530
+ *
495
531
  * Options:
496
532
  * - proto3_optional = true
497
533
  */
498
- creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
534
+ runtime?: string;
499
535
  /**
536
+ * the number of seconds the client has been up
537
+ *
500
538
  * Options:
501
539
  * - proto3_optional = true
502
540
  */
503
- cache?: dxos_echo_metadata.SpaceCache;
504
- metrics: Space.Metrics;
505
- }
506
- export namespace Space {
541
+ uptime?: number;
507
542
  /**
508
- * Defined in:
509
- * {@link file://./../../../dxos/client/services.proto}
510
- */
511
- export interface Metrics {
512
- /**
513
- * Options:
514
- * - proto3_optional = true
515
- */
516
- open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
517
- /**
518
- * Options:
519
- * - proto3_optional = true
520
- */
521
- pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
522
- /**
523
- * Options:
524
- * - proto3_optional = true
525
- */
526
- controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
527
- /**
528
- * Options:
529
- * - proto3_optional = true
530
- */
531
- dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
532
- /**
533
- * Options:
534
- * - proto3_optional = true
535
- */
536
- dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
537
- /**
538
- * Options:
539
- * - proto3_optional = true
540
- */
541
- ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
542
- }
543
+ * e.g. NodeJS.MemoryUsage, subject to change
544
+ *
545
+ * Options:
546
+ * - proto3_optional = true
547
+ */
548
+ memory?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
549
+ }
550
+ export namespace Platform {
543
551
  /**
544
552
  * Defined in:
545
553
  * {@link file://./../../../dxos/client/services.proto}
546
554
  */
547
- export interface PipelineState {
548
- /**
549
- * Options:
550
- * - proto3_optional = true
551
- */
552
- controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
553
- /**
554
- * Options:
555
- * - proto3_optional = true
556
- */
557
- dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
558
- /**
559
- * TODO(burdon): Normalize _key suffix.
560
- */
561
- controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
562
- dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
563
- /**
564
- * Last processed epoch. Might now have been applied yet.
565
- *
566
- * Options:
567
- * - proto3_optional = true
568
- */
569
- currentEpoch?: dxos_halo_credentials.Credential;
570
- /**
571
- * Epoch that is currently applied.
572
- *
573
- * Options:
574
- * - proto3_optional = true
575
- */
576
- appliedEpoch?: dxos_halo_credentials.Credential;
577
- /**
578
- * Mutations already processed.
579
- *
580
- * Options:
581
- * - proto3_optional = true
582
- */
583
- currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
584
- /**
585
- * Minimum timeframe to consider the state to be up-to-date.
586
- *
587
- * Options:
588
- * - proto3_optional = true
589
- */
590
- targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
591
- /**
592
- * All mutations stored in feeds.
593
- *
594
- * Options:
595
- * - proto3_optional = true
596
- */
597
- totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
598
- /**
599
- * All mutations known to exist on the network.
600
- *
601
- * Options:
602
- * - proto3_optional = true
603
- */
604
- knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
605
- /**
606
- * Start timeframe of the pipeline.
607
- *
608
- * Options:
609
- * - proto3_optional = true
610
- */
611
- startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
612
- /**
613
- * Mutations already processed.
614
- *
615
- * Options:
616
- * - proto3_optional = true
617
- */
618
- currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
619
- /**
620
- * Minimum timeframe to consider the state to be up-to-date.
621
- *
622
- * Options:
623
- * - proto3_optional = true
624
- */
625
- targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
626
- /**
627
- * All mutations stored in feeds.
628
- *
629
- * Options:
630
- * - proto3_optional = true
631
- */
632
- totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
633
- /**
634
- * All mutations known to exist on the network.
635
- *
636
- * Options:
637
- * - proto3_optional = true
638
- */
639
- knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
640
- /**
641
- * URL of the current space root automerge document.
642
- *
643
- * Options:
644
- * - proto3_optional = true
645
- */
646
- spaceRootUrl?: string;
555
+ export enum PLATFORM_TYPE {
556
+ BROWSER = 0,
557
+ SHARED_WORKER = 1,
558
+ NODE = 2
647
559
  }
648
560
  }
649
561
  /**
650
562
  * Defined in:
651
563
  * {@link file://./../../../dxos/client/services.proto}
652
564
  */
653
- export interface UpdateSpaceRequest {
654
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
565
+ export interface SystemService {
566
+ /**
567
+ * Get the static config of the client.
568
+ */
569
+ getConfig: (request: void, options?: RequestOptions) => Promise<dxos_config.Config>;
570
+ /**
571
+ * Get the diagnostics snapshot.
572
+ */
573
+ getDiagnostics: (request: GetDiagnosticsRequest, options?: RequestOptions) => Promise<GetDiagnosticsResponse>;
574
+ /**
575
+ * Update the status of the client. Used to re-activate an inactive client.
576
+ */
577
+ updateStatus: (request: UpdateStatusRequest, options?: RequestOptions) => Promise<void>;
578
+ /**
579
+ * Stream the status of the client.
580
+ */
581
+ queryStatus: (request: QueryStatusRequest, options?: RequestOptions) => Stream<QueryStatusResponse>;
582
+ /**
583
+ * Reset the client.
584
+ */
585
+ reset: (request: void, options?: RequestOptions) => Promise<void>;
586
+ /**
587
+ * Get platform Information
588
+ */
589
+ getPlatform: (request: void, options?: RequestOptions) => Promise<Platform>;
590
+ }
591
+ /**
592
+ * Defined in:
593
+ * {@link file://./../../../dxos/client/services.proto}
594
+ */
595
+ export interface Identity {
596
+ did: string;
597
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
655
598
  /**
656
- * Allowed values: ACTIVE, INACTIVE.
657
- *
658
599
  * Options:
659
600
  * - proto3_optional = true
660
601
  */
661
- state?: SpaceState;
602
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
662
603
  /**
663
604
  * Options:
664
605
  * - proto3_optional = true
665
606
  */
666
- edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
607
+ profile?: dxos_halo_credentials.ProfileDocument;
667
608
  }
668
609
  /**
669
610
  * Defined in:
670
611
  * {@link file://./../../../dxos/client/services.proto}
671
612
  */
672
- export interface QuerySpacesResponse {
673
- spaces?: Space[];
613
+ export interface RequestRecoveryChallengeResponse {
614
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
615
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
616
+ challenge: string;
674
617
  }
675
618
  /**
676
619
  * Defined in:
677
620
  * {@link file://./../../../dxos/client/services.proto}
678
621
  */
679
- export interface PostMessageRequest {
680
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
681
- channel: string;
682
- message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
622
+ export interface RecoverIdentityRequest {
623
+ recoveryCode?: string;
624
+ external?: RecoverIdentityRequest.ExternalSignature;
625
+ token?: string;
626
+ }
627
+ export namespace RecoverIdentityRequest {
628
+ /**
629
+ * Defined in:
630
+ * {@link file://./../../../dxos/client/services.proto}
631
+ */
632
+ export interface ExternalSignature {
633
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
634
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
635
+ controlFeedKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
636
+ signature: Uint8Array;
637
+ /**
638
+ * Options:
639
+ * - proto3_optional = true
640
+ */
641
+ clientDataJson?: Uint8Array;
642
+ /**
643
+ * Options:
644
+ * - proto3_optional = true
645
+ */
646
+ authenticatorData?: Uint8Array;
647
+ }
683
648
  }
684
649
  /**
685
650
  * Defined in:
686
651
  * {@link file://./../../../dxos/client/services.proto}
687
652
  */
688
- export interface SubscribeMessagesRequest {
689
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
690
- channel: string;
653
+ export interface RecoveryCredentialData {
654
+ /**
655
+ * Recovery key used to validate recovery challenge signature.
656
+ */
657
+ recoveryKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
658
+ /**
659
+ * Public key used to identify the recovery key.
660
+ */
661
+ lookupKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
662
+ /**
663
+ * Algorithm used to generate the recovery key.
664
+ */
665
+ algorithm: string;
691
666
  }
692
667
  /**
693
668
  * Defined in:
694
669
  * {@link file://./../../../dxos/client/services.proto}
695
670
  */
696
- export interface WriteCredentialsRequest {
697
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
698
- credentials?: dxos_halo_credentials.Credential[];
671
+ export interface CreateRecoveryCredentialRequest {
672
+ /**
673
+ * If not provided, a new key will be generated.
674
+ *
675
+ * Options:
676
+ * - proto3_optional = true
677
+ */
678
+ data?: RecoveryCredentialData;
699
679
  }
700
680
  /**
701
681
  * Defined in:
702
682
  * {@link file://./../../../dxos/client/services.proto}
703
683
  */
704
- export interface QueryCredentialsRequest {
705
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
684
+ export interface CreateRecoveryCredentialResponse {
706
685
  /**
707
686
  * Options:
708
687
  * - proto3_optional = true
709
688
  */
710
- noTail?: boolean;
689
+ recoveryCode?: string;
711
690
  }
712
691
  /**
713
692
  * Defined in:
714
693
  * {@link file://./../../../dxos/client/services.proto}
715
694
  */
716
- export interface CreateEpochRequest {
717
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
695
+ export interface QueryIdentityResponse {
718
696
  /**
719
697
  * Options:
720
698
  * - proto3_optional = true
721
699
  */
722
- migration?: CreateEpochRequest.Migration;
700
+ identity?: Identity;
701
+ }
702
+ /**
703
+ * Defined in:
704
+ * {@link file://./../../../dxos/client/services.proto}
705
+ */
706
+ export interface SignPresentationRequest {
707
+ presentation: dxos_halo_credentials.Presentation;
723
708
  /**
724
- * For REPLACE_AUTOMERGE_ROOT migration.
725
- *
726
709
  * Options:
727
710
  * - proto3_optional = true
728
711
  */
729
- automergeRootUrl?: string;
730
- }
731
- export namespace CreateEpochRequest {
732
- /**
733
- * Defined in:
734
- * {@link file://./../../../dxos/client/services.proto}
735
- */
736
- export enum Migration {
737
- NONE = 0,
738
- INIT_AUTOMERGE = 1,
739
- PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
740
- FRAGMENT_AUTOMERGE_ROOT = 3,
741
- REPLACE_AUTOMERGE_ROOT = 4,
742
- MIGRATE_REFERENCES_TO_DXN = 5
743
- }
712
+ nonce?: Uint8Array;
744
713
  }
745
714
  /**
746
715
  * Defined in:
747
716
  * {@link file://./../../../dxos/client/services.proto}
748
717
  */
749
- export interface CreateEpochResponse {
718
+ export interface CreateIdentityRequest {
750
719
  /**
751
- * Credential of the new epoch.
752
- *
753
720
  * Options:
754
721
  * - proto3_optional = true
755
722
  */
756
- epochCredential?: dxos_halo_credentials.Credential;
723
+ profile?: dxos_halo_credentials.ProfileDocument;
757
724
  /**
758
- * Control pipeline timeframe.
759
- *
760
725
  * Options:
761
726
  * - proto3_optional = true
762
727
  */
763
- controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
728
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
764
729
  }
765
730
  /**
766
731
  * Defined in:
767
732
  * {@link file://./../../../dxos/client/services.proto}
768
733
  */
769
- export interface UpdateMemberRoleRequest {
770
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
771
- memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
772
- newRole: dxos_halo_credentials.SpaceMember.Role;
734
+ export interface IdentityService {
735
+ createIdentity: (request: CreateIdentityRequest, options?: RequestOptions) => Promise<Identity>;
736
+ requestRecoveryChallenge: (request: void, options?: RequestOptions) => Promise<RequestRecoveryChallengeResponse>;
737
+ recoverIdentity: (request: RecoverIdentityRequest, options?: RequestOptions) => Promise<Identity>;
738
+ createRecoveryCredential: (request: CreateRecoveryCredentialRequest, options?: RequestOptions) => Promise<CreateRecoveryCredentialResponse>;
739
+ queryIdentity: (request: void, options?: RequestOptions) => Stream<QueryIdentityResponse>;
740
+ updateProfile: (request: dxos_halo_credentials.ProfileDocument, options?: RequestOptions) => Promise<Identity>;
741
+ signPresentation: (request: SignPresentationRequest, options?: RequestOptions) => Promise<dxos_halo_credentials.Presentation>;
742
+ createAuthCredential: (request: void, options?: RequestOptions) => Promise<dxos_halo_credentials.Credential>;
773
743
  }
774
744
  /**
775
745
  * Defined in:
776
746
  * {@link file://./../../../dxos/client/services.proto}
777
747
  */
778
- export interface AdmitContactRequest {
779
- contact: Contact;
780
- role: dxos_halo_credentials.SpaceMember.Role;
781
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
748
+ export enum DeviceKind {
749
+ CURRENT = 0,
750
+ TRUSTED = 1
782
751
  }
783
752
  /**
784
753
  * Defined in:
785
754
  * {@link file://./../../../dxos/client/services.proto}
786
755
  */
787
- export interface ContactAdmission {
788
- credential: dxos_halo_credentials.Credential;
756
+ export interface Device {
757
+ deviceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
758
+ kind: DeviceKind;
759
+ /**
760
+ * Options:
761
+ * - proto3_optional = true
762
+ */
763
+ profile?: dxos_halo_credentials.DeviceProfileDocument;
764
+ presence: Device.PresenceState;
789
765
  }
790
- /**
791
- * Defined in:
792
- * {@link file://./../../../dxos/client/services.proto}
793
- */
794
- export interface JoinSpaceResponse {
795
- space: Space;
766
+ export namespace Device {
767
+ /**
768
+ * Defined in:
769
+ * {@link file://./../../../dxos/client/services.proto}
770
+ */
771
+ export enum PresenceState {
772
+ OFFLINE = 0,
773
+ ONLINE = 1,
774
+ REMOVED = 2
775
+ }
796
776
  }
797
777
  /**
798
778
  * Defined in:
799
779
  * {@link file://./../../../dxos/client/services.proto}
800
780
  */
801
- export interface JoinBySpaceKeyRequest {
802
- spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
781
+ export interface QueryDevicesResponse {
782
+ devices?: Device[];
803
783
  }
804
784
  /**
805
785
  * Defined in:
806
786
  * {@link file://./../../../dxos/client/services.proto}
807
787
  */
808
- export interface SpaceArchive {
809
- filename: string;
810
- contents: Uint8Array;
788
+ export interface DevicesService {
789
+ updateDevice: (request: dxos_halo_credentials.DeviceProfileDocument, options?: RequestOptions) => Promise<Device>;
790
+ queryDevices: (request: void, options?: RequestOptions) => Stream<QueryDevicesResponse>;
811
791
  }
812
792
  /**
813
793
  * Defined in:
814
794
  * {@link file://./../../../dxos/client/services.proto}
815
795
  */
816
- export interface ExportSpaceRequest {
817
- spaceId: string;
796
+ export interface Contact {
797
+ identityKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
798
+ /**
799
+ * Options:
800
+ * - proto3_optional = true
801
+ */
802
+ profile?: dxos_halo_credentials.ProfileDocument;
803
+ commonSpaces?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
818
804
  }
819
805
  /**
820
806
  * Defined in:
821
807
  * {@link file://./../../../dxos/client/services.proto}
822
808
  */
823
- export interface ExportSpaceResponse {
824
- archive: SpaceArchive;
809
+ export interface ContactBook {
810
+ contacts?: Contact[];
825
811
  }
826
812
  /**
827
813
  * Defined in:
828
814
  * {@link file://./../../../dxos/client/services.proto}
829
815
  */
830
- export interface ImportSpaceRequest {
831
- archive: SpaceArchive;
816
+ export interface ContactsService {
817
+ getContacts: (request: void, options?: RequestOptions) => Promise<ContactBook>;
818
+ queryContacts: (request: void, options?: RequestOptions) => Stream<ContactBook>;
832
819
  }
833
820
  /**
834
821
  * Defined in:
835
822
  * {@link file://./../../../dxos/client/services.proto}
836
823
  */
837
- export interface ImportSpaceResponse {
824
+ export interface SpaceMember {
825
+ identity: Identity;
826
+ presence: SpaceMember.PresenceState;
827
+ peerStates?: dxos_mesh_presence.PeerState[];
828
+ role: dxos_halo_credentials.SpaceMember.Role;
829
+ }
830
+ export namespace SpaceMember {
838
831
  /**
839
- * the ID of the new space.
832
+ * Defined in:
833
+ * {@link file://./../../../dxos/client/services.proto}
840
834
  */
841
- newSpaceId: string;
835
+ export enum PresenceState {
836
+ OFFLINE = 0,
837
+ ONLINE = 1
838
+ }
842
839
  }
843
840
  /**
844
841
  * Defined in:
845
842
  * {@link file://./../../../dxos/client/services.proto}
846
843
  */
847
- export interface SpacesService {
848
- createSpace: (request: void, options?: RequestOptions) => Promise<Space>;
849
- updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
850
- querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
851
- updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
852
- admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
853
- joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
854
- /**
855
- * Broadcast an ephemeral message to the space swarm.
856
- */
857
- postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
844
+ export interface Space {
845
+ id: string;
846
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
847
+ state: SpaceState;
858
848
  /**
859
- * Subscribe to messages from the space swarm.
849
+ * Options:
850
+ * - proto3_optional = true
860
851
  */
861
- subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
852
+ pipeline?: Space.PipelineState;
862
853
  /**
863
- * Write credentials to the space control feed.
854
+ * Options:
855
+ * - proto3_optional = true
864
856
  */
865
- writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
857
+ error?: dxos_error.Error;
866
858
  /**
867
- * Query credentials from the space control feed.
859
+ * Options:
860
+ * - proto3_optional = true
868
861
  */
869
- queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
870
- createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
871
- exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
872
- importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
873
- }
874
- /**
875
- * Defined in:
876
- * {@link file://./../../../dxos/client/services.proto}
877
- */
878
- export interface AcceptInvitationRequest {
879
- invitation: Invitation;
862
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
863
+ members?: SpaceMember[];
880
864
  /**
881
865
  * Options:
882
866
  * - proto3_optional = true
883
867
  */
884
- deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
885
- }
886
- /**
887
- * Defined in:
888
- * {@link file://./../../../dxos/client/services.proto}
889
- */
890
- export interface AuthenticationRequest {
891
- invitationId: string;
892
- authCode: string;
893
- }
894
- /**
895
- * Defined in:
896
- * {@link file://./../../../dxos/client/services.proto}
897
- */
898
- export interface CancelInvitationRequest {
899
- invitationId: string;
900
- }
901
- /**
902
- * Defined in:
903
- * {@link file://./../../../dxos/client/services.proto}
904
- */
905
- export interface InvitationMethod {
906
- created?: Invitation;
907
- accepted?: Invitation;
908
- }
909
- /**
910
- * Defined in:
911
- * {@link file://./../../../dxos/client/services.proto}
912
- */
913
- export interface QueryInvitationsResponse {
914
- action: QueryInvitationsResponse.Action;
915
- type: QueryInvitationsResponse.Type;
916
- invitations?: Invitation[];
868
+ creator?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
917
869
  /**
918
870
  * Options:
919
871
  * - proto3_optional = true
920
872
  */
921
- existing?: boolean;
873
+ cache?: dxos_echo_metadata.SpaceCache;
874
+ metrics: Space.Metrics;
922
875
  }
923
- export namespace QueryInvitationsResponse {
876
+ export namespace Space {
924
877
  /**
925
878
  * Defined in:
926
879
  * {@link file://./../../../dxos/client/services.proto}
927
880
  */
928
- export enum Action {
929
- ADDED = 0,
930
- REMOVED = 1,
931
- SAVED = 2,
932
- LOAD_COMPLETE = 3
881
+ export interface Metrics {
882
+ /**
883
+ * Options:
884
+ * - proto3_optional = true
885
+ */
886
+ open?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
887
+ /**
888
+ * Options:
889
+ * - proto3_optional = true
890
+ */
891
+ pipelineInitBegin?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
892
+ /**
893
+ * Options:
894
+ * - proto3_optional = true
895
+ */
896
+ controlPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
897
+ /**
898
+ * Options:
899
+ * - proto3_optional = true
900
+ */
901
+ dataPipelineOpen?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
902
+ /**
903
+ * Options:
904
+ * - proto3_optional = true
905
+ */
906
+ dataPipelineReady?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
907
+ /**
908
+ * Options:
909
+ * - proto3_optional = true
910
+ */
911
+ ready?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
933
912
  }
934
913
  /**
935
914
  * Defined in:
936
915
  * {@link file://./../../../dxos/client/services.proto}
937
916
  */
938
- export enum Type {
939
- CREATED = 0,
940
- ACCEPTED = 1
941
- }
942
- }
943
- /**
944
- * Defined in:
945
- * {@link file://./../../../dxos/client/services.proto}
946
- */
947
- export interface LoadPersistentInvitationsResponse {
948
- invitations?: Invitation[];
917
+ export interface PipelineState {
918
+ /**
919
+ * Options:
920
+ * - proto3_optional = true
921
+ */
922
+ controlFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
923
+ /**
924
+ * Options:
925
+ * - proto3_optional = true
926
+ */
927
+ dataFeedKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
928
+ /**
929
+ * TODO(burdon): Normalize _key suffix.
930
+ */
931
+ controlFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
932
+ dataFeeds?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>[];
933
+ /**
934
+ * Last processed epoch. Might now have been applied yet.
935
+ *
936
+ * Options:
937
+ * - proto3_optional = true
938
+ */
939
+ currentEpoch?: dxos_halo_credentials.Credential;
940
+ /**
941
+ * Epoch that is currently applied.
942
+ *
943
+ * Options:
944
+ * - proto3_optional = true
945
+ */
946
+ appliedEpoch?: dxos_halo_credentials.Credential;
947
+ /**
948
+ * Mutations already processed.
949
+ *
950
+ * Options:
951
+ * - proto3_optional = true
952
+ */
953
+ currentControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
954
+ /**
955
+ * Minimum timeframe to consider the state to be up-to-date.
956
+ *
957
+ * Options:
958
+ * - proto3_optional = true
959
+ */
960
+ targetControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
961
+ /**
962
+ * All mutations stored in feeds.
963
+ *
964
+ * Options:
965
+ * - proto3_optional = true
966
+ */
967
+ totalControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
968
+ /**
969
+ * All mutations known to exist on the network.
970
+ *
971
+ * Options:
972
+ * - proto3_optional = true
973
+ */
974
+ knownControlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
975
+ /**
976
+ * Start timeframe of the pipeline.
977
+ *
978
+ * Options:
979
+ * - proto3_optional = true
980
+ */
981
+ startDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
982
+ /**
983
+ * Mutations already processed.
984
+ *
985
+ * Options:
986
+ * - proto3_optional = true
987
+ */
988
+ currentDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
989
+ /**
990
+ * Minimum timeframe to consider the state to be up-to-date.
991
+ *
992
+ * Options:
993
+ * - proto3_optional = true
994
+ */
995
+ targetDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
996
+ /**
997
+ * All mutations stored in feeds.
998
+ *
999
+ * Options:
1000
+ * - proto3_optional = true
1001
+ */
1002
+ totalDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1003
+ /**
1004
+ * All mutations known to exist on the network.
1005
+ *
1006
+ * Options:
1007
+ * - proto3_optional = true
1008
+ */
1009
+ knownDataTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1010
+ /**
1011
+ * URL of the current space root automerge document.
1012
+ *
1013
+ * Options:
1014
+ * - proto3_optional = true
1015
+ */
1016
+ spaceRootUrl?: string;
1017
+ }
949
1018
  }
950
1019
  /**
951
1020
  * Defined in:
952
1021
  * {@link file://./../../../dxos/client/services.proto}
953
1022
  */
954
- export interface InvitationsService {
955
- createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
956
- acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
957
- authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
958
- cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
959
- queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1023
+ export interface UpdateSpaceRequest {
1024
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1025
+ /**
1026
+ * Allowed values: ACTIVE, INACTIVE.
1027
+ *
1028
+ * Options:
1029
+ * - proto3_optional = true
1030
+ */
1031
+ state?: SpaceState;
1032
+ /**
1033
+ * Options:
1034
+ * - proto3_optional = true
1035
+ */
1036
+ edgeReplication?: dxos_echo_metadata.EdgeReplicationSetting;
960
1037
  }
961
1038
  /**
962
1039
  * Defined in:
963
1040
  * {@link file://./../../../dxos/client/services.proto}
964
1041
  */
965
- export enum ConnectionState {
966
- OFFLINE = 0,
967
- ONLINE = 1
1042
+ export interface QuerySpacesResponse {
1043
+ spaces?: Space[];
968
1044
  }
969
1045
  /**
970
1046
  * Defined in:
971
1047
  * {@link file://./../../../dxos/client/services.proto}
972
1048
  */
973
- export interface NetworkStatus {
974
- swarm: ConnectionState;
975
- signaling?: NetworkStatus.Signal[];
976
- connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
1049
+ export interface PostMessageRequest {
1050
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1051
+ channel: string;
1052
+ message: ReturnType<(typeof substitutions)["google.protobuf.Any"]["decode"]>;
977
1053
  }
978
- export namespace NetworkStatus {
979
- /**
980
- * Defined in:
981
- * {@link file://./../../../dxos/client/services.proto}
982
- */
983
- export interface Signal {
984
- server: string;
985
- state: dxos_mesh_signal.SignalState;
986
- }
1054
+ /**
1055
+ * Defined in:
1056
+ * {@link file://./../../../dxos/client/services.proto}
1057
+ */
1058
+ export interface SubscribeMessagesRequest {
1059
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1060
+ channel: string;
987
1061
  }
988
1062
  /**
989
1063
  * Defined in:
990
1064
  * {@link file://./../../../dxos/client/services.proto}
991
1065
  */
992
- export interface UpdateConfigRequest {
993
- swarm: ConnectionState;
1066
+ export interface WriteCredentialsRequest {
1067
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1068
+ credentials?: dxos_halo_credentials.Credential[];
994
1069
  }
995
1070
  /**
996
1071
  * Defined in:
997
1072
  * {@link file://./../../../dxos/client/services.proto}
998
1073
  */
999
- export interface SubscribeSwarmStateRequest {
1000
- topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1074
+ export interface QueryCredentialsRequest {
1075
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1076
+ /**
1077
+ * Options:
1078
+ * - proto3_optional = true
1079
+ */
1080
+ noTail?: boolean;
1001
1081
  }
1002
1082
  /**
1003
1083
  * Defined in:
1004
1084
  * {@link file://./../../../dxos/client/services.proto}
1005
1085
  */
1006
- export interface NetworkService {
1007
- updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1008
- queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1009
- joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
1010
- leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1086
+ export interface CreateEpochRequest {
1087
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1011
1088
  /**
1012
- * Query the swarm state without joining it.
1089
+ * Options:
1090
+ * - proto3_optional = true
1013
1091
  */
1014
- querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
1015
- subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
1016
- sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
1017
- subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1092
+ migration?: CreateEpochRequest.Migration;
1093
+ /**
1094
+ * For REPLACE_AUTOMERGE_ROOT migration.
1095
+ *
1096
+ * Options:
1097
+ * - proto3_optional = true
1098
+ */
1099
+ automergeRootUrl?: string;
1100
+ }
1101
+ export namespace CreateEpochRequest {
1102
+ /**
1103
+ * Defined in:
1104
+ * {@link file://./../../../dxos/client/services.proto}
1105
+ */
1106
+ export enum Migration {
1107
+ NONE = 0,
1108
+ INIT_AUTOMERGE = 1,
1109
+ PRUNE_AUTOMERGE_ROOT_HISTORY = 2,
1110
+ FRAGMENT_AUTOMERGE_ROOT = 3,
1111
+ REPLACE_AUTOMERGE_ROOT = 4,
1112
+ MIGRATE_REFERENCES_TO_DXN = 5
1113
+ }
1018
1114
  }
1019
1115
  /**
1020
1116
  * Defined in:
1021
1117
  * {@link file://./../../../dxos/client/services.proto}
1022
1118
  */
1023
- export interface EdgeAgentService {
1024
- queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1025
- createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1026
- queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1119
+ export interface CreateEpochResponse {
1120
+ /**
1121
+ * Credential of the new epoch.
1122
+ *
1123
+ * Options:
1124
+ * - proto3_optional = true
1125
+ */
1126
+ epochCredential?: dxos_halo_credentials.Credential;
1127
+ /**
1128
+ * Control pipeline timeframe.
1129
+ *
1130
+ * Options:
1131
+ * - proto3_optional = true
1132
+ */
1133
+ controlTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
1027
1134
  }
1028
1135
  /**
1029
1136
  * Defined in:
1030
1137
  * {@link file://./../../../dxos/client/services.proto}
1031
1138
  */
1032
- export enum EdgeStatus {
1033
- NOT_CONNECTED = 0,
1034
- CONNECTED = 1
1139
+ export interface UpdateMemberRoleRequest {
1140
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1141
+ memberKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1142
+ newRole: dxos_halo_credentials.SpaceMember.Role;
1035
1143
  }
1036
1144
  /**
1037
1145
  * Defined in:
1038
1146
  * {@link file://./../../../dxos/client/services.proto}
1039
1147
  */
1040
- export interface QueryEdgeStatusResponse {
1041
- status: EdgeStatus;
1148
+ export interface AdmitContactRequest {
1149
+ contact: Contact;
1150
+ role: dxos_halo_credentials.SpaceMember.Role;
1151
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1042
1152
  }
1043
1153
  /**
1044
1154
  * Defined in:
1045
1155
  * {@link file://./../../../dxos/client/services.proto}
1046
1156
  */
1047
- export interface QueryAgentStatusResponse {
1048
- status: QueryAgentStatusResponse.AgentStatus;
1157
+ export interface ContactAdmission {
1158
+ credential: dxos_halo_credentials.Credential;
1049
1159
  }
1050
- export namespace QueryAgentStatusResponse {
1051
- /**
1052
- * Defined in:
1053
- * {@link file://./../../../dxos/client/services.proto}
1054
- */
1055
- export enum AgentStatus {
1056
- UNKNOWN = 0,
1057
- ACTIVE = 1,
1058
- INACTIVE = 2,
1059
- NOT_FOUND = 3
1060
- }
1160
+ /**
1161
+ * Defined in:
1162
+ * {@link file://./../../../dxos/client/services.proto}
1163
+ */
1164
+ export interface JoinSpaceResponse {
1165
+ space: Space;
1061
1166
  }
1062
1167
  /**
1063
1168
  * Defined in:
1064
- * {@link file://./../../../dxos/client/invitation.proto}
1169
+ * {@link file://./../../../dxos/client/services.proto}
1065
1170
  */
1066
- export interface AdmissionKeypair {
1067
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1068
- /**
1069
- * Options:
1070
- * - proto3_optional = true
1071
- */
1072
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1171
+ export interface JoinBySpaceKeyRequest {
1172
+ spaceKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1073
1173
  }
1074
1174
  /**
1075
- * Runtime state of the space object.
1076
- *
1077
1175
  * Defined in:
1078
- * {@link file://./../../../dxos/client/invitation.proto}
1176
+ * {@link file://./../../../dxos/client/services.proto}
1079
1177
  */
1080
- export enum SpaceState {
1081
- INVALID = 0,
1082
- SPACE_INACTIVE = 2,
1083
- SPACE_ACTIVE = 6,
1084
- SPACE_CLOSED = 1,
1085
- SPACE_CONTROL_ONLY = 7,
1086
- SPACE_INITIALIZING = 4,
1087
- SPACE_READY = 3,
1088
- SPACE_ERROR = 5,
1089
- SPACE_REQUIRES_MIGRATION = 8
1178
+ export interface SpaceArchive {
1179
+ filename: string;
1180
+ contents: Uint8Array;
1090
1181
  }
1091
1182
  /**
1092
- * Represents the invitation state passed between client and service.
1093
- *
1094
1183
  * Defined in:
1095
- * {@link file://./../../../dxos/client/invitation.proto}
1184
+ * {@link file://./../../../dxos/client/services.proto}
1096
1185
  */
1097
- export interface Invitation {
1098
- /**
1099
- * Local identifier (random).
1100
- */
1101
- invitationId: string;
1102
- /**
1103
- * Determines the behavior of the invitation.
1104
- */
1105
- type: Invitation.Type;
1106
- /**
1107
- * Kind of access the invitation will grant.
1108
- */
1109
- kind: Invitation.Kind;
1110
- /**
1111
- * How the invitation is authenticated.
1112
- */
1113
- authMethod: Invitation.AuthMethod;
1114
- /**
1115
- * Swarm rendezvous (random).
1116
- */
1117
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1118
- /**
1119
- * Local state.
1120
- */
1121
- state: Invitation.State;
1122
- /**
1123
- * Timeout for guest to complete invitation once connected (ms).
1124
- *
1125
- * Options:
1126
- * - proto3_optional = true
1127
- */
1128
- timeout?: number;
1129
- /**
1130
- * Guest's identity.
1131
- *
1132
- * Options:
1133
- * - proto3_optional = true
1134
- */
1135
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1136
- /**
1137
- * Space to join (only present if kind is SPACE).
1138
- *
1139
- * Options:
1140
- * - proto3_optional = true
1141
- */
1142
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1143
- /**
1144
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1145
- *
1146
- * Options:
1147
- * - proto3_optional = true
1148
- */
1149
- authCode?: string;
1150
- /**
1151
- * Path or identifier to navigate to after successful authentication.
1152
- *
1153
- * Options:
1154
- * - proto3_optional = true
1155
- */
1156
- target?: string;
1157
- /**
1158
- * Host should resume invitation on startup until timeout.
1159
- *
1160
- * Options:
1161
- * - proto3_optional = true
1162
- */
1163
- persistent?: boolean;
1164
- /**
1165
- * Options:
1166
- * - proto3_optional = true
1167
- */
1168
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1169
- /**
1170
- * Options:
1171
- * - proto3_optional = true
1172
- */
1173
- lifetime?: number;
1174
- /**
1175
- * Whether an invitation can be used multiple times.
1176
- *
1177
- * Options:
1178
- * - proto3_optional = true
1179
- */
1180
- multiUse?: boolean;
1181
- /**
1182
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1183
- *
1184
- * Options:
1185
- * - proto3_optional = true
1186
- */
1187
- guestKeypair?: AdmissionKeypair;
1188
- /**
1189
- * Present on Type.DELEGATED invitations.
1190
- *
1191
- * Options:
1192
- * - proto3_optional = true
1193
- */
1194
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1195
- /**
1196
- * Role of the admitted member, defaults to ADMIN.
1197
- *
1198
- * Options:
1199
- * - proto3_optional = true
1200
- */
1201
- role?: dxos_halo_credentials.SpaceMember.Role;
1202
- /**
1203
- * Id of a the space to join (only present if kind is SPACE).
1204
- *
1205
- * Options:
1206
- * - proto3_optional = true
1207
- */
1208
- spaceId?: string;
1186
+ export interface ExportSpaceRequest {
1187
+ spaceId: string;
1209
1188
  }
1210
- export namespace Invitation {
1211
- /**
1212
- * Defined in:
1213
- * {@link file://./../../../dxos/client/invitation.proto}
1214
- */
1215
- export enum Type {
1216
- INTERACTIVE = 0,
1217
- DELEGATED = 1,
1218
- MULTIUSE = 2
1219
- }
1220
- /**
1221
- * Defined in:
1222
- * {@link file://./../../../dxos/client/invitation.proto}
1223
- */
1224
- export enum Kind {
1225
- DEVICE = 0,
1226
- SPACE = 1
1227
- }
1228
- /**
1229
- * Defined in:
1230
- * {@link file://./../../../dxos/client/invitation.proto}
1231
- */
1232
- export enum AuthMethod {
1233
- NONE = 0,
1234
- SHARED_SECRET = 1,
1235
- KNOWN_PUBLIC_KEY = 2
1236
- }
1237
- /**
1238
- * Defined in:
1239
- * {@link file://./../../../dxos/client/invitation.proto}
1240
- */
1241
- export enum State {
1242
- INIT = 0,
1243
- CONNECTING = 1,
1244
- CONNECTED = 2,
1245
- READY_FOR_AUTHENTICATION = 3,
1246
- AUTHENTICATING = 4,
1247
- SUCCESS = 5,
1248
- CANCELLED = 6,
1249
- TIMEOUT = 7,
1250
- ERROR = 8,
1251
- EXPIRED = 9
1252
- }
1189
+ /**
1190
+ * Defined in:
1191
+ * {@link file://./../../../dxos/client/services.proto}
1192
+ */
1193
+ export interface ExportSpaceResponse {
1194
+ archive: SpaceArchive;
1253
1195
  }
1254
1196
  /**
1255
1197
  * Defined in:
1256
- * {@link file://./../../../dxos/client/logging.proto}
1198
+ * {@link file://./../../../dxos/client/services.proto}
1257
1199
  */
1258
- export interface Metrics {
1259
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1260
- values?: Metrics.KeyPair[];
1200
+ export interface ImportSpaceRequest {
1201
+ archive: SpaceArchive;
1261
1202
  }
1262
- export namespace Metrics {
1263
- /**
1264
- * Defined in:
1265
- * {@link file://./../../../dxos/client/logging.proto}
1266
- */
1267
- export interface KeyPair {
1268
- /**
1269
- * Options:
1270
- * - proto3_optional = true
1271
- */
1272
- key?: string;
1273
- /**
1274
- * Options:
1275
- * - proto3_optional = true
1276
- */
1277
- value?: dxos_value.Value;
1278
- /**
1279
- * Options:
1280
- * - proto3_optional = true
1281
- */
1282
- stats?: dxos_value.Stats;
1283
- }
1203
+ /**
1204
+ * Defined in:
1205
+ * {@link file://./../../../dxos/client/services.proto}
1206
+ */
1207
+ export interface ImportSpaceResponse {
1208
+ /**
1209
+ * the ID of the new space.
1210
+ */
1211
+ newSpaceId: string;
1284
1212
  }
1285
1213
  /**
1286
1214
  * Defined in:
1287
- * {@link file://./../../../dxos/client/logging.proto}
1215
+ * {@link file://./../../../dxos/client/services.proto}
1288
1216
  */
1289
- export interface ControlMetricsRequest {
1217
+ export interface SpacesService {
1218
+ createSpace: (request: void, options?: RequestOptions) => Promise<Space>;
1219
+ updateSpace: (request: UpdateSpaceRequest, options?: RequestOptions) => Promise<void>;
1220
+ querySpaces: (request: void, options?: RequestOptions) => Stream<QuerySpacesResponse>;
1221
+ updateMemberRole: (request: UpdateMemberRoleRequest, options?: RequestOptions) => Promise<void>;
1222
+ admitContact: (request: AdmitContactRequest, options?: RequestOptions) => Promise<void>;
1223
+ joinBySpaceKey: (request: JoinBySpaceKeyRequest, options?: RequestOptions) => Promise<JoinSpaceResponse>;
1290
1224
  /**
1291
- * Options:
1292
- * - proto3_optional = true
1225
+ * Broadcast an ephemeral message to the space swarm.
1293
1226
  */
1294
- reset?: boolean;
1227
+ postMessage: (request: PostMessageRequest, options?: RequestOptions) => Promise<void>;
1295
1228
  /**
1296
- * Options:
1297
- * - proto3_optional = true
1229
+ * Subscribe to messages from the space swarm.
1298
1230
  */
1299
- record?: boolean;
1231
+ subscribeMessages: (request: SubscribeMessagesRequest, options?: RequestOptions) => Stream<dxos_mesh_teleport_gossip.GossipMessage>;
1232
+ /**
1233
+ * Write credentials to the space control feed.
1234
+ */
1235
+ writeCredentials: (request: WriteCredentialsRequest, options?: RequestOptions) => Promise<void>;
1236
+ /**
1237
+ * Query credentials from the space control feed.
1238
+ */
1239
+ queryCredentials: (request: QueryCredentialsRequest, options?: RequestOptions) => Stream<dxos_halo_credentials.Credential>;
1240
+ createEpoch: (request: CreateEpochRequest, options?: RequestOptions) => Promise<CreateEpochResponse>;
1241
+ exportSpace: (request: ExportSpaceRequest, options?: RequestOptions) => Promise<ExportSpaceResponse>;
1242
+ importSpace: (request: ImportSpaceRequest, options?: RequestOptions) => Promise<ImportSpaceResponse>;
1300
1243
  }
1301
1244
  /**
1302
1245
  * Defined in:
1303
- * {@link file://./../../../dxos/client/logging.proto}
1246
+ * {@link file://./../../../dxos/client/services.proto}
1304
1247
  */
1305
- export interface ControlMetricsResponse {
1248
+ export interface AcceptInvitationRequest {
1249
+ invitation: Invitation;
1306
1250
  /**
1307
1251
  * Options:
1308
1252
  * - proto3_optional = true
1309
1253
  */
1310
- recording?: boolean;
1254
+ deviceProfile?: dxos_halo_credentials.DeviceProfileDocument;
1311
1255
  }
1312
1256
  /**
1313
1257
  * Defined in:
1314
- * {@link file://./../../../dxos/client/logging.proto}
1258
+ * {@link file://./../../../dxos/client/services.proto}
1315
1259
  */
1316
- export interface QueryMetricsRequest {
1317
- /**
1318
- * Options:
1319
- * - proto3_optional = true
1320
- */
1321
- interval?: number;
1260
+ export interface AuthenticationRequest {
1261
+ invitationId: string;
1262
+ authCode: string;
1322
1263
  }
1323
1264
  /**
1324
1265
  * Defined in:
1325
- * {@link file://./../../../dxos/client/logging.proto}
1266
+ * {@link file://./../../../dxos/client/services.proto}
1326
1267
  */
1327
- export interface QueryMetricsResponse {
1328
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1329
- metrics: Metrics;
1268
+ export interface CancelInvitationRequest {
1269
+ invitationId: string;
1330
1270
  }
1331
1271
  /**
1332
1272
  * Defined in:
1333
- * {@link file://./../../../dxos/client/logging.proto}
1273
+ * {@link file://./../../../dxos/client/services.proto}
1334
1274
  */
1335
- export enum LogLevel {
1336
- NONE = 0,
1337
- TRACE = 5,
1338
- DEBUG = 10,
1339
- VERBOSE = 11,
1340
- INFO = 12,
1341
- WARN = 13,
1342
- ERROR = 14
1275
+ export interface InvitationMethod {
1276
+ created?: Invitation;
1277
+ accepted?: Invitation;
1343
1278
  }
1344
1279
  /**
1345
1280
  * Defined in:
1346
- * {@link file://./../../../dxos/client/logging.proto}
1281
+ * {@link file://./../../../dxos/client/services.proto}
1347
1282
  */
1348
- export interface QueryLogsRequest {
1349
- filters?: QueryLogsRequest.Filter[];
1283
+ export interface QueryInvitationsResponse {
1284
+ action: QueryInvitationsResponse.Action;
1285
+ type: QueryInvitationsResponse.Type;
1286
+ invitations?: Invitation[];
1350
1287
  /**
1351
1288
  * Options:
1352
1289
  * - proto3_optional = true
1353
1290
  */
1354
- options?: QueryLogsRequest.MatchingOptions;
1291
+ existing?: boolean;
1355
1292
  }
1356
- export namespace QueryLogsRequest {
1293
+ export namespace QueryInvitationsResponse {
1357
1294
  /**
1358
1295
  * Defined in:
1359
- * {@link file://./../../../dxos/client/logging.proto}
1296
+ * {@link file://./../../../dxos/client/services.proto}
1360
1297
  */
1361
- export enum MatchingOptions {
1362
- NONE = 0,
1363
- INCLUSIVE = 1,
1364
- EXPLICIT = 2
1298
+ export enum Action {
1299
+ ADDED = 0,
1300
+ REMOVED = 1,
1301
+ SAVED = 2,
1302
+ LOAD_COMPLETE = 3
1365
1303
  }
1366
1304
  /**
1367
1305
  * Defined in:
1368
- * {@link file://./../../../dxos/client/logging.proto}
1306
+ * {@link file://./../../../dxos/client/services.proto}
1369
1307
  */
1370
- export interface Filter {
1371
- level: LogLevel;
1372
- /**
1373
- * Options:
1374
- * - proto3_optional = true
1375
- */
1376
- pattern?: string;
1308
+ export enum Type {
1309
+ CREATED = 0,
1310
+ ACCEPTED = 1
1377
1311
  }
1378
1312
  }
1379
1313
  /**
1380
1314
  * Defined in:
1381
- * {@link file://./../../../dxos/client/logging.proto}
1315
+ * {@link file://./../../../dxos/client/services.proto}
1382
1316
  */
1383
- export interface LogEntry {
1384
- level: LogLevel;
1385
- message: string;
1386
- /**
1387
- * Options:
1388
- * - proto3_optional = true
1389
- */
1390
- context?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1391
- /**
1392
- * Options:
1393
- * - proto3_optional = true
1394
- */
1395
- meta?: LogEntry.Meta;
1396
- /**
1397
- * Options:
1398
- * - proto3_optional = true
1399
- */
1400
- error?: dxos_error.Error;
1401
- timestamp: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1317
+ export interface LoadPersistentInvitationsResponse {
1318
+ invitations?: Invitation[];
1402
1319
  }
1403
- export namespace LogEntry {
1320
+ /**
1321
+ * Defined in:
1322
+ * {@link file://./../../../dxos/client/services.proto}
1323
+ */
1324
+ export interface InvitationsService {
1325
+ createInvitation: (request: Invitation, options?: RequestOptions) => Stream<Invitation>;
1326
+ acceptInvitation: (request: AcceptInvitationRequest, options?: RequestOptions) => Stream<Invitation>;
1327
+ authenticate: (request: AuthenticationRequest, options?: RequestOptions) => Promise<void>;
1328
+ cancelInvitation: (request: CancelInvitationRequest, options?: RequestOptions) => Promise<void>;
1329
+ queryInvitations: (request: void, options?: RequestOptions) => Stream<QueryInvitationsResponse>;
1330
+ }
1331
+ /**
1332
+ * Defined in:
1333
+ * {@link file://./../../../dxos/client/services.proto}
1334
+ */
1335
+ export enum ConnectionState {
1336
+ OFFLINE = 0,
1337
+ ONLINE = 1
1338
+ }
1339
+ /**
1340
+ * Defined in:
1341
+ * {@link file://./../../../dxos/client/services.proto}
1342
+ */
1343
+ export interface NetworkStatus {
1344
+ swarm: ConnectionState;
1345
+ signaling?: NetworkStatus.Signal[];
1346
+ connectionInfo?: dxos_devtools_swarm.SwarmInfo[];
1347
+ }
1348
+ export namespace NetworkStatus {
1404
1349
  /**
1405
1350
  * Defined in:
1406
- * {@link file://./../../../dxos/client/logging.proto}
1351
+ * {@link file://./../../../dxos/client/services.proto}
1407
1352
  */
1408
- export interface Meta {
1409
- file: string;
1410
- line: number;
1411
- /**
1412
- * Options:
1413
- * - proto3_optional = true
1414
- */
1415
- scope?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
1416
- /**
1417
- * Options:
1418
- * - proto3_optional = true
1419
- */
1420
- resourceId?: number;
1353
+ export interface Signal {
1354
+ server: string;
1355
+ state: dxos_mesh_signal.SignalState;
1421
1356
  }
1422
1357
  }
1423
1358
  /**
1424
1359
  * Defined in:
1425
- * {@link file://./../../../dxos/client/logging.proto}
1360
+ * {@link file://./../../../dxos/client/services.proto}
1426
1361
  */
1427
- export interface LoggingService {
1428
- controlMetrics: (request: ControlMetricsRequest, options?: RequestOptions) => Promise<ControlMetricsResponse>;
1429
- queryMetrics: (request: QueryMetricsRequest, options?: RequestOptions) => Stream<QueryMetricsResponse>;
1430
- queryLogs: (request: QueryLogsRequest, options?: RequestOptions) => Stream<LogEntry>;
1362
+ export interface UpdateConfigRequest {
1363
+ swarm: ConnectionState;
1364
+ }
1365
+ /**
1366
+ * Defined in:
1367
+ * {@link file://./../../../dxos/client/services.proto}
1368
+ */
1369
+ export interface SubscribeSwarmStateRequest {
1370
+ topic: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1371
+ }
1372
+ /**
1373
+ * Defined in:
1374
+ * {@link file://./../../../dxos/client/services.proto}
1375
+ */
1376
+ export interface NetworkService {
1377
+ updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1378
+ queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1379
+ joinSwarm: (request: dxos_edge_signal.JoinRequest, options?: RequestOptions) => Promise<void>;
1380
+ leaveSwarm: (request: dxos_edge_signal.LeaveRequest, options?: RequestOptions) => Promise<void>;
1381
+ /**
1382
+ * Query the swarm state without joining it.
1383
+ */
1384
+ querySwarm: (request: dxos_edge_signal.QueryRequest, options?: RequestOptions) => Promise<dxos_edge_messenger.SwarmResponse>;
1385
+ subscribeSwarmState: (request: SubscribeSwarmStateRequest, options?: RequestOptions) => Stream<dxos_edge_messenger.SwarmResponse>;
1386
+ sendMessage: (request: dxos_edge_signal.Message, options?: RequestOptions) => Promise<void>;
1387
+ subscribeMessages: (request: dxos_edge_messenger.Peer, options?: RequestOptions) => Stream<dxos_edge_signal.Message>;
1388
+ }
1389
+ /**
1390
+ * Defined in:
1391
+ * {@link file://./../../../dxos/client/services.proto}
1392
+ */
1393
+ export interface EdgeAgentService {
1394
+ queryEdgeStatus: (request: void, options?: RequestOptions) => Stream<QueryEdgeStatusResponse>;
1395
+ createAgent: (request: void, options?: RequestOptions) => Promise<void>;
1396
+ queryAgentStatus: (request: void, options?: RequestOptions) => Stream<QueryAgentStatusResponse>;
1397
+ }
1398
+ /**
1399
+ * Defined in:
1400
+ * {@link file://./../../../dxos/client/services.proto}
1401
+ */
1402
+ export enum EdgeStatus {
1403
+ NOT_CONNECTED = 0,
1404
+ CONNECTED = 1
1405
+ }
1406
+ /**
1407
+ * Defined in:
1408
+ * {@link file://./../../../dxos/client/services.proto}
1409
+ */
1410
+ export interface QueryEdgeStatusResponse {
1411
+ status: EdgeStatus;
1412
+ }
1413
+ /**
1414
+ * Defined in:
1415
+ * {@link file://./../../../dxos/client/services.proto}
1416
+ */
1417
+ export interface QueryAgentStatusResponse {
1418
+ status: QueryAgentStatusResponse.AgentStatus;
1419
+ }
1420
+ export namespace QueryAgentStatusResponse {
1421
+ /**
1422
+ * Defined in:
1423
+ * {@link file://./../../../dxos/client/services.proto}
1424
+ */
1425
+ export enum AgentStatus {
1426
+ UNKNOWN = 0,
1427
+ ACTIVE = 1,
1428
+ INACTIVE = 2,
1429
+ NOT_FOUND = 3
1430
+ }
1431
1431
  }