@dxos/echo-protocol 2.33.8 → 2.33.9-dev.0cfaca1b

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 (104) hide show
  1. package/dist/src/feeds/feed-store-iterator.d.ts +1 -1
  2. package/dist/src/feeds/feed-store-iterator.d.ts.map +1 -1
  3. package/dist/src/feeds/feed-store-iterator.js +6 -6
  4. package/dist/src/feeds/feed-store-iterator.js.map +1 -1
  5. package/dist/src/feeds/feed-store-iterator.test.js +8 -9
  6. package/dist/src/feeds/feed-store-iterator.test.js.map +1 -1
  7. package/dist/src/feeds/feed.test.js +6 -3
  8. package/dist/src/feeds/feed.test.js.map +1 -1
  9. package/dist/src/index.d.ts +0 -1
  10. package/dist/src/index.d.ts.map +1 -1
  11. package/dist/src/index.js +0 -1
  12. package/dist/src/index.js.map +1 -1
  13. package/dist/src/proto/gen/dxos/credentials.d.ts +39 -0
  14. package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -1
  15. package/dist/src/proto/gen/dxos/echo/feed.d.ts +65 -6
  16. package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
  17. package/dist/src/proto/gen/dxos/echo/feed.js +4 -0
  18. package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -1
  19. package/dist/src/proto/gen/dxos/echo/invitation.d.ts +19 -3
  20. package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -1
  21. package/dist/src/proto/gen/dxos/echo/invitation.js +6 -0
  22. package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -1
  23. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +31 -8
  24. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
  25. package/dist/src/proto/gen/dxos/echo/service.d.ts +49 -13
  26. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
  27. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +45 -13
  28. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
  29. package/dist/src/proto/gen/dxos/echo/testing.d.ts +15 -3
  30. package/dist/src/proto/gen/dxos/echo/testing.d.ts.map +1 -1
  31. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +9 -2
  32. package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
  33. package/dist/src/proto/gen/dxos/halo/keys.d.ts +44 -2
  34. package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
  35. package/dist/src/proto/gen/dxos/halo/keys.js +4 -0
  36. package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -1
  37. package/dist/src/proto/gen/dxos/test/echo.d.ts +23 -0
  38. package/dist/src/proto/gen/dxos/test/echo.d.ts.map +1 -0
  39. package/dist/src/proto/gen/dxos/test/echo.js +3 -0
  40. package/dist/src/proto/gen/dxos/test/echo.js.map +1 -0
  41. package/dist/src/proto/gen/google/protobuf.d.ts +4 -4
  42. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  43. package/dist/src/proto/gen/index.d.ts +4 -0
  44. package/dist/src/proto/gen/index.d.ts.map +1 -1
  45. package/dist/src/proto/gen/index.js +1 -1
  46. package/dist/src/proto/gen/index.js.map +1 -1
  47. package/dist/src/proto/index.d.ts +3 -3
  48. package/dist/src/proto/index.d.ts.map +1 -1
  49. package/dist/src/proto/index.js +3 -3
  50. package/dist/src/proto/index.js.map +1 -1
  51. package/dist/src/proto/messages.d.ts +2 -3
  52. package/dist/src/proto/messages.d.ts.map +1 -1
  53. package/dist/src/proto/messages.js +4 -14
  54. package/dist/src/proto/messages.js.map +1 -1
  55. package/dist/src/proto/substitutions.d.ts +2 -2
  56. package/dist/src/proto/substitutions.d.ts.map +1 -1
  57. package/dist/src/proto/substitutions.js +1 -2
  58. package/dist/src/proto/substitutions.js.map +1 -1
  59. package/dist/src/types.d.ts +1 -2
  60. package/dist/src/types.d.ts.map +1 -1
  61. package/dist/src/types.js.map +1 -1
  62. package/dist/tsconfig.tsbuildinfo +1 -1
  63. package/package.json +14 -10
  64. package/src/feeds/feed-store-iterator.test.ts +3 -4
  65. package/src/feeds/feed-store-iterator.ts +2 -3
  66. package/src/feeds/feed.test.ts +7 -4
  67. package/src/index.ts +0 -1
  68. package/src/proto/defs/import.proto +5 -3
  69. package/src/proto/gen/dxos/credentials.ts +40 -0
  70. package/src/proto/gen/dxos/echo/feed.ts +66 -6
  71. package/src/proto/gen/dxos/echo/invitation.ts +20 -3
  72. package/src/proto/gen/dxos/echo/metadata.ts +32 -8
  73. package/src/proto/gen/dxos/echo/service.ts +50 -13
  74. package/src/proto/gen/dxos/echo/snapshot.ts +46 -13
  75. package/src/proto/gen/dxos/echo/testing.ts +16 -3
  76. package/src/proto/gen/dxos/echo/timeframe.ts +10 -2
  77. package/src/proto/gen/dxos/halo/keys.ts +45 -2
  78. package/src/proto/gen/dxos/test/echo.ts +34 -0
  79. package/src/proto/gen/google/protobuf.ts +5 -4
  80. package/src/proto/gen/index.ts +5 -1
  81. package/src/proto/index.ts +4 -3
  82. package/src/proto/messages.ts +5 -16
  83. package/src/proto/substitutions.ts +1 -3
  84. package/src/types.ts +1 -2
  85. package/dist/src/spacetime/index.d.ts +0 -3
  86. package/dist/src/spacetime/index.d.ts.map +0 -1
  87. package/dist/src/spacetime/index.js +0 -22
  88. package/dist/src/spacetime/index.js.map +0 -1
  89. package/dist/src/spacetime/substitutions.d.ts +0 -13
  90. package/dist/src/spacetime/substitutions.d.ts.map +0 -1
  91. package/dist/src/spacetime/substitutions.js +0 -22
  92. package/dist/src/spacetime/substitutions.js.map +0 -1
  93. package/dist/src/spacetime/timeframe.d.ts +0 -45
  94. package/dist/src/spacetime/timeframe.d.ts.map +0 -1
  95. package/dist/src/spacetime/timeframe.js +0 -101
  96. package/dist/src/spacetime/timeframe.js.map +0 -1
  97. package/dist/src/spacetime/timeframe.test.d.ts +0 -2
  98. package/dist/src/spacetime/timeframe.test.d.ts.map +0 -1
  99. package/dist/src/spacetime/timeframe.test.js +0 -118
  100. package/dist/src/spacetime/timeframe.test.js.map +0 -1
  101. package/src/spacetime/index.ts +0 -6
  102. package/src/spacetime/substitutions.ts +0 -20
  103. package/src/spacetime/timeframe.test.ts +0 -132
  104. package/src/spacetime/timeframe.ts +0 -119
