cojson 0.3.7 → 0.4.0

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 (78) hide show
  1. package/dist/coValue.d.ts +7 -12
  2. package/dist/coValue.js.map +1 -1
  3. package/dist/coValueCore.d.ts +9 -4
  4. package/dist/coValueCore.js +69 -33
  5. package/dist/coValueCore.js.map +1 -1
  6. package/dist/coValues/account.d.ts +62 -0
  7. package/dist/{account.js → coValues/account.js} +19 -11
  8. package/dist/coValues/account.js.map +1 -0
  9. package/dist/coValues/coList.d.ts +19 -19
  10. package/dist/coValues/coList.js.map +1 -1
  11. package/dist/coValues/coMap.d.ts +31 -23
  12. package/dist/coValues/coMap.js +4 -6
  13. package/dist/coValues/coMap.js.map +1 -1
  14. package/dist/coValues/coStream.d.ts +19 -19
  15. package/dist/coValues/coStream.js.map +1 -1
  16. package/dist/{group.d.ts → coValues/group.d.ts} +27 -38
  17. package/dist/{group.js → coValues/group.js} +69 -73
  18. package/dist/coValues/group.js.map +1 -0
  19. package/dist/ids.d.ts +1 -1
  20. package/dist/index.d.ts +15 -11
  21. package/dist/index.js +10 -5
  22. package/dist/index.js.map +1 -1
  23. package/dist/localNode.d.ts +20 -7
  24. package/dist/localNode.js +74 -39
  25. package/dist/localNode.js.map +1 -1
  26. package/dist/media.d.ts +1 -1
  27. package/dist/permissions.d.ts +1 -1
  28. package/dist/permissions.js +43 -22
  29. package/dist/permissions.js.map +1 -1
  30. package/dist/queriedCoValues/queriedAccount.d.ts +13 -0
  31. package/dist/queriedCoValues/queriedAccount.js +24 -0
  32. package/dist/queriedCoValues/queriedAccount.js.map +1 -0
  33. package/dist/queriedCoValues/queriedCoList.d.ts +10 -10
  34. package/dist/queriedCoValues/queriedCoList.js +11 -15
  35. package/dist/queriedCoValues/queriedCoList.js.map +1 -1
  36. package/dist/queriedCoValues/queriedCoMap.d.ts +14 -21
  37. package/dist/queriedCoValues/queriedCoMap.js +27 -28
  38. package/dist/queriedCoValues/queriedCoMap.js.map +1 -1
  39. package/dist/queriedCoValues/queriedCoStream.d.ts +9 -9
  40. package/dist/queriedCoValues/queriedCoStream.js +44 -20
  41. package/dist/queriedCoValues/queriedCoStream.js.map +1 -1
  42. package/dist/queriedCoValues/queriedGroup.d.ts +29 -0
  43. package/dist/queriedCoValues/queriedGroup.js +54 -0
  44. package/dist/queriedCoValues/queriedGroup.js.map +1 -0
  45. package/dist/queries.d.ts +40 -9
  46. package/dist/queries.js +104 -39
  47. package/dist/queries.js.map +1 -1
  48. package/dist/tests/testUtils.d.ts +15 -7
  49. package/dist/tests/testUtils.js +16 -17
  50. package/dist/tests/testUtils.js.map +1 -1
  51. package/package.json +2 -2
  52. package/src/coValue.ts +12 -31
  53. package/src/coValueCore.ts +100 -40
  54. package/src/{account.ts → coValues/account.ts} +46 -27
  55. package/src/coValues/coList.ts +24 -28
  56. package/src/coValues/coMap.ts +42 -68
  57. package/src/coValues/coStream.ts +20 -26
  58. package/src/{group.ts → coValues/group.ts} +121 -141
  59. package/src/ids.ts +1 -1
  60. package/src/index.ts +25 -10
  61. package/src/localNode.ts +180 -77
  62. package/src/media.ts +1 -1
  63. package/src/permissions.ts +67 -36
  64. package/src/queriedCoValues/queriedAccount.ts +40 -0
  65. package/src/queriedCoValues/queriedCoList.ts +22 -30
  66. package/src/queriedCoValues/queriedCoMap.ts +60 -72
  67. package/src/queriedCoValues/queriedCoStream.ts +67 -37
  68. package/src/queriedCoValues/queriedGroup.ts +90 -0
  69. package/src/queries.ts +181 -60
  70. package/src/tests/account.test.ts +14 -9
  71. package/src/tests/coValueCore.test.ts +2 -2
  72. package/src/tests/permissions.test.ts +351 -242
  73. package/src/tests/queries.test.ts +98 -79
  74. package/src/tests/sync.test.ts +11 -11
  75. package/src/tests/testUtils.ts +16 -18
  76. package/dist/account.d.ts +0 -58
  77. package/dist/account.js.map +0 -1
  78. package/dist/group.js.map +0 -1
