@dxos/protocols 0.6.5-staging.435ed25 → 0.6.5-staging.a07b6c7

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