@dxos/echo-protocol 2.33.5-dev.c37556a4 → 2.33.5-dev.cb045a79
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.test.js +6 -6
- package/dist/src/feeds/feed-store-iterator.test.js.map +1 -1
- package/dist/src/feeds/feed-writer.d.ts +3 -0
- package/dist/src/feeds/feed-writer.d.ts.map +1 -1
- package/dist/src/feeds/index.js +5 -1
- package/dist/src/feeds/index.js.map +1 -1
- package/dist/src/index.js +5 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/proto/gen/dxos/credentials.d.ts +1 -1
- package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +2 -14
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +10 -5
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +7 -7
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +4 -4
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/testing.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +13 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js +3 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +3 -3
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/index.d.ts +3 -2
- 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.js +5 -1
- 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/messages.js +1 -1
- package/dist/src/proto/messages.js.map +1 -1
- package/dist/src/proto/substitutions.d.ts +1 -1
- package/dist/src/spacetime/index.js +5 -1
- package/dist/src/spacetime/index.js.map +1 -1
- package/dist/src/spacetime/substitutions.d.ts +1 -1
- package/dist/src/spacetime/substitutions.js +1 -1
- package/dist/src/spacetime/substitutions.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/feeds/feed-store-iterator.test.ts +4 -4
- package/src/proto/gen/dxos/credentials.ts +2 -1
- package/src/proto/gen/dxos/echo/feed.ts +3 -14
- package/src/proto/gen/dxos/echo/invitation.ts +1 -0
- package/src/proto/gen/dxos/echo/metadata.ts +11 -5
- package/src/proto/gen/dxos/echo/service.ts +8 -7
- package/src/proto/gen/dxos/echo/snapshot.ts +5 -4
- package/src/proto/gen/dxos/echo/testing.ts +1 -0
- package/src/proto/gen/dxos/echo/timeframe.ts +23 -0
- package/src/proto/gen/dxos/halo/keys.ts +4 -3
- package/src/proto/gen/google/protobuf.ts +1 -0
- package/src/proto/gen/index.ts +4 -3
- package/src/proto/messages.ts +1 -1
- package/src/spacetime/substitutions.ts +1 -1
|
@@ -6,17 +6,18 @@ import * as dxos_echo_invitation from "./invitation";
|
|
|
6
6
|
import * as dxos_echo_metadata from "./metadata";
|
|
7
7
|
import * as dxos_echo_snapshot from "./snapshot";
|
|
8
8
|
import * as dxos_echo_testing from "./testing";
|
|
9
|
+
import * as dxos_echo_timeframe from "./timeframe";
|
|
9
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
10
11
|
import * as google_protobuf from "../../google/protobuf";
|
|
11
12
|
export interface SubscribeEntitySetRequest {
|
|
12
|
-
partyKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
13
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
13
14
|
}
|
|
14
15
|
export interface SubscribeEntitySetResponse {
|
|
15
16
|
added?: dxos_echo_feed.EchoEnvelope[];
|
|
16
17
|
deleted?: dxos_echo_feed.EchoEnvelope[];
|
|
17
18
|
}
|
|
18
19
|
export interface SubscribeEntityStreamRequest {
|
|
19
|
-
partyKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
20
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
20
21
|
itemId?: string;
|
|
21
22
|
}
|
|
22
23
|
export interface SubscribeEntityStreamResponse {
|
|
@@ -30,19 +31,19 @@ export namespace SubscribeEntityStreamResponse {
|
|
|
30
31
|
}
|
|
31
32
|
export namespace Mutation {
|
|
32
33
|
export interface Metadata {
|
|
33
|
-
feedKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
34
|
-
memberKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
34
|
+
feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
35
|
+
memberKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
35
36
|
seq?: number;
|
|
36
|
-
timeframe?: ReturnType<typeof substitutions["dxos.echo.
|
|
37
|
+
timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
export interface WriteRequest {
|
|
41
|
-
partyKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
42
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
42
43
|
mutation?: dxos_echo_feed.EchoEnvelope;
|
|
43
44
|
}
|
|
44
45
|
export interface MutationReceipt {
|
|
45
|
-
feedKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
46
|
+
feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
46
47
|
seq?: number;
|
|
47
48
|
}
|
|
48
49
|
export interface DataService {
|
|
@@ -6,17 +6,18 @@ import * as dxos_echo_invitation from "./invitation";
|
|
|
6
6
|
import * as dxos_echo_metadata from "./metadata";
|
|
7
7
|
import * as dxos_echo_service from "./service";
|
|
8
8
|
import * as dxos_echo_testing from "./testing";
|
|
9
|
+
import * as dxos_echo_timeframe from "./timeframe";
|
|
9
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
10
11
|
import * as google_protobuf from "../../google/protobuf";
|
|
11
12
|
export interface PartySnapshot {
|
|
12
13
|
partyKey?: Uint8Array;
|
|
13
|
-
timeframe?: ReturnType<typeof substitutions["dxos.echo.
|
|
14
|
+
timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
|
|
14
15
|
timestamp?: number;
|
|
15
16
|
halo?: HaloStateSnapshot;
|
|
16
17
|
database?: DatabaseSnapshot;
|
|
17
18
|
}
|
|
18
19
|
export interface HaloStateSnapshot {
|
|
19
|
-
messages?: ReturnType<typeof substitutions["dxos.echo.feed.CredentialsMessage"]["decode"]>[];
|
|
20
|
+
messages?: ReturnType<(typeof substitutions)["dxos.echo.feed.CredentialsMessage"]["decode"]>[];
|
|
20
21
|
}
|
|
21
22
|
export interface DatabaseSnapshot {
|
|
22
23
|
items?: ItemSnapshot[];
|
|
@@ -102,7 +103,7 @@ export interface ModelMutation {
|
|
|
102
103
|
meta: ModelMutationMeta;
|
|
103
104
|
}
|
|
104
105
|
export interface ModelMutationMeta {
|
|
105
|
-
feedKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
106
|
+
feedKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
106
107
|
seq: number;
|
|
107
|
-
memberKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
108
|
+
memberKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
108
109
|
}
|
|
@@ -6,6 +6,7 @@ import * as dxos_echo_invitation from "./invitation";
|
|
|
6
6
|
import * as dxos_echo_metadata from "./metadata";
|
|
7
7
|
import * as dxos_echo_service from "./service";
|
|
8
8
|
import * as dxos_echo_snapshot from "./snapshot";
|
|
9
|
+
import * as dxos_echo_timeframe from "./timeframe";
|
|
9
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
10
11
|
import * as google_protobuf from "../../google/protobuf";
|
|
11
12
|
export interface TestItemMutation {
|
|
@@ -0,0 +1,23 @@
|
|
|
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 "./feed";
|
|
5
|
+
import * as dxos_echo_invitation from "./invitation";
|
|
6
|
+
import * as dxos_echo_metadata from "./metadata";
|
|
7
|
+
import * as dxos_echo_service from "./service";
|
|
8
|
+
import * as dxos_echo_snapshot from "./snapshot";
|
|
9
|
+
import * as dxos_echo_testing from "./testing";
|
|
10
|
+
import * as dxos_halo_keys from "../halo/keys";
|
|
11
|
+
import * as google_protobuf from "../../google/protobuf";
|
|
12
|
+
/**
|
|
13
|
+
* Vector timestamp used to order messages.
|
|
14
|
+
*/
|
|
15
|
+
export interface TimeframeVector {
|
|
16
|
+
frames?: TimeframeVector.Frame[];
|
|
17
|
+
}
|
|
18
|
+
export namespace TimeframeVector {
|
|
19
|
+
export interface Frame {
|
|
20
|
+
feedKey?: Uint8Array;
|
|
21
|
+
seq?: number;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -7,6 +7,7 @@ import * as dxos_echo_metadata from "../echo/metadata";
|
|
|
7
7
|
import * as dxos_echo_service from "../echo/service";
|
|
8
8
|
import * as dxos_echo_snapshot from "../echo/snapshot";
|
|
9
9
|
import * as dxos_echo_testing from "../echo/testing";
|
|
10
|
+
import * as dxos_echo_timeframe from "../echo/timeframe";
|
|
10
11
|
import * as google_protobuf from "../../google/protobuf";
|
|
11
12
|
export enum KeyType {
|
|
12
13
|
UNKNOWN = 0,
|
|
@@ -30,11 +31,11 @@ export interface KeyRecord {
|
|
|
30
31
|
/**
|
|
31
32
|
* - The public key as a Buffer (required).
|
|
32
33
|
*/
|
|
33
|
-
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
34
|
+
publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
34
35
|
/**
|
|
35
36
|
* - The secret key as a Buffer (this will never be visible outside the Keyring).
|
|
36
37
|
*/
|
|
37
|
-
secretKey?: ReturnType<typeof substitutions["dxos.halo.keys.PrivKey"]["decode"]>;
|
|
38
|
+
secretKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PrivKey"]["decode"]>;
|
|
38
39
|
/**
|
|
39
40
|
* - Is this key from a Greeting "hint"?
|
|
40
41
|
*/
|
|
@@ -61,7 +62,7 @@ export interface KeyRecordList {
|
|
|
61
62
|
keys?: KeyRecord[];
|
|
62
63
|
}
|
|
63
64
|
export interface KeyChain {
|
|
64
|
-
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
65
|
+
publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
65
66
|
message: dxos_credentials.SignedMessage;
|
|
66
67
|
parents?: KeyChain[];
|
|
67
68
|
}
|
|
@@ -7,6 +7,7 @@ import * as dxos_echo_metadata from "../dxos/echo/metadata";
|
|
|
7
7
|
import * as dxos_echo_service from "../dxos/echo/service";
|
|
8
8
|
import * as dxos_echo_snapshot from "../dxos/echo/snapshot";
|
|
9
9
|
import * as dxos_echo_testing from "../dxos/echo/testing";
|
|
10
|
+
import * as dxos_echo_timeframe from "../dxos/echo/timeframe";
|
|
10
11
|
import * as dxos_halo_keys from "../dxos/halo/keys";
|
|
11
12
|
export interface Any {
|
|
12
13
|
type_url?: string;
|
package/src/proto/gen/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as dxos_echo_metadata from "./dxos/echo/metadata";
|
|
|
6
6
|
import * as dxos_echo_service from "./dxos/echo/service";
|
|
7
7
|
import * as dxos_echo_snapshot from "./dxos/echo/snapshot";
|
|
8
8
|
import * as dxos_echo_testing from "./dxos/echo/testing";
|
|
9
|
+
import * as dxos_echo_timeframe from "./dxos/echo/timeframe";
|
|
9
10
|
import * as dxos_halo_keys from "./dxos/halo/keys";
|
|
10
11
|
import * as google_protobuf from "./google/protobuf";
|
|
11
12
|
import substitutions from "../substitutions";
|
|
@@ -21,8 +22,6 @@ export interface TYPES {
|
|
|
21
22
|
"dxos.echo.feed.ItemMutation": dxos_echo_feed.ItemMutation;
|
|
22
23
|
"dxos.echo.feed.ItemMutation.Action": dxos_echo_feed.ItemMutation.Action;
|
|
23
24
|
"dxos.echo.feed.LinkData": dxos_echo_feed.LinkData;
|
|
24
|
-
"dxos.echo.feed.TimeframeVector": dxos_echo_feed.TimeframeVector;
|
|
25
|
-
"dxos.echo.feed.TimeframeVector.Frame": dxos_echo_feed.TimeframeVector.Frame;
|
|
26
25
|
"dxos.echo.invitation.InvitationDescriptor": dxos_echo_invitation.InvitationDescriptor;
|
|
27
26
|
"dxos.echo.invitation.InvitationDescriptor.Type": dxos_echo_invitation.InvitationDescriptor.Type;
|
|
28
27
|
"dxos.echo.metadata.EchoMetadata": dxos_echo_metadata.EchoMetadata;
|
|
@@ -46,6 +45,8 @@ export interface TYPES {
|
|
|
46
45
|
"dxos.echo.testing.TestItemMutation": dxos_echo_testing.TestItemMutation;
|
|
47
46
|
"dxos.echo.testing.TestItemSnapshot": dxos_echo_testing.TestItemSnapshot;
|
|
48
47
|
"dxos.echo.testing.TestListMutation": dxos_echo_testing.TestListMutation;
|
|
48
|
+
"dxos.echo.timeframe.TimeframeVector": dxos_echo_timeframe.TimeframeVector;
|
|
49
|
+
"dxos.echo.timeframe.TimeframeVector.Frame": dxos_echo_timeframe.TimeframeVector.Frame;
|
|
49
50
|
"dxos.halo.keys.KeyChain": dxos_halo_keys.KeyChain;
|
|
50
51
|
"dxos.halo.keys.KeyRecord": dxos_halo_keys.KeyRecord;
|
|
51
52
|
"dxos.halo.keys.KeyRecordList": dxos_halo_keys.KeyRecordList;
|
|
@@ -58,5 +59,5 @@ export interface TYPES {
|
|
|
58
59
|
export interface SERVICES {
|
|
59
60
|
"dxos.echo.service.DataService": dxos_echo_service.DataService;
|
|
60
61
|
}
|
|
61
|
-
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},\"snapshot\":{\"type\":\"ModelSnapshot\",\"id\":13,\"comment\":\"Set the model to the provided snapshot.\"}},\"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\":null},\"ItemMutation\":{\"fields\":{\"parentId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"action\":{\"type\":\"Action\",\"id\":2,\"comment\":null}},\"nested\":{\"Action\":{\"values\":{\"NOOP\":0,\"DELETE\":1,\"RESTORE\":2},\"comment\":null,\"comments\":{\"NOOP\":null,\"DELETE\":null,\"RESTORE\":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.\"}}},\"invitation\":{\"nested\":{\"InvitationDescriptor\":{\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"swarmKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"invitation\":{\"type\":\"bytes\",\"id\":3,\"comment\":null},\"identityKey\":{\"type\":\"bytes\",\"id\":4,\"comment\":\"Only present if type == OFFLINE.\"},\"secret\":{\"type\":\"bytes\",\"id\":5,\"comment\":\"Must be stripped out when passing to another peer.\"}},\"nested\":{\"Type\":{\"values\":{\"INTERACTIVE\":1,\"OFFLINE\":2},\"comment\":\"Defines an invitation type.\",\"comments\":{\"INTERACTIVE\":\"Interactive invitation is when both peers are online at the same time.\",\"OFFLINE\":\"Offline is when only a single peer needs to be online at the time.\"}}},\"comment\":null}}},\"metadata\":{\"nested\":{\"EchoMetadata\":{\"fields\":{\"version\":{\"type\":\"int32\",\"id\":1,\"comment\":\"Version number that is inceremnted every time there's a breaking change to the storage schema.\\n\\nThis is used to detect if the storage schema has changed since the last time the client was run.\\nLoading data from a different version will might result in an error.\"},\"parties\":{\"rule\":\"repeated\",\"type\":\"PartyMetadata\",\"id\":2,\"comment\":null},\"created\":{\"type\":\"google.protobuf.Timestamp\",\"id\":3,\"comment\":null},\"updated\":{\"type\":\"google.protobuf.Timestamp\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyMetadata\":{\"fields\":{\"key\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Party key.\"},\"feedKeys\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"List of all feed associated with the party.\"},\"dataFeedKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"Key of the wriatable data feed.\"}},\"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},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":4,\"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},\"links\":{\"rule\":\"repeated\",\"type\":\"LinkSnapshot\",\"id\":2,\"comment\":null}},\"comment\":null},\"HaloStateSnapshot\":{\"fields\":{\"messages\":{\"rule\":\"repeated\",\"type\":\"dxos.CredentialsMessage\",\"id\":1,\"comment\":null}},\"comment\":null},\"ItemSnapshot\":{\"oneofs\":{\"_itemId\":{\"oneof\":[\"itemId\"]},\"_itemType\":{\"oneof\":[\"itemType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_parentId\":{\"oneof\":[\"parentId\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"itemType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"parentId\":{\"type\":\"string\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"LinkSnapshot\":{\"oneofs\":{\"_linkId\":{\"oneof\":[\"linkId\"]},\"_linkType\":{\"oneof\":[\"linkType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"linkId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"linkType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"source\":{\"rule\":\"required\",\"type\":\"string\",\"id\":5,\"comment\":null},\"target\":{\"rule\":\"required\",\"type\":\"string\",\"id\":6,\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":7,\"options\":{\"proto3_optional\":true},\"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},\"ModelMutationMeta\":{\"fields\":{\"feedKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"rule\":\"required\",\"type\":\"int32\",\"id\":2,\"comment\":null},\"memberKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":3,\"comment\":null}},\"comment\":null},\"ModelSnapshot\":{\"oneofs\":{\"_snapshot\":{\"oneof\":[\"snapshot\"]}},\"fields\":{\"snapshot\":{\"type\":\"bytes\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":\"Encoded model snapshot (defined by the model's codec).\\nIf undefined the state machine will be initialized with it's default state.\"},\"mutations\":{\"rule\":\"repeated\",\"type\":\"ModelMutation\",\"id\":2,\"comment\":\"Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.\"}},\"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},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"type\":\"string\",\"id\":1,\"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,\"DXNS_ADDRESS\":5},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null,\"DXNS_ADDRESS\":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},\"Timestamp\":{\"fields\":{\"seconds\":{\"type\":\"int64\",\"id\":1},\"nanos\":{\"type\":\"int32\",\"id\":2}},\"comment\":null}}}}}}}");
|
|
62
|
+
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},\"genesis\":{\"type\":\"ItemGenesis\",\"id\":10,\"comment\":null},\"itemMutation\":{\"type\":\"ItemMutation\",\"id\":11,\"comment\":null},\"mutation\":{\"type\":\"bytes\",\"id\":12,\"comment\":null},\"snapshot\":{\"type\":\"ModelSnapshot\",\"id\":13,\"comment\":\"Set the model to the provided snapshot.\"}},\"comment\":\"Wrapper for all ECHO messages.\"},\"FeedMessage\":{\"oneofs\":{\"payload\":{\"oneof\":[\"halo\",\"echo\"],\"comment\":null}},\"fields\":{\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":1,\"comment\":null},\"halo\":{\"type\":\"CredentialsMessage\",\"id\":10,\"comment\":null},\"echo\":{\"type\":\"EchoEnvelope\",\"id\":11,\"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\":null},\"ItemMutation\":{\"fields\":{\"parentId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"action\":{\"type\":\"Action\",\"id\":2,\"comment\":null}},\"nested\":{\"Action\":{\"values\":{\"NOOP\":0,\"DELETE\":1,\"RESTORE\":2},\"comment\":null,\"comments\":{\"NOOP\":null,\"DELETE\":null,\"RESTORE\":null}}},\"comment\":\"Item mutation.\"},\"LinkData\":{\"fields\":{\"source\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"target\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"invitation\":{\"nested\":{\"InvitationDescriptor\":{\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"swarmKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"invitation\":{\"type\":\"bytes\",\"id\":3,\"comment\":null},\"identityKey\":{\"type\":\"bytes\",\"id\":4,\"comment\":\"Only present if type == OFFLINE.\"},\"secret\":{\"type\":\"bytes\",\"id\":5,\"comment\":\"Must be stripped out when passing to another peer.\"}},\"nested\":{\"Type\":{\"values\":{\"INTERACTIVE\":1,\"OFFLINE\":2},\"comment\":\"Defines an invitation type.\",\"comments\":{\"INTERACTIVE\":\"Interactive invitation is when both peers are online at the same time.\",\"OFFLINE\":\"Offline is when only a single peer needs to be online at the time.\"}}},\"comment\":null}}},\"metadata\":{\"nested\":{\"EchoMetadata\":{\"fields\":{\"version\":{\"type\":\"int32\",\"id\":1,\"comment\":\"Version number that is inceremnted every time there's a breaking change to the storage schema.\\n\\nThis is used to detect if the storage schema has changed since the last time the client was run.\\nLoading data from a different version will might result in an error.\"},\"parties\":{\"rule\":\"repeated\",\"type\":\"PartyMetadata\",\"id\":2,\"comment\":null},\"created\":{\"type\":\"google.protobuf.Timestamp\",\"id\":3,\"comment\":null},\"updated\":{\"type\":\"google.protobuf.Timestamp\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyMetadata\":{\"fields\":{\"key\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Party key.\"},\"feedKeys\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"List of all feed associated with the party.\"},\"dataFeedKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"Key of the wriatable data feed.\"},\"controlFeedKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"Key of the wriatable control feed.\"},\"latestTimeframe\":{\"type\":\"TimeframeVector\",\"id\":5,\"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},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":4,\"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},\"links\":{\"rule\":\"repeated\",\"type\":\"LinkSnapshot\",\"id\":2,\"comment\":null}},\"comment\":null},\"HaloStateSnapshot\":{\"fields\":{\"messages\":{\"rule\":\"repeated\",\"type\":\"dxos.CredentialsMessage\",\"id\":1,\"comment\":null}},\"comment\":null},\"ItemSnapshot\":{\"oneofs\":{\"_itemId\":{\"oneof\":[\"itemId\"]},\"_itemType\":{\"oneof\":[\"itemType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_parentId\":{\"oneof\":[\"parentId\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"itemType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"parentId\":{\"type\":\"string\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"LinkSnapshot\":{\"oneofs\":{\"_linkId\":{\"oneof\":[\"linkId\"]},\"_linkType\":{\"oneof\":[\"linkType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"linkId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"linkType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"source\":{\"rule\":\"required\",\"type\":\"string\",\"id\":5,\"comment\":null},\"target\":{\"rule\":\"required\",\"type\":\"string\",\"id\":6,\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":7,\"options\":{\"proto3_optional\":true},\"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},\"ModelMutationMeta\":{\"fields\":{\"feedKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"rule\":\"required\",\"type\":\"int32\",\"id\":2,\"comment\":null},\"memberKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":3,\"comment\":null}},\"comment\":null},\"ModelSnapshot\":{\"oneofs\":{\"_snapshot\":{\"oneof\":[\"snapshot\"]}},\"fields\":{\"snapshot\":{\"type\":\"bytes\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":\"Encoded model snapshot (defined by the model's codec).\\nIf undefined the state machine will be initialized with it's default state.\"},\"mutations\":{\"rule\":\"repeated\",\"type\":\"ModelMutation\",\"id\":2,\"comment\":\"Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.\"}},\"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},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}}},\"timeframe\":{\"nested\":{\"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.\"}}}}},\"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,\"DXNS_ADDRESS\":5},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null,\"DXNS_ADDRESS\":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},\"Timestamp\":{\"fields\":{\"seconds\":{\"type\":\"int64\",\"id\":1},\"nanos\":{\"type\":\"int32\",\"id\":2}},\"comment\":null}}}}}}}");
|
|
62
63
|
export const schema = Schema.fromJson<TYPES, SERVICES>(schemaJson, substitutions);
|
package/src/proto/messages.ts
CHANGED
|
@@ -26,9 +26,9 @@ export const createItemGenesis = (itemId: ItemID, itemType: ItemType): FeedMessa
|
|
|
26
26
|
export const createTestItemMutation = (
|
|
27
27
|
itemId: ItemID, key: string, value: string, timeframe?: Timeframe
|
|
28
28
|
): FeedMessage => ({
|
|
29
|
+
timeframe,
|
|
29
30
|
echo: {
|
|
30
31
|
itemId,
|
|
31
|
-
timeframe,
|
|
32
32
|
mutation: schema.getCodecForType('dxos.echo.testing.TestItemMutation').encode({
|
|
33
33
|
key,
|
|
34
34
|
value
|
|
@@ -7,7 +7,7 @@ import { PublicKey } from '@dxos/crypto';
|
|
|
7
7
|
import { Timeframe } from './timeframe';
|
|
8
8
|
|
|
9
9
|
export const timeframeSubstitutions = {
|
|
10
|
-
'dxos.echo.
|
|
10
|
+
'dxos.echo.timeframe.TimeframeVector': {
|
|
11
11
|
encode: (timeframe: Timeframe) => ({
|
|
12
12
|
frames: timeframe.frames().map(([feedKey, seq]) => ({ feedKey: feedKey.asUint8Array(), seq }))
|
|
13
13
|
}),
|