@tdxvolt/volt-client-grpc 0.20.10 → 0.20.12
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/lib/index.cjs +456 -189
- package/package.json +2 -2
- package/src/grpc-call.js +7 -8
- package/src/volt-client-internal.js +2 -2
- package/src/volt-client.js +117 -32
- package/src/volt-connection.js +3 -3
- package/src/volt-proto-literals.js +327 -144
|
@@ -718,128 +718,6 @@ message RemoteResponse {
|
|
|
718
718
|
HttpRequest http_request = 5;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
`;
|
|
722
|
-
export const spark_api = `syntax = "proto3";
|
|
723
|
-
|
|
724
|
-
package tdx.volt_api.volt.v1;
|
|
725
|
-
|
|
726
|
-
import "tdx/volt_api/volt/v1/status.proto";
|
|
727
|
-
|
|
728
|
-
// The Spark API allows clients to start and communicate with Spark VMs.
|
|
729
|
-
service SparkAPI {
|
|
730
|
-
// Start or connect to a spark VM and establish a long-lived communication channel.
|
|
731
|
-
rpc Spark(stream SparkRequest) returns (stream SparkResponse);
|
|
732
|
-
|
|
733
|
-
// Get details of running spark VMs.
|
|
734
|
-
rpc GetSpark(GetSparkRequest) returns (GetSparkResponse);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// Start a resource-hosted spark.
|
|
738
|
-
// Provenance is determined from the resource owner.
|
|
739
|
-
message StartSparkResource {
|
|
740
|
-
// The id of the resource containing the VM byte code.
|
|
741
|
-
string resource_id = 1;
|
|
742
|
-
|
|
743
|
-
// JSON-encoded payload to parameterise the spark.
|
|
744
|
-
string payload = 2;
|
|
745
|
-
|
|
746
|
-
// Envelope signature.
|
|
747
|
-
string signature = 3;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Start a spark from byte code included in the payload, along with issuer/developer claims and signature.
|
|
751
|
-
message StartSparkAdhoc {
|
|
752
|
-
// Ad-hoc byte code of VM to run.
|
|
753
|
-
bytes byte_code = 1;
|
|
754
|
-
|
|
755
|
-
// Verifiable credentials associated with this spark.
|
|
756
|
-
repeated string credential = 2;
|
|
757
|
-
|
|
758
|
-
// Envelope signature.
|
|
759
|
-
string signature = 3;
|
|
760
|
-
|
|
761
|
-
// JSON-encoded payload to parameterise the spark.
|
|
762
|
-
string payload = 4;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
// Send commands and payloads to communicate with a running spark.
|
|
766
|
-
message SparkCommand {
|
|
767
|
-
// Optional id to associate with this command.
|
|
768
|
-
// If this is omitted, an id will be assigned and returned in the command acknowledgement.
|
|
769
|
-
string command_id = 1;
|
|
770
|
-
|
|
771
|
-
// The command to send to the spark.
|
|
772
|
-
string command = 2;
|
|
773
|
-
|
|
774
|
-
// The command payload.
|
|
775
|
-
string payload = 3;
|
|
776
|
-
|
|
777
|
-
// Command verifiable credential.
|
|
778
|
-
string credential = 4;
|
|
779
|
-
|
|
780
|
-
// Command signature.
|
|
781
|
-
string signature = 5;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
// The request must contain one of the messages indicated below.
|
|
785
|
-
message SparkRequest {
|
|
786
|
-
oneof payload {
|
|
787
|
-
StartSparkResource start_resource = 1;
|
|
788
|
-
StartSparkAdhoc start_adhoc = 2;
|
|
789
|
-
SparkCommand command = 3;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
// Receive events and payload from a running spark.
|
|
794
|
-
message SparkData {
|
|
795
|
-
// The command id to which this data corresponds.
|
|
796
|
-
string command_id = 1;
|
|
797
|
-
|
|
798
|
-
oneof payload {
|
|
799
|
-
// Acknowledges receipt of a spark command.
|
|
800
|
-
bool acknowledge = 2;
|
|
801
|
-
|
|
802
|
-
// Indicates the command has completed.
|
|
803
|
-
bool ended = 3;
|
|
804
|
-
|
|
805
|
-
// Will contain error details on command failure.
|
|
806
|
-
string error = 4;
|
|
807
|
-
|
|
808
|
-
// Data emitted by a command, usually in stringified JSON format.
|
|
809
|
-
string data = 5;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
// Details of a spark instance.
|
|
814
|
-
message SparkInstance {
|
|
815
|
-
// The UUID assigned to the spark instance.
|
|
816
|
-
string spark_id = 1;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
// The response will contain one of the messages indicated below.
|
|
820
|
-
message SparkResponse {
|
|
821
|
-
oneof payload {
|
|
822
|
-
// Details of any error that occurred on the call.
|
|
823
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
824
|
-
|
|
825
|
-
// Details of the spark instance, sent in response to a start command.
|
|
826
|
-
SparkInstance spark_instance = 2;
|
|
827
|
-
|
|
828
|
-
// Payload data emitted by the spark.
|
|
829
|
-
SparkData spark_data = 3;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
message GetSparkRequest {
|
|
834
|
-
string spark_id = 1;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
// One of the following fields will be present in the response.
|
|
838
|
-
message GetSparkResponse {
|
|
839
|
-
// Details of any error that occurred on the call.
|
|
840
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
721
|
`;
|
|
844
722
|
export const ssi = `syntax = "proto3";
|
|
845
723
|
|
|
@@ -915,12 +793,12 @@ export const ssi_api = `syntax = "proto3";
|
|
|
915
793
|
|
|
916
794
|
package tdx.volt_api.volt.v1;
|
|
917
795
|
|
|
918
|
-
import "tdx/volt_api/volt/v1/status.proto";
|
|
919
796
|
import "tdx/volt_api/volt/v1/ssi.proto";
|
|
797
|
+
import "tdx/volt_api/volt/v1/status.proto";
|
|
920
798
|
|
|
921
799
|
service SsiAPI {
|
|
922
|
-
//
|
|
923
|
-
rpc
|
|
800
|
+
// Creates a verifiable credential binding an email address to an identity.
|
|
801
|
+
rpc CreateEmailCredential(CreateEmailCredentialRequest) returns (CreateEmailCredentialResponse);
|
|
924
802
|
|
|
925
803
|
// Delete a DID document or all DID documents originating from a given Volt.
|
|
926
804
|
// Requires \`volt:delete-did\` API privilege.
|
|
@@ -951,20 +829,26 @@ service SsiAPI {
|
|
|
951
829
|
rpc SearchDIDRegistry(SearchDIDRegistryRequest) returns (SearchDIDRegistryResponse);
|
|
952
830
|
}
|
|
953
831
|
|
|
954
|
-
message
|
|
955
|
-
// The
|
|
956
|
-
string
|
|
832
|
+
message CreateEmailCredentialRequest {
|
|
833
|
+
// The DID of the identity to bind to. If not specified the DID of the currently authenticated account is used.
|
|
834
|
+
string identity_did = 1;
|
|
835
|
+
|
|
836
|
+
// The email address to bind to the identity.
|
|
837
|
+
string email_address = 2;
|
|
838
|
+
|
|
839
|
+
// The identity provider to use.
|
|
840
|
+
string identity_provider = 3;
|
|
957
841
|
|
|
958
|
-
// The
|
|
959
|
-
|
|
842
|
+
// The passphrase for the identity key, if required (i.e. the key is encrypted).
|
|
843
|
+
string key_passphrase = 4;
|
|
960
844
|
}
|
|
961
845
|
|
|
962
|
-
message
|
|
846
|
+
message CreateEmailCredentialResponse {
|
|
963
847
|
// Details of any error that occurred on the call.
|
|
964
848
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
965
849
|
|
|
966
|
-
// The
|
|
967
|
-
string
|
|
850
|
+
// The verifiable credential resource id.
|
|
851
|
+
string vc_id = 2;
|
|
968
852
|
}
|
|
969
853
|
|
|
970
854
|
message DeleteDIDRequest {
|
|
@@ -1166,14 +1050,57 @@ export const sync_api = `syntax = "proto3";
|
|
|
1166
1050
|
package tdx.volt_api.volt.v1;
|
|
1167
1051
|
|
|
1168
1052
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
1053
|
+
import "tdx/volt_api/volt/v1/volt_api.proto";
|
|
1169
1054
|
|
|
1170
1055
|
// The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
|
|
1171
1056
|
service SyncAPI {
|
|
1057
|
+
// Create a synapse connection resource.
|
|
1058
|
+
// A synapse connection defines a bi-directional syncronisation between two Volt databases. The connection is created as a child of the local synapse resource, and a symbolic link is also placed in the system-wide 'connection' folder.
|
|
1059
|
+
// The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
|
|
1060
|
+
// The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
|
|
1061
|
+
rpc CreateSynapseConnection(SaveResourceRequest) returns (SaveResourceResponse);
|
|
1062
|
+
|
|
1063
|
+
// Set the metadata for a synapse document.
|
|
1064
|
+
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1065
|
+
|
|
1172
1066
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
1173
1067
|
rpc SyncDocument(stream SyncDocumentRequest) returns (stream SyncDocumentResponse);
|
|
1174
1068
|
|
|
1175
|
-
//
|
|
1176
|
-
rpc
|
|
1069
|
+
// Watch synapse paths for changes.
|
|
1070
|
+
rpc WatchSynapsePath(stream WatchSynapsePathRequest) returns (stream WatchSynapsePathResponse);
|
|
1071
|
+
|
|
1072
|
+
// Write a single value to a given synapse JSON path.
|
|
1073
|
+
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
message SynapseDocumentMetadata {
|
|
1078
|
+
// The name of the top-level shared type in the document.
|
|
1079
|
+
string name = 1;
|
|
1080
|
+
|
|
1081
|
+
// The type of the shared type, e.g. "map", "array" or "text".
|
|
1082
|
+
string type = 2;
|
|
1083
|
+
|
|
1084
|
+
// The JSON schema that describes the data that is stored in this shared type.
|
|
1085
|
+
string json_schema = 3;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
message SetSynapseDocumentMetadataRequest {
|
|
1089
|
+
// The id of the synapse.
|
|
1090
|
+
string database_id = 1;
|
|
1091
|
+
|
|
1092
|
+
// The id of the document to set the metadata for.
|
|
1093
|
+
string document_id = 2;
|
|
1094
|
+
|
|
1095
|
+
// The metadata to set for the document.
|
|
1096
|
+
repeated SynapseDocumentMetadata metadata = 3;
|
|
1097
|
+
|
|
1098
|
+
// Any additional application-specific JSON to attach to the document.
|
|
1099
|
+
string json = 4;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
message SetSynapseDocumentMetadataResponse {
|
|
1103
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1177
1104
|
}
|
|
1178
1105
|
|
|
1179
1106
|
enum SyncState {
|
|
@@ -1237,20 +1164,88 @@ message SyncDocumentResponse {
|
|
|
1237
1164
|
bool is_read_only = 5;
|
|
1238
1165
|
}
|
|
1239
1166
|
|
|
1240
|
-
|
|
1167
|
+
// Parameters to start watching synapse paths. Sent as the first message.
|
|
1168
|
+
message WatchSynapsePathStart {
|
|
1169
|
+
// The id of the database that contains the document.
|
|
1241
1170
|
string database_id = 1;
|
|
1171
|
+
|
|
1172
|
+
// The id of the document to watch.
|
|
1242
1173
|
string document_id = 2;
|
|
1174
|
+
|
|
1175
|
+
// The JSON paths to watch.
|
|
1176
|
+
repeated string path = 3;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
message WatchSynapsePathRequest {
|
|
1180
|
+
oneof payload {
|
|
1181
|
+
// Start watching the given paths; must be sent as the first message.
|
|
1182
|
+
WatchSynapsePathStart start = 1;
|
|
1183
|
+
|
|
1184
|
+
// Request to stop the watch.
|
|
1185
|
+
bool stop = 2;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
enum SynapsePathUpdateType {
|
|
1190
|
+
SYNAPSE_PATH_UPDATE_TYPE_UNKNOWN = 0;
|
|
1191
|
+
SYNAPSE_PATH_UPDATE_TYPE_ADD = 1;
|
|
1192
|
+
SYNAPSE_PATH_UPDATE_TYPE_UPDATE = 2;
|
|
1193
|
+
SYNAPSE_PATH_UPDATE_TYPE_DELETE = 3;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
message WatchSynapsePathUpdate {
|
|
1197
|
+
// The JSON path that was updated.
|
|
1198
|
+
string watch_path = 1;
|
|
1199
|
+
|
|
1200
|
+
// The actual JSON path for this match (e.g. $.content["Atlantic Star"].lat).
|
|
1201
|
+
// Enables clients to identify which array element or map key the update refers to when using wildcard matches such as $.content[*]
|
|
1202
|
+
string event_path = 2;
|
|
1203
|
+
|
|
1204
|
+
// The type of update.
|
|
1205
|
+
SynapsePathUpdateType update_type = 3;
|
|
1206
|
+
|
|
1207
|
+
// The JSON value that was updated.
|
|
1208
|
+
string value = 4;
|
|
1209
|
+
|
|
1210
|
+
// The previous JSON value before the update.
|
|
1211
|
+
string previous_value = 5;
|
|
1212
|
+
|
|
1213
|
+
// The zero-based index of the update.
|
|
1214
|
+
uint32 index = 6;
|
|
1215
|
+
|
|
1216
|
+
// The total number of updates.
|
|
1217
|
+
uint32 total = 7;
|
|
1243
1218
|
}
|
|
1244
1219
|
|
|
1245
|
-
message
|
|
1220
|
+
message WatchSynapsePathResponse {
|
|
1246
1221
|
oneof result {
|
|
1247
1222
|
// Details of any error that occurred on the call.
|
|
1248
|
-
tdx.volt_api.volt.v1.Status
|
|
1223
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1249
1224
|
|
|
1250
|
-
// The
|
|
1251
|
-
|
|
1225
|
+
// The update to the path.
|
|
1226
|
+
WatchSynapsePathUpdate update = 2;
|
|
1252
1227
|
}
|
|
1253
1228
|
}
|
|
1229
|
+
|
|
1230
|
+
message WriteSynapsePathRequest {
|
|
1231
|
+
// The id of the database that contains the document.
|
|
1232
|
+
string database_id = 1;
|
|
1233
|
+
|
|
1234
|
+
// The id of the document to write to.
|
|
1235
|
+
string document_id = 2;
|
|
1236
|
+
|
|
1237
|
+
// The JSON path to write to.
|
|
1238
|
+
string path = 3;
|
|
1239
|
+
|
|
1240
|
+
// The JSON value to write.
|
|
1241
|
+
string json = 4;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
message WriteSynapsePathResponse {
|
|
1245
|
+
// Details of any error that occurred on the call.
|
|
1246
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1254
1249
|
`;
|
|
1255
1250
|
export const terminal_api = `syntax = "proto3";
|
|
1256
1251
|
|
|
@@ -2008,6 +2003,9 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2008
2003
|
// A client certificate can be obtained from the \`Authenticate\` method.
|
|
2009
2004
|
// All methods include a \`tdx.volt_api.volt.v1.Status\` in the response. If the status contains a non-OK error code the client should assume the remainder of the message is invalid, unless otherwise indicated in the response documentation.
|
|
2010
2005
|
service VoltAPI {
|
|
2006
|
+
// Add a relay connection resource to this volt.
|
|
2007
|
+
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2008
|
+
|
|
2011
2009
|
// Issues a request to authenticate on the volt.
|
|
2012
2010
|
// All clients must successfully authenticate in order to gain any kind of access.
|
|
2013
2011
|
// A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
|
|
@@ -2097,17 +2095,35 @@ service VoltAPI {
|
|
|
2097
2095
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2098
2096
|
|
|
2099
2097
|
// Create or update a static file HTTP server.
|
|
2100
|
-
rpc SaveHttpFileServer(
|
|
2098
|
+
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2099
|
+
|
|
2100
|
+
// Create or update an HTTP forwarder resource.
|
|
2101
|
+
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2101
2102
|
|
|
2102
2103
|
// Create or update an HTTP REST API server.
|
|
2103
|
-
rpc
|
|
2104
|
+
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2105
|
+
|
|
2106
|
+
// Create or update an HTTP REST API node.
|
|
2107
|
+
rpc SaveHttpRestApiNode(SaveHttpRestApiNodeRequest) returns (SaveHttpRestApiNodeResponse);
|
|
2104
2108
|
|
|
2105
2109
|
// Create or update an identity.
|
|
2106
2110
|
rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
|
|
2107
2111
|
|
|
2112
|
+
// Create or update a database resource.
|
|
2113
|
+
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2114
|
+
|
|
2108
2115
|
// Create or update a mirrored link resource.
|
|
2109
2116
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2110
2117
|
|
|
2118
|
+
// Create or update a sync database resource.
|
|
2119
|
+
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
2120
|
+
|
|
2121
|
+
// Create or update a synapse resource.
|
|
2122
|
+
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
2123
|
+
|
|
2124
|
+
// Create a synapse connection resource.
|
|
2125
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
2126
|
+
|
|
2111
2127
|
// Update Volt parameters.
|
|
2112
2128
|
// This is a privileged call that requires Volt root access.
|
|
2113
2129
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
@@ -2166,7 +2182,7 @@ message AuthenticateRequest {
|
|
|
2166
2182
|
// A human-readable name of the entity requesting to authenticate.
|
|
2167
2183
|
string client_name = 6;
|
|
2168
2184
|
|
|
2169
|
-
// Optional challenge code, hashed using SHA-256 and base64 encoded.
|
|
2185
|
+
// Optional challenge code, hashed using SHA-256 and base64 URL encoded (no padding).
|
|
2170
2186
|
string challenge = 7;
|
|
2171
2187
|
|
|
2172
2188
|
// The host name to add as a SAN to the issued certificate.
|
|
@@ -3024,6 +3040,143 @@ message SaveResourceResponse {
|
|
|
3024
3040
|
Resource resource = 2;
|
|
3025
3041
|
}
|
|
3026
3042
|
|
|
3043
|
+
message SaveDatabaseRequest {
|
|
3044
|
+
Resource resource = 1;
|
|
3045
|
+
bool create = 2;
|
|
3046
|
+
string create_in_parent_id = 3;
|
|
3047
|
+
bool purge_attributes = 4;
|
|
3048
|
+
bool encrypted = 5;
|
|
3049
|
+
bool read_audit = 6;
|
|
3050
|
+
bool write_audit = 7;
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
message SaveDatabaseResponse {
|
|
3054
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3055
|
+
Resource resource = 2;
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
message SaveSyncDatabaseRequest {
|
|
3059
|
+
Resource resource = 1;
|
|
3060
|
+
bool create = 2;
|
|
3061
|
+
string create_in_parent_id = 3;
|
|
3062
|
+
bool purge_attributes = 4;
|
|
3063
|
+
bool encrypted = 5;
|
|
3064
|
+
bool read_audit = 6;
|
|
3065
|
+
bool write_audit = 7;
|
|
3066
|
+
bool no_snapshots = 8;
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
message SaveSyncDatabaseResponse {
|
|
3070
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3071
|
+
Resource resource = 2;
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
message SaveSynapseRequest {
|
|
3075
|
+
Resource resource = 1;
|
|
3076
|
+
bool create = 2;
|
|
3077
|
+
string create_in_parent_id = 3;
|
|
3078
|
+
bool purge_attributes = 4;
|
|
3079
|
+
bool encrypted = 5;
|
|
3080
|
+
bool read_audit = 6;
|
|
3081
|
+
bool write_audit = 7;
|
|
3082
|
+
bool no_snapshots = 8;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
message SaveSynapseResponse {
|
|
3086
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3087
|
+
Resource resource = 2;
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
message SaveHttpForwarderRequest {
|
|
3091
|
+
Resource resource = 1;
|
|
3092
|
+
bool create = 2;
|
|
3093
|
+
string create_in_parent_id = 3;
|
|
3094
|
+
bool purge_attributes = 4;
|
|
3095
|
+
string domain = 5;
|
|
3096
|
+
string host = 6;
|
|
3097
|
+
int32 port = 7;
|
|
3098
|
+
bool forward_host = 8;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
message SaveHttpForwarderResponse {
|
|
3102
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3103
|
+
Resource resource = 2;
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
message SaveHttpFileServerRequest {
|
|
3107
|
+
Resource resource = 1;
|
|
3108
|
+
bool create = 2;
|
|
3109
|
+
string create_in_parent_id = 3;
|
|
3110
|
+
bool purge_attributes = 4;
|
|
3111
|
+
string path = 5;
|
|
3112
|
+
string host = 6;
|
|
3113
|
+
int32 port = 7;
|
|
3114
|
+
bool enabled = 8;
|
|
3115
|
+
int32 cache_timeout = 9;
|
|
3116
|
+
bool catch_all_enabled = 10;
|
|
3117
|
+
string catch_all = 11;
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
message SaveHttpFileServerResponse {
|
|
3121
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3122
|
+
Resource resource = 2;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
message SaveHttpRestApiServerRequest {
|
|
3126
|
+
Resource resource = 1;
|
|
3127
|
+
bool create = 2;
|
|
3128
|
+
string create_in_parent_id = 3;
|
|
3129
|
+
bool purge_attributes = 4;
|
|
3130
|
+
string host = 5;
|
|
3131
|
+
int32 port = 6;
|
|
3132
|
+
bool enabled = 7;
|
|
3133
|
+
bool cors_enabled = 8;
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
message SaveHttpRestApiServerResponse {
|
|
3137
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3138
|
+
Resource resource = 2;
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
message SaveHttpRestApiNodeRequest {
|
|
3142
|
+
Resource resource = 1;
|
|
3143
|
+
bool create = 2;
|
|
3144
|
+
string create_in_parent_id = 3;
|
|
3145
|
+
bool purge_attributes = 4;
|
|
3146
|
+
bool is_literal = 5;
|
|
3147
|
+
string literal_json = 6;
|
|
3148
|
+
string database_id = 7;
|
|
3149
|
+
string sql = 8;
|
|
3150
|
+
repeated string parameter = 9;
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
message SaveHttpRestApiNodeResponse {
|
|
3154
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3155
|
+
Resource resource = 2;
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
message CreateSynapseConnectionRequest {
|
|
3159
|
+
Resource resource = 1;
|
|
3160
|
+
bool create = 2;
|
|
3161
|
+
string create_in_parent_id = 3;
|
|
3162
|
+
bool purge_attributes = 4;
|
|
3163
|
+
string local_synapse_id = 5;
|
|
3164
|
+
string remote_synapse_id = 6;
|
|
3165
|
+
string remote_volt_identity = 7;
|
|
3166
|
+
string remote_volt_address = 8;
|
|
3167
|
+
string remote_volt_http_address = 9;
|
|
3168
|
+
string remote_volt_ca = 10;
|
|
3169
|
+
string remote_identity = 11;
|
|
3170
|
+
string relay_address = 12;
|
|
3171
|
+
string relay_ca = 13;
|
|
3172
|
+
string relay_challenge = 14;
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
message CreateSynapseConnectionResponse {
|
|
3176
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3177
|
+
Resource resource = 2;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3027
3180
|
message SaveSessionRequest {
|
|
3028
3181
|
Session session = 1;
|
|
3029
3182
|
}
|
|
@@ -3130,17 +3283,47 @@ export const wire_api = `syntax = "proto3";
|
|
|
3130
3283
|
package tdx.volt_api.volt.v1;
|
|
3131
3284
|
|
|
3132
3285
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
3286
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
3133
3287
|
|
|
3134
3288
|
// The Wire API allows clients to subscribe and publish to Volt wire resources.
|
|
3135
3289
|
service WireAPI {
|
|
3290
|
+
|
|
3136
3291
|
// Establishes a client-streaming call to the wire resource.
|
|
3137
3292
|
rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
|
|
3138
3293
|
|
|
3294
|
+
// Saves a wire resource.
|
|
3295
|
+
rpc SaveWire(SaveWireRequest) returns (SaveWireResponse);
|
|
3296
|
+
|
|
3139
3297
|
// Establishes a bi-directional streaming call to the wire resource.
|
|
3140
3298
|
// Although we're only really interested in receiving data from the wire, a bi-directional stream is required so that we can gracefully stop the subscription.
|
|
3141
3299
|
rpc SubscribeWire(stream SubscribeWireRequest) returns (stream SubscribeWireResponse);
|
|
3142
3300
|
}
|
|
3143
3301
|
|
|
3302
|
+
message SaveWireRequest {
|
|
3303
|
+
// The wire resource to save.
|
|
3304
|
+
Resource resource = 1;
|
|
3305
|
+
|
|
3306
|
+
// Set to create a new wire resource.
|
|
3307
|
+
bool create = 2;
|
|
3308
|
+
|
|
3309
|
+
// The id of the folder resource in which to create the wire resource.
|
|
3310
|
+
string create_in_parent_id = 3;
|
|
3311
|
+
|
|
3312
|
+
// Set to purge the wire resource attributes before saving.
|
|
3313
|
+
bool purge_attributes = 4;
|
|
3314
|
+
|
|
3315
|
+
// Set to persist the wire messages.
|
|
3316
|
+
bool persist = 5;
|
|
3317
|
+
|
|
3318
|
+
// The table to persist the wire messages to.
|
|
3319
|
+
string persist_table = 6;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
message SaveWireResponse {
|
|
3323
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3324
|
+
tdx.volt_api.volt.v1.Resource resource = 2;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3144
3327
|
// Because the publish RPC is streaming, the policy will not be checked until the first message arrives. This can mean that the \`PublishWire\` call appears to succeed but then fails after the first attempt to publish a message.
|
|
3145
3328
|
// To avoid this, clients can immediately send a message with the \`wire_id\` set and no \`chunk\` set. This will establish that the correct permissions are in place and fail fast if not.
|
|
3146
3329
|
message PublishWireRequest {
|
|
@@ -3182,4 +3365,4 @@ message SubscribeWireResponse {
|
|
|
3182
3365
|
}
|
|
3183
3366
|
|
|
3184
3367
|
`;
|
|
3185
|
-
export const voltProtos = [sqlite, sqlite_database_api, sqlite_server_api, proto_db_sync, proxy_api, relay_api, discovery_api, file, file_api, remote,
|
|
3368
|
+
export const voltProtos = [sqlite, sqlite_database_api, sqlite_server_api, proto_db_sync, proxy_api, relay_api, discovery_api, file, file_api, remote, ssi, ssi_api, status, sync_api, terminal_api, volt, volt_api, wire_api];
|