@dxos/protocols 0.8.4-main.ead640a → 0.8.4-main.ef1bc66f44
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/FeedProtocol.d.ts +528 -0
- package/dist/src/FeedProtocol.d.ts.map +1 -0
- package/dist/src/FeedProtocol.js +237 -0
- package/dist/src/FeedProtocol.js.map +1 -0
- package/dist/src/FunctionProtocol.d.ts +82 -0
- package/dist/src/FunctionProtocol.d.ts.map +1 -0
- package/dist/src/FunctionProtocol.js +4 -0
- package/dist/src/FunctionProtocol.js.map +1 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +189 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +39 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
- package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +5 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js +5 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +4 -0
- package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +1 -0
- package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
- package/dist/src/codec.test.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +120 -0
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
- package/dist/src/edge/EdgeFunctionEnv.js +4 -0
- package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
- package/dist/src/{edge.d.ts → edge/edge.d.ts} +117 -10
- package/dist/src/edge/edge.d.ts.map +1 -0
- package/dist/src/edge/edge.js +169 -0
- package/dist/src/edge/edge.js.map +1 -0
- package/dist/src/edge/errors.d.ts +29 -0
- package/dist/src/edge/errors.d.ts.map +1 -0
- package/dist/src/edge/errors.js +69 -0
- package/dist/src/edge/errors.js.map +1 -0
- package/dist/src/edge/index.d.ts +4 -0
- package/dist/src/edge/index.d.ts.map +1 -0
- package/dist/src/edge/index.js +7 -0
- package/dist/src/edge/index.js.map +1 -0
- package/dist/src/errors/base-errors.d.ts +86 -8
- package/dist/src/errors/base-errors.d.ts.map +1 -1
- package/dist/src/errors/base-errors.js +4 -20
- package/dist/src/errors/base-errors.js.map +1 -1
- package/dist/src/errors/encoding.d.ts +2 -2
- package/dist/src/errors/encoding.d.ts.map +1 -1
- package/dist/src/errors/encoding.js +1 -1
- package/dist/src/errors/errors.d.ts +619 -42
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/errors/errors.js +50 -104
- package/dist/src/errors/errors.js.map +1 -1
- package/dist/src/errors/errors.test.js +2 -2
- package/dist/src/errors/errors.test.js.map +1 -1
- package/dist/src/errors/helpers.d.ts +9 -5
- package/dist/src/errors/helpers.d.ts.map +1 -1
- package/dist/src/errors/helpers.js +3 -3
- package/dist/src/errors/helpers.js.map +1 -1
- package/dist/src/errors/index.d.ts +5 -5
- package/dist/src/errors/index.js +5 -5
- package/dist/src/feed-replication.d.ts.map +1 -1
- package/dist/src/index.d.ts +12 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/indexing.test.js +1 -1
- package/dist/src/messenger.d.ts +16 -0
- package/dist/src/messenger.d.ts.map +1 -0
- package/dist/src/messenger.js +4 -0
- package/dist/src/messenger.js.map +1 -0
- package/dist/src/proto/gen/dxos/client/services.d.ts +256 -152
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.js +28 -27
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +5 -0
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/config.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/query.d.ts +17 -1
- package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/index.d.ts +8 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/src/proto/index.d.ts +2 -2
- package/dist/src/proto/index.js +1 -1
- package/dist/src/proto/types.d.ts +1 -1
- package/dist/src/types.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -15
- package/src/FeedProtocol.ts +319 -0
- package/src/FunctionProtocol.ts +104 -0
- package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/queue_pb.ts +231 -0
- package/src/buf/proto/gen/dxos/client/services_pb.ts +7 -2
- package/src/buf/proto/gen/dxos/config_pb.ts +7 -2
- package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/query_pb.ts +16 -4
- package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
- package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/iframe_pb.ts +2 -1
- package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/rpc_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/tracing_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
- package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
- package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
- package/src/codec.test.ts +1 -1
- package/src/edge/EdgeFunctionEnv.ts +193 -0
- package/src/edge/edge.ts +493 -0
- package/src/edge/errors.ts +85 -0
- package/src/edge/index.ts +7 -0
- package/src/errors/base-errors.ts +4 -22
- package/src/errors/encoding.ts +2 -2
- package/src/errors/errors.test.ts +2 -2
- package/src/errors/errors.ts +57 -123
- package/src/errors/helpers.ts +6 -7
- package/src/errors/index.ts +5 -5
- package/src/feed-replication.ts +1 -0
- package/src/index.ts +12 -12
- package/src/indexing.test.ts +1 -1
- package/src/messenger.ts +22 -0
- package/src/proto/dxos/client/queue.proto +67 -0
- package/src/proto/dxos/client/services.proto +1 -0
- package/src/proto/dxos/config.proto +2 -0
- package/src/proto/dxos/echo/query.proto +4 -1
- package/src/proto/dxos/echo/service.proto +27 -6
- package/src/proto/dxos/iframe.proto +1 -0
- package/src/proto/gen/dxos/client/services.ts +256 -152
- package/src/proto/gen/dxos/config.ts +5 -0
- package/src/proto/gen/dxos/echo/query.ts +17 -1
- package/src/proto/gen/dxos/echo/service.ts +33 -8
- package/src/proto/gen/index.ts +9 -1
- package/src/proto/index.ts +2 -2
- package/src/proto/types.ts +1 -1
- package/src/types.ts +2 -2
- package/dist/src/edge-error.d.ts +0 -26
- package/dist/src/edge-error.d.ts.map +0 -1
- package/dist/src/edge-error.js +0 -102
- package/dist/src/edge-error.js.map +0 -1
- package/dist/src/edge.d.ts.map +0 -1
- package/dist/src/edge.js +0 -49
- package/dist/src/edge.js.map +0 -1
- package/dist/src/query.d.ts +0 -5
- package/dist/src/query.d.ts.map +0 -1
- package/dist/src/query.js +0 -8
- package/dist/src/query.js.map +0 -1
- package/dist/src/queue.d.ts +0 -28
- package/dist/src/queue.d.ts.map +0 -1
- package/dist/src/queue.js +0 -8
- package/dist/src/queue.js.map +0 -1
- package/src/edge-error.ts +0 -134
- package/src/edge.ts +0 -279
- package/src/query.ts +0 -8
- package/src/queue.ts +0 -38
|
@@ -6,6 +6,7 @@ syntax = "proto3";
|
|
|
6
6
|
|
|
7
7
|
import "dxos/keys.proto";
|
|
8
8
|
import "google/protobuf/empty.proto";
|
|
9
|
+
import "google/protobuf/struct.proto";
|
|
9
10
|
|
|
10
11
|
package dxos.echo.service;
|
|
11
12
|
|
|
@@ -61,12 +62,6 @@ message DocumentUpdate {
|
|
|
61
62
|
* Value returned by `Automerge.saveSince()`.
|
|
62
63
|
*/
|
|
63
64
|
bytes mutation = 2;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Set to true for init mutation of document.
|
|
67
|
-
* default: undefined.
|
|
68
|
-
*/
|
|
69
|
-
optional bool is_new = 3;
|
|
70
65
|
}
|
|
71
66
|
|
|
72
67
|
message DocHeadsList {
|
|
@@ -94,6 +89,26 @@ message ReIndexHeadsRequest {
|
|
|
94
89
|
repeated string document_ids = 1;
|
|
95
90
|
}
|
|
96
91
|
|
|
92
|
+
message CreateDocumentRequest {
|
|
93
|
+
/**
|
|
94
|
+
* Space id where the document will be created.
|
|
95
|
+
*/
|
|
96
|
+
string space_id = 1;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Automerge encoded initial document value.
|
|
100
|
+
* Optional - if not provided, an empty document will be created.
|
|
101
|
+
*/
|
|
102
|
+
optional google.protobuf.Struct initial_value = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message CreateDocumentResponse {
|
|
106
|
+
/**
|
|
107
|
+
* The generated document id.
|
|
108
|
+
*/
|
|
109
|
+
string document_id = 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
97
112
|
message GetSpaceSyncStateRequest {
|
|
98
113
|
string space_id = 1;
|
|
99
114
|
}
|
|
@@ -157,6 +172,12 @@ service DataService {
|
|
|
157
172
|
*/
|
|
158
173
|
rpc UpdateSubscription(UpdateSubscriptionRequest) returns (google.protobuf.Empty);
|
|
159
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Create a new automerge document.
|
|
177
|
+
* Returns the generated document id which is controlled by the host.
|
|
178
|
+
*/
|
|
179
|
+
rpc CreateDocument(CreateDocumentRequest) returns (CreateDocumentResponse);
|
|
180
|
+
|
|
160
181
|
/**
|
|
161
182
|
* Write incremental updates to multiple automerge documents.
|
|
162
183
|
* Used to propagate changes from client to services.
|
|
@@ -65,6 +65,198 @@ import * as dxos_value from "../value.js";
|
|
|
65
65
|
import * as example_testing_data from "../../example/testing/data.js";
|
|
66
66
|
import * as example_testing_rpc from "../../example/testing/rpc.js";
|
|
67
67
|
import * as google_protobuf from "../../google/protobuf.js";
|
|
68
|
+
/**
|
|
69
|
+
* Defined in:
|
|
70
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
71
|
+
*/
|
|
72
|
+
export interface AdmissionKeypair {
|
|
73
|
+
publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
74
|
+
/**
|
|
75
|
+
* Options:
|
|
76
|
+
* - proto3_optional = true
|
|
77
|
+
*/
|
|
78
|
+
privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Runtime state of the space object.
|
|
82
|
+
*
|
|
83
|
+
* Defined in:
|
|
84
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
85
|
+
*/
|
|
86
|
+
export enum SpaceState {
|
|
87
|
+
INVALID = 0,
|
|
88
|
+
SPACE_INACTIVE = 2,
|
|
89
|
+
SPACE_ACTIVE = 6,
|
|
90
|
+
SPACE_CLOSED = 1,
|
|
91
|
+
SPACE_CONTROL_ONLY = 7,
|
|
92
|
+
SPACE_INITIALIZING = 4,
|
|
93
|
+
SPACE_READY = 3,
|
|
94
|
+
SPACE_ERROR = 5,
|
|
95
|
+
SPACE_REQUIRES_MIGRATION = 8
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Represents the invitation state passed between client and service.
|
|
99
|
+
*
|
|
100
|
+
* Defined in:
|
|
101
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
102
|
+
*/
|
|
103
|
+
export interface Invitation {
|
|
104
|
+
/**
|
|
105
|
+
* Local identifier (random).
|
|
106
|
+
*/
|
|
107
|
+
invitationId: string;
|
|
108
|
+
/**
|
|
109
|
+
* Determines the behavior of the invitation.
|
|
110
|
+
*/
|
|
111
|
+
type: Invitation.Type;
|
|
112
|
+
/**
|
|
113
|
+
* Kind of access the invitation will grant.
|
|
114
|
+
*/
|
|
115
|
+
kind: Invitation.Kind;
|
|
116
|
+
/**
|
|
117
|
+
* How the invitation is authenticated.
|
|
118
|
+
*/
|
|
119
|
+
authMethod: Invitation.AuthMethod;
|
|
120
|
+
/**
|
|
121
|
+
* Swarm rendezvous (random).
|
|
122
|
+
*/
|
|
123
|
+
swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
124
|
+
/**
|
|
125
|
+
* Local state.
|
|
126
|
+
*/
|
|
127
|
+
state: Invitation.State;
|
|
128
|
+
/**
|
|
129
|
+
* Timeout for guest to complete invitation once connected (ms).
|
|
130
|
+
*
|
|
131
|
+
* Options:
|
|
132
|
+
* - proto3_optional = true
|
|
133
|
+
*/
|
|
134
|
+
timeout?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Guest's identity.
|
|
137
|
+
*
|
|
138
|
+
* Options:
|
|
139
|
+
* - proto3_optional = true
|
|
140
|
+
*/
|
|
141
|
+
identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
142
|
+
/**
|
|
143
|
+
* Space to join (only present if kind is SPACE).
|
|
144
|
+
*
|
|
145
|
+
* Options:
|
|
146
|
+
* - proto3_optional = true
|
|
147
|
+
*/
|
|
148
|
+
spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
149
|
+
/**
|
|
150
|
+
* Authentication code created by host (only present if auth_method is SHARED_SECRET).
|
|
151
|
+
*
|
|
152
|
+
* Options:
|
|
153
|
+
* - proto3_optional = true
|
|
154
|
+
*/
|
|
155
|
+
authCode?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Path or identifier to navigate to after successful authentication.
|
|
158
|
+
*
|
|
159
|
+
* Options:
|
|
160
|
+
* - proto3_optional = true
|
|
161
|
+
*/
|
|
162
|
+
target?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Host should resume invitation on startup until timeout.
|
|
165
|
+
*
|
|
166
|
+
* Options:
|
|
167
|
+
* - proto3_optional = true
|
|
168
|
+
*/
|
|
169
|
+
persistent?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Options:
|
|
172
|
+
* - proto3_optional = true
|
|
173
|
+
*/
|
|
174
|
+
created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
175
|
+
/**
|
|
176
|
+
* Options:
|
|
177
|
+
* - proto3_optional = true
|
|
178
|
+
*/
|
|
179
|
+
lifetime?: number;
|
|
180
|
+
/**
|
|
181
|
+
* Whether an invitation can be used multiple times.
|
|
182
|
+
*
|
|
183
|
+
* Options:
|
|
184
|
+
* - proto3_optional = true
|
|
185
|
+
*/
|
|
186
|
+
multiUse?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Guest's keypair required for AuthMethod.KNOWN_PUBLIC_KEY.
|
|
189
|
+
*
|
|
190
|
+
* Options:
|
|
191
|
+
* - proto3_optional = true
|
|
192
|
+
*/
|
|
193
|
+
guestKeypair?: AdmissionKeypair;
|
|
194
|
+
/**
|
|
195
|
+
* Present on Type.DELEGATED invitations.
|
|
196
|
+
*
|
|
197
|
+
* Options:
|
|
198
|
+
* - proto3_optional = true
|
|
199
|
+
*/
|
|
200
|
+
delegationCredentialId?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
201
|
+
/**
|
|
202
|
+
* Role of the admitted member, defaults to ADMIN.
|
|
203
|
+
*
|
|
204
|
+
* Options:
|
|
205
|
+
* - proto3_optional = true
|
|
206
|
+
*/
|
|
207
|
+
role?: dxos_halo_credentials.SpaceMember.Role;
|
|
208
|
+
/**
|
|
209
|
+
* Id of a the space to join (only present if kind is SPACE).
|
|
210
|
+
*
|
|
211
|
+
* Options:
|
|
212
|
+
* - proto3_optional = true
|
|
213
|
+
*/
|
|
214
|
+
spaceId?: string;
|
|
215
|
+
}
|
|
216
|
+
export namespace Invitation {
|
|
217
|
+
/**
|
|
218
|
+
* Defined in:
|
|
219
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
220
|
+
*/
|
|
221
|
+
export enum Type {
|
|
222
|
+
INTERACTIVE = 0,
|
|
223
|
+
DELEGATED = 1,
|
|
224
|
+
MULTIUSE = 2
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Defined in:
|
|
228
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
229
|
+
*/
|
|
230
|
+
export enum Kind {
|
|
231
|
+
DEVICE = 0,
|
|
232
|
+
SPACE = 1
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Defined in:
|
|
236
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
237
|
+
*/
|
|
238
|
+
export enum AuthMethod {
|
|
239
|
+
NONE = 0,
|
|
240
|
+
SHARED_SECRET = 1,
|
|
241
|
+
KNOWN_PUBLIC_KEY = 2
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Defined in:
|
|
245
|
+
* {@link file://./../../../dxos/client/invitation.proto}
|
|
246
|
+
*/
|
|
247
|
+
export enum State {
|
|
248
|
+
INIT = 0,
|
|
249
|
+
CONNECTING = 1,
|
|
250
|
+
CONNECTED = 2,
|
|
251
|
+
READY_FOR_AUTHENTICATION = 3,
|
|
252
|
+
AUTHENTICATING = 4,
|
|
253
|
+
SUCCESS = 5,
|
|
254
|
+
CANCELLED = 6,
|
|
255
|
+
TIMEOUT = 7,
|
|
256
|
+
ERROR = 8,
|
|
257
|
+
EXPIRED = 9
|
|
258
|
+
}
|
|
259
|
+
}
|
|
68
260
|
/**
|
|
69
261
|
* Defined in:
|
|
70
262
|
* {@link file://./../../../dxos/client/logging.proto}
|
|
@@ -245,195 +437,106 @@ export interface LoggingService {
|
|
|
245
437
|
}
|
|
246
438
|
/**
|
|
247
439
|
* Defined in:
|
|
248
|
-
* {@link file://./../../../dxos/client/
|
|
249
|
-
*/
|
|
250
|
-
export interface AdmissionKeypair {
|
|
251
|
-
publicKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
252
|
-
/**
|
|
253
|
-
* Options:
|
|
254
|
-
* - proto3_optional = true
|
|
255
|
-
*/
|
|
256
|
-
privateKey?: ReturnType<(typeof substitutions)["dxos.keys.PrivateKey"]["decode"]>;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Runtime state of the space object.
|
|
260
|
-
*
|
|
261
|
-
* Defined in:
|
|
262
|
-
* {@link file://./../../../dxos/client/invitation.proto}
|
|
263
|
-
*/
|
|
264
|
-
export enum SpaceState {
|
|
265
|
-
INVALID = 0,
|
|
266
|
-
SPACE_INACTIVE = 2,
|
|
267
|
-
SPACE_ACTIVE = 6,
|
|
268
|
-
SPACE_CLOSED = 1,
|
|
269
|
-
SPACE_CONTROL_ONLY = 7,
|
|
270
|
-
SPACE_INITIALIZING = 4,
|
|
271
|
-
SPACE_READY = 3,
|
|
272
|
-
SPACE_ERROR = 5,
|
|
273
|
-
SPACE_REQUIRES_MIGRATION = 8
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Represents the invitation state passed between client and service.
|
|
277
|
-
*
|
|
278
|
-
* Defined in:
|
|
279
|
-
* {@link file://./../../../dxos/client/invitation.proto}
|
|
440
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
280
441
|
*/
|
|
281
|
-
export interface
|
|
282
|
-
|
|
283
|
-
* Local identifier (random).
|
|
284
|
-
*/
|
|
285
|
-
invitationId: string;
|
|
286
|
-
/**
|
|
287
|
-
* Determines the behavior of the invitation.
|
|
288
|
-
*/
|
|
289
|
-
type: Invitation.Type;
|
|
290
|
-
/**
|
|
291
|
-
* Kind of access the invitation will grant.
|
|
292
|
-
*/
|
|
293
|
-
kind: Invitation.Kind;
|
|
294
|
-
/**
|
|
295
|
-
* How the invitation is authenticated.
|
|
296
|
-
*/
|
|
297
|
-
authMethod: Invitation.AuthMethod;
|
|
298
|
-
/**
|
|
299
|
-
* Swarm rendezvous (random).
|
|
300
|
-
*/
|
|
301
|
-
swarmKey: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
302
|
-
/**
|
|
303
|
-
* Local state.
|
|
304
|
-
*/
|
|
305
|
-
state: Invitation.State;
|
|
306
|
-
/**
|
|
307
|
-
* Timeout for guest to complete invitation once connected (ms).
|
|
308
|
-
*
|
|
309
|
-
* Options:
|
|
310
|
-
* - proto3_optional = true
|
|
311
|
-
*/
|
|
312
|
-
timeout?: number;
|
|
313
|
-
/**
|
|
314
|
-
* Guest's identity.
|
|
315
|
-
*
|
|
316
|
-
* Options:
|
|
317
|
-
* - proto3_optional = true
|
|
318
|
-
*/
|
|
319
|
-
identityKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
320
|
-
/**
|
|
321
|
-
* Space to join (only present if kind is SPACE).
|
|
322
|
-
*
|
|
323
|
-
* Options:
|
|
324
|
-
* - proto3_optional = true
|
|
325
|
-
*/
|
|
326
|
-
spaceKey?: ReturnType<(typeof substitutions)["dxos.keys.PublicKey"]["decode"]>;
|
|
442
|
+
export interface QueueQuery {
|
|
443
|
+
spaceId: string;
|
|
327
444
|
/**
|
|
328
|
-
* Authentication code created by host (only present if auth_method is SHARED_SECRET).
|
|
329
|
-
*
|
|
330
445
|
* Options:
|
|
331
446
|
* - proto3_optional = true
|
|
332
447
|
*/
|
|
333
|
-
|
|
448
|
+
queuesNamespace?: string;
|
|
334
449
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* Options:
|
|
338
|
-
* - proto3_optional = true
|
|
450
|
+
* Queries the whole space if missing.
|
|
339
451
|
*/
|
|
340
|
-
|
|
452
|
+
queueIds?: string[];
|
|
341
453
|
/**
|
|
342
|
-
*
|
|
454
|
+
* Filter items after this cursor. Exclusive.
|
|
343
455
|
*
|
|
344
456
|
* Options:
|
|
345
457
|
* - proto3_optional = true
|
|
346
458
|
*/
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Options:
|
|
350
|
-
* - proto3_optional = true
|
|
351
|
-
*/
|
|
352
|
-
created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
459
|
+
after?: string;
|
|
353
460
|
/**
|
|
354
|
-
*
|
|
355
|
-
* - proto3_optional = true
|
|
356
|
-
*/
|
|
357
|
-
lifetime?: number;
|
|
358
|
-
/**
|
|
359
|
-
* Whether an invitation can be used multiple times.
|
|
461
|
+
* Filter items before this cursor. Exclusive.
|
|
360
462
|
*
|
|
361
463
|
* Options:
|
|
362
464
|
* - proto3_optional = true
|
|
363
465
|
*/
|
|
364
|
-
|
|
466
|
+
before?: string;
|
|
365
467
|
/**
|
|
366
|
-
*
|
|
468
|
+
* Filter items after this position. Inclusive.
|
|
367
469
|
*
|
|
368
470
|
* Options:
|
|
369
471
|
* - proto3_optional = true
|
|
370
472
|
*/
|
|
371
|
-
|
|
473
|
+
beginPosition?: string;
|
|
372
474
|
/**
|
|
373
|
-
*
|
|
475
|
+
* Filter items before this position. Exclusive.
|
|
374
476
|
*
|
|
375
477
|
* Options:
|
|
376
478
|
* - proto3_optional = true
|
|
377
479
|
*/
|
|
378
|
-
|
|
480
|
+
endPosition?: string;
|
|
379
481
|
/**
|
|
380
|
-
* Role of the admitted member, defaults to ADMIN.
|
|
381
|
-
*
|
|
382
482
|
* Options:
|
|
383
483
|
* - proto3_optional = true
|
|
384
484
|
*/
|
|
385
|
-
|
|
485
|
+
limit?: number;
|
|
386
486
|
/**
|
|
387
|
-
* Id of a the space to join (only present if kind is SPACE).
|
|
388
|
-
*
|
|
389
487
|
* Options:
|
|
390
488
|
* - proto3_optional = true
|
|
391
489
|
*/
|
|
392
|
-
|
|
490
|
+
reverse?: boolean;
|
|
491
|
+
objectIds?: string[];
|
|
393
492
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
INTERACTIVE = 0,
|
|
401
|
-
DELEGATED = 1,
|
|
402
|
-
MULTIUSE = 2
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Defined in:
|
|
406
|
-
* {@link file://./../../../dxos/client/invitation.proto}
|
|
407
|
-
*/
|
|
408
|
-
export enum Kind {
|
|
409
|
-
DEVICE = 0,
|
|
410
|
-
SPACE = 1
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Defined in:
|
|
414
|
-
* {@link file://./../../../dxos/client/invitation.proto}
|
|
415
|
-
*/
|
|
416
|
-
export enum AuthMethod {
|
|
417
|
-
NONE = 0,
|
|
418
|
-
SHARED_SECRET = 1,
|
|
419
|
-
KNOWN_PUBLIC_KEY = 2
|
|
420
|
-
}
|
|
493
|
+
/**
|
|
494
|
+
* Defined in:
|
|
495
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
496
|
+
*/
|
|
497
|
+
export interface QueueQueryResult {
|
|
498
|
+
objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
|
|
421
499
|
/**
|
|
422
|
-
*
|
|
423
|
-
* {@link file://./../../../dxos/client/invitation.proto}
|
|
500
|
+
* Cursor to query the next items. Can be passed to `after` in query to keep querying.
|
|
424
501
|
*/
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
502
|
+
nextCursor: string;
|
|
503
|
+
prevCursor: string;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Defined in:
|
|
507
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
508
|
+
*/
|
|
509
|
+
export interface QueryQueueRequest {
|
|
510
|
+
query: QueueQuery;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Defined in:
|
|
514
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
515
|
+
*/
|
|
516
|
+
export interface InsertIntoQueueRequest {
|
|
517
|
+
subspaceTag: string;
|
|
518
|
+
spaceId: string;
|
|
519
|
+
queueId: string;
|
|
520
|
+
objects?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>[];
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Defined in:
|
|
524
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
525
|
+
*/
|
|
526
|
+
export interface DeleteFromQueueRequest {
|
|
527
|
+
subspaceTag: string;
|
|
528
|
+
spaceId: string;
|
|
529
|
+
queueId: string;
|
|
530
|
+
objectIds?: string[];
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Defined in:
|
|
534
|
+
* {@link file://./../../../dxos/client/queue.proto}
|
|
535
|
+
*/
|
|
536
|
+
export interface QueueService {
|
|
537
|
+
queryQueue: (request: QueryQueueRequest, options?: RequestOptions) => Promise<QueueQueryResult>;
|
|
538
|
+
insertIntoQueue: (request: InsertIntoQueueRequest, options?: RequestOptions) => Promise<void>;
|
|
539
|
+
deleteFromQueue: (request: DeleteFromQueueRequest, options?: RequestOptions) => Promise<void>;
|
|
437
540
|
}
|
|
438
541
|
/**
|
|
439
542
|
* Defined in:
|
|
@@ -555,7 +658,8 @@ export namespace Platform {
|
|
|
555
658
|
export enum PLATFORM_TYPE {
|
|
556
659
|
BROWSER = 0,
|
|
557
660
|
SHARED_WORKER = 1,
|
|
558
|
-
NODE = 2
|
|
661
|
+
NODE = 2,
|
|
662
|
+
DEDICATED_WORKER = 3
|
|
559
663
|
}
|
|
560
664
|
}
|
|
561
665
|
/**
|
|
@@ -332,6 +332,11 @@ export namespace Runtime {
|
|
|
332
332
|
* - proto3_optional = true
|
|
333
333
|
*/
|
|
334
334
|
edgeFeatures?: Runtime.Client.EdgeFeatures;
|
|
335
|
+
/**
|
|
336
|
+
* Options:
|
|
337
|
+
* - proto3_optional = true
|
|
338
|
+
*/
|
|
339
|
+
enableLocalQueues?: boolean;
|
|
335
340
|
}
|
|
336
341
|
export namespace Client {
|
|
337
342
|
/**
|
|
@@ -106,9 +106,25 @@ export interface Heads {
|
|
|
106
106
|
export interface QueryResult {
|
|
107
107
|
id: string;
|
|
108
108
|
spaceId: string;
|
|
109
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Options:
|
|
111
|
+
* - proto3_optional = true
|
|
112
|
+
*/
|
|
113
|
+
documentId?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Options:
|
|
116
|
+
* - proto3_optional = true
|
|
117
|
+
*/
|
|
118
|
+
queueId?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Options:
|
|
121
|
+
* - proto3_optional = true
|
|
122
|
+
*/
|
|
123
|
+
queueNamespace?: string;
|
|
110
124
|
rank: number;
|
|
111
125
|
/**
|
|
126
|
+
* In the ECHO Json object format.
|
|
127
|
+
*
|
|
112
128
|
* Options:
|
|
113
129
|
* - proto3_optional = true
|
|
114
130
|
*/
|
|
@@ -133,14 +133,6 @@ export interface DocumentUpdate {
|
|
|
133
133
|
* Value returned by `Automerge.saveSince()`.
|
|
134
134
|
*/
|
|
135
135
|
mutation: Uint8Array;
|
|
136
|
-
/**
|
|
137
|
-
* Set to true for init mutation of document.
|
|
138
|
-
* default: undefined.
|
|
139
|
-
*
|
|
140
|
-
* Options:
|
|
141
|
-
* - proto3_optional = true
|
|
142
|
-
*/
|
|
143
|
-
isNew?: boolean;
|
|
144
136
|
}
|
|
145
137
|
/**
|
|
146
138
|
* Defined in:
|
|
@@ -187,6 +179,34 @@ export interface WaitUntilHeadsReplicatedRequest {
|
|
|
187
179
|
export interface ReIndexHeadsRequest {
|
|
188
180
|
documentIds?: string[];
|
|
189
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Defined in:
|
|
184
|
+
* {@link file://./../../../dxos/echo/service.proto}
|
|
185
|
+
*/
|
|
186
|
+
export interface CreateDocumentRequest {
|
|
187
|
+
/**
|
|
188
|
+
* Space id where the document will be created.
|
|
189
|
+
*/
|
|
190
|
+
spaceId: string;
|
|
191
|
+
/**
|
|
192
|
+
* Automerge encoded initial document value.
|
|
193
|
+
* Optional - if not provided, an empty document will be created.
|
|
194
|
+
*
|
|
195
|
+
* Options:
|
|
196
|
+
* - proto3_optional = true
|
|
197
|
+
*/
|
|
198
|
+
initialValue?: ReturnType<(typeof substitutions)["google.protobuf.Struct"]["decode"]>;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Defined in:
|
|
202
|
+
* {@link file://./../../../dxos/echo/service.proto}
|
|
203
|
+
*/
|
|
204
|
+
export interface CreateDocumentResponse {
|
|
205
|
+
/**
|
|
206
|
+
* The generated document id.
|
|
207
|
+
*/
|
|
208
|
+
documentId: string;
|
|
209
|
+
}
|
|
190
210
|
/**
|
|
191
211
|
* Defined in:
|
|
192
212
|
* {@link file://./../../../dxos/echo/service.proto}
|
|
@@ -254,6 +274,11 @@ export interface DataService {
|
|
|
254
274
|
* Change which documents are subscribed to for specific subscription.
|
|
255
275
|
*/
|
|
256
276
|
updateSubscription: (request: UpdateSubscriptionRequest, options?: RequestOptions) => Promise<void>;
|
|
277
|
+
/**
|
|
278
|
+
* Create a new automerge document.
|
|
279
|
+
* Returns the generated document id which is controlled by the host.
|
|
280
|
+
*/
|
|
281
|
+
createDocument: (request: CreateDocumentRequest, options?: RequestOptions) => Promise<CreateDocumentResponse>;
|
|
257
282
|
/**
|
|
258
283
|
* Write incremental updates to multiple automerge documents.
|
|
259
284
|
* Used to propagate changes from client to services.
|