@dxos/protocols 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/src/index.d.ts +1 -0
  2. package/dist/src/index.d.ts.map +1 -0
  3. package/dist/src/index.js +5 -0
  4. package/dist/src/index.js.map +1 -0
  5. package/dist/src/proto/gen/dxos/bot.d.ts +109 -0
  6. package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -0
  7. package/dist/src/proto/gen/dxos/bot.js +14 -0
  8. package/dist/src/proto/gen/dxos/bot.js.map +1 -0
  9. package/dist/src/proto/gen/dxos/client.d.ts +179 -0
  10. package/dist/src/proto/gen/dxos/client.d.ts.map +1 -0
  11. package/dist/src/proto/gen/dxos/client.js +11 -0
  12. package/dist/src/proto/gen/dxos/client.js.map +1 -0
  13. package/dist/src/proto/gen/dxos/config.d.ts +210 -0
  14. package/dist/src/proto/gen/dxos/config.d.ts.map +1 -0
  15. package/dist/src/proto/gen/dxos/config.js +29 -0
  16. package/dist/src/proto/gen/dxos/config.js.map +1 -0
  17. package/dist/src/proto/gen/dxos/credentials/auth.d.ts +11 -0
  18. package/dist/src/proto/gen/dxos/credentials/auth.d.ts.map +1 -0
  19. package/dist/src/proto/gen/dxos/credentials/auth.js +3 -0
  20. package/dist/src/proto/gen/dxos/credentials/auth.js.map +1 -0
  21. package/dist/src/proto/gen/dxos/credentials/greet.d.ts +39 -0
  22. package/dist/src/proto/gen/dxos/credentials/greet.d.ts.map +1 -0
  23. package/dist/src/proto/gen/dxos/credentials/greet.js +15 -0
  24. package/dist/src/proto/gen/dxos/credentials/greet.js.map +1 -0
  25. package/dist/src/proto/gen/dxos/credentials/identity.d.ts +10 -0
  26. package/dist/src/proto/gen/dxos/credentials/identity.d.ts.map +1 -0
  27. package/dist/src/proto/gen/dxos/credentials/identity.js +3 -0
  28. package/dist/src/proto/gen/dxos/credentials/identity.js.map +1 -0
  29. package/dist/src/proto/gen/dxos/credentials/party.d.ts +49 -0
  30. package/dist/src/proto/gen/dxos/credentials/party.d.ts.map +1 -0
  31. package/dist/src/proto/gen/dxos/credentials/party.js +15 -0
  32. package/dist/src/proto/gen/dxos/credentials/party.js.map +1 -0
  33. package/dist/src/proto/gen/dxos/credentials.d.ts +25 -0
  34. package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -0
  35. package/dist/src/proto/gen/dxos/credentials.js +3 -0
  36. package/dist/src/proto/gen/dxos/credentials.js.map +1 -0
  37. package/dist/src/proto/gen/dxos/devtools.d.ts +196 -0
  38. package/dist/src/proto/gen/dxos/devtools.d.ts.map +1 -0
  39. package/dist/src/proto/gen/dxos/devtools.js +3 -0
  40. package/dist/src/proto/gen/dxos/devtools.js.map +1 -0
  41. package/dist/src/proto/gen/dxos/echo/feed.d.ts +69 -0
  42. package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -0
  43. package/dist/src/proto/gen/dxos/echo/feed.js +13 -0
  44. package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -0
  45. package/dist/src/proto/gen/dxos/echo/invitation.d.ts +20 -0
  46. package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -0
  47. package/dist/src/proto/gen/dxos/echo/invitation.js +12 -0
  48. package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -0
  49. package/dist/src/proto/gen/dxos/echo/metadata.d.ts +19 -0
  50. package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -0
  51. package/dist/src/proto/gen/dxos/echo/metadata.js +3 -0
  52. package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -0
  53. package/dist/src/proto/gen/dxos/echo/service.d.ts +47 -0
  54. package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -0
  55. package/dist/src/proto/gen/dxos/echo/service.js +3 -0
  56. package/dist/src/proto/gen/dxos/echo/service.js.map +1 -0
  57. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +51 -0
  58. package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -0
  59. package/dist/src/proto/gen/dxos/echo/snapshot.js +3 -0
  60. package/dist/src/proto/gen/dxos/echo/snapshot.js.map +1 -0
  61. package/dist/src/proto/gen/dxos/halo/keys.d.ts +59 -0
  62. package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -0
  63. package/dist/src/proto/gen/dxos/halo/keys.js +13 -0
  64. package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -0
  65. package/dist/src/proto/gen/dxos/rpc.d.ts +41 -0
  66. package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -0
  67. package/dist/src/proto/gen/dxos/rpc.js +12 -0
  68. package/dist/src/proto/gen/dxos/rpc.js.map +1 -0
  69. package/dist/src/proto/gen/google/protobuf.d.ts +277 -0
  70. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -0
  71. package/dist/src/proto/gen/google/protobuf.js +58 -0
  72. package/dist/src/proto/gen/google/protobuf.js.map +1 -0
  73. package/dist/src/proto/gen/index.d.ts +249 -0
  74. package/dist/src/proto/gen/index.d.ts.map +1 -0
  75. package/dist/src/proto/gen/index.js +7 -0
  76. package/dist/src/proto/gen/index.js.map +1 -0
  77. package/dist/tsconfig.tsbuildinfo +1 -0
  78. package/package.json +35 -0
  79. package/src/index.ts +3 -0
  80. package/src/proto/dxos/bot.proto +120 -0
  81. package/src/proto/dxos/client.proto +237 -0
  82. package/src/proto/dxos/config.proto +254 -0
  83. package/src/proto/dxos/devtools.proto +271 -0
  84. package/src/proto/dxos/echo/feed.proto +93 -0
  85. package/src/proto/dxos/echo/invitation.proto +29 -0
  86. package/src/proto/dxos/echo/metadata.proto +30 -0
  87. package/src/proto/dxos/echo/service.proto +64 -0
  88. package/src/proto/dxos/echo/snapshot.proto +88 -0
  89. package/src/proto/dxos/halo/auth.proto +20 -0
  90. package/src/proto/dxos/halo/greet.proto +125 -0
  91. package/src/proto/dxos/halo/identity.proto +24 -0
  92. package/src/proto/dxos/halo/keys.proto +88 -0
  93. package/src/proto/dxos/halo/party.proto +127 -0
  94. package/src/proto/dxos/halo/signed.proto +42 -0
  95. package/src/proto/dxos/rpc.proto +59 -0
  96. package/src/proto/gen/dxos/bot.ts +120 -0
  97. package/src/proto/gen/dxos/client.ts +190 -0
  98. package/src/proto/gen/dxos/config.ts +225 -0
  99. package/src/proto/gen/dxos/credentials/auth.ts +26 -0
  100. package/src/proto/gen/dxos/credentials/greet.ts +53 -0
  101. package/src/proto/gen/dxos/credentials/identity.ts +25 -0
  102. package/src/proto/gen/dxos/credentials/party.ts +63 -0
  103. package/src/proto/gen/dxos/credentials.ts +39 -0
  104. package/src/proto/gen/dxos/devtools.ts +206 -0
  105. package/src/proto/gen/dxos/echo/feed.ts +84 -0
  106. package/src/proto/gen/dxos/echo/invitation.ts +36 -0
  107. package/src/proto/gen/dxos/echo/metadata.ts +33 -0
  108. package/src/proto/gen/dxos/echo/service.ts +59 -0
  109. package/src/proto/gen/dxos/echo/snapshot.ts +66 -0
  110. package/src/proto/gen/dxos/halo/keys.ts +74 -0
  111. package/src/proto/gen/dxos/rpc.ts +56 -0
  112. package/src/proto/gen/google/protobuf.ts +293 -0
  113. package/src/proto/gen/index.ts +248 -0
