@dxos/protocols 0.8.4-main.bc674ce → 0.8.4-main.bd9b33e6c8

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