@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.
- package/dist/src/feeds/feed-store-iterator.d.ts +1 -1
- package/dist/src/feeds/feed-store-iterator.d.ts.map +1 -1
- package/dist/src/feeds/feed-store-iterator.js +6 -6
- package/dist/src/feeds/feed-store-iterator.js.map +1 -1
- package/dist/src/feeds/feed-store-iterator.test.js +8 -9
- package/dist/src/feeds/feed-store-iterator.test.js.map +1 -1
- package/dist/src/feeds/feed.test.js +6 -3
- package/dist/src/feeds/feed.test.js.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/proto/gen/dxos/credentials.d.ts +39 -0
- package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +65 -6
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.js +4 -0
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts +19 -3
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.js +6 -0
- package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +31 -8
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +49 -13
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +45 -13
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/testing.d.ts +15 -3
- package/dist/src/proto/gen/dxos/echo/testing.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +9 -2
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +44 -2
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.js +4 -0
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -1
- package/dist/src/proto/gen/dxos/test/echo.d.ts +23 -0
- package/dist/src/proto/gen/dxos/test/echo.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/test/echo.js +3 -0
- package/dist/src/proto/gen/dxos/test/echo.js.map +1 -0
- package/dist/src/proto/gen/google/protobuf.d.ts +4 -4
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/index.d.ts +4 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/src/proto/index.d.ts +3 -3
- package/dist/src/proto/index.d.ts.map +1 -1
- package/dist/src/proto/index.js +3 -3
- package/dist/src/proto/index.js.map +1 -1
- package/dist/src/proto/messages.d.ts +2 -3
- package/dist/src/proto/messages.d.ts.map +1 -1
- package/dist/src/proto/messages.js +4 -14
- package/dist/src/proto/messages.js.map +1 -1
- package/dist/src/proto/substitutions.d.ts +2 -2
- package/dist/src/proto/substitutions.d.ts.map +1 -1
- package/dist/src/proto/substitutions.js +1 -2
- package/dist/src/proto/substitutions.js.map +1 -1
- package/dist/src/types.d.ts +1 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -10
- package/src/feeds/feed-store-iterator.test.ts +3 -4
- package/src/feeds/feed-store-iterator.ts +2 -3
- package/src/feeds/feed.test.ts +7 -4
- package/src/index.ts +0 -1
- package/src/proto/defs/import.proto +5 -3
- package/src/proto/gen/dxos/credentials.ts +40 -0
- package/src/proto/gen/dxos/echo/feed.ts +66 -6
- package/src/proto/gen/dxos/echo/invitation.ts +20 -3
- package/src/proto/gen/dxos/echo/metadata.ts +32 -8
- package/src/proto/gen/dxos/echo/service.ts +50 -13
- package/src/proto/gen/dxos/echo/snapshot.ts +46 -13
- package/src/proto/gen/dxos/echo/testing.ts +16 -3
- package/src/proto/gen/dxos/echo/timeframe.ts +10 -2
- package/src/proto/gen/dxos/halo/keys.ts +45 -2
- package/src/proto/gen/dxos/test/echo.ts +34 -0
- package/src/proto/gen/google/protobuf.ts +5 -4
- package/src/proto/gen/index.ts +5 -1
- package/src/proto/index.ts +4 -3
- package/src/proto/messages.ts +5 -16
- package/src/proto/substitutions.ts +1 -3
- package/src/types.ts +1 -2
- package/dist/src/spacetime/index.d.ts +0 -3
- package/dist/src/spacetime/index.d.ts.map +0 -1
- package/dist/src/spacetime/index.js +0 -22
- package/dist/src/spacetime/index.js.map +0 -1
- package/dist/src/spacetime/substitutions.d.ts +0 -13
- package/dist/src/spacetime/substitutions.d.ts.map +0 -1
- package/dist/src/spacetime/substitutions.js +0 -22
- package/dist/src/spacetime/substitutions.js.map +0 -1
- package/dist/src/spacetime/timeframe.d.ts +0 -45
- package/dist/src/spacetime/timeframe.d.ts.map +0 -1
- package/dist/src/spacetime/timeframe.js +0 -101
- package/dist/src/spacetime/timeframe.js.map +0 -1
- package/dist/src/spacetime/timeframe.test.d.ts +0 -2
- package/dist/src/spacetime/timeframe.test.d.ts.map +0 -1
- package/dist/src/spacetime/timeframe.test.js +0 -118
- package/dist/src/spacetime/timeframe.test.js.map +0 -1
- package/src/spacetime/index.ts +0 -6
- package/src/spacetime/substitutions.ts +0 -20
- package/src/spacetime/timeframe.test.ts +0 -132
- package/src/spacetime/timeframe.ts +0 -119
package/src/feeds/feed.test.ts
CHANGED
|
@@ -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
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
42
|
-
target
|
|
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
|
|
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
|
|
14
|
-
swarmKey
|
|
15
|
-
invitation
|
|
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
|
|
24
|
+
version: number;
|
|
20
25
|
parties?: PartyMetadata[];
|
|
21
|
-
created
|
|
22
|
-
updated
|
|
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
|
|
37
|
+
key: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
29
38
|
/**
|
|
30
|
-
*
|
|
39
|
+
* Options:
|
|
40
|
+
* - proto3_optional = true
|
|
31
41
|
*/
|
|
32
|
-
|
|
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
|
-
*
|
|
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
|
|
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
|
|
21
|
-
itemId
|
|
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
|
|
30
|
-
meta
|
|
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
|
|
35
|
-
memberKey
|
|
36
|
-
seq
|
|
37
|
-
timeframe
|
|
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
|
|
43
|
-
mutation
|
|
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
|
|
47
|
-
seq
|
|
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
|
|
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
|
|
17
|
-
database
|
|
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
|
|
14
|
-
value
|
|
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
|
|
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
|
|
21
|
-
seq
|
|
28
|
+
feedKey: Uint8Array;
|
|
29
|
+
seq: number;
|
|
22
30
|
}
|
|
23
31
|
}
|