@@ -0,0 +1,206 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "./bot";
3
+ import * as dxos_client from "./client";
4
+ import * as dxos_config from "./config";
5
+ import * as dxos_credentials from "./credentials";
6
+ import * as dxos_credentials_auth from "./credentials/auth";
7
+ import * as dxos_credentials_greet from "./credentials/greet";
8
+ import * as dxos_credentials_identity from "./credentials/identity";
9
+ import * as dxos_credentials_party from "./credentials/party";
10
+ import * as dxos_echo_feed from "./echo/feed";
11
+ import * as dxos_echo_invitation from "./echo/invitation";
12
+ import * as dxos_echo_metadata from "./echo/metadata";
13
+ import * as dxos_echo_service from "./echo/service";
14
+ import * as dxos_echo_snapshot from "./echo/snapshot";
15
+ import * as dxos_halo_keys from "./halo/keys";
16
+ import * as dxos_rpc from "./rpc";
17
+ import * as google_protobuf from "../google/protobuf";
18
+ export interface DevtoolsHost {
19
+ events: (request: void) => Stream<Event>;
20
+ getConfig: (request: void) => Promise<GetConfigResponse>;
21
+ resetStorage: (request: ResetStorageRequest) => Promise<void>;
22
+ enableDebugLogging: (request: EnableDebugLoggingRequest) => Promise<EnableDebugLoggingResponse>;
23
+ disableDebugLogging: (request: EnableDebugLoggingRequest) => Promise<EnableDebugLoggingResponse>;
24
+ subscribeToKeyringKeys: (request: SubscribeToKeyringKeysRequest) => Stream<SubscribeToKeyringKeysResponse>;
25
+ subscribeToCredentialMessages: (request: SubscribeToCredentialMessagesRequest) => Stream<SubscribeToCredentialMessagesResponse>;
26
+ subscribeToParties: (request: SubscribeToPartiesRequest) => Stream<SubscribeToPartiesResponse>;
27
+ subscribeToItems: (request: SubscribeToItemsRequest) => Stream<SubscribeToItemsResponse>;
28
+ subscribeToFeeds: (request: SubscribeToFeedsRequest) => Stream<SubscribeToFeedsResponse>;
29
+ subscribeToFeed: (request: SubscribeToFeedRequest) => Stream<SubscribeToFeedResponse>;
30
+ getPartySnapshot: (request: GetPartySnapshotRequest) => Promise<GetPartySnapshotResponse>;
31
+ savePartySnapshot: (request: SavePartySnapshotRequest) => Promise<SavePartySnapshotResponse>;
32
+ clearSnapshots: (request: ClearSnapshotsRequest) => Promise<void>;
33
+ getNetworkPeers: (request: GetNetworkPeersRequest) => Promise<GetNetworkPeersResponse>;
34
+ subscribeToNetworkTopics: (request: void) => Stream<SubscribeToNetworkTopicsResponse>;
35
+ subscribeToSignalStatus: (request: void) => Stream<SubscribeToSignalStatusResponse>;
36
+ subscribeToSignalTrace: (request: void) => Stream<SubscribeToSignalTraceResponse>;
37
+ subscribeToSwarmInfo: (request: SubscribeToSwarmInfoRequest) => Stream<SubscribeToSwarmInfoResponse>;
38
+ }
39
+ export interface Event {
40
+ ready?: ReadyEvent;
41
+ }
42
+ export interface ReadyEvent {
43
+ }
44
+ export interface GetConfigResponse {
45
+ config?: string;
46
+ }
47
+ export interface EnableDebugLoggingRequest {
48
+ namespaces?: string;
49
+ }
50
+ export interface EnableDebugLoggingResponse {
51
+ enabledNamespaces?: string;
52
+ }
53
+ export interface DisableDebugLoggingRequest {
54
+ namespaces?: string;
55
+ }
56
+ export interface DisableDebugLoggingResponse {
57
+ enabledNamespaces?: string;
58
+ }
59
+ export interface SubscribeToKeyringKeysRequest {
60
+ }
61
+ export interface SubscribeToKeyringKeysResponse {
62
+ keys?: dxos_halo_keys.KeyRecord[];
63
+ }
64
+ export interface SubscribeToCredentialMessagesRequest {
65
+ partyKey?: dxos_halo_keys.PubKey;
66
+ }
67
+ export interface SubscribeToCredentialMessagesResponse {
68
+ messages?: dxos_credentials.SignedMessage[];
69
+ }
70
+ export interface ResetStorageRequest {
71
+ }
72
+ export interface GetNetworkPeersRequest {
73
+ topic?: Uint8Array;
74
+ }
75
+ export interface GetNetworkPeersResponse {
76
+ peers?: GetNetworkPeersResponse.PeerInfo[];
77
+ }
78
+ export namespace GetNetworkPeersResponse {
79
+ export interface PeerInfo {
80
+ id?: dxos_halo_keys.PubKey;
81
+ state?: string;
82
+ connections?: Uint8Array[];
83
+ }
84
+ }
85
+ export interface SubscribeToPartiesRequest {
86
+ }
87
+ export interface SubscribeToPartiesResponse {
88
+ parties?: SubscribeToPartiesResponse.PartyInfo[];
89
+ }
90
+ export namespace SubscribeToPartiesResponse {
91
+ export interface PartyInfo {
92
+ key?: string;
93
+ isOpen?: boolean;
94
+ isActive?: boolean;
95
+ feedKeys?: number;
96
+ properties?: Partial<Record<string, string>>;
97
+ timeframe?: dxos_echo_feed.TimeframeVector;
98
+ }
99
+ }
100
+ export interface SubscribeToItemsRequest {
101
+ }
102
+ export interface SubscribeToItemsResponse {
103
+ data?: string;
104
+ }
105
+ export interface SubscribeToFeedsRequest {
106
+ }
107
+ export interface SubscribeToFeedsResponse {
108
+ parties?: SubscribeToFeedsResponse.Party[];
109
+ }
110
+ export namespace SubscribeToFeedsResponse {
111
+ export interface Party {
112
+ key?: dxos_halo_keys.PubKey;
113
+ feeds?: dxos_halo_keys.PubKey[];
114
+ }
115
+ }
116
+ export interface SubscribeToFeedRequest {
117
+ partyKey?: dxos_halo_keys.PubKey;
118
+ feedKey?: dxos_halo_keys.PubKey;
119
+ }
120
+ export interface SubscribeToFeedResponse {
121
+ blocks?: SubscribeToFeedResponse.EchoFeedBlock[];
122
+ }
123
+ export namespace SubscribeToFeedResponse {
124
+ export interface EchoFeedBlock {
125
+ key?: Uint8Array;
126
+ seq?: number;
127
+ sync?: boolean;
128
+ path?: string;
129
+ data?: dxos_echo_feed.FeedMessage;
130
+ }
131
+ }
132
+ export interface GetPartySnapshotRequest {
133
+ partyKey: dxos_halo_keys.PubKey;
134
+ }
135
+ export interface GetPartySnapshotResponse {
136
+ snapshot?: dxos_echo_snapshot.PartySnapshot;
137
+ }
138
+ export interface SavePartySnapshotRequest {
139
+ partyKey: dxos_halo_keys.PubKey;
140
+ }
141
+ export interface SavePartySnapshotResponse {
142
+ snapshot?: dxos_echo_snapshot.PartySnapshot;
143
+ }
144
+ export interface ClearSnapshotsRequest {
145
+ }
146
+ export interface SubscribeToNetworkTopicsResponse {
147
+ topics?: SubscribeToNetworkTopicsResponse.Topic[];
148
+ }
149
+ export namespace SubscribeToNetworkTopicsResponse {
150
+ export interface Topic {
151
+ topic?: dxos_halo_keys.PubKey;
152
+ label?: string;
153
+ }
154
+ }
155
+ export interface SubscribeToSignalStatusResponse {
156
+ servers?: SubscribeToSignalStatusResponse.SignalServer[];
157
+ }
158
+ export namespace SubscribeToSignalStatusResponse {
159
+ export interface SignalServer {
160
+ host?: string;
161
+ state?: string;
162
+ error?: string;
163
+ reconnectIn?: number;
164
+ connectionStarted?: number;
165
+ lastStateChange?: number;
166
+ }
167
+ }
168
+ export interface SubscribeToSignalTraceResponse {
169
+ events?: string[];
170
+ }
171
+ export interface SubscribeToSwarmInfoRequest {
172
+ }
173
+ export interface SubscribeToSwarmInfoResponse {
174
+ data?: SubscribeToSwarmInfoResponse.SwarmInfo[];
175
+ }
176
+ export namespace SubscribeToSwarmInfoResponse {
177
+ export interface SwarmInfo {
178
+ id?: dxos_halo_keys.PubKey;
179
+ topic?: dxos_halo_keys.PubKey;
180
+ label?: string;
181
+ isActive?: boolean;
182
+ connections?: SubscribeToSwarmInfoResponse.SwarmInfo.ConnectionInfo[];
183
+ }
184
+ export namespace SwarmInfo {
185
+ export interface ConnectionInfo {
186
+ state?: string;
187
+ sessionId?: dxos_halo_keys.PubKey;
188
+ remotePeerId?: dxos_halo_keys.PubKey;
189
+ transport?: string;
190
+ protocolExtensions?: string[];
191
+ events?: SubscribeToSwarmInfoResponse.SwarmInfo.ConnectionInfo.Json[];
192
+ }
193
+ export namespace ConnectionInfo {
194
+ export interface Json {
195
+ data?: string;
196
+ }
197
+ }
198
+ }
199
+ }
200
+ export interface SetTracingOptionsRequest {
201
+ enable?: boolean;
202
+ }
203
+ export interface TracingService {
204
+ setTracingOptions: (request: SetTracingOptionsRequest) => Promise<void>;
205
+ subscribeToRpcTrace: (request: void) => Stream<dxos_rpc.RpcMessage>;
206
+ }
@@ -0,0 +1,84 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_invitation from "./invitation";
12
+ import * as dxos_echo_metadata from "./metadata";
13
+ import * as dxos_echo_service from "./service";
14
+ import * as dxos_echo_snapshot from "./snapshot";
15
+ import * as dxos_halo_keys from "../halo/keys";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ /**
19
+ * Outer message type decoded by Codec.
20
+ * This is what is written to the feeds.
21
+ */
22
+ export interface FeedMessage {
23
+ halo?: CredentialsMessage;
24
+ echo?: EchoEnvelope;
25
+ }
26
+ /**
27
+ * A container for dxos.credentials.Message
28
+ */
29
+ export interface CredentialsMessage {
30
+ data?: Uint8Array;
31
+ }
32
+ /**
33
+ * Vector timestamp used to order messages.
34
+ */
35
+ export interface TimeframeVector {
36
+ frames?: TimeframeVector.Frame[];
37
+ }
38
+ export namespace TimeframeVector {
39
+ export interface Frame {
40
+ feedKey?: Uint8Array;
41
+ seq?: number;
42
+ }
43
+ }
44
+ /**
45
+ * Wrapper for all ECHO messages.
46
+ */
47
+ export interface EchoEnvelope {
48
+ itemId?: string;
49
+ timeframe?: TimeframeVector;
50
+ genesis?: ItemGenesis;
51
+ itemMutation?: ItemMutation;
52
+ mutation?: Uint8Array;
53
+ /**
54
+ * Set the model to the provided snapshot.
55
+ */
56
+ snapshot?: dxos_echo_snapshot.ModelSnapshot;
57
+ }
58
+ export interface LinkData {
59
+ source?: string;
60
+ target?: string;
61
+ }
62
+ /**
63
+ * Item creation.
64
+ */
65
+ export interface ItemGenesis {
66
+ itemType?: string;
67
+ modelType?: string;
68
+ modelVersion?: string;
69
+ link?: LinkData;
70
+ }
71
+ /**
72
+ * Item mutation.
73
+ */
74
+ export interface ItemMutation {
75
+ parentId?: string;
76
+ action?: ItemMutation.Action;
77
+ }
78
+ export namespace ItemMutation {
79
+ export enum Action {
80
+ NOOP = 0,
81
+ DELETE = 1,
82
+ RESTORE = 2
83
+ }
84
+ }
@@ -0,0 +1,36 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_feed from "./feed";
12
+ import * as dxos_echo_metadata from "./metadata";
13
+ import * as dxos_echo_service from "./service";
14
+ import * as dxos_echo_snapshot from "./snapshot";
15
+ import * as dxos_halo_keys from "../halo/keys";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ export interface InvitationDescriptor {
19
+ type?: InvitationDescriptor.Type;
20
+ swarmKey?: Uint8Array;
21
+ invitation?: Uint8Array;
22
+ /**
23
+ * Only present if type == OFFLINE.
24
+ */
25
+ identityKey?: Uint8Array;
26
+ /**
27
+ * Must be stripped out when passing to another peer.
28
+ */
29
+ secret?: Uint8Array;
30
+ }
31
+ export namespace InvitationDescriptor {
32
+ export enum Type {
33
+ INTERACTIVE = 1,
34
+ OFFLINE = 2
35
+ }
36
+ }
@@ -0,0 +1,33 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_feed from "./feed";
12
+ import * as dxos_echo_invitation from "./invitation";
13
+ import * as dxos_echo_service from "./service";
14
+ import * as dxos_echo_snapshot from "./snapshot";
15
+ import * as dxos_halo_keys from "../halo/keys";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ export interface EchoMetadata {
19
+ /**
20
+ * Version number that is inceremnted every time there's a breaking change to the storage schema.
21
+ *
22
+ * This is used to detect if the storage schema has changed since the last time the client was run.
23
+ * Loading data from a different version will might result in an error.
24
+ */
25
+ version?: number;
26
+ parties?: PartyMetadata[];
27
+ created?: google_protobuf.Timestamp;
28
+ updated?: google_protobuf.Timestamp;
29
+ }
30
+ export interface PartyMetadata {
31
+ key?: dxos_halo_keys.PubKey;
32
+ feedKeys?: dxos_halo_keys.PubKey[];
33
+ }
@@ -0,0 +1,59 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_feed from "./feed";
12
+ import * as dxos_echo_invitation from "./invitation";
13
+ import * as dxos_echo_metadata from "./metadata";
14
+ import * as dxos_echo_snapshot from "./snapshot";
15
+ import * as dxos_halo_keys from "../halo/keys";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ export interface SubscribeEntitySetRequest {
19
+ partyKey?: dxos_halo_keys.PubKey;
20
+ }
21
+ export interface SubscribeEntitySetResponse {
22
+ added?: dxos_echo_feed.EchoEnvelope[];
23
+ deleted?: dxos_echo_feed.EchoEnvelope[];
24
+ }
25
+ export interface SubscribeEntityStreamRequest {
26
+ partyKey?: dxos_halo_keys.PubKey;
27
+ itemId?: string;
28
+ }
29
+ export interface SubscribeEntityStreamResponse {
30
+ snapshot?: dxos_echo_snapshot.ItemSnapshot;
31
+ mutation?: SubscribeEntityStreamResponse.Mutation;
32
+ }
33
+ export namespace SubscribeEntityStreamResponse {
34
+ export interface Mutation {
35
+ data?: dxos_echo_feed.EchoEnvelope;
36
+ meta?: SubscribeEntityStreamResponse.Mutation.Metadata;
37
+ }
38
+ export namespace Mutation {
39
+ export interface Metadata {
40
+ feedKey?: dxos_halo_keys.PubKey;
41
+ memberKey?: dxos_halo_keys.PubKey;
42
+ seq?: number;
43
+ timeframe?: dxos_echo_feed.TimeframeVector;
44
+ }
45
+ }
46
+ }
47
+ export interface WriteRequest {
48
+ partyKey?: dxos_halo_keys.PubKey;
49
+ mutation?: dxos_echo_feed.EchoEnvelope;
50
+ }
51
+ export interface MutationReceipt {
52
+ feedKey?: dxos_halo_keys.PubKey;
53
+ seq?: number;
54
+ }
55
+ export interface DataService {
56
+ subscribeEntitySet: (request: SubscribeEntitySetRequest) => Stream<SubscribeEntitySetResponse>;
57
+ subscribeEntityStream: (request: SubscribeEntityStreamRequest) => Stream<SubscribeEntityStreamResponse>;
58
+ write: (request: WriteRequest) => Promise<MutationReceipt>;
59
+ }
@@ -0,0 +1,66 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_feed from "./feed";
12
+ import * as dxos_echo_invitation from "./invitation";
13
+ import * as dxos_echo_metadata from "./metadata";
14
+ import * as dxos_echo_service from "./service";
15
+ import * as dxos_halo_keys from "../halo/keys";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ export interface PartySnapshot {
19
+ partyKey?: Uint8Array;
20
+ timeframe?: dxos_echo_feed.TimeframeVector;
21
+ timestamp?: number;
22
+ halo?: HaloStateSnapshot;
23
+ database?: DatabaseSnapshot;
24
+ }
25
+ export interface DatabaseSnapshot {
26
+ items?: ItemSnapshot[];
27
+ }
28
+ export interface HaloStateSnapshot {
29
+ messages?: dxos_echo_feed.CredentialsMessage[];
30
+ }
31
+ export interface ItemSnapshot {
32
+ itemId?: string;
33
+ itemType?: string;
34
+ modelType?: string;
35
+ modelVersion?: string;
36
+ parentId?: string;
37
+ model?: ModelSnapshot;
38
+ }
39
+ /**
40
+ * Represents the reified state of a state machine.
41
+ * The snapshots make consist of a custom snapshot object and/or a list of mutations
42
+ * that are applied to the snapshot or the initial state.
43
+ */
44
+ export interface ModelSnapshot {
45
+ /**
46
+ * Encoded model snapshot (defined by the model's codec).
47
+ * If undefined the state machine will be initialized with it's default state.
48
+ *
49
+ * Options:
50
+ * - proto3_optional = true
51
+ */
52
+ snapshot?: Uint8Array;
53
+ /**
54
+ * Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.
55
+ */
56
+ mutations?: ModelMutation[];
57
+ }
58
+ export interface ModelMutation {
59
+ mutation: Uint8Array;
60
+ meta: ModelMutationMeta;
61
+ }
62
+ export interface ModelMutationMeta {
63
+ feedKey: Uint8Array;
64
+ seq: number;
65
+ memberKey: Uint8Array;
66
+ }
@@ -0,0 +1,74 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "../bot";
3
+ import * as dxos_client from "../client";
4
+ import * as dxos_config from "../config";
5
+ import * as dxos_credentials from "../credentials";
6
+ import * as dxos_credentials_auth from "../credentials/auth";
7
+ import * as dxos_credentials_greet from "../credentials/greet";
8
+ import * as dxos_credentials_identity from "../credentials/identity";
9
+ import * as dxos_credentials_party from "../credentials/party";
10
+ import * as dxos_devtools from "../devtools";
11
+ import * as dxos_echo_feed from "../echo/feed";
12
+ import * as dxos_echo_invitation from "../echo/invitation";
13
+ import * as dxos_echo_metadata from "../echo/metadata";
14
+ import * as dxos_echo_service from "../echo/service";
15
+ import * as dxos_echo_snapshot from "../echo/snapshot";
16
+ import * as dxos_rpc from "../rpc";
17
+ import * as google_protobuf from "../../google/protobuf";
18
+ export enum KeyType {
19
+ UNKNOWN = 0,
20
+ IDENTITY = 1,
21
+ DEVICE = 2,
22
+ PARTY = 3,
23
+ FEED = 4,
24
+ DXNS_ADDRESS = 5
25
+ }
26
+ export interface PubKey {
27
+ data?: Uint8Array;
28
+ }
29
+ export interface PrivKey {
30
+ data?: Uint8Array;
31
+ }
32
+ export interface KeyRecord {
33
+ /**
34
+ * - The `KeyType` type of the key. This is often unknown for keys from other sources.
35
+ */
36
+ type: KeyType;
37
+ /**
38
+ * - The public key as a Buffer (required).
39
+ */
40
+ publicKey: PubKey;
41
+ /**
42
+ * - The secret key as a Buffer (this will never be visible outside the Keyring).
43
+ */
44
+ secretKey?: PrivKey;
45
+ /**
46
+ * - Is this key from a Greeting "hint"?
47
+ */
48
+ hint?: boolean;
49
+ /**
50
+ * - Is this our key? Usually true if `secretKey` is present,
51
+ * may be false for "inception keys" such as the Party key.
52
+ */
53
+ own?: boolean;
54
+ /**
55
+ * - Is this key to be trusted?
56
+ */
57
+ trusted?: boolean;
58
+ /**
59
+ * - An RFC-3339 date/time string for when the key was added to the Keyring.
60
+ */
61
+ added?: string;
62
+ /**
63
+ * - An RFC-3339 date/time string for when the key was created.
64
+ */
65
+ created?: string;
66
+ }
67
+ export interface KeyRecordList {
68
+ keys?: KeyRecord[];
69
+ }
70
+ export interface KeyChain {
71
+ publicKey: PubKey;
72
+ message: dxos_credentials.SignedMessage;
73
+ parents?: KeyChain[];
74
+ }
@@ -0,0 +1,56 @@
1
+ import type { Stream } from "@dxos/codec-protobuf";
2
+ import * as dxos_bot from "./bot";
3
+ import * as dxos_client from "./client";
4
+ import * as dxos_config from "./config";
5
+ import * as dxos_credentials from "./credentials";
6
+ import * as dxos_credentials_auth from "./credentials/auth";
7
+ import * as dxos_credentials_greet from "./credentials/greet";
8
+ import * as dxos_credentials_identity from "./credentials/identity";
9
+ import * as dxos_credentials_party from "./credentials/party";
10
+ import * as dxos_devtools from "./devtools";
11
+ import * as dxos_echo_feed from "./echo/feed";
12
+ import * as dxos_echo_invitation from "./echo/invitation";
13
+ import * as dxos_echo_metadata from "./echo/metadata";
14
+ import * as dxos_echo_service from "./echo/service";
15
+ import * as dxos_echo_snapshot from "./echo/snapshot";
16
+ import * as dxos_halo_keys from "./halo/keys";
17
+ import * as google_protobuf from "../google/protobuf";
18
+ export interface RpcMessage {
19
+ request?: Request;
20
+ response?: Response;
21
+ /**
22
+ * Means that the node is open to receiving requests. Second stage of the hasnshake protocol.
23
+ */
24
+ open?: boolean;
25
+ streamClose?: StreamClose;
26
+ }
27
+ export interface Request {
28
+ id?: number;
29
+ method?: string;
30
+ payload?: google_protobuf.Any;
31
+ stream?: boolean;
32
+ }
33
+ export interface Response {
34
+ id?: number;
35
+ payload?: google_protobuf.Any;
36
+ error?: Error;
37
+ close?: boolean;
38
+ }
39
+ export interface StreamClose {
40
+ id?: number;
41
+ }
42
+ export interface Error {
43
+ name?: string;
44
+ message?: string;
45
+ stack?: string;
46
+ }
47
+ export interface MessageTrace {
48
+ direction?: MessageTrace.Direction;
49
+ data?: Uint8Array;
50
+ }
51
+ export namespace MessageTrace {
52
+ export enum Direction {
53
+ INCOMING = 0,
54
+ OUTGOING = 1
55
+ }
56
+ }