@@ -1,6 +1,8 @@
1
- import { CoID, CoValue, AnyCoValue, AnyCoMap, AnyCoList } from "./coValue.js";
2
- import { CoMap } from "./coValues/coMap.js";
3
- import { JsonObject, JsonValue } from "./jsonValue.js";
1
+ import { CoID, CoValue, expectMap } from "../coValue.js";
2
+ import { CoMap } from "./coMap.js";
3
+ import { CoList } from "./coList.js";
4
+ import { JsonObject } from "../jsonValue.js";
5
+ import { BinaryCoStream, CoStream } from "./coStream.js";
4
6
  import {
5
7
  Encrypted,
6
8
  KeyID,
@@ -14,37 +16,40 @@ import {
14
16
  newRandomSecretSeed,
15
17
  agentSecretFromSecretSeed,
16
18
  getAgentID,
17
- } from "./crypto.js";
18
- import { LocalNode } from "./localNode.js";
19
- import { AgentID, SessionID, isAgentID } from "./ids.js";
20
- import { AccountID, GeneralizedControlledAccount, Profile } from "./account.js";
21
- import { Role } from "./permissions.js";
19
+ } from "../crypto.js";
20
+ import { AgentID, isAgentID } from "../ids.js";
21
+ import { AccountID, Profile } from "./account.js";
22
+ import { Role } from "../permissions.js";
22
23
  import { base58 } from "@scure/base";
23
- import {
24
- BinaryCoStream,
25
- BinaryCoStreamMeta,
26
- CoStream,
27
- } from "./coValues/coStream.js";
28
24
 
