@dxos/protocols 0.6.10-main.bbdfaa4 → 0.6.10-staging.00555f6

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 (52) hide show
  1. package/dist/cjs/src/index.d.ts +0 -2
  2. package/dist/cjs/src/index.d.ts.map +1 -1
  3. package/dist/cjs/src/index.js +0 -2
  4. package/dist/cjs/src/index.js.map +1 -1
  5. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts +185 -185
  6. package/dist/cjs/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  7. package/dist/cjs/src/proto/gen/dxos/client/services.js +68 -68
  8. package/dist/cjs/src/proto/gen/dxos/client/services.js.map +1 -1
  9. package/dist/cjs/src/proto/index.d.ts +1 -0
  10. package/dist/cjs/src/proto/index.d.ts.map +1 -1
  11. package/dist/cjs/src/proto/index.js +15 -0
  12. package/dist/cjs/src/proto/index.js.map +1 -1
  13. package/dist/cjs/src/proto/types.d.ts +4 -0
  14. package/dist/cjs/src/proto/types.d.ts.map +1 -0
  15. package/dist/cjs/src/proto/types.js +6 -0
  16. package/dist/cjs/src/proto/types.js.map +1 -0
  17. package/dist/cjs/src/types.d.ts +0 -3
  18. package/dist/cjs/src/types.d.ts.map +1 -1
  19. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  20. package/dist/esm/src/index.d.ts +0 -2
  21. package/dist/esm/src/index.d.ts.map +1 -1
  22. package/dist/esm/src/index.js +0 -2
  23. package/dist/esm/src/index.js.map +1 -1
  24. package/dist/esm/src/proto/gen/dxos/client/services.d.ts +185 -185
  25. package/dist/esm/src/proto/gen/dxos/client/services.d.ts.map +1 -1
  26. package/dist/esm/src/proto/gen/dxos/client/services.js +67 -67
  27. package/dist/esm/src/proto/gen/dxos/client/services.js.map +1 -1
  28. package/dist/esm/src/proto/index.d.ts +1 -0
  29. package/dist/esm/src/proto/index.d.ts.map +1 -1
  30. package/dist/esm/src/proto/index.js +1 -0
  31. package/dist/esm/src/proto/index.js.map +1 -1
  32. package/dist/esm/src/proto/types.d.ts +4 -0
  33. package/dist/esm/src/proto/types.d.ts.map +1 -0
  34. package/dist/esm/src/proto/types.js +5 -0
  35. package/dist/esm/src/proto/types.js.map +1 -0
  36. package/dist/esm/src/types.d.ts +0 -3
  37. package/dist/esm/src/types.d.ts.map +1 -1
  38. package/package.json +15 -6
  39. package/src/index.ts +0 -2
  40. package/src/proto/gen/dxos/client/services.ts +185 -185
  41. package/src/proto/index.ts +1 -0
  42. package/src/proto/types.ts +10 -0
  43. package/src/types.ts +0 -5
  44. package/dist/cjs/src/testing.d.ts +0 -5
  45. package/dist/cjs/src/testing.d.ts.map +0 -1
  46. package/dist/cjs/src/testing.js +0 -37
  47. package/dist/cjs/src/testing.js.map +0 -1
  48. package/dist/esm/src/testing.d.ts +0 -5
  49. package/dist/esm/src/testing.d.ts.map +0 -1
  50. package/dist/esm/src/testing.js +0 -33
  51. package/dist/esm/src/testing.js.map +0 -1
  52. package/src/testing.ts +0 -43
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/proto/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAc,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/proto/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAc,MAAM,OAAO,CAAC;AACvD,cAAc,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type TypedProtoMessage } from '@dxos/codec-protobuf';
2
+ import { type TYPES } from './gen';
3
+ export type TypedMessage = TypedProtoMessage<TYPES>;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/proto/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAC;AAGnC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/proto/types.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE"}
@@ -1,10 +1,7 @@
1
- import { type TypedProtoMessage } from '@dxos/codec-protobuf';
2
1
  import { type PublicKey } from '@dxos/keys';
3
2
  import { type Timeframe } from '@dxos/timeframe';
4
- import { type TYPES } from './proto';
5
3
  import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed';
6
4
  import { type EchoObjectBatch } from './proto/gen/dxos/echo/object';