@@ -6,7 +6,7 @@ import pify from 'pify';
6
6
 
7
7
  import { createKeyPair } from '@dxos/crypto';
8
8
  import { FeedStore } from '@dxos/feed-store';
9
- import { PublicKey } from '@dxos/protocols';
9
+ import { PublicKey, Timeframe } from '@dxos/protocols';
10
10
  import { createStorage, StorageType } from '@dxos/random-access-multi-storage';
11
11
 
12
12
  import { codec, FeedMessage } from '../proto';
@@ -14,7 +14,7 @@ import { createFeedWriter } from './feed-writer';
14
14
 
15
15
  describe('Feed tests:', () => {
16
16
  test('codec', () => {
17
- const message1: FeedMessage = {};
17
+ const message1: FeedMessage = { timeframe: new Timeframe() };
18
18
 
19
19
  const buffer = codec.encode(message1);
20
20
 
@@ -30,7 +30,7 @@ describe('Feed tests:', () => {
30
30
  const { feed } = await feedStore.openReadWriteFeed(PublicKey.from(publicKey), secretKey);
31
31
  expect(feed.length).toBe(0);
32
32
 
33
- const data: FeedMessage = {};
33
+ const data: FeedMessage = { timeframe: new Timeframe() };
34
34
 
35
35
  await pify(feed.append.bind(feed))(data);
36
36
 
@@ -47,9 +47,12 @@ describe('Feed tests:', () => {
47
47
  const writer = createFeedWriter<FeedMessage>(feed);
48
48
 
49
49
  const data: FeedMessage = {
50
+ timeframe: new Timeframe(),
50
51
  echo: {
52
+ itemId: 'id',
51
53
  genesis: {
52
- itemType: 'foo'
54
+ itemType: 'foo',
55
+ modelType: 'bar'
53
56
  }
54
57
  }
55
58
  };
package/src/index.ts CHANGED
@@ -4,5 +4,4 @@
4
4
 
5
5
  export * from './feeds';
6
6
  export * from './proto';
7
- export * from './spacetime';
8
7
  export * from './types';
@@ -3,7 +3,9 @@ syntax = "proto3";
3
3
  package dxos;
4
4
 
5
5
  import "@dxos/protocols/src/proto/dxos/echo/feed.proto";
6
- import "@dxos/protocols/src/proto/dxos/echo/snapshot.proto";
7
- import "@dxos/protocols/src/proto/dxos/echo/service.proto";
8
- import "@dxos/protocols/src/proto/dxos/echo/metadata.proto";
9
6
  import "@dxos/protocols/src/proto/dxos/echo/invitation.proto";
7
+ import "@dxos/protocols/src/proto/dxos/echo/metadata.proto";
8
+ import "@dxos/protocols/src/proto/dxos/echo/service.proto";
9
+ import "@dxos/protocols/src/proto/dxos/echo/snapshot.proto";
10
+
11
+ import "@dxos/protocols/src/proto/dxos/test/echo.proto";
@@ -8,26 +8,66 @@ import * as dxos_echo_snapshot from "./echo/snapshot";
8
8
  import * as dxos_echo_testing from "./echo/testing";
9
9
  import * as dxos_echo_timeframe from "./echo/timeframe";
10
10
  import * as dxos_halo_keys from "./halo/keys";
11
+ import * as dxos_test_echo from "./test/echo";
11
12
  import * as google_protobuf from "../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
16
+ */
12
17
  export interface Message {
13
18
  payload: google_protobuf.Any;
14
19
  }
15
20
  /**
16
21
  * A generic container message used whenever messages are signed (e.g. PartyCredential)
22
+ *
23
+ * Defined in:
24
+ * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
17
25
  */
18
26
  export interface SignedMessage {
27
+ /**
28
+ * The signed message contents.
29
+ */
19
30
  signed: SignedMessage.Signed;
31
+ /**
32
+ * An array of Signatures, one for each key that signed the message.
33
+ */
20
34
  signatures?: SignedMessage.Signature[];
21
35
  }
22
36
  export namespace SignedMessage {
37
+ /**
38
+ * Defined in:
39
+ * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
40
+ */
23
41
  export interface Signed {
42
+ /**
43
+ * RFC-3339 datetime string.
44
+ */
24
45
  created: string;
25
46
  nonce: Uint8Array;
47
+ /**
48
+ * The payload to be signed.
49
+ */
26
50
  payload: google_protobuf.Any;
27
51
  }
52
+ /**
53
+ * Defined in:
54
+ * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
55
+ */
28
56
  export interface Signature {
57
+ /**
58
+ * The publicKey of the keypair that made this signature.
59
+ */
29
60
  key: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
61
+ /**
62
+ * The bytes of the signature.
63
+ */
30
64
  signature: Uint8Array;
65
+ /**
66
+ * The certification chain of SignedMessages for this key.
67
+ *
68
+ * Options:
69
+ * - proto3_optional = true
70
+ */
31
71
  keyChain?: dxos_halo_keys.KeyChain;
32
72
  }
33
73
  }
@@ -8,53 +8,113 @@ import * as dxos_echo_snapshot from "./snapshot";
8
8
  import * as dxos_echo_testing from "./testing";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
12
13
  /**
13
14
  * Outer message type decoded by Codec.
14
15
  * This is what is written to the feeds.
16
+ *
17
+ * Defined in:
18
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
15
19
  */
16
20
  export interface FeedMessage {
17
- timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
21
+ timeframe: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
18
22
  halo?: ReturnType<(typeof substitutions)["dxos.echo.feed.CredentialsMessage"]["decode"]>;
19
23
  echo?: EchoEnvelope;
20
24
  }
21
25
  /**
22
26
  * A container for dxos.credentials.Message
27
+ *
28
+ * Defined in:
29
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
23
30
  */
24
31
  export interface CredentialsMessage {
25
- data?: Uint8Array;
32
+ data: Uint8Array;
26
33
  }
27
34
  /**
28
35
  * Wrapper for all ECHO messages.
36
+ *
37
+ * Defined in:
38
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
29
39
  */
30
40
  export interface EchoEnvelope {
31
- itemId?: string;
41
+ itemId: string;
42
+ /**
43
+ * Options:
44
+ * - proto3_optional = true
45
+ */
32
46
  genesis?: ItemGenesis;
47
+ /**
48
+ * Options:
49
+ * - proto3_optional = true
50
+ */
33
51
  itemMutation?: ItemMutation;
52
+ /**
53
+ * Options:
54
+ * - proto3_optional = true
55
+ */
34
56
  mutation?: Uint8Array;
35
57
  /**
36
58
  * Set the model to the provided snapshot.
59
+ *
60
+ * Options:
61
+ * - proto3_optional = true
37
62
  */
38
63
  snapshot?: dxos_echo_snapshot.ModelSnapshot;
39
64
  }
65
+ /**
66
+ * Defined in:
67
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
68
+ */
40
69
  export interface LinkData {
41
- source?: string;
42
- target?: string;
70
+ source: string;
71
+ target: string;
43
72
  }
73
+ /**
74
+ * Defined in:
75
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
76
+ */
44
77
  export interface ItemGenesis {
78
+ /**
79
+ * Options:
80
+ * - proto3_optional = true
81
+ */
45
82
  itemType?: string;
46
- modelType?: string;
83
+ modelType: string;
84
+ /**
85
+ * Options:
86
+ * - proto3_optional = true
87
+ */
47
88
  modelVersion?: string;
89
+ /**
90
+ * Options:
91
+ * - proto3_optional = true
92
+ */
48
93
  link?: LinkData;
49
94
  }
50
95
  /**
51
96
  * Item mutation.
97
+ *
98
+ * Defined in:
99
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
52
100
  */
53
101
  export interface ItemMutation {
102
+ /**
103
+ * Options:
104
+ * - proto3_optional = true
105
+ */
54
106
  parentId?: string;
107
+ /**
108
+ * Options:
109
+ * - proto3_optional = true
110
+ */
55
111
  action?: ItemMutation.Action;
56
112
  }
57
113
  export namespace ItemMutation {
114
+ /**
115
+ * Defined in:
116
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/feed.proto}
117
+ */
58
118
  export enum Action {
59
119
  NOOP = 0,
60
120
  DELETE = 1,
@@ -8,21 +8,38 @@ import * as dxos_echo_snapshot from "./snapshot";
8
8
  import * as dxos_echo_testing from "./testing";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/invitation.proto}
16
+ */
12
17
  export interface InvitationDescriptor {
13
- type?: InvitationDescriptor.Type;
14
- swarmKey?: Uint8Array;
15
- invitation?: Uint8Array;
18
+ type: InvitationDescriptor.Type;
19
+ swarmKey: Uint8Array;
20
+ invitation: Uint8Array;
16
21
  /**
17
22
  * Only present if type == OFFLINE.
23
+ *
24
+ * Options:
25
+ * - proto3_optional = true
18
26
  */
19
27
  identityKey?: Uint8Array;
20
28
  /**
21
29
  * Must be stripped out when passing to another peer.
30
+ *
31
+ * Options:
32
+ * - proto3_optional = true
22
33
  */
23
34
  secret?: Uint8Array;
24
35
  }
25
36
  export namespace InvitationDescriptor {
37
+ /**
38
+ * Defines an invitation type.
39
+ *
40
+ * Defined in:
41
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/invitation.proto}
42
+ */
26
43
  export enum Type {
27
44
  INTERACTIVE = 1,
28
45
  OFFLINE = 2
@@ -8,7 +8,12 @@ import * as dxos_echo_snapshot from "./snapshot";
8
8
  import * as dxos_echo_testing from "./testing";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/metadata.proto}
16
+ */
12
17
  export interface EchoMetadata {
13
18
  /**
14
19
  * Version number that is inceremnted every time there's a breaking change to the storage schema.
@@ -16,27 +21,46 @@ export interface EchoMetadata {
16
21
  * This is used to detect if the storage schema has changed since the last time the client was run.
17
22
  * Loading data from a different version will might result in an error.
18
23
  */
19
- version?: number;
24
+ version: number;
20
25
  parties?: PartyMetadata[];
21
- created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
22
- updated?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
26
+ created: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
27
+ updated: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
23
28
  }
29
+ /**
30
+ * Defined in:
31
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/metadata.proto}
32
+ */
24
33
  export interface PartyMetadata {
25
34
  /**
26
35
  * Party key.
27
36
  */
28
- key?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
37
+ key: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
29
38
  /**
30
- * List of all feed associated with the party.
39
+ * Options:
40
+ * - proto3_optional = true
31
41
  */
32
- feedKeys?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>[];
42
+ genesisFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
43
+ /**
44
+ * Key of the wriatable control feed.
45
+ *
46
+ * Options:
47
+ * - proto3_optional = true
48
+ */
49
+ controlFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
33
50
  /**
34
51
  * Key of the wriatable data feed.
52
+ *
53
+ * Options:
54
+ * - proto3_optional = true
35
55
  */
36
56
  dataFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
37
57
  /**
38
- * Key of the wriatable control feed.
58
+ * Options:
59
+ * - proto3_optional = true
39
60
  */
40
- controlFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
41
61
  latestTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
62
+ /**
63
+ * List of all feed associated with the party.
64
+ */
65
+ feedKeys?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>[];
42
66
  }
@@ -8,44 +8,81 @@ import * as dxos_echo_snapshot from "./snapshot";
8
8
  import * as dxos_echo_testing from "./testing";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
16
+ */
12
17
  export interface SubscribeEntitySetRequest {
13
- partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
18
+ partyKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
14
19
  }
20
+ /**
21
+ * Defined in:
22
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
23
+ */
15
24
  export interface SubscribeEntitySetResponse {
16
25
  added?: dxos_echo_feed.EchoEnvelope[];
17
26
  deleted?: dxos_echo_feed.EchoEnvelope[];
18
27
  }
28
+ /**
29
+ * Defined in:
30
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
31
+ */
19
32
  export interface SubscribeEntityStreamRequest {
20
- partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
21
- itemId?: string;
33
+ partyKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
34
+ itemId: string;
22
35
  }
36
+ /**
37
+ * Defined in:
38
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
39
+ */
23
40
  export interface SubscribeEntityStreamResponse {
24
41
  snapshot?: dxos_echo_snapshot.ItemSnapshot;
25
42
  mutation?: SubscribeEntityStreamResponse.Mutation;
26
43
  }
27
44
  export namespace SubscribeEntityStreamResponse {
45
+ /**
46
+ * Defined in:
47
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
48
+ */
28
49
  export interface Mutation {
29
- data?: dxos_echo_feed.EchoEnvelope;
30
- meta?: SubscribeEntityStreamResponse.Mutation.Metadata;
50
+ data: dxos_echo_feed.EchoEnvelope;
51
+ meta: SubscribeEntityStreamResponse.Mutation.Metadata;
31
52
  }
32
53
  export namespace Mutation {
54
+ /**
55
+ * Defined in:
56
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
57
+ */
33
58
  export interface Metadata {
34
- feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
35
- memberKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
36
- seq?: number;
37
- timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
59
+ feedKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
60
+ memberKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
61
+ seq: number;
62
+ timeframe: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
38
63
  }
39
64
  }
40
65
  }
66
+ /**
67
+ * Defined in:
68
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
69
+ */
41
70
  export interface WriteRequest {
42
- partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
43
- mutation?: dxos_echo_feed.EchoEnvelope;
71
+ partyKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
72
+ mutation: dxos_echo_feed.EchoEnvelope;
44
73
  }
74
+ /**
75
+ * Defined in:
76
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
77
+ */
45
78
  export interface MutationReceipt {
46
- feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
47
- seq?: number;
79
+ feedKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
80
+ seq: number;
48
81
  }
82
+ /**
83
+ * Defined in:
84
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
85
+ */
49
86
  export interface DataService {
50
87
  subscribeEntitySet: (request: SubscribeEntitySetRequest) => Stream<SubscribeEntitySetResponse>;
51
88
  subscribeEntityStream: (request: SubscribeEntityStreamRequest) => Stream<SubscribeEntityStreamResponse>;
@@ -8,21 +8,46 @@ import * as dxos_echo_service from "./service";
8
8
  import * as dxos_echo_testing from "./testing";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
16
+ */
12
17
  export interface PartySnapshot {
13
- partyKey?: Uint8Array;
18
+ partyKey: Uint8Array;
19
+ /**
20
+ * Options:
21
+ * - proto3_optional = true
22
+ */
14
23
  timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
24
+ /**
25
+ * Options:
26
+ * - proto3_optional = true
27
+ */
15
28
  timestamp?: number;
16
- halo?: HaloStateSnapshot;
17
- database?: DatabaseSnapshot;
29
+ halo: HaloStateSnapshot;
30
+ database: DatabaseSnapshot;
18
31
  }
32
+ /**
33
+ * Defined in:
34
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
35
+ */
19
36
  export interface HaloStateSnapshot {
20
37
  messages?: ReturnType<(typeof substitutions)["dxos.echo.feed.CredentialsMessage"]["decode"]>[];
21
38
  }
39
+ /**
40
+ * Defined in:
41
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
42
+ */
22
43
  export interface DatabaseSnapshot {
23
44
  items?: ItemSnapshot[];
24
45
  links?: LinkSnapshot[];
25
46
  }
47
+ /**
48
+ * Defined in:
49
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
50
+ */
26
51
  export interface ItemSnapshot {
27
52
  /**
28
53
  * Options:
@@ -34,11 +59,7 @@ export interface ItemSnapshot {
34
59
  * - proto3_optional = true
35
60
  */
36
61
  itemType?: string;
37
- /**
38
- * Options:
39
- * - proto3_optional = true
40
- */
41
- modelType?: string;
62
+ modelType: string;
42
63
  /**
43
64
  * Options:
44
65
  * - proto3_optional = true
@@ -55,6 +76,10 @@ export interface ItemSnapshot {
55
76
  */
56
77
  model?: ModelSnapshot;
57
78
  }
79
+ /**
80
+ * Defined in:
81
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
82
+ */
58
83
  export interface LinkSnapshot {
59
84
  /**
60
85
  * Options:
@@ -66,11 +91,7 @@ export interface LinkSnapshot {
66
91
  * - proto3_optional = true
67
92
  */
68
93
  linkType?: string;
69
- /**
70
- * Options:
71
- * - proto3_optional = true
72
- */
73
- modelType?: string;
94
+ modelType: string;
74
95
  /**
75
96
  * Options:
76
97
  * - proto3_optional = true
@@ -84,6 +105,10 @@ export interface LinkSnapshot {
84
105
  */
85
106
  model?: ModelSnapshot;
86
107
  }
108
+ /**
109
+ * Defined in:
110
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
111
+ */
87
112
  export interface ModelSnapshot {
88
113
  /**
89
114
  * Encoded model snapshot (defined by the model's codec).
@@ -98,10 +123,18 @@ export interface ModelSnapshot {
98
123
  */
99
124
  mutations?: ModelMutation[];
100
125
  }
126
+ /**
127
+ * Defined in:
128
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
129
+ */
101
130
  export interface ModelMutation {
102
131
  mutation: Uint8Array;
103
132
  meta: ModelMutationMeta;
104
133
  }
134
+ /**
135
+ * Defined in:
136
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
137
+ */
105
138
  export interface ModelMutationMeta {
106
139
  feedKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
107
140
  seq: number;
@@ -8,14 +8,27 @@ import * as dxos_echo_service from "./service";
8
8
  import * as dxos_echo_snapshot from "./snapshot";
9
9
  import * as dxos_echo_timeframe from "./timeframe";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
13
+ /**
14
+ * Defined in:
15
+ * {@link file://./../../../defs/testing.proto}
16
+ */
12
17
  export interface TestItemMutation {
13
- key?: string;
14
- value?: string;
18
+ key: string;
19
+ value: string;
15
20
  }
21
+ /**
22
+ * Defined in:
23
+ * {@link file://./../../../defs/testing.proto}
24
+ */
16
25
  export interface TestListMutation {
17
- data?: string;
26
+ data: string;
18
27
  }
28
+ /**
29
+ * Defined in:
30
+ * {@link file://./../../../defs/testing.proto}
31
+ */
19
32
  export interface TestItemSnapshot {
20
33
  keys?: TestItemMutation[];
21
34
  }
@@ -8,16 +8,24 @@ import * as dxos_echo_service from "./service";
8
8
  import * as dxos_echo_snapshot from "./snapshot";
9
9
  import * as dxos_echo_testing from "./testing";
10
10
  import * as dxos_halo_keys from "../halo/keys";
11
+ import * as dxos_test_echo from "../test/echo";
11
12
  import * as google_protobuf from "../../google/protobuf";
12
13
  /**
13
14
  * Vector timestamp used to order messages.
15
+ *
16
+ * Defined in:
17
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/timeframe.proto}
14
18
  */
15
19
  export interface TimeframeVector {
16
20
  frames?: TimeframeVector.Frame[];
17
21
  }
18
22
  export namespace TimeframeVector {
23
+ /**
24
+ * Defined in:
25
+ * {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/timeframe.proto}
26
+ */
19
27
  export interface Frame {
20
- feedKey?: Uint8Array;
21
- seq?: number;
28
+ feedKey: Uint8Array;
29
+ seq: number;
22
30
  }
23
31
  }