@dxos/protocols 0.8.4-main.84f28bd → 0.8.4-main.f9ba587

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