7
- export type TypedMessage = TypedProtoMessage<TYPES>;
8
5
  export type FeedMeta = {
9
6
  feedKey: PublicKey;
10
7
  seq: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAGpD,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AAEtD,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,SAAS,EAAE,SAAS,CAAC;CACtB;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,eAAe,CAAC;CACxB;AAGD,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AAEtD,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,SAAS,EAAE,SAAS,CAAC;CACtB;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,eAAe,CAAC;CACxB;AAGD,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/protocols",
3
- "version": "0.6.10-main.bbdfaa4",
3
+ "version": "0.6.10-staging.00555f6",
4
4
  "description": "Protobuf definitions for DXOS protocols.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -19,6 +19,12 @@
19
19
  "require": "./dist/cjs/src/feed-replication.js",
20
20
  "node": "./dist/cjs/src/feed-replication.js"
21
21
  },
22
+ "./proto": {
23
+ "browser": "./dist/esm/src/proto/index.js",
24
+ "import": "./dist/esm/src/proto/index.js",
25
+ "require": "./dist/cjs/src/proto/index.js",
26
+ "node": "./dist/cjs/src/proto/index.js"
27
+ },
22
28
  "./proto/*": {
23
29
  "browser": "./dist/esm/src/proto/gen/*.js",
24
30
  "import": "./dist/esm/src/proto/gen/*.js",
@@ -52,6 +58,9 @@
52
58
  ],
53
59
  "buf": [
54
60
  "dist/esm/src/buf/index.d.ts"
61
+ ],
62
+ "proto": [
63
+ "dist/esm/src/proto/index.d.ts"
55
64
  ]
56
65
  }
57
66
  },
@@ -62,11 +71,11 @@
62
71
  "dependencies": {
63
72
  "@bufbuild/protobuf": "^2.0.0",
64
73
  "@effect/schema": "^0.67.16",
65
- "@dxos/codec-protobuf": "0.6.10-main.bbdfaa4",
66
- "@dxos/keys": "0.6.10-main.bbdfaa4",
67
- "@dxos/invariant": "0.6.10-main.bbdfaa4",
68
- "@dxos/timeframe": "0.6.10-main.bbdfaa4",
69
- "@dxos/util": "0.6.10-main.bbdfaa4"
74
+ "@dxos/codec-protobuf": "0.6.10-staging.00555f6",
75
+ "@dxos/invariant": "0.6.10-staging.00555f6",
76
+ "@dxos/keys": "0.6.10-staging.00555f6",
77
+ "@dxos/util": "0.6.10-staging.00555f6",
78
+ "@dxos/timeframe": "0.6.10-staging.00555f6"
70
79
  },