29
- export type GroupContent = {
30
- profile?: CoID<Profile> | null;
25
+ export const EVERYONE = "everyone" as const;
26
+ export type Everyone = "everyone";
27
+
28
+ export type GroupShape<P extends Profile, R extends CoMap> = {
29
+ profile?: CoID<P> | null;
30
+ root?: CoID<R> | null;
31
31
  [key: AccountID | AgentID]: Role;
32
+ [EVERYONE]?: Role;
32
33
  readKey?: KeyID;
33
34
  [revelationFor: `${KeyID}_for_${AccountID | AgentID}`]: Sealed<KeySecret>;
35
+ [revelationFor: `${KeyID}_for_${Everyone}`]: KeySecret;
34
36
  [oldKeyForNewKey: `${KeyID}_for_${KeyID}`]: Encrypted<
35
37
  KeySecret,
36
38
  { encryptedID: KeyID; encryptingID: KeyID }
37
39
  >;
38
40
  };
39
41
 
40
- export function expectGroupContent(
41
- content: CoValue
42
- ): CoMap<GroupContent, JsonObject | null> {
43
- if (content.type !== "comap") {
44
- throw new Error("Expected map");
42
+ export function expectGroup(content: CoValue): Group {
43
+ const map = expectMap(content);
44
+ if (map.core.header.ruleset.type !== "group") {
45
+ throw new Error("Expected group ruleset in group");
46
+ }
47
+
48
+ if (!(map instanceof Group)) {
49
+ throw new Error("Expected group");
45
50
  }
46
51
 
47
- return content as CoMap<GroupContent, JsonObject | null>;
52
+ return map;
48
53
  }
49
54
 
50
55
  /** A `Group` is a scope for permissions of its members (`"reader" | "writer" | "admin"`), applying to objects owned by that group.
@@ -68,30 +73,11 @@ export function expectGroupContent(
68
73
  * const localNode.createGroup();
69
74
  * ```
70
75
  * */
71
- export class Group {
72
- /** @category 4. Underlying CoMap */
73
- underlyingMap: CoMap<GroupContent, JsonObject | null>;
74
- /** @internal */
75
- node: LocalNode;
76
-
77
- /** @internal */
78
- constructor(
79
- underlyingMap: CoMap<GroupContent, JsonObject | null>,
80
- node: LocalNode
81
- ) {
82
- this.underlyingMap = underlyingMap;
83
- this.node = node;
84
- }
85
-
86
- /**
87
- * Returns the `CoID` of the `Group`.
88
- *
89
- * @category 4. Underlying CoMap
90
- */
91
- get id(): CoID<CoMap<GroupContent, JsonObject | null>> {
92
- return this.underlyingMap.id;
93
- }
94
-
76
+ export class Group<
77
+ P extends Profile = Profile,
78
+ R extends CoMap = CoMap,
79
+ Meta extends JsonObject | null = JsonObject | null
80
+ > extends CoMap<GroupShape<P, R>, Meta> {
95
81
  /**
96
82
  * Returns the current role of a given account.
97
83
  *
@@ -103,7 +89,7 @@ export class Group {
103
89
 
104
90
  /** @internal */
105
91
  roleOfInternal(accountID: AccountID | AgentID): Role | undefined {
106
- return this.underlyingMap.get(accountID);
92
+ return this.get(accountID);
107
93
  }
108
94
 
109
95
  /**
@@ -112,7 +98,7 @@ export class Group {
112
98
  * @category 1. Role reading
113
99
  */
114
100
  myRole(): Role | undefined {
115
- return this.roleOfInternal(this.node.account.id);
101
+ return this.roleOfInternal(this.core.node.account.id);
116
102
  }
117
103
 
118
104
  /**
@@ -121,64 +107,81 @@ export class Group {
121
107
  *
122
108
  * @category 2. Role changing
123
109
  */
124
- addMember(accountID: AccountID, role: Role) {
125
- this.addMemberInternal(accountID, role);
110
+ addMember(accountID: AccountID | Everyone, role: Role): this {
111
+ return this.addMemberInternal(accountID, role);
126
112
  }
127
113
 
128
114
  /** @internal */
129
- addMemberInternal(accountID: AccountID | AgentID, role: Role) {
130
- this.underlyingMap = this.underlyingMap.mutate((map) => {
131
- const currentReadKey = this.underlyingMap.core.getCurrentReadKey();
115
+ addMemberInternal(
116
+ accountID: AccountID | AgentID | Everyone,
117
+ role: Role
118
+ ): this {
119
+ return this.mutate((mutable) => {
120
+ const currentReadKey = this.core.getCurrentReadKey();
132
121
 
133
122
  if (!currentReadKey.secret) {
134
123
  throw new Error("Can't add member without read key secret");
135
124
  }
136
125
 
137
- const agent = this.node.resolveAccountAgent(
138
- accountID,
139
- "Expected to know agent to add them to group"
140
- );
126
+ if (accountID === EVERYONE) {
127
+ if (!(role === "reader" || role === "writer")) {
128
+ throw new Error(
129
+ "Can't make everyone something other than reader or writer"
130
+ );
131
+ }
132
+ mutable.set(accountID, role, "trusting");
141
133
 
142
- map.set(accountID, role, "trusting");
134
+ if (mutable.get(accountID) !== role) {
135
+ throw new Error("Failed to set role");
136
+ }
143
137
 
144
- if (map.get(accountID) !== role) {
145
- throw new Error("Failed to set role");
146
- }
138
+ mutable.set(
139
+ `${currentReadKey.id}_for_${EVERYONE}`,
140
+ currentReadKey.secret,
141
+ "trusting"
142
+ );
143
+ } else {
144
+ const agent = this.core.node.resolveAccountAgent(
145
+ accountID,
146
+ "Expected to know agent to add them to group"
147
+ );
148
+ mutable.set(accountID, role, "trusting");
147
149
 
148
- map.set(
149
- `${currentReadKey.id}_for_${accountID}`,
150
- seal({
151
- message: currentReadKey.secret,
152
- from: this.underlyingMap.core.node.account.currentSealerSecret(),
153
- to: getAgentSealerID(agent),
154
- nOnceMaterial: {
155
- in: this.underlyingMap.core.id,
156
- tx: this.underlyingMap.core.nextTransactionID(),
157
- },
158
- }),
159
- "trusting"
160
- );
150
+ if (mutable.get(accountID) !== role) {
151
+ throw new Error("Failed to set role");
152
+ }
153
+
154
+ mutable.set(
155
+ `${currentReadKey.id}_for_${accountID}`,
156
+ seal({
157
+ message: currentReadKey.secret,
158
+ from: this.core.node.account.currentSealerSecret(),
159
+ to: getAgentSealerID(agent),
160
+ nOnceMaterial: {
161
+ in: this.id,
162
+ tx: this.core.nextTransactionID(),
163
+ },
164
+ }),
165
+ "trusting"
166
+ );
167
+ }
161
168
  });
162
169
  }
163
170
 
164
171
  /** @internal */
165
- rotateReadKey() {
166
- const currentlyPermittedReaders = this.underlyingMap
167
- .keys()
168
- .filter((key) => {
169
- if (key.startsWith("co_") || isAgentID(key)) {
170
- const role = this.underlyingMap.get(key);
171
- return (
172
- role === "admin" ||
173
- role === "writer" ||
174
- role === "reader"
175
- );
176
- } else {
177
- return false;
178
- }
179
- }) as (AccountID | AgentID)[];
172
+ rotateReadKey(): this {
173
+ const currentlyPermittedReaders = this.keys().filter((key) => {
174
+ if (key.startsWith("co_") || isAgentID(key)) {
175
+ const role = this.get(key);
176
+ return (
177
+ role === "admin" || role === "writer" || role === "reader"
178
+ );
179
+ } else {
180
+ return false;
181
+ }
182
+ }) as (AccountID | AgentID)[];
180
183
 
181
- const maybeCurrentReadKey = this.underlyingMap.core.getCurrentReadKey();
184
+ const maybeCurrentReadKey = this.core.getCurrentReadKey();
182
185
 
183
186
  if (!maybeCurrentReadKey.secret) {
184
187
  throw new Error(
@@ -193,29 +196,29 @@ export class Group {
193
196
 
194
197
  const newReadKey = newRandomKeySecret();
195
198
 
196
- this.underlyingMap = this.underlyingMap.mutate((map) => {
199
+ return this.mutate((mutable) => {
197
200
  for (const readerID of currentlyPermittedReaders) {
198
- const reader = this.node.resolveAccountAgent(
201
+ const reader = this.core.node.resolveAccountAgent(
199
202
  readerID,
200
203
  "Expected to know currently permitted reader"
201
204
  );
202
205
 
203
- map.set(
206
+ mutable.set(
204
207
  `${newReadKey.id}_for_${readerID}`,
205
208
  seal({
206
209
  message: newReadKey.secret,
207
- from: this.underlyingMap.core.node.account.currentSealerSecret(),
210
+ from: this.core.node.account.currentSealerSecret(),
208
211
  to: getAgentSealerID(reader),
209
212
  nOnceMaterial: {
210
- in: this.underlyingMap.core.id,
211
- tx: this.underlyingMap.core.nextTransactionID(),
213
+ in: this.id,
214
+ tx: this.core.nextTransactionID(),
212
215
  },
213
216
  }),
214
217
  "trusting"
215
218
  );
216
219
  }
217
220
 
218
- map.set(
221
+ mutable.set(
219
222
  `${currentReadKey.id}_for_${newReadKey.id}`,
220
223
  encryptKeySecret({
221
224
  encrypting: newReadKey,
@@ -224,7 +227,7 @@ export class Group {
224
227
  "trusting"
225
228
  );
226
229
 
227
- map.set("readKey", newReadKey.id, "trusting");
230
+ mutable.set("readKey", newReadKey.id, "trusting");
228
231
  });
229
232
  }
230
233
 
@@ -235,17 +238,17 @@ export class Group {
235
238
  *
236
239
  * @category 2. Role changing
237
240
  */
238
- removeMember(accountID: AccountID) {
239
- this.removeMemberInternal(accountID);
241
+ removeMember(accountID: AccountID): this {
242
+ return this.removeMemberInternal(accountID);
240
243
  }
241
244
 
242
245
  /** @internal */
243
- removeMemberInternal(accountID: AccountID | AgentID) {
244
- this.underlyingMap = this.underlyingMap.mutate((map) => {
246
+ removeMemberInternal(accountID: AccountID | AgentID): this {
247
+ const afterRevoke = this.mutate((map) => {
245
248
  map.set(accountID, "revoked", "trusting");
246
249
  });
247
250
 
248
- this.rotateReadKey();
251
+ return afterRevoke.rotateReadKey();
249
252
  }
250
253
 
251
254
  /**
@@ -272,21 +275,17 @@ export class Group {
272
275
  *
273
276
  * @category 3. Value creation
274
277
  */
275
- createMap<M extends AnyCoMap>(
276
- init?: {
277
- [K in keyof M["_shape"]]: M["_shape"][K] extends AnyCoValue
278
- ? M["_shape"][K] | CoID<M["_shape"][K]>
279
- : M["_shape"][K];
280
- },
278
+ createMap<M extends CoMap>(
279
+ init?: M["_shape"],
281
280
  meta?: M["meta"],
282
- initPrivacy: "trusting" | "private" = "trusting"
281
+ initPrivacy: "trusting" | "private" = "private"
283
282
  ): M {
284
- let map = this.node
283
+ let map = this.core.node
285
284
  .createCoValue({
286
285
  type: "comap",
287
286
  ruleset: {
288
287
  type: "ownedByGroup",
289
- group: this.underlyingMap.id,
288
+ group: this.id,
290
289
  },
291
290
  meta: meta || null,
292
291
  ...createdNowUnique(),
@@ -308,19 +307,17 @@ export class Group {
308
307
  *
309
308
  * @category 3. Value creation
310
309
  */
311
- createList<L extends AnyCoList>(
312
- init?: (L["_item"] extends CoValue
313
- ? CoID<L["_item"]> | L["_item"]
314
- : L["_item"])[],
310
+ createList<L extends CoList>(
311
+ init?: L["_item"][],
315
312
  meta?: L["meta"],
316
- initPrivacy: "trusting" | "private" = "trusting"
313
+ initPrivacy: "trusting" | "private" = "private"
317
314
  ): L {
318
- let list = this.node
315
+ let list = this.core.node
319
316
  .createCoValue({
320
317
  type: "colist",
321
318
  ruleset: {
322
319
  type: "ownedByGroup",
323
- group: this.underlyingMap.id,
320
+ group: this.id,
324
321
  },
325
322
  meta: meta || null,
326
323
  ...createdNowUnique(),
@@ -337,15 +334,13 @@ export class Group {
337
334
  }
338
335
 
339
336
  /** @category 3. Value creation */
340
- createStream<C extends CoStream<JsonValue | CoValue, JsonObject | null>>(
341
- meta?: C["meta"]
342
- ): C {
343
- return this.node
337
+ createStream<C extends CoStream>(meta?: C["meta"]): C {
338
+ return this.core.node
344
339
  .createCoValue({
345
340
  type: "costream",
346
341
  ruleset: {
347
342
  type: "ownedByGroup",
348
- group: this.underlyingMap.id,
343
+ group: this.id,
349
344
  },
350
345
  meta: meta || null,
351
346
  ...createdNowUnique(),
@@ -354,36 +349,21 @@ export class Group {
354
349
  }
355
350
 
356
351
  /** @category 3. Value creation */
357
- createBinaryStream<C extends BinaryCoStream<BinaryCoStreamMeta>>(
352
+ createBinaryStream<C extends BinaryCoStream>(
358
353
  meta: C["meta"] = { type: "binary" }
359
354
  ): C {
360
- return this.node
355
+ return this.core.node
361
356
  .createCoValue({
362
357
  type: "costream",
363
358
  ruleset: {
364
359
  type: "ownedByGroup",
365
- group: this.underlyingMap.id,
360
+ group: this.id,
366
361
  },
367
362
  meta: meta,
368
363
  ...createdNowUnique(),
369
364
  })
370
365
  .getCurrentContent() as C;
371
366
  }
372
-
373
- /** @internal */
374
- testWithDifferentAccount(
375
- account: GeneralizedControlledAccount,
376
- sessionId: SessionID
377
- ): Group {
378
- return new Group(
379
- expectGroupContent(
380
- this.underlyingMap.core
381
- .testWithDifferentAccount(account, sessionId)
382
- .getCurrentContent()
383
- ),
384
- this.node
385
- );
386
- }
387
367
  }
388
368
 
389
369
  export type InviteSecret = `inviteSecret_z${string}`;
package/src/ids.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AccountID } from './account.js';
1
+ import { AccountID } from './coValues/account.js';
2
2
  import { base58 } from "@scure/base";
3
3
  import { shortHashLength } from './crypto.js';
4
4
 
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  CoValueCore,
3
3
  newRandomSessionID,
4
4
  MAX_RECOMMENDED_TX_SIZE,
5
+ accountOrAgentIDfromSessionID
5
6
  } from "./coValueCore.js";
6
7
  import { LocalNode } from "./localNode.js";
7
8
  import type { CoValue } from "./coValue.js";
@@ -25,18 +26,24 @@ import {
25
26
  cryptoReady,
26
27
  } from "./crypto.js";
27
28
  import { connectedPeers } from "./streamUtils.js";
28
- import { AnonymousControlledAccount, ControlledAccount } from "./account.js";
29
+ import {
30
+ AnonymousControlledAccount,
31
+ ControlledAccount,
32
+ } from "./coValues/account.js";
29
33
  import { rawCoIDtoBytes, rawCoIDfromBytes } from "./ids.js";
30
- import { Group, expectGroupContent } from "./group.js";
34
+ import { Group, expectGroup, EVERYONE } from "./coValues/group.js";
31
35
  import { base64URLtoBytes, bytesToBase64url } from "./base64url.js";
32
36
  import { parseJSON } from "./jsonStringify.js";
37
+ import { Account, Profile, isAccountID } from "./coValues/account.js";
33
38
 
34
39
  import type { SessionID, AgentID } from "./ids.js";
35
40
  import type { CoID, AnyCoValue } from "./coValue.js";
36
- import type { Queried } from "./queries.js";
41
+ import type { Queried, QueryExtension } from "./queries.js";
37
42
  import type { QueriedCoStream } from "./queriedCoValues/queriedCoStream.js";
38
43
  import type { QueriedCoList } from "./queriedCoValues/queriedCoList.js";
39
44
  import type { QueriedCoMap } from "./queriedCoValues/queriedCoMap.js";
45
+ import { QueriedAccount } from "./queriedCoValues/queriedAccount.js";
46
+ import { QueriedGroup } from "./queriedCoValues/queriedGroup.js";
40
47
  import type {
41
48
  BinaryStreamInfo,
42
49
  BinaryCoStreamMeta,
@@ -44,8 +51,8 @@ import type {
44
51
  import type { JsonValue } from "./jsonValue.js";
45
52
  import type { SyncMessage, Peer } from "./sync.js";
46
53
  import type { AgentSecret } from "./crypto.js";
47
- import type { AccountID, Account, Profile } from "./account.js";
48
- import type { InviteSecret } from "./group.js";
54
+ import type { AccountID, AccountMeta, AccountMigration, ProfileMeta } from "./coValues/account.js";
55
+ import type { InviteSecret } from "./coValues/group.js";
49
56
  import type * as Media from "./media.js";
50
57
 
51
58
  type Value = JsonValue | AnyCoValue;
@@ -64,15 +71,18 @@ export const cojsonInternals = {
64
71
  agentSecretFromSecretSeed,
65
72
  secretSeedLength,
66
73
  shortHashLength,
67
- expectGroupContent,
74
+ expectGroup,
68
75
  base64URLtoBytes,
69
76
  bytesToBase64url,
70
77
  parseJSON,
78
+ accountOrAgentIDfromSessionID,
79
+ isAccountID,
71
80
  };
72
81
 
73
82
  export {
74
83
  LocalNode,
75
84
  Group,
85
+ EVERYONE,
76
86
  CoMap,
77
87
  MutableCoMap,
78
88
  CoList,
@@ -88,9 +98,14 @@ export {
88
98
  QueriedCoMap,
89
99
  QueriedCoList,
90
100
  QueriedCoStream,
91
- AccountID,
101
+ QueriedGroup,
102
+ QueriedAccount,
92
103
  Account,
104
+ AccountID,
105
+ AccountMeta,
106
+ AccountMigration,
93
107
  Profile,
108
+ ProfileMeta,
94
109
  SessionID,
95
110
  Media,
96
111
  CoValueCore,
@@ -107,6 +122,7 @@ export {
107
122
  AgentSecret,
108
123
  InviteSecret,
109
124
  SyncMessage,
125
+ QueryExtension,
110
126
  };
111
127
 
112
128
  // eslint-disable-next-line @typescript-eslint/no-namespace
@@ -120,9 +136,8 @@ export namespace CojsonInternalTypes {
120
136
  export type Transaction = import("./coValueCore.js").Transaction;
121
137
  export type Signature = import("./crypto.js").Signature;
122
138
  export type RawCoID = import("./ids.js").RawCoID;
123
- export type AccountContent = import("./account.js").AccountContent;
124
- export type ProfileContent = import("./account.js").ProfileContent;
125
- export type ProfileMeta = import("./account.js").ProfileMeta;
139
+ export type ProfileShape = import("./coValues/account.js").ProfileShape;
140
+ export type ProfileMeta = import("./coValues/account.js").ProfileMeta;
126
141
  export type SealerSecret = import("./crypto.js").SealerSecret;
127
142
  export type SignerSecret = import("./crypto.js").SignerSecret;
128
143
  }