@dxos/echo-protocol 2.18.1 → 2.18.2
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-writer.d.ts +2 -0
- package/dist/src/feeds/feed-writer.d.ts.map +1 -1
- package/dist/src/feeds/feed-writer.js +5 -1
- package/dist/src/feeds/feed-writer.js.map +1 -1
- package/dist/src/proto/gen/dxos/credentials.d.ts +26 -0
- package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -0
- package/dist/src/proto/gen/{dxos.js → dxos/credentials.js} +1 -1
- package/dist/src/proto/gen/dxos/credentials.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +57 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/{echo.js → echo/feed.js} +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +2 -2
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +46 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/{keys.js → service.js} +1 -1
- package/dist/src/proto/gen/dxos/echo/service.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -2
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +59 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.js +12 -0
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -0
- package/dist/src/proto/gen/index.d.ts +31 -15
- 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 +1 -1
- package/dist/src/proto/messages.d.ts.map +1 -1
- package/dist/src/proto/substitutions.d.ts +3 -3
- package/dist/src/proto/substitutions.js +3 -3
- package/dist/src/proto/substitutions.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -9
- package/src/feeds/feed-writer.ts +8 -1
- package/src/proto/defs/metadata.proto +3 -3
- package/src/proto/defs/proto.proto +7 -0
- package/src/proto/gen/dxos/credentials.ts +31 -0
- package/src/proto/gen/dxos/echo/feed.ts +64 -0
- package/src/proto/gen/dxos/echo/metadata.ts +6 -6
- package/src/proto/gen/dxos/echo/service.ts +50 -0
- package/src/proto/gen/dxos/echo/snapshot.ts +6 -6
- package/src/proto/gen/dxos/echo/testing.ts +4 -4
- package/src/proto/gen/dxos/halo/keys.ts +65 -0
- package/src/proto/gen/google/protobuf.ts +4 -4
- package/src/proto/gen/index.ts +32 -16
- package/src/proto/index.ts +3 -3
- package/src/proto/messages.ts +1 -1
- package/src/proto/substitutions.ts +3 -3
- package/dist/src/proto/gen/dxos/echo/keys.d.ts +0 -4
- package/dist/src/proto/gen/dxos/echo/keys.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos/echo/keys.js.map +0 -1
- package/dist/src/proto/gen/dxos/echo/remote.d.ts +0 -10
- package/dist/src/proto/gen/dxos/echo/remote.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos/echo/remote.js +0 -3
- package/dist/src/proto/gen/dxos/echo/remote.js.map +0 -1
- package/dist/src/proto/gen/dxos/echo.d.ts +0 -31
- package/dist/src/proto/gen/dxos/echo.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos/echo.js.map +0 -1
- package/dist/src/proto/gen/dxos.d.ts +0 -10
- package/dist/src/proto/gen/dxos.d.ts.map +0 -1
- package/dist/src/proto/gen/dxos.js.map +0 -1
- package/src/proto/defs/dxos.proto +0 -33
- package/src/proto/defs/echo.proto +0 -62
- package/src/proto/defs/key.proto +0 -11
- package/src/proto/defs/remote.proto +0 -25
- package/src/proto/defs/snapshot.proto +0 -82
- package/src/proto/gen/dxos/echo/keys.ts +0 -12
- package/src/proto/gen/dxos/echo/remote.ts +0 -16
- package/src/proto/gen/dxos/echo.ts +0 -38
- package/src/proto/gen/dxos.ts +0 -16
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Stream } from "@dxos/codec-protobuf";
|
|
2
|
+
import substitutions from "../../../substitutions";
|
|
3
|
+
import * as dxos_credentials from "../credentials";
|
|
4
|
+
import * as dxos_echo_feed from "../echo/feed";
|
|
5
|
+
import * as dxos_echo_metadata from "../echo/metadata";
|
|
6
|
+
import * as dxos_echo_service from "../echo/service";
|
|
7
|
+
import * as dxos_echo_snapshot from "../echo/snapshot";
|
|
8
|
+
import * as dxos_echo_testing from "../echo/testing";
|
|
9
|
+
import * as google_protobuf from "../../google/protobuf";
|
|
10
|
+
export enum KeyType {
|
|
11
|
+
UNKNOWN = 0,
|
|
12
|
+
IDENTITY = 1,
|
|
13
|
+
DEVICE = 2,
|
|
14
|
+
PARTY = 3,
|
|
15
|
+
FEED = 4
|
|
16
|
+
}
|
|
17
|
+
export interface PubKey {
|
|
18
|
+
data?: Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
export interface PrivKey {
|
|
21
|
+
data?: Uint8Array;
|
|
22
|
+
}
|
|
23
|
+
export interface KeyRecord {
|
|
24
|
+
/**
|
|
25
|
+
* - The `KeyType` type of the key. This is often unknown for keys from other sources.
|
|
26
|
+
*/
|
|
27
|
+
type: KeyType;
|
|
28
|
+
/**
|
|
29
|
+
* - The public key as a Buffer (required).
|
|
30
|
+
*/
|
|
31
|
+
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
32
|
+
/**
|
|
33
|
+
* - The secret key as a Buffer (this will never be visible outside the Keyring).
|
|
34
|
+
*/
|
|
35
|
+
secretKey?: PrivKey;
|
|
36
|
+
/**
|
|
37
|
+
* - Is this key from a Greeting "hint"?
|
|
38
|
+
*/
|
|
39
|
+
hint?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* - Is this our key? Usually true if `secretKey` is present,
|
|
42
|
+
* may be false for "inception keys" such as the Party key.
|
|
43
|
+
*/
|
|
44
|
+
own?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* - Is this key to be trusted?
|
|
47
|
+
*/
|
|
48
|
+
trusted?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* - An RFC-3339 date/time string for when the key was added to the Keyring.
|
|
51
|
+
*/
|
|
52
|
+
added?: string;
|
|
53
|
+
/**
|
|
54
|
+
* - An RFC-3339 date/time string for when the key was created.
|
|
55
|
+
*/
|
|
56
|
+
created?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface KeyRecordList {
|
|
59
|
+
keys?: KeyRecord[];
|
|
60
|
+
}
|
|
61
|
+
export interface KeyChain {
|
|
62
|
+
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
63
|
+
message: dxos_credentials.SignedMessage;
|
|
64
|
+
parents?: KeyChain[];
|
|
65
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Stream } from "@dxos/codec-protobuf";
|
|
2
2
|
import substitutions from "../../substitutions";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as dxos_echo_keys from "../dxos/echo/keys";
|
|
3
|
+
import * as dxos_credentials from "../dxos/credentials";
|
|
4
|
+
import * as dxos_echo_feed from "../dxos/echo/feed";
|
|
6
5
|
import * as dxos_echo_metadata from "../dxos/echo/metadata";
|
|
7
|
-
import * as
|
|
6
|
+
import * as dxos_echo_service from "../dxos/echo/service";
|
|
8
7
|
import * as dxos_echo_snapshot from "../dxos/echo/snapshot";
|
|
9
8
|
import * as dxos_echo_testing from "../dxos/echo/testing";
|
|
9
|
+
import * as dxos_halo_keys from "../dxos/halo/keys";
|
|
10
10
|
export interface Any {
|
|
11
11
|
type_url?: string;
|
|
12
12
|
value?: Uint8Array;
|
package/src/proto/gen/index.ts
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import { Schema } from "@dxos/codec-protobuf";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as dxos_echo_keys from "./dxos/echo/keys";
|
|
2
|
+
import * as dxos_credentials from "./dxos/credentials";
|
|
3
|
+
import * as dxos_echo_feed from "./dxos/echo/feed";
|
|
5
4
|
import * as dxos_echo_metadata from "./dxos/echo/metadata";
|
|
6
|
-
import * as
|
|
5
|
+
import * as dxos_echo_service from "./dxos/echo/service";
|
|
7
6
|
import * as dxos_echo_snapshot from "./dxos/echo/snapshot";
|
|
8
7
|
import * as dxos_echo_testing from "./dxos/echo/testing";
|
|
8
|
+
import * as dxos_halo_keys from "./dxos/halo/keys";
|
|
9
9
|
import * as google_protobuf from "./google/protobuf";
|
|
10
10
|
import substitutions from "../substitutions";
|
|
11
11
|
export interface TYPES {
|
|
12
|
-
"dxos.
|
|
13
|
-
"dxos.
|
|
14
|
-
"dxos.
|
|
15
|
-
"dxos.
|
|
16
|
-
"dxos.echo.
|
|
17
|
-
"dxos.echo.
|
|
12
|
+
"dxos.credentials.Message": dxos_credentials.Message;
|
|
13
|
+
"dxos.credentials.SignedMessage": dxos_credentials.SignedMessage;
|
|
14
|
+
"dxos.credentials.SignedMessage.Signature": dxos_credentials.SignedMessage.Signature;
|
|
15
|
+
"dxos.credentials.SignedMessage.Signed": dxos_credentials.SignedMessage.Signed;
|
|
16
|
+
"dxos.echo.feed.CredentialsMessage": dxos_echo_feed.CredentialsMessage;
|
|
17
|
+
"dxos.echo.feed.EchoEnvelope": dxos_echo_feed.EchoEnvelope;
|
|
18
|
+
"dxos.echo.feed.FeedMessage": dxos_echo_feed.FeedMessage;
|
|
19
|
+
"dxos.echo.feed.ItemGenesis": dxos_echo_feed.ItemGenesis;
|
|
20
|
+
"dxos.echo.feed.ItemMutation": dxos_echo_feed.ItemMutation;
|
|
21
|
+
"dxos.echo.feed.LinkData": dxos_echo_feed.LinkData;
|
|
22
|
+
"dxos.echo.feed.TimeframeVector": dxos_echo_feed.TimeframeVector;
|
|
23
|
+
"dxos.echo.feed.TimeframeVector.Frame": dxos_echo_feed.TimeframeVector.Frame;
|
|
18
24
|
"dxos.echo.metadata.EchoMetadata": dxos_echo_metadata.EchoMetadata;
|
|
19
25
|
"dxos.echo.metadata.PartyMetadata": dxos_echo_metadata.PartyMetadata;
|
|
20
|
-
"dxos.echo.
|
|
21
|
-
"dxos.echo.
|
|
26
|
+
"dxos.echo.service.MutationReceipt": dxos_echo_service.MutationReceipt;
|
|
27
|
+
"dxos.echo.service.SubscribeEntitySetRequest": dxos_echo_service.SubscribeEntitySetRequest;
|
|
28
|
+
"dxos.echo.service.SubscribeEntitySetResponse": dxos_echo_service.SubscribeEntitySetResponse;
|
|
29
|
+
"dxos.echo.service.SubscribeEntityStreamRequest": dxos_echo_service.SubscribeEntityStreamRequest;
|
|
30
|
+
"dxos.echo.service.SubscribeEntityStreamResponse": dxos_echo_service.SubscribeEntityStreamResponse;
|
|
31
|
+
"dxos.echo.service.SubscribeEntityStreamResponse.Mutation": dxos_echo_service.SubscribeEntityStreamResponse.Mutation;
|
|
32
|
+
"dxos.echo.service.SubscribeEntityStreamResponse.Mutation.Metadata": dxos_echo_service.SubscribeEntityStreamResponse.Mutation.Metadata;
|
|
33
|
+
"dxos.echo.service.WriteRequest": dxos_echo_service.WriteRequest;
|
|
22
34
|
"dxos.echo.snapshot.DatabaseSnapshot": dxos_echo_snapshot.DatabaseSnapshot;
|
|
23
35
|
"dxos.echo.snapshot.HaloStateSnapshot": dxos_echo_snapshot.HaloStateSnapshot;
|
|
24
36
|
"dxos.echo.snapshot.ItemSnapshot": dxos_echo_snapshot.ItemSnapshot;
|
|
@@ -28,12 +40,16 @@ export interface TYPES {
|
|
|
28
40
|
"dxos.echo.snapshot.ModelSnapshot": dxos_echo_snapshot.ModelSnapshot;
|
|
29
41
|
"dxos.echo.snapshot.PartySnapshot": dxos_echo_snapshot.PartySnapshot;
|
|
30
42
|
"dxos.echo.testing.TestItemMutation": dxos_echo_testing.TestItemMutation;
|
|
31
|
-
"dxos.
|
|
32
|
-
"dxos.
|
|
33
|
-
"dxos.
|
|
43
|
+
"dxos.halo.keys.KeyChain": dxos_halo_keys.KeyChain;
|
|
44
|
+
"dxos.halo.keys.KeyRecord": dxos_halo_keys.KeyRecord;
|
|
45
|
+
"dxos.halo.keys.KeyRecordList": dxos_halo_keys.KeyRecordList;
|
|
46
|
+
"dxos.halo.keys.KeyType": dxos_halo_keys.KeyType;
|
|
47
|
+
"dxos.halo.keys.PrivKey": dxos_halo_keys.PrivKey;
|
|
48
|
+
"dxos.halo.keys.PubKey": dxos_halo_keys.PubKey;
|
|
34
49
|
"google.protobuf.Any": google_protobuf.Any;
|
|
35
50
|
}
|
|
36
51
|
export interface SERVICES {
|
|
52
|
+
"dxos.echo.service.DataService": dxos_echo_service.DataService;
|
|
37
53
|
}
|
|
38
|
-
export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"
|
|
54
|
+
export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"credentials\":{\"nested\":{\"Message\":{\"fields\":{\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"SignedMessage\":{\"fields\":{\"signed\":{\"rule\":\"required\",\"type\":\"Signed\",\"id\":1,\"comment\":null},\"signatures\":{\"rule\":\"repeated\",\"type\":\"Signature\",\"id\":2,\"comment\":null}},\"nested\":{\"Signature\":{\"fields\":{\"key\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"signature\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"keyChain\":{\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"Signed\":{\"fields\":{\"created\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1,\"comment\":null},\"nonce\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"comment\":null}},\"comment\":\"A generic container message used whenever messages are signed (e.g. PartyCredential)\"}}},\"echo\":{\"nested\":{\"feed\":{\"nested\":{\"CredentialsMessage\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":\"A container for dxos.credentials.Message\"},\"EchoEnvelope\":{\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":2,\"comment\":null},\"genesis\":{\"type\":\"ItemGenesis\",\"id\":10,\"comment\":null},\"itemMutation\":{\"type\":\"ItemMutation\",\"id\":11,\"comment\":null},\"mutation\":{\"type\":\"bytes\",\"id\":12,\"comment\":null}},\"comment\":\"Wrapper for all ECHO messages.\"},\"FeedMessage\":{\"fields\":{\"halo\":{\"type\":\"CredentialsMessage\",\"id\":1,\"comment\":null},\"echo\":{\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":\"Outer message type decoded by Codec.\\nThis is what is written to the feeds.\"},\"ItemGenesis\":{\"fields\":{\"itemType\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"link\":{\"type\":\"LinkData\",\"id\":4,\"comment\":null}},\"comment\":\"Item creation.\"},\"ItemMutation\":{\"fields\":{\"parentId\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":\"Item mutation.\"},\"LinkData\":{\"fields\":{\"source\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"target\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"TimeframeVector\":{\"fields\":{\"frames\":{\"rule\":\"repeated\",\"type\":\"Frame\",\"id\":1,\"comment\":null}},\"nested\":{\"Frame\":{\"fields\":{\"feedKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null}},\"comment\":null}},\"comment\":\"Vector timestamp used to order messages.\"}}},\"metadata\":{\"nested\":{\"EchoMetadata\":{\"fields\":{\"parties\":{\"rule\":\"repeated\",\"type\":\"PartyMetadata\",\"id\":1,\"comment\":null}},\"comment\":null},\"PartyMetadata\":{\"fields\":{\"key\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"feedKeys\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"service\":{\"nested\":{\"DataService\":{\"methods\":{\"SubscribeEntitySet\":{\"requestType\":\"SubscribeEntitySetRequest\",\"responseType\":\"SubscribeEntitySetResponse\",\"responseStream\":true,\"comment\":null},\"SubscribeEntityStream\":{\"requestType\":\"SubscribeEntityStreamRequest\",\"responseType\":\"SubscribeEntityStreamResponse\",\"responseStream\":true,\"comment\":null},\"Write\":{\"requestType\":\"WriteRequest\",\"responseType\":\"MutationReceipt\",\"comment\":null}},\"comment\":null},\"MutationReceipt\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetResponse\":{\"fields\":{\"added\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"deleted\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"itemId\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamResponse\":{\"oneofs\":{\"kind\":{\"oneof\":[\"snapshot\",\"mutation\"],\"comment\":null}},\"fields\":{\"snapshot\":{\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"Mutation\",\"id\":2,\"comment\":null}},\"nested\":{\"Mutation\":{\"fields\":{\"data\":{\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"meta\":{\"type\":\"Metadata\",\"id\":2,\"comment\":null}},\"nested\":{\"Metadata\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"memberKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null}},\"comment\":null}},\"comment\":null}},\"comment\":null},\"WriteRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"snapshot\":{\"nested\":{\"DatabaseSnapshot\":{\"fields\":{\"items\":{\"rule\":\"repeated\",\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null}},\"comment\":null},\"HaloStateSnapshot\":{\"fields\":{\"messages\":{\"rule\":\"repeated\",\"type\":\"dxos.CredentialsMessage\",\"id\":1,\"comment\":null}},\"comment\":null},\"ItemSnapshot\":{\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"itemType\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"comment\":null},\"parentId\":{\"type\":\"string\",\"id\":5,\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":6,\"comment\":null}},\"comment\":null},\"ModelMutation\":{\"fields\":{\"mutation\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null},\"meta\":{\"rule\":\"required\",\"type\":\"ModelMutationMeta\",\"id\":2,\"comment\":null}},\"comment\":null},\"ModelMutationArray\":{\"fields\":{\"mutations\":{\"rule\":\"repeated\",\"type\":\"ModelMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"ModelMutationMeta\":{\"fields\":{\"feedKey\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null},\"seq\":{\"rule\":\"required\",\"type\":\"int32\",\"id\":2,\"comment\":null},\"memberKey\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":3,\"comment\":null}},\"comment\":null},\"ModelSnapshot\":{\"oneofs\":{\"snapshot\":{\"oneof\":[\"custom\",\"array\"],\"comment\":null}},\"fields\":{\"custom\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"array\":{\"type\":\"ModelMutationArray\",\"id\":2,\"comment\":null}},\"comment\":null},\"PartySnapshot\":{\"fields\":{\"partyKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":2,\"comment\":null},\"timestamp\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"halo\":{\"type\":\"HaloStateSnapshot\",\"id\":11,\"comment\":null},\"database\":{\"type\":\"DatabaseSnapshot\",\"id\":12,\"comment\":null}},\"comment\":null}}},\"testing\":{\"nested\":{\"TestItemMutation\":{\"fields\":{\"key\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"value\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}}}},\"halo\":{\"nested\":{\"keys\":{\"nested\":{\"KeyChain\":{\"fields\":{\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"rule\":\"required\",\"type\":\"SignedMessage\",\"id\":2,\"comment\":null},\"parents\":{\"rule\":\"repeated\",\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"KeyRecord\":{\"fields\":{\"type\":{\"rule\":\"required\",\"type\":\"KeyType\",\"id\":1,\"comment\":\"- The `KeyType` type of the key. This is often unknown for keys from other sources.\"},\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"- The public key as a Buffer (required).\"},\"secretKey\":{\"type\":\"PrivKey\",\"id\":3,\"comment\":\"- The secret key as a Buffer (this will never be visible outside the Keyring).\"},\"hint\":{\"type\":\"bool\",\"id\":4,\"comment\":\"- Is this key from a Greeting \\\"hint\\\"?\"},\"own\":{\"type\":\"bool\",\"id\":5,\"comment\":\"- Is this our key? Usually true if `secretKey` is present,\\nmay be false for \\\"inception keys\\\" such as the Party key.\"},\"trusted\":{\"type\":\"bool\",\"id\":6,\"comment\":\"- Is this key to be trusted?\"},\"added\":{\"type\":\"string\",\"id\":7,\"comment\":\"- An RFC-3339 date/time string for when the key was added to the Keyring.\"},\"created\":{\"type\":\"string\",\"id\":8,\"comment\":\"- An RFC-3339 date/time string for when the key was created.\"}},\"comment\":null},\"KeyRecordList\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"KeyRecord\",\"id\":1,\"comment\":null}},\"comment\":null},\"KeyType\":{\"values\":{\"UNKNOWN\":0,\"IDENTITY\":1,\"DEVICE\":2,\"PARTY\":3,\"FEED\":4},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null}},\"PrivKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"PubKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null}}}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null}}}}}}}");
|
|
39
55
|
export const schema = Schema.fromJson<TYPES, SERVICES>(schemaJson, substitutions);
|
package/src/proto/index.ts
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { schema } from './gen';
|
|
6
6
|
|
|
7
7
|
export * from './gen';
|
|
8
|
-
export * from './gen/dxos';
|
|
9
|
-
export * from './gen/dxos/echo';
|
|
8
|
+
export * from './gen/dxos/echo/feed';
|
|
10
9
|
export * from './gen/dxos/echo/metadata';
|
|
11
10
|
export * from './gen/dxos/echo/snapshot';
|
|
12
11
|
export * from './gen/dxos/echo/testing';
|
|
12
|
+
export * from './gen/dxos/echo/service';
|
|
13
13
|
|
|
14
14
|
export * from './messages';
|
|
15
15
|
|
|
16
|
-
export const codec = schema.getCodecForType('dxos.FeedMessage');
|
|
16
|
+
export const codec = schema.getCodecForType('dxos.echo.feed.FeedMessage');
|
package/src/proto/messages.ts
CHANGED
|
@@ -9,11 +9,11 @@ import { Timeframe } from '../spacetime';
|
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
// TODO(marik-d): Temporary codec bridging logic until we can require proto declarations across package boundaries.
|
|
12
|
-
'dxos.CredentialsMessage': {
|
|
12
|
+
'dxos.echo.feed.CredentialsMessage': {
|
|
13
13
|
encode: (msg: Message) => ({ data: codec.encode(msg) }),
|
|
14
14
|
decode: (msg: any): Message => codec.decode(msg.data)
|
|
15
15
|
},
|
|
16
|
-
'dxos.echo.TimeframeVector': {
|
|
16
|
+
'dxos.echo.feed.TimeframeVector': {
|
|
17
17
|
encode: (timeframe: Timeframe) => ({
|
|
18
18
|
frames: timeframe.frames().map(([feedKey, seq]) => ({ feedKey: feedKey.asUint8Array(), seq }))
|
|
19
19
|
}),
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
.map((frame: any) => [PublicKey.from(frame.feedKey), frame.seq])
|
|
24
24
|
)
|
|
25
25
|
},
|
|
26
|
-
'dxos.
|
|
26
|
+
'dxos.halo.keys.PubKey': {
|
|
27
27
|
encode: (value: PublicKey) => ({ data: value.asUint8Array() }),
|
|
28
28
|
decode: (value: any) => PublicKey.from(value.data)
|
|
29
29
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../../../../src/proto/gen/dxos/echo/keys.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,GAAG;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../../src/proto/gen/dxos/echo/keys.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as dxos_echo from "../echo";
|
|
2
|
-
import * as dxos_echo_snapshot from "./snapshot";
|
|
3
|
-
export interface ServerMessage {
|
|
4
|
-
snapshot?: dxos_echo_snapshot.DatabaseSnapshot;
|
|
5
|
-
update?: dxos_echo.EchoEnvelope;
|
|
6
|
-
}
|
|
7
|
-
export interface ClientMessage {
|
|
8
|
-
mutation?: dxos_echo.EchoEnvelope;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../src/proto/gen/dxos/echo/remote.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,SAAS,MAAM,SAAS,CAAC;AAGrC,OAAO,KAAK,kBAAkB,MAAM,YAAY,CAAC;AAGjD,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;IAC/C,MAAM,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC;CACnC;AACD,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC;CACrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../../../../../src/proto/gen/dxos/echo/remote.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import substitutions from "../../substitutions";
|
|
2
|
-
export interface TimeframeVector {
|
|
3
|
-
frames?: TimeframeVector.Frame[];
|
|
4
|
-
}
|
|
5
|
-
export declare namespace TimeframeVector {
|
|
6
|
-
interface Frame {
|
|
7
|
-
feedKey?: Uint8Array;
|
|
8
|
-
seq?: number;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export interface EchoEnvelope {
|
|
12
|
-
itemId?: string;
|
|
13
|
-
timeframe?: ReturnType<typeof substitutions["dxos.echo.TimeframeVector"]["decode"]>;
|
|
14
|
-
genesis?: ItemGenesis;
|
|
15
|
-
itemMutation?: ItemMutation;
|
|
16
|
-
mutation?: Uint8Array;
|
|
17
|
-
}
|
|
18
|
-
export interface ItemGenesis {
|
|
19
|
-
itemType?: string;
|
|
20
|
-
modelType?: string;
|
|
21
|
-
modelVersion?: string;
|
|
22
|
-
link?: LinkData;
|
|
23
|
-
}
|
|
24
|
-
export interface LinkData {
|
|
25
|
-
source?: string;
|
|
26
|
-
target?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ItemMutation {
|
|
29
|
-
parentId?: string;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=echo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../../../../src/proto/gen/dxos/echo.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAQhD,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;CACpC;AACD,yBAAiB,eAAe,CAAC;IAC7B,UAAiB,KAAK;QAClB,OAAO,CAAC,EAAE,UAAU,CAAC;QACrB,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB;CACJ;AACD,MAAM,WAAW,YAAY;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,UAAU,CAAC;CACzB;AACD,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AACD,MAAM,WAAW,QAAQ;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"echo.js","sourceRoot":"","sources":["../../../../../src/proto/gen/dxos/echo.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import substitutions from "../substitutions";
|
|
2
|
-
import * as dxos_echo from "./dxos/echo";
|
|
3
|
-
export interface FeedMessage {
|
|
4
|
-
halo?: ReturnType<typeof substitutions["dxos.CredentialsMessage"]["decode"]>;
|
|
5
|
-
echo?: dxos_echo.EchoEnvelope;
|
|
6
|
-
}
|
|
7
|
-
export interface CredentialsMessage {
|
|
8
|
-
data?: Uint8Array;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=dxos.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dxos.d.ts","sourceRoot":"","sources":["../../../../src/proto/gen/dxos.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAOzC,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC;CACjC;AACD,MAAM,WAAW,kBAAkB;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dxos.js","sourceRoot":"","sources":["../../../../src/proto/gen/dxos.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2020 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
syntax = "proto3";
|
|
6
|
-
|
|
7
|
-
package dxos;
|
|
8
|
-
|
|
9
|
-
import "echo.proto";
|
|
10
|
-
import "testing.proto";
|
|
11
|
-
import "snapshot.proto";
|
|
12
|
-
import "remote.proto";
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// Typescript Note:
|
|
16
|
-
// Use the interface name in code (e.g., IFeedEvenlope) and the concrete class name in the __type_url reference.
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
// Outer message type decoded by Codec.
|
|
21
|
-
//
|
|
22
|
-
message FeedMessage {
|
|
23
|
-
CredentialsMessage halo = 1;
|
|
24
|
-
dxos.echo.EchoEnvelope echo = 2;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
// A container for dxos.credentials.Message
|
|
29
|
-
// TODO(marik-d): Figure out how to import a protobuf type from @dxos/credentials package.
|
|
30
|
-
//
|
|
31
|
-
message CredentialsMessage {
|
|
32
|
-
bytes data = 1;
|
|
33
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2020 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
syntax = "proto3";
|
|
6
|
-
|
|
7
|
-
package dxos.echo;
|
|
8
|
-
|
|
9
|
-
import "google/protobuf/any.proto";
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
// Vector timestamp used to order messages.
|
|
13
|
-
//
|
|
14
|
-
message TimeframeVector {
|
|
15
|
-
message Frame {
|
|
16
|
-
// TODO(marik-d): Compress using numeric feed indexes.
|
|
17
|
-
// TODO(burdon): Determine if admit DAG can be ordered. Requires party messages to be ordered (by lexical feed key).
|
|
18
|
-
bytes feedKey = 1;
|
|
19
|
-
int32 seq = 3;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
repeated Frame frames = 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
// Wrapper for all ECHO messages.
|
|
27
|
-
//
|
|
28
|
-
message EchoEnvelope {
|
|
29
|
-
string itemId = 1;
|
|
30
|
-
TimeframeVector timeframe = 2;
|
|
31
|
-
|
|
32
|
-
// Create item.
|
|
33
|
-
ItemGenesis genesis = 10;
|
|
34
|
-
|
|
35
|
-
// Item system mutations.
|
|
36
|
-
ItemMutation itemMutation = 11;
|
|
37
|
-
|
|
38
|
-
// Model-specific mutations.
|
|
39
|
-
bytes mutation = 12;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
// Item creation.
|
|
44
|
-
//
|
|
45
|
-
message ItemGenesis {
|
|
46
|
-
string itemType = 1;
|
|
47
|
-
string modelType = 2;
|
|
48
|
-
string modelVersion = 3;
|
|
49
|
-
LinkData link = 4;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
message LinkData {
|
|
53
|
-
string source = 1;
|
|
54
|
-
string target = 2;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
// Item mutation.
|
|
59
|
-
//
|
|
60
|
-
message ItemMutation {
|
|
61
|
-
string parentId = 1;
|
|
62
|
-
}
|
package/src/proto/defs/key.proto
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2020 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
syntax = "proto3";
|
|
6
|
-
|
|
7
|
-
package dxos.echo.remote;
|
|
8
|
-
|
|
9
|
-
import "echo.proto";
|
|
10
|
-
import "snapshot.proto";
|
|
11
|
-
|
|
12
|
-
// Message from server to client.
|
|
13
|
-
message ServerMessage {
|
|
14
|
-
oneof msg {
|
|
15
|
-
DatabaseSnapshot snapshot = 1;
|
|
16
|
-
EchoEnvelope update = 2;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Message from client to server.
|
|
21
|
-
message ClientMessage {
|
|
22
|
-
oneof msg {
|
|
23
|
-
EchoEnvelope mutation = 1;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2020 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
syntax = "proto3";
|
|
6
|
-
|
|
7
|
-
package dxos.echo.snapshot;
|
|
8
|
-
|
|
9
|
-
import "echo.proto";
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
// Snapshots define full party state at a given point in time.
|
|
13
|
-
// They must have enough information to be able to recover the party state without reading the feed messages.
|
|
14
|
-
//
|
|
15
|
-
// Each snapshot is identified by a party key and a timeframe.
|
|
16
|
-
// The timeframe defines the set of feed messages that have already been processed.
|
|
17
|
-
// When loading from the snapshot, application would skip all of the feed messages up to (and including) the provided timeframe.
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
message PartySnapshot {
|
|
21
|
-
bytes partyKey = 1;
|
|
22
|
-
TimeframeVector timeframe = 2;
|
|
23
|
-
|
|
24
|
-
// Unix timestamp of the snapshot creation time. For information purposes only.
|
|
25
|
-
int32 timestamp = 3;
|
|
26
|
-
|
|
27
|
-
HaloStateSnapshot halo = 11;
|
|
28
|
-
DatabaseSnapshot database = 12;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
message DatabaseSnapshot {
|
|
32
|
-
repeated ItemSnapshot items = 1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// For now we just store and replay a list of all halo messages as thier number is expected to be relatively low.
|
|
36
|
-
message HaloStateSnapshot {
|
|
37
|
-
repeated dxos.CredentialsMessage messages = 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
message ItemSnapshot {
|
|
41
|
-
string itemId = 1;
|
|
42
|
-
|
|
43
|
-
string itemType = 2;
|
|
44
|
-
string modelType = 3;
|
|
45
|
-
string modelVersion = 4;
|
|
46
|
-
|
|
47
|
-
string parentId = 5;
|
|
48
|
-
|
|
49
|
-
// TODO(burdon): = 10 (make room for other meta?)
|
|
50
|
-
ModelSnapshot model = 6;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
message ModelSnapshot {
|
|
54
|
-
oneof snapshot {
|
|
55
|
-
// Encoding is defined by model.
|
|
56
|
-
bytes custom = 1;
|
|
57
|
-
|
|
58
|
-
// Fallback to storing array of mutations.
|
|
59
|
-
ModelMutationArray array = 2;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
message ModelMutationArray {
|
|
64
|
-
repeated ModelMutation mutations = 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
message ModelMutation {
|
|
68
|
-
// TODO(burdon): Remove required.
|
|
69
|
-
// Encoded model mutation, format is defined by model's codec.
|
|
70
|
-
required bytes mutation = 1;
|
|
71
|
-
required ModelMutationMeta meta = 2;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
message ModelMutationMeta {
|
|
75
|
-
// TODO(burdon): Remove required.
|
|
76
|
-
required bytes feedKey = 1;
|
|
77
|
-
required int32 seq = 2;
|
|
78
|
-
required bytes memberKey = 3;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Stream } from "@dxos/codec-protobuf";
|
|
2
|
-
import substitutions from "../../../substitutions";
|
|
3
|
-
import * as dxos from "../../dxos";
|
|
4
|
-
import * as dxos_echo from "../echo";
|
|
5
|
-
import * as dxos_echo_metadata from "./metadata";
|
|
6
|
-
import * as dxos_echo_remote from "./remote";
|
|
7
|
-
import * as dxos_echo_snapshot from "./snapshot";
|
|
8
|
-
import * as dxos_echo_testing from "./testing";
|
|
9
|
-
import * as google_protobuf from "../../google/protobuf";
|
|
10
|
-
export interface Key {
|
|
11
|
-
data?: Uint8Array;
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Stream } from "@dxos/codec-protobuf";
|
|
2
|
-
import substitutions from "../../../substitutions";
|
|
3
|
-
import * as dxos from "../../dxos";
|
|
4
|
-
import * as dxos_echo from "../echo";
|
|
5
|
-
import * as dxos_echo_keys from "./keys";
|
|
6
|
-
import * as dxos_echo_metadata from "./metadata";
|
|
7
|
-
import * as dxos_echo_snapshot from "./snapshot";
|
|
8
|
-
import * as dxos_echo_testing from "./testing";
|
|
9
|
-
import * as google_protobuf from "../../google/protobuf";
|
|
10
|
-
export interface ServerMessage {
|
|
11
|
-
snapshot?: dxos_echo_snapshot.DatabaseSnapshot;
|
|
12
|
-
update?: dxos_echo.EchoEnvelope;
|
|
13
|
-
}
|
|
14
|
-
export interface ClientMessage {
|
|
15
|
-
mutation?: dxos_echo.EchoEnvelope;
|
|
16
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Stream } from "@dxos/codec-protobuf";
|
|
2
|
-
import substitutions from "../../substitutions";
|
|
3
|
-
import * as dxos from "../dxos";
|
|
4
|
-
import * as dxos_echo_keys from "./echo/keys";
|
|
5
|
-
import * as dxos_echo_metadata from "./echo/metadata";
|
|
6
|
-
import * as dxos_echo_remote from "./echo/remote";
|
|
7
|
-
import * as dxos_echo_snapshot from "./echo/snapshot";
|
|
8
|
-
import * as dxos_echo_testing from "./echo/testing";
|
|
9
|
-
import * as google_protobuf from "../google/protobuf";
|
|
10
|
-
export interface TimeframeVector {
|
|
11
|
-
frames?: TimeframeVector.Frame[];
|
|
12
|
-
}
|
|
13
|
-
export namespace TimeframeVector {
|
|
14
|
-
export interface Frame {
|
|
15
|
-
feedKey?: Uint8Array;
|
|
16
|
-
seq?: number;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export interface EchoEnvelope {
|
|
20
|
-
itemId?: string;
|
|
21
|
-
timeframe?: ReturnType<typeof substitutions["dxos.echo.TimeframeVector"]["decode"]>;
|
|
22
|
-
genesis?: ItemGenesis;
|
|
23
|
-
itemMutation?: ItemMutation;
|
|
24
|
-
mutation?: Uint8Array;
|
|
25
|
-
}
|
|
26
|
-
export interface ItemGenesis {
|
|
27
|
-
itemType?: string;
|
|
28
|
-
modelType?: string;
|
|
29
|
-
modelVersion?: string;
|
|
30
|
-
link?: LinkData;
|
|
31
|
-
}
|
|
32
|
-
export interface LinkData {
|
|
33
|
-
source?: string;
|
|
34
|
-
target?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface ItemMutation {
|
|
37
|
-
parentId?: string;
|
|
38
|
-
}
|