@dxos/protocols 0.6.14-main.8b352a0 → 0.6.14-staging.3e2eaca

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.
@@ -63,6 +63,198 @@ import * as dxos_value from "../value.js";
63
63
  import * as example_testing_data from "../../example/testing/data.js";
64
64
  import * as example_testing_rpc from "../../example/testing/rpc.js";
65
65
  import * as google_protobuf from "../../google/protobuf.js";
66
+ /**
67
+ * Defined in:
68
+ * {@link file://./../../../dxos/client/invitation.proto}
69
+ */
70
+ export interface AdmissionKeypair {
71
+ publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
72
+ /**
73
+ * Options:
74
+ * - proto3_optional = true
75
+ */
76
+ privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
77
+ }
78
+ /**
79
+ * Runtime state of the space object.
80
+ *
81
+ * Defined in:
82
+ * {@link file://./../../../dxos/client/invitation.proto}
83
+ */
84
+ export enum SpaceState {
85
+ INVALID = 0,
86
+ SPACE_INACTIVE = 2,
87
+ SPACE_ACTIVE = 6,
88
+ SPACE_CLOSED = 1,
89
+ SPACE_CONTROL_ONLY = 7,
90
+ SPACE_INITIALIZING = 4,
91
+ SPACE_READY = 3,
92
+ SPACE_ERROR = 5,
93
+ SPACE_REQUIRES_MIGRATION = 8
94
+ }
95
+ /**
96
+ * Represents the invitation state passed between client and service.
97
+ *
98
+ * Defined in:
99
+ * {@link file://./../../../dxos/client/invitation.proto}
100
+ */
101
+ export interface Invitation {
102
+ /**
103
+ * Local identifier (random).
104
+ */
105
+ invitationId: string;
106
+ /**
107
+ * Determines the behavior of the invitation.
108
+ */
109
+ type: Invitation.Type;
110
+ /**
111
+ * Kind of access the invitation will grant.
112
+ */
113
+ kind: Invitation.Kind;
114
+ /**
115
+ * How the invitation is authenticated.
116
+ */
117
+ authMethod: Invitation.AuthMethod;
118
+ /**
119
+ * Swarm rendezvous (random).
120
+ */
121
+ swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
122
+ /**
123
+ * Local state.
124
+ */
125
+ state: Invitation.State;
126
+ /**
127
+ * Timeout for guest to complete invitation once connected (ms).
128
+ *
129
+ * Options:
130
+ * - proto3_optional = true
131
+ */
132
+ timeout?: number;
133
+ /**
134
+ * Guest's identity.
135
+ *
136
+ * Options:
137
+ * - proto3_optional = true
138
+ */
139
+ identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
140
+ /**
141
+ * Space to join (only present if kind is SPACE).
142
+ *
143
+ * Options:
144
+ * - proto3_optional = true
145
+ */
146
+ spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
147
+ /**
148
+ * Authentication code created by host (only present if auth_method is SHARED_SECRET).
149
+ *
150
+ * Options:
151
+ * - proto3_optional = true
152
+ */
153
+ authCode?: string;
154
+ /**
155
+ * Path or identifier to navigate to after successful authentication.
156
+ *
157
+ * Options:
158
+ * - proto3_optional = true
159
+ */
160
+ target?: string;
161
+ /**
162
+ * Host should resume invitation on startup until timeout.
163
+ *
164
+ * Options:
165
+ * - proto3_optional = true
166
+ */
167
+ persistent?: boolean;
168
+ /**
169
+ * Options:
170
+ * - proto3_optional = true
171
+ */
172
+ created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
173
+ /**
174
+ * Options:
175
+ * - proto3_optional = true
176
+ */
177
+ lifetime?: number;
178
+ /**
179
+ * Whether an invitation can be used multiple times.
180
+ *
181
+ * Options:
182
+ * - proto3_optional = true
183
+ */
184
+ multiUse?: boolean;
185
+ /**
186
+ * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
187
+ *
188
+ * Options:
189
+ * - proto3_optional = true
190
+ */
191
+ guestKeypair?: AdmissionKeypair;
192
+ /**
193
+ * Present on Type.DELEGATED invitations.
194
+ *
195
+ * Options:
196
+ * - proto3_optional = true
197
+ */
198
+ delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
199
+ /**
200
+ * Role of the admitted member, defaults to ADMIN.
201
+ *
202
+ * Options:
203
+ * - proto3_optional = true
204
+ */
205
+ role?: dxos_halo_credentials.SpaceMember.Role;
206
+ /**
207
+ * Id of a the space to join (only present if kind is SPACE).
208
+ *
209
+ * Options:
210
+ * - proto3_optional = true
211
+ */
212
+ spaceId?: string;
213
+ }
214
+ export namespace Invitation {
215
+ /**
216
+ * Defined in:
217
+ * {@link file://./../../../dxos/client/invitation.proto}
218
+ */
219
+ export enum Type {
220
+ INTERACTIVE = 0,
221
+ DELEGATED = 1,
222
+ MULTIUSE = 2
223
+ }
224
+ /**
225
+ * Defined in:
226
+ * {@link file://./../../../dxos/client/invitation.proto}
227
+ */
228
+ export enum Kind {
229
+ DEVICE = 0,
230
+ SPACE = 1
231
+ }
232
+ /**
233
+ * Defined in:
234
+ * {@link file://./../../../dxos/client/invitation.proto}
235
+ */
236
+ export enum AuthMethod {
237
+ NONE = 0,
238
+ SHARED_SECRET = 1,
239
+ KNOWN_PUBLIC_KEY = 2
240
+ }
241
+ /**
242
+ * Defined in:
243
+ * {@link file://./../../../dxos/client/invitation.proto}
244
+ */
245
+ export enum State {
246
+ INIT = 0,
247
+ CONNECTING = 1,
248
+ CONNECTED = 2,
249
+ READY_FOR_AUTHENTICATION = 3,
250
+ AUTHENTICATING = 4,
251
+ SUCCESS = 5,
252
+ CANCELLED = 6,
253
+ TIMEOUT = 7,
254
+ ERROR = 8,
255
+ EXPIRED = 9
256
+ }
257
+ }
66
258
  /**
67
259
  * Defined in:
68
260
  * {@link file://./../../../dxos/client/logging.proto}
@@ -1091,195 +1283,3 @@ export namespace QueryAgentStatusResponse {
1091
1283
  NOT_FOUND = 3
1092
1284
  }
1093
1285
  }
1094
- /**
1095
- * Defined in:
1096
- * {@link file://./../../../dxos/client/invitation.proto}
1097
- */
1098
- export interface AdmissionKeypair {
1099
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1100
- /**
1101
- * Options:
1102
- * - proto3_optional = true
1103
- */
1104
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1105
- }
1106
- /**
1107
- * Runtime state of the space object.
1108
- *
1109
- * Defined in:
1110
- * {@link file://./../../../dxos/client/invitation.proto}
1111
- */
1112
- export enum SpaceState {
1113
- INVALID = 0,
1114
- SPACE_INACTIVE = 2,
1115
- SPACE_ACTIVE = 6,
1116
- SPACE_CLOSED = 1,
1117
- SPACE_CONTROL_ONLY = 7,
1118
- SPACE_INITIALIZING = 4,
1119
- SPACE_READY = 3,
1120
- SPACE_ERROR = 5,
1121
- SPACE_REQUIRES_MIGRATION = 8
1122
- }
1123
- /**
1124
- * Represents the invitation state passed between client and service.
1125
- *
1126
- * Defined in:
1127
- * {@link file://./../../../dxos/client/invitation.proto}
1128
- */
1129
- export interface Invitation {
1130
- /**
1131
- * Local identifier (random).
1132
- */
1133
- invitationId: string;
1134
- /**
1135
- * Determines the behavior of the invitation.
1136
- */
1137
- type: Invitation.Type;
1138
- /**
1139
- * Kind of access the invitation will grant.
1140
- */
1141
- kind: Invitation.Kind;
1142
- /**
1143
- * How the invitation is authenticated.
1144
- */
1145
- authMethod: Invitation.AuthMethod;
1146
- /**
1147
- * Swarm rendezvous (random).
1148
- */
1149
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1150
- /**
1151
- * Local state.
1152
- */
1153
- state: Invitation.State;
1154
- /**
1155
- * Timeout for guest to complete invitation once connected (ms).
1156
- *
1157
- * Options:
1158
- * - proto3_optional = true
1159
- */
1160
- timeout?: number;
1161
- /**
1162
- * Guest's identity.
1163
- *
1164
- * Options:
1165
- * - proto3_optional = true
1166
- */
1167
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1168
- /**
1169
- * Space to join (only present if kind is SPACE).
1170
- *
1171
- * Options:
1172
- * - proto3_optional = true
1173
- */
1174
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1175
- /**
1176
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1177
- *
1178
- * Options:
1179
- * - proto3_optional = true
1180
- */
1181
- authCode?: string;
1182
- /**
1183
- * Path or identifier to navigate to after successful authentication.
1184
- *
1185
- * Options:
1186
- * - proto3_optional = true
1187
- */
1188
- target?: string;
1189
- /**
1190
- * Host should resume invitation on startup until timeout.
1191
- *
1192
- * Options:
1193
- * - proto3_optional = true
1194
- */
1195
- persistent?: boolean;
1196
- /**
1197
- * Options:
1198
- * - proto3_optional = true
1199
- */
1200
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1201
- /**
1202
- * Options:
1203
- * - proto3_optional = true
1204
- */
1205
- lifetime?: number;
1206
- /**
1207
- * Whether an invitation can be used multiple times.
1208
- *
1209
- * Options:
1210
- * - proto3_optional = true
1211
- */
1212
- multiUse?: boolean;
1213
- /**
1214
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1215
- *
1216
- * Options:
1217
- * - proto3_optional = true
1218
- */
1219
- guestKeypair?: AdmissionKeypair;
1220
- /**
1221
- * Present on Type.DELEGATED invitations.
1222
- *
1223
- * Options:
1224
- * - proto3_optional = true
1225
- */
1226
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1227
- /**
1228
- * Role of the admitted member, defaults to ADMIN.
1229
- *
1230
- * Options:
1231
- * - proto3_optional = true
1232
- */
1233
- role?: dxos_halo_credentials.SpaceMember.Role;
1234
- /**
1235
- * Id of a the space to join (only present if kind is SPACE).
1236
- *
1237
- * Options:
1238
- * - proto3_optional = true
1239
- */
1240
- spaceId?: string;
1241
- }
1242
- export namespace Invitation {
1243
- /**
1244
- * Defined in:
1245
- * {@link file://./../../../dxos/client/invitation.proto}
1246
- */
1247
- export enum Type {
1248
- INTERACTIVE = 0,
1249
- DELEGATED = 1,
1250
- MULTIUSE = 2
1251
- }
1252
- /**
1253
- * Defined in:
1254
- * {@link file://./../../../dxos/client/invitation.proto}
1255
- */
1256
- export enum Kind {
1257
- DEVICE = 0,
1258
- SPACE = 1
1259
- }
1260
- /**
1261
- * Defined in:
1262
- * {@link file://./../../../dxos/client/invitation.proto}
1263
- */
1264
- export enum AuthMethod {
1265
- NONE = 0,
1266
- SHARED_SECRET = 1,
1267
- KNOWN_PUBLIC_KEY = 2
1268
- }
1269
- /**
1270
- * Defined in:
1271
- * {@link file://./../../../dxos/client/invitation.proto}
1272
- */
1273
- export enum State {
1274
- INIT = 0,
1275
- CONNECTING = 1,
1276
- CONNECTED = 2,
1277
- READY_FOR_AUTHENTICATION = 3,
1278
- AUTHENTICATING = 4,
1279
- SUCCESS = 5,
1280
- CANCELLED = 6,
1281
- TIMEOUT = 7,
1282
- ERROR = 8,
1283
- EXPIRED = 9
1284
- }
1285
- }