71
80
  "devDependencies": {
72
81
  "@bufbuild/buf": "^1.35.0",
package/src/index.ts CHANGED
@@ -4,9 +4,7 @@
4
4
 
5
5
  export * from './errors';
6
6
  export * from './indexing';
7
- export * from './proto';
8
7
  export * from './storage';
9
- export * from './testing';
10
8
  export * from './tracing';
11
9
  export * from './types';
12
10
  export * from './query';
@@ -63,6 +63,191 @@ import * as dxos_value from "../value";
63
63
  import * as example_testing_data from "../../example/testing/data";
64
64
  import * as example_testing_rpc from "../../example/testing/rpc";
65
65
  import * as google_protobuf from "../../google/protobuf";
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
+ export namespace Invitation {
208
+ /**
209
+ * Defined in:
210
+ * {@link file://./../../../dxos/client/invitation.proto}
211
+ */
212
+ export enum Type {
213
+ INTERACTIVE = 0,
214
+ DELEGATED = 1,
215
+ MULTIUSE = 2
216
+ }
217
+ /**
218
+ * Defined in:
219
+ * {@link file://./../../../dxos/client/invitation.proto}
220
+ */
221
+ export enum Kind {
222
+ DEVICE = 0,
223
+ SPACE = 1
224
+ }
225
+ /**
226
+ * Defined in:
227
+ * {@link file://./../../../dxos/client/invitation.proto}
228
+ */
229
+ export enum AuthMethod {
230
+ NONE = 0,
231
+ SHARED_SECRET = 1,
232
+ KNOWN_PUBLIC_KEY = 2
233
+ }
234
+ /**
235
+ * Defined in:
236
+ * {@link file://./../../../dxos/client/invitation.proto}
237
+ */
238
+ export enum State {
239
+ INIT = 0,
240
+ CONNECTING = 1,
241
+ CONNECTED = 2,
242
+ READY_FOR_AUTHENTICATION = 3,
243
+ AUTHENTICATING = 4,
244
+ SUCCESS = 5,
245
+ CANCELLED = 6,
246
+ TIMEOUT = 7,
247
+ ERROR = 8,
248
+ EXPIRED = 9
249
+ }
250
+ }
66
251
  /**
67
252
  * Defined in:
68
253
  * {@link file://./../../../dxos/client/logging.proto}
@@ -1045,188 +1230,3 @@ export interface NetworkService {
1045
1230
  updateConfig: (request: UpdateConfigRequest, options?: RequestOptions) => Promise<void>;
1046
1231
  queryStatus: (request: void, options?: RequestOptions) => Stream<NetworkStatus>;
1047
1232
  }
1048
- /**
1049
- * Defined in:
1050
- * {@link file://./../../../dxos/client/invitation.proto}
1051
- */
1052
- export interface AdmissionKeypair {
1053
- publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1054
- /**
1055
- * Options:
1056
- * - proto3_optional = true
1057
- */
1058
- privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
1059
- }
1060
- /**
1061
- * Runtime state of the space object.
1062
- *
1063
- * Defined in:
1064
- * {@link file://./../../../dxos/client/invitation.proto}
1065
- */
1066
- export enum SpaceState {
1067
- INVALID = 0,
1068
- SPACE_INACTIVE = 2,
1069
- SPACE_ACTIVE = 6,
1070
- SPACE_CLOSED = 1,
1071
- SPACE_CONTROL_ONLY = 7,
1072
- SPACE_INITIALIZING = 4,
1073
- SPACE_READY = 3,
1074
- SPACE_ERROR = 5,
1075
- SPACE_REQUIRES_MIGRATION = 8
1076
- }
1077
- /**
1078
- * Represents the invitation state passed between client and service.
1079
- *
1080
- * Defined in:
1081
- * {@link file://./../../../dxos/client/invitation.proto}
1082
- */
1083
- export interface Invitation {
1084
- /**
1085
- * Local identifier (random).
1086
- */
1087
- invitationId: string;
1088
- /**
1089
- * Determines the behavior of the invitation.
1090
- */
1091
- type: Invitation.Type;
1092
- /**
1093
- * Kind of access the invitation will grant.
1094
- */
1095
- kind: Invitation.Kind;
1096
- /**
1097
- * How the invitation is authenticated.
1098
- */
1099
- authMethod: Invitation.AuthMethod;
1100
- /**
1101
- * Swarm rendezvous (random).
1102
- */
1103
- swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1104
- /**
1105
- * Local state.
1106
- */
1107
- state: Invitation.State;
1108
- /**
1109
- * Timeout for guest to complete invitation once connected (ms).
1110
- *
1111
- * Options:
1112
- * - proto3_optional = true
1113
- */
1114
- timeout?: number;
1115
- /**
1116
- * Guest's identity.
1117
- *
1118
- * Options:
1119
- * - proto3_optional = true
1120
- */
1121
- identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1122
- /**
1123
- * Space to join (only present if kind is SPACE).
1124
- *
1125
- * Options:
1126
- * - proto3_optional = true
1127
- */
1128
- spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1129
- /**
1130
- * Authentication code created by host (only present if auth_method is SHARED_SECRET).
1131
- *
1132
- * Options:
1133
- * - proto3_optional = true
1134
- */
1135
- authCode?: string;
1136
- /**
1137
- * Path or identifier to navigate to after successful authentication.
1138
- *
1139
- * Options:
1140
- * - proto3_optional = true
1141
- */
1142
- target?: string;
1143
- /**
1144
- * Host should resume invitation on startup until timeout.
1145
- *
1146
- * Options:
1147
- * - proto3_optional = true
1148
- */
1149
- persistent?: boolean;
1150
- /**
1151
- * Options:
1152
- * - proto3_optional = true
1153
- */
1154
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
1155
- /**
1156
- * Options:
1157
- * - proto3_optional = true
1158
- */
1159
- lifetime?: number;
1160
- /**
1161
- * Whether an invitation can be used multiple times.
1162
- *
1163
- * Options:
1164
- * - proto3_optional = true
1165
- */
1166
- multiUse?: boolean;
1167
- /**
1168
- * Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
1169
- *
1170
- * Options:
1171
- * - proto3_optional = true
1172
- */
1173
- guestKeypair?: AdmissionKeypair;
1174
- /**
1175
- * Present on Type.DELEGATED invitations.
1176
- *
1177
- * Options:
1178
- * - proto3_optional = true
1179
- */
1180
- delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
1181
- /**
1182
- * Role of the admitted member, defaults to ADMIN.
1183
- *
1184
- * Options:
1185
- * - proto3_optional = true
1186
- */
1187
- role?: dxos_halo_credentials.SpaceMember.Role;
1188
- }
1189
- export namespace Invitation {
1190
- /**
1191
- * Defined in:
1192
- * {@link file://./../../../dxos/client/invitation.proto}
1193
- */
1194
- export enum Type {
1195
- INTERACTIVE = 0,
1196
- DELEGATED = 1,
1197
- MULTIUSE = 2
1198
- }
1199
- /**
1200
- * Defined in:
1201
- * {@link file://./../../../dxos/client/invitation.proto}
1202
- */
1203
- export enum Kind {
1204
- DEVICE = 0,
1205
- SPACE = 1
1206
- }
1207
- /**
1208
- * Defined in:
1209
- * {@link file://./../../../dxos/client/invitation.proto}
1210
- */
1211
- export enum AuthMethod {
1212
- NONE = 0,
1213
- SHARED_SECRET = 1,
1214
- KNOWN_PUBLIC_KEY = 2
1215
- }
1216
- /**
1217
- * Defined in:
1218
- * {@link file://./../../../dxos/client/invitation.proto}
1219
- */
1220
- export enum State {
1221
- INIT = 0,
1222
- CONNECTING = 1,
1223
- CONNECTED = 2,
1224
- READY_FOR_AUTHENTICATION = 3,
1225
- AUTHENTICATING = 4,
1226
- SUCCESS = 5,
1227
- CANCELLED = 6,
1228
- TIMEOUT = 7,
1229
- ERROR = 8,
1230
- EXPIRED = 9
1231
- }
1232
- }
@@ -3,3 +3,4 @@
3
3
  //
4
4
 
5
5
  export { schema, schemaJson, type TYPES } from './gen';
6
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type TypedProtoMessage } from '@dxos/codec-protobuf';
6
+
7
+ import { type TYPES } from './gen';
8
+
9
+ // TODO(burdon): Rename ProtocolMessage.
10
+ export type TypedMessage = TypedProtoMessage<TYPES>;
package/src/types.ts CHANGED
@@ -2,17 +2,12 @@
2
2
  // Copyright 2020 DXOS.org
3
3
  //
4
4
 
5
- import { type TypedProtoMessage } from '@dxos/codec-protobuf';
6
5
  import { type PublicKey } from '@dxos/keys';
7
6
  import { type Timeframe } from '@dxos/timeframe';
8
7
 
9
- import { type TYPES } from './proto';
10
8
  import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed';
11
9
  import { type EchoObjectBatch } from './proto/gen/dxos/echo/object';
12
10
 
13
- // TODO(burdon): Rename ProtocolMessage.
14
- export type TypedMessage = TypedProtoMessage<TYPES>;
15
-
16
11
  // TODO(burdon): Replace with proto definition.
17
12
  export type FeedMeta = {
18
13
  feedKey: PublicKey;
@@ -1,5 +0,0 @@
1
- import { Timeframe } from '@dxos/timeframe';
2
- import type { FeedMessage } from './proto/gen/dxos/echo/feed';
3
- import { type ObjectId } from './types';
4
- export declare const createTestItemMutation: (objectId: ObjectId, key: string, value: string, timeframe?: Timeframe) => FeedMessage;
5
- //# sourceMappingURL=testing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,eAAO,MAAM,sBAAsB,aACvB,QAAQ,OACb,MAAM,SACJ,MAAM,4BAEZ,WAsBD,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- //
3
- // Copyright 2020 DXOS.org
4
- //
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createTestItemMutation = void 0;
7
- const timeframe_1 = require("@dxos/timeframe");
8
- const proto_1 = require("./proto");
9
- //
10
- // Testing.
11
- //
12
- // TODO(burdon): Move to testing package (with other fakers, etc.)
13
- const createTestItemMutation = (objectId, key, value, timeframe = new timeframe_1.Timeframe()) => ({
14
- timeframe,
15
- payload: {
16
- data: {
17
- batch: {
18
- objects: [
19
- {
20
- objectId,
21
- mutations: [
22
- {
23
- model: {
24
- '@type': 'google.protobuf.Any',
25
- typeUrl: 'todo',
26
- value: proto_1.schema.getCodecForType('example.testing.data.TestItemMutation').encode({ key, value }),
27
- },
28
- },
29
- ],
30
- },
31
- ],
32
- },
33
- },
34
- },
35
- });
36
- exports.createTestItemMutation = createTestItemMutation;
37
- //# sourceMappingURL=testing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,+CAA4C;AAE5C,mCAAiC;AAIjC,EAAE;AACF,WAAW;AACX,EAAE;AAEF,kEAAkE;AAC3D,MAAM,sBAAsB,GAAG,CACpC,QAAkB,EAClB,GAAW,EACX,KAAa,EACb,SAAS,GAAG,IAAI,qBAAS,EAAE,EACd,EAAE,CAAC,CAAC;IACjB,SAAS;IACT,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,OAAO,EAAE;oBACP;wBACE,QAAQ;wBACR,SAAS,EAAE;4BACT;gCACE,KAAK,EAAE;oCACL,OAAO,EAAE,qBAAqB;oCAC9B,OAAO,EAAE,MAAM;oCACf,KAAK,EAAE,cAAM,CAAC,eAAe,CAAC,uCAAuC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;iCAC9F;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC;AA3BU,QAAA,sBAAsB,0BA2BhC"}
@@ -1,5 +0,0 @@
1
- import { Timeframe } from '@dxos/timeframe';
2
- import type { FeedMessage } from './proto/gen/dxos/echo/feed';
3
- import { type ObjectId } from './types';
4
- export declare const createTestItemMutation: (objectId: ObjectId, key: string, value: string, timeframe?: Timeframe) => FeedMessage;
5
- //# sourceMappingURL=testing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOxC,eAAO,MAAM,sBAAsB,aACvB,QAAQ,OACb,MAAM,SACJ,MAAM,4BAEZ,WAsBD,CAAC"}
@@ -1,33 +0,0 @@
1
- //
2
- // Copyright 2020 DXOS.org
3
- //
4
- import { Timeframe } from '@dxos/timeframe';
5
- import { schema } from './proto';
6
- //
7
- // Testing.
8
- //
9
- // TODO(burdon): Move to testing package (with other fakers, etc.)
10
- export const createTestItemMutation = (objectId, key, value, timeframe = new Timeframe()) => ({
11
- timeframe,
12
- payload: {
13
- data: {
14
- batch: {
15
- objects: [
16
- {
17
- objectId,
18
- mutations: [
19
- {
20
- model: {
21
- '@type': 'google.protobuf.Any',
22
- typeUrl: 'todo',
23
- value: schema.getCodecForType('example.testing.data.TestItemMutation').encode({ key, value }),
24
- },
25
- },
26
- ],
27
- },
28
- ],
29
- },
30
- },
31
- },
32
- });
33
- //# sourceMappingURL=testing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,EAAE;AACF,WAAW;AACX,EAAE;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,QAAkB,EAClB,GAAW,EACX,KAAa,EACb,SAAS,GAAG,IAAI,SAAS,EAAE,EACd,EAAE,CAAC,CAAC;IACjB,SAAS;IACT,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,OAAO,EAAE;oBACP;wBACE,QAAQ;wBACR,SAAS,EAAE;4BACT;gCACE,KAAK,EAAE;oCACL,OAAO,EAAE,qBAAqB;oCAC9B,OAAO,EAAE,MAAM;oCACf,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,uCAAuC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;iCAC9F;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC"}
package/src/testing.ts DELETED
@@ -1,43 +0,0 @@
1
- //
2
- // Copyright 2020 DXOS.org
3
- //
4
-
5
- import { Timeframe } from '@dxos/timeframe';
6
-
7
- import { schema } from './proto';
8
- import type { FeedMessage } from './proto/gen/dxos/echo/feed';
9
- import { type ObjectId } from './types';
10
-
11
- //
12
- // Testing.
13
- //
14
-
15
- // TODO(burdon): Move to testing package (with other fakers, etc.)
16
- export const createTestItemMutation = (
17
- objectId: ObjectId,
18
- key: string,
19
- value: string,
20
- timeframe = new Timeframe(),
21
- ): FeedMessage => ({
22
- timeframe,
23
- payload: {
24
- data: {
25
- batch: {
26
- objects: [
27
- {
28
- objectId,
29
- mutations: [
30
- {
31
- model: {
32
- '@type': 'google.protobuf.Any',
33
- typeUrl: 'todo',
34
- value: schema.getCodecForType('example.testing.data.TestItemMutation').encode({ key, value }),
35
- },
36
- },
37
- ],
38
- },
39
- ],
40
- },
41
- },
42
- },
43
- });