@tdxvolt/volt-client-grpc 0.20.16 → 0.20.18
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 +270 -77
- package/package.json +3 -3
- package/src/grpc-call.js +6 -2
- package/src/volt-client.js +15 -4
- package/src/volt-proto-literals.js +253 -72
package/lib/index.cjs
CHANGED
|
@@ -980,6 +980,84 @@ message DiscoverResponse {
|
|
|
980
980
|
// A list of endpoints that match the request criteria.
|
|
981
981
|
repeated SignedEndpoint endpoint = 2;
|
|
982
982
|
}
|
|
983
|
+
`;
|
|
984
|
+
const drive_api = `syntax = "proto3";
|
|
985
|
+
|
|
986
|
+
package tdx.volt_api.volt.v1;
|
|
987
|
+
|
|
988
|
+
import "tdx/volt_api/volt/v1/status.proto";
|
|
989
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
990
|
+
|
|
991
|
+
// The Drive API allows clients to create and manage Volt Drive resources.
|
|
992
|
+
service DriveAPI {
|
|
993
|
+
// Create or update a drive connection resource.
|
|
994
|
+
// This is a privileged API call and requires volt:api-call / volt:save-drive permission.
|
|
995
|
+
rpc SaveDrive(SaveDriveRequest) returns (SaveDriveResponse);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
message SaveDriveRequest {
|
|
999
|
+
// Details of the drive to save.
|
|
1000
|
+
Resource resource = 1;
|
|
1001
|
+
|
|
1002
|
+
// Set to indicate this is a new drive.
|
|
1003
|
+
bool create = 2;
|
|
1004
|
+
|
|
1005
|
+
// The id of the folder resource in which a new drive should be created.
|
|
1006
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1007
|
+
string create_in_parent_id = 3;
|
|
1008
|
+
|
|
1009
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1010
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1011
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1012
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1013
|
+
bool purge_attributes = 4;
|
|
1014
|
+
|
|
1015
|
+
// The id of the synapse resource that stores the drive data.
|
|
1016
|
+
string source_synapse_id = 5;
|
|
1017
|
+
|
|
1018
|
+
// The local path of the folder to sync.
|
|
1019
|
+
string target_folder = 6;
|
|
1020
|
+
|
|
1021
|
+
// The comma-separated include patterns.
|
|
1022
|
+
string include = 7;
|
|
1023
|
+
|
|
1024
|
+
// The comma-separated exclude patterns.
|
|
1025
|
+
string exclude = 8;
|
|
1026
|
+
|
|
1027
|
+
// The DID of the identity that should be used to authenticate with the remote Volt. If omitted, the authenticated identity will be used.
|
|
1028
|
+
// The identity must have a private key stored in the Volt key store.
|
|
1029
|
+
string identity_did = 9;
|
|
1030
|
+
|
|
1031
|
+
// The DID of the remote Volt.
|
|
1032
|
+
string remote_volt_identity = 10;
|
|
1033
|
+
|
|
1034
|
+
// Optional address of the remote Volt. Either this or the relay address must be provided.
|
|
1035
|
+
string remote_volt_address = 11;
|
|
1036
|
+
|
|
1037
|
+
// Optional HTTP address of the remote Volt.
|
|
1038
|
+
string remote_volt_http_address = 12;
|
|
1039
|
+
|
|
1040
|
+
// Optional CA of the remote Volt. Either this or the relay CA must be provided.
|
|
1041
|
+
string remote_volt_ca = 13;
|
|
1042
|
+
|
|
1043
|
+
// Optional address of the relay. Either this or the remote Volt address must be provided.
|
|
1044
|
+
string relay_address = 14;
|
|
1045
|
+
|
|
1046
|
+
// Optional CA of the relay. Either this or the remote Volt CA must be provided.
|
|
1047
|
+
string relay_ca = 15;
|
|
1048
|
+
|
|
1049
|
+
// Optional challenge of the relay.
|
|
1050
|
+
string relay_challenge = 16;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
message SaveDriveResponse {
|
|
1054
|
+
// Details of any error that occurred on the call.
|
|
1055
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1056
|
+
|
|
1057
|
+
// The updated drive resource.
|
|
1058
|
+
Resource resource = 2;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
983
1061
|
`;
|
|
984
1062
|
const file = `syntax = "proto3";
|
|
985
1063
|
|
|
@@ -1371,6 +1449,8 @@ service SsiAPI {
|
|
|
1371
1449
|
rpc RegisterDIDDocument(RegisterDIDDocumentRequest) returns (RegisterDIDDocumentResponse);
|
|
1372
1450
|
|
|
1373
1451
|
// Save a verifiable credential.
|
|
1452
|
+
// If the credential is to be issued by the Volt, this is a privileged API call and requires volt:api-call / volt:save-verifiable-credential permission.
|
|
1453
|
+
// If the credential is to be issued by an identity other than the Volt root, the authenticated session must have the associated identity id (or be the Volt root).
|
|
1374
1454
|
rpc SaveCredential(SaveCredentialRequest) returns (SaveCredentialResponse);
|
|
1375
1455
|
|
|
1376
1456
|
// Search the DID registry.
|
|
@@ -1597,8 +1677,8 @@ const sync_api = `syntax = "proto3";
|
|
|
1597
1677
|
|
|
1598
1678
|
package tdx.volt_api.volt.v1;
|
|
1599
1679
|
|
|
1680
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
1600
1681
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
1601
|
-
import "tdx/volt_api/volt/v1/volt_api.proto";
|
|
1602
1682
|
|
|
1603
1683
|
// The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
|
|
1604
1684
|
service SyncAPI {
|
|
@@ -1606,12 +1686,18 @@ service SyncAPI {
|
|
|
1606
1686
|
// A synapse connection defines a bi-directional syncronisation between two Volt synapses. 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.
|
|
1607
1687
|
// The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
|
|
1608
1688
|
// The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
|
|
1609
|
-
rpc CreateSynapseConnection(
|
|
1610
|
-
|
|
1689
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1690
|
+
|
|
1611
1691
|
// Delete a document from the synapse.
|
|
1612
1692
|
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1613
1693
|
|
|
1614
|
-
//
|
|
1694
|
+
// Create or update a synapse resource.
|
|
1695
|
+
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
1696
|
+
|
|
1697
|
+
// Create or update a sync database resource.
|
|
1698
|
+
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
1699
|
+
|
|
1700
|
+
// Set the metadata for a synapse document.
|
|
1615
1701
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1616
1702
|
|
|
1617
1703
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1624,6 +1710,60 @@ service SyncAPI {
|
|
|
1624
1710
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1625
1711
|
}
|
|
1626
1712
|
|
|
1713
|
+
message CreateSynapseConnectionRequest {
|
|
1714
|
+
// Details of the synapse connection to create.
|
|
1715
|
+
Resource resource = 1;
|
|
1716
|
+
|
|
1717
|
+
// Set to indicate this is a new synapse connection.
|
|
1718
|
+
bool create = 2;
|
|
1719
|
+
|
|
1720
|
+
// The id of the folder resource in which a new synapse connection should be created.
|
|
1721
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1722
|
+
string create_in_parent_id = 3;
|
|
1723
|
+
|
|
1724
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1725
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1726
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1727
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1728
|
+
bool purge_attributes = 4;
|
|
1729
|
+
|
|
1730
|
+
// The id of the synapse on the local Volt.
|
|
1731
|
+
string local_synapse_id = 5;
|
|
1732
|
+
|
|
1733
|
+
// The id of the synapse on the remote Volt.
|
|
1734
|
+
string remote_synapse_id = 6;
|
|
1735
|
+
|
|
1736
|
+
// The DID of the remote Volt.
|
|
1737
|
+
string remote_volt_identity = 7;
|
|
1738
|
+
|
|
1739
|
+
// The address of the remote Volt.
|
|
1740
|
+
string remote_volt_address = 8;
|
|
1741
|
+
|
|
1742
|
+
// The HTTP address of the remote Volt.
|
|
1743
|
+
string remote_volt_http_address = 9;
|
|
1744
|
+
|
|
1745
|
+
// The CA of the remote Volt.
|
|
1746
|
+
string remote_volt_ca = 10;
|
|
1747
|
+
|
|
1748
|
+
// Optional DID of the account to use when connecting to the remote Volt. If omitted, the local Volt DID will be used.
|
|
1749
|
+
// The identity must have a private key stored in the Volt key store.
|
|
1750
|
+
string remote_identity = 11;
|
|
1751
|
+
|
|
1752
|
+
// Optional address of the relay to use when connecting to the remote Volt.
|
|
1753
|
+
string relay_address = 12;
|
|
1754
|
+
|
|
1755
|
+
// Optional CA of the relay.
|
|
1756
|
+
string relay_ca = 13;
|
|
1757
|
+
|
|
1758
|
+
// Optional challenge of the relay.
|
|
1759
|
+
string relay_challenge = 14;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
message CreateSynapseConnectionResponse {
|
|
1763
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1764
|
+
Resource resource = 2;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1627
1767
|
message DeleteSynapseDocumentMetadataRequest {
|
|
1628
1768
|
// DEPRECATED: Use synapse_id instead.
|
|
1629
1769
|
string database_id = 1;
|
|
@@ -1639,6 +1779,79 @@ message DeleteSynapseDocumentMetadataResponse {
|
|
|
1639
1779
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
1640
1780
|
}
|
|
1641
1781
|
|
|
1782
|
+
message SaveSyncDatabaseRequest {
|
|
1783
|
+
// Details of the database to save.
|
|
1784
|
+
Resource resource = 1;
|
|
1785
|
+
|
|
1786
|
+
// Set to indicate this is a new database.
|
|
1787
|
+
bool create = 2;
|
|
1788
|
+
|
|
1789
|
+
// The id of the folder resource in which a new database should be created.
|
|
1790
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1791
|
+
string create_in_parent_id = 3;
|
|
1792
|
+
|
|
1793
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1794
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1795
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1796
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1797
|
+
bool purge_attributes = 4;
|
|
1798
|
+
|
|
1799
|
+
// Set to encrypt the database.
|
|
1800
|
+
bool encrypted = 5;
|
|
1801
|
+
|
|
1802
|
+
// Set to audit all SELECT database operations.
|
|
1803
|
+
bool read_audit = 6;
|
|
1804
|
+
|
|
1805
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
1806
|
+
bool write_audit = 7;
|
|
1807
|
+
|
|
1808
|
+
// By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the database and improve performance, but will also reduce the ability to rollback to a previous state.
|
|
1809
|
+
bool no_snapshots = 8;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
message SaveSyncDatabaseResponse {
|
|
1813
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1814
|
+
Resource resource = 2;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
message SaveSynapseRequest {
|
|
1818
|
+
// Details of the synapse to save.
|
|
1819
|
+
Resource resource = 1;
|
|
1820
|
+
|
|
1821
|
+
// Set to indicate this is a new synapse.
|
|
1822
|
+
bool create = 2;
|
|
1823
|
+
|
|
1824
|
+
// The id of the folder resource in which a new synapse should be created.
|
|
1825
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1826
|
+
string create_in_parent_id = 3;
|
|
1827
|
+
|
|
1828
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1829
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1830
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1831
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1832
|
+
bool purge_attributes = 4;
|
|
1833
|
+
|
|
1834
|
+
// Set to encrypt the synapse.
|
|
1835
|
+
bool encrypted = 5;
|
|
1836
|
+
|
|
1837
|
+
// Set to audit all SELECT synapse operations.
|
|
1838
|
+
bool read_audit = 6;
|
|
1839
|
+
|
|
1840
|
+
// Set to audit all INSERT, UPDATE, and DELETE synapse operations.
|
|
1841
|
+
bool write_audit = 7;
|
|
1842
|
+
|
|
1843
|
+
// By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the synapse and improve performance, but will also reduce the ability to rollback to a previous state.
|
|
1844
|
+
bool no_snapshots = 8;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
message SaveSynapseResponse {
|
|
1848
|
+
// Details of any error that occurred on the call.
|
|
1849
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1850
|
+
|
|
1851
|
+
// The updated synapse resource.
|
|
1852
|
+
Resource resource = 2;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1642
1855
|
message SynapseDocumentMetadata {
|
|
1643
1856
|
// The name of the top-level shared type in the document.
|
|
1644
1857
|
string name = 1;
|
|
@@ -2578,6 +2791,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2578
2791
|
// 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.
|
|
2579
2792
|
service VoltAPI {
|
|
2580
2793
|
// Add a relay connection resource to this volt.
|
|
2794
|
+
// This is a privileged API call and requires volt:api-call / volt:add-relay permission.
|
|
2581
2795
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2582
2796
|
|
|
2583
2797
|
// Issues a request to authenticate on the volt.
|
|
@@ -2606,6 +2820,7 @@ service VoltAPI {
|
|
|
2606
2820
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2607
2821
|
|
|
2608
2822
|
// Remove a custom access rule, such as a file share.
|
|
2823
|
+
// This is a privileged API call and requires volt:api-call / volt:delete-access permission. Resource owners have this privilege by default.
|
|
2609
2824
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2610
2825
|
|
|
2611
2826
|
// Delete a resource from this volt.
|
|
@@ -2632,11 +2847,11 @@ service VoltAPI {
|
|
|
2632
2847
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2633
2848
|
|
|
2634
2849
|
// Retrieve the Volt parameters.
|
|
2635
|
-
// This is a privileged API call and requires
|
|
2850
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2636
2851
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2637
2852
|
|
|
2638
2853
|
// Retrieve the active Volt policy.
|
|
2639
|
-
// This is a privileged API call and requires
|
|
2854
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2640
2855
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2641
2856
|
|
|
2642
2857
|
// Get resource from this volt.
|
|
@@ -2666,15 +2881,18 @@ service VoltAPI {
|
|
|
2666
2881
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2667
2882
|
|
|
2668
2883
|
// Create or update an access rule.
|
|
2884
|
+
// This is a privileged API call and requires volt:api-call / volt:save-access permission. Resource owners have this privilege by default.
|
|
2669
2885
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2670
2886
|
|
|
2671
2887
|
// Create or update a static file HTTP server.
|
|
2888
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-file-server permission.
|
|
2672
2889
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2673
2890
|
|
|
2674
2891
|
// Create or update an HTTP forwarder resource.
|
|
2675
2892
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2676
2893
|
|
|
2677
2894
|
// Create or update an HTTP REST API server.
|
|
2895
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
|
|
2678
2896
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2679
2897
|
|
|
2680
2898
|
// Create or update an HTTP REST API node.
|
|
@@ -2687,44 +2905,41 @@ service VoltAPI {
|
|
|
2687
2905
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2688
2906
|
|
|
2689
2907
|
// Create or update a mirrored link resource.
|
|
2908
|
+
// This is a privileged API call and requires volt:api-call / volt:save-mirrored-link permission.
|
|
2690
2909
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2691
2910
|
|
|
2692
|
-
// Create or update a sync database resource.
|
|
2693
|
-
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
2694
|
-
|
|
2695
|
-
// Create or update a synapse resource.
|
|
2696
|
-
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
2697
|
-
|
|
2698
|
-
// Create a synapse connection resource.
|
|
2699
|
-
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
2700
|
-
|
|
2701
2911
|
// Update Volt parameters.
|
|
2702
|
-
// This is a privileged call
|
|
2912
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2703
2913
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2704
2914
|
|
|
2705
2915
|
// Create or update resource in this volt.
|
|
2706
2916
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2707
2917
|
|
|
2708
2918
|
// Create or update a symbolic link resource.
|
|
2919
|
+
// This is a privileged API call and requires volt:api-call / volt:save-symbolic-link permission.ß
|
|
2709
2920
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2710
2921
|
|
|
2711
2922
|
// Save a session.
|
|
2923
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2712
2924
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2713
2925
|
|
|
2714
2926
|
// Set Volt access request decision.
|
|
2715
|
-
// This is a privileged call
|
|
2927
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2716
2928
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2717
2929
|
|
|
2930
|
+
// Set Volt policy.
|
|
2931
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2718
2932
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2719
2933
|
|
|
2720
2934
|
// Set the status of a Volt service.
|
|
2721
2935
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2722
2936
|
|
|
2723
2937
|
// Used to shutdown remote Volts.
|
|
2724
|
-
// This is a privileged call
|
|
2938
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2725
2939
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2726
2940
|
|
|
2727
2941
|
// Sign or verify an arbitrary message using the Volt key.
|
|
2942
|
+
// For signing using an \`identity_did\` other than the authenticated account, the authenticated session must have \`volt:sign\` permission for the given \`identity_did\`.
|
|
2728
2943
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2729
2944
|
}
|
|
2730
2945
|
|
|
@@ -3615,49 +3830,37 @@ message SaveResourceResponse {
|
|
|
3615
3830
|
}
|
|
3616
3831
|
|
|
3617
3832
|
message SaveDatabaseRequest {
|
|
3833
|
+
// Details of the database to save.
|
|
3618
3834
|
Resource resource = 1;
|
|
3619
|
-
bool create = 2;
|
|
3620
|
-
string create_in_parent_id = 3;
|
|
3621
|
-
bool purge_attributes = 4;
|
|
3622
|
-
bool encrypted = 5;
|
|
3623
|
-
bool read_audit = 6;
|
|
3624
|
-
bool write_audit = 7;
|
|
3625
|
-
}
|
|
3626
|
-
|
|
3627
|
-
message SaveDatabaseResponse {
|
|
3628
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3629
|
-
Resource resource = 2;
|
|
3630
|
-
}
|
|
3631
3835
|
|
|
3632
|
-
|
|
3633
|
-
Resource resource = 1;
|
|
3836
|
+
// Set to indicate this is a new database.
|
|
3634
3837
|
bool create = 2;
|
|
3635
|
-
string create_in_parent_id = 3;
|
|
3636
|
-
bool purge_attributes = 4;
|
|
3637
|
-
bool encrypted = 5;
|
|
3638
|
-
bool read_audit = 6;
|
|
3639
|
-
bool write_audit = 7;
|
|
3640
|
-
bool no_snapshots = 8;
|
|
3641
|
-
}
|
|
3642
3838
|
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
Resource resource = 2;
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
|
-
message SaveSynapseRequest {
|
|
3649
|
-
Resource resource = 1;
|
|
3650
|
-
bool create = 2;
|
|
3839
|
+
// The id of the folder resource in which a new database should be created.
|
|
3840
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
3651
3841
|
string create_in_parent_id = 3;
|
|
3842
|
+
|
|
3843
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
3844
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
3845
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
3846
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
3652
3847
|
bool purge_attributes = 4;
|
|
3848
|
+
|
|
3849
|
+
// Set to encrypt the database.
|
|
3653
3850
|
bool encrypted = 5;
|
|
3851
|
+
|
|
3852
|
+
// Set to audit all SELECT database operations.
|
|
3654
3853
|
bool read_audit = 6;
|
|
3854
|
+
|
|
3855
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3655
3856
|
bool write_audit = 7;
|
|
3656
|
-
bool no_snapshots = 8;
|
|
3657
3857
|
}
|
|
3658
3858
|
|
|
3659
|
-
message
|
|
3859
|
+
message SaveDatabaseResponse {
|
|
3860
|
+
// Details of any error that occurred on the call.
|
|
3660
3861
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3862
|
+
|
|
3863
|
+
// The updated database resource.
|
|
3661
3864
|
Resource resource = 2;
|
|
3662
3865
|
}
|
|
3663
3866
|
|
|
@@ -3729,28 +3932,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3729
3932
|
Resource resource = 2;
|
|
3730
3933
|
}
|
|
3731
3934
|
|
|
3732
|
-
message CreateSynapseConnectionRequest {
|
|
3733
|
-
Resource resource = 1;
|
|
3734
|
-
bool create = 2;
|
|
3735
|
-
string create_in_parent_id = 3;
|
|
3736
|
-
bool purge_attributes = 4;
|
|
3737
|
-
string local_synapse_id = 5;
|
|
3738
|
-
string remote_synapse_id = 6;
|
|
3739
|
-
string remote_volt_identity = 7;
|
|
3740
|
-
string remote_volt_address = 8;
|
|
3741
|
-
string remote_volt_http_address = 9;
|
|
3742
|
-
string remote_volt_ca = 10;
|
|
3743
|
-
string remote_identity = 11;
|
|
3744
|
-
string relay_address = 12;
|
|
3745
|
-
string relay_ca = 13;
|
|
3746
|
-
string relay_challenge = 14;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
|
-
message CreateSynapseConnectionResponse {
|
|
3750
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3751
|
-
Resource resource = 2;
|
|
3752
|
-
}
|
|
3753
|
-
|
|
3754
3935
|
message SaveSessionRequest {
|
|
3755
3936
|
Session session = 1;
|
|
3756
3937
|
}
|
|
@@ -3939,7 +4120,7 @@ message SubscribeWireResponse {
|
|
|
3939
4120
|
}
|
|
3940
4121
|
|
|
3941
4122
|
`;
|
|
3942
|
-
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];
|
|
4123
|
+
const voltProtos = [sqlite, sqlite_database_api, sqlite_server_api, proto_db_sync, proxy_api, relay_api, discovery_api, drive_api, file, file_api, remote, ssi, ssi_api, status, sync_api, terminal_api, volt, volt_api, wire_api];
|
|
3943
4124
|
|
|
3944
4125
|
debug__default["default"]("volt-client-grpc:proto-utils");
|
|
3945
4126
|
|
|
@@ -4395,9 +4576,10 @@ class GRPCCall extends EventEmitter__default["default"] {
|
|
|
4395
4576
|
} else if (parsedResponse.payload) {
|
|
4396
4577
|
// Interpret a non-empty status message as an error.
|
|
4397
4578
|
if (parsedResponse.payload?.status?.message) {
|
|
4579
|
+
const { message, description, code } = parsedResponse.payload.status;
|
|
4398
4580
|
this.emit(
|
|
4399
4581
|
"error",
|
|
4400
|
-
new
|
|
4582
|
+
new js.VoltClientError(message, { description, code })
|
|
4401
4583
|
);
|
|
4402
4584
|
} else {
|
|
4403
4585
|
this.emit("data", parsedResponse.payload);
|
|
@@ -6391,6 +6573,13 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6391
6573
|
return subscribeCall.start(grpcClient, request);
|
|
6392
6574
|
}
|
|
6393
6575
|
|
|
6576
|
+
/**
|
|
6577
|
+
* DriveAPI
|
|
6578
|
+
*/
|
|
6579
|
+
SaveDrive(request) {
|
|
6580
|
+
return unaryCallInternal.call(this, "SaveDrive", request);
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6394
6583
|
/**
|
|
6395
6584
|
* SyncAPI
|
|
6396
6585
|
*/
|
|
@@ -6404,9 +6593,13 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6404
6593
|
);
|
|
6405
6594
|
return syncDocumentCall.start(grpcClient, request);
|
|
6406
6595
|
}
|
|
6407
|
-
|
|
6596
|
+
|
|
6408
6597
|
DeleteSynapseDocumentMetadata(request) {
|
|
6409
|
-
return unaryCallInternal.call(
|
|
6598
|
+
return unaryCallInternal.call(
|
|
6599
|
+
this,
|
|
6600
|
+
"DeleteSynapseDocumentMetadata",
|
|
6601
|
+
request
|
|
6602
|
+
);
|
|
6410
6603
|
}
|
|
6411
6604
|
|
|
6412
6605
|
SetSynapseDocumentMetadata(request) {
|
|
@@ -6417,8 +6610,8 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6417
6610
|
const grpcClient = this.getVoltAPIClient();
|
|
6418
6611
|
|
|
6419
6612
|
const watchPathCall = new GRPCCall(
|
|
6420
|
-
this,
|
|
6421
|
-
"WatchSynapsePath",
|
|
6613
|
+
this,
|
|
6614
|
+
"WatchSynapsePath",
|
|
6422
6615
|
"METHOD_TYPE_BIDI"
|
|
6423
6616
|
);
|
|
6424
6617
|
return watchPathCall.start(grpcClient, request);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.20.
|
|
6
|
+
"version": "0.20.18",
|
|
7
7
|
"description": "tdx Volt library for nodejs clients",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"author": "toby.ealden@gmail.com",
|
|
34
34
|
"license": "ISC",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tdxvolt/volt-client-web": "^0.20.
|
|
37
|
-
"@tdxvolt/volt-utility": "^0.20.
|
|
36
|
+
"@tdxvolt/volt-client-web": "^0.20.18",
|
|
37
|
+
"@tdxvolt/volt-utility": "^0.20.18",
|
|
38
38
|
"debug": "^4.1.1",
|
|
39
39
|
"ip": "^1.1.5",
|
|
40
40
|
"jsonwebtoken": "^8.5.1",
|
package/src/grpc-call.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
VoltClientError,
|
|
4
|
+
voltUtils as voltClientUtils
|
|
5
|
+
} from "@tdxvolt/volt-client-web/js";
|
|
3
6
|
import debug from "debug";
|
|
4
7
|
import EventEmitter from "events";
|
|
5
8
|
|
|
@@ -396,9 +399,10 @@ export default class GRPCCall extends EventEmitter {
|
|
|
396
399
|
} else if (parsedResponse.payload) {
|
|
397
400
|
// Interpret a non-empty status message as an error.
|
|
398
401
|
if (parsedResponse.payload?.status?.message) {
|
|
402
|
+
const { message, description, code } = parsedResponse.payload.status;
|
|
399
403
|
this.emit(
|
|
400
404
|
"error",
|
|
401
|
-
new
|
|
405
|
+
new VoltClientError(message, { description, code })
|
|
402
406
|
);
|
|
403
407
|
} else {
|
|
404
408
|
this.emit("data", parsedResponse.payload);
|
package/src/volt-client.js
CHANGED
|
@@ -725,6 +725,13 @@ export class VoltClient extends EventEmitter {
|
|
|
725
725
|
return subscribeCall.start(grpcClient, request);
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
+
/**
|
|
729
|
+
* DriveAPI
|
|
730
|
+
*/
|
|
731
|
+
SaveDrive(request) {
|
|
732
|
+
return unaryCallInternal.call(this, "SaveDrive", request);
|
|
733
|
+
}
|
|
734
|
+
|
|
728
735
|
/**
|
|
729
736
|
* SyncAPI
|
|
730
737
|
*/
|
|
@@ -738,9 +745,13 @@ export class VoltClient extends EventEmitter {
|
|
|
738
745
|
);
|
|
739
746
|
return syncDocumentCall.start(grpcClient, request);
|
|
740
747
|
}
|
|
741
|
-
|
|
748
|
+
|
|
742
749
|
DeleteSynapseDocumentMetadata(request) {
|
|
743
|
-
return unaryCallInternal.call(
|
|
750
|
+
return unaryCallInternal.call(
|
|
751
|
+
this,
|
|
752
|
+
"DeleteSynapseDocumentMetadata",
|
|
753
|
+
request
|
|
754
|
+
);
|
|
744
755
|
}
|
|
745
756
|
|
|
746
757
|
SetSynapseDocumentMetadata(request) {
|
|
@@ -751,8 +762,8 @@ export class VoltClient extends EventEmitter {
|
|
|
751
762
|
const grpcClient = this.getVoltAPIClient();
|
|
752
763
|
|
|
753
764
|
const watchPathCall = new GRPCCall(
|
|
754
|
-
this,
|
|
755
|
-
"WatchSynapsePath",
|
|
765
|
+
this,
|
|
766
|
+
"WatchSynapsePath",
|
|
756
767
|
"METHOD_TYPE_BIDI"
|
|
757
768
|
);
|
|
758
769
|
return watchPathCall.start(grpcClient, request);
|
|
@@ -432,6 +432,84 @@ message DiscoverResponse {
|
|
|
432
432
|
// A list of endpoints that match the request criteria.
|
|
433
433
|
repeated SignedEndpoint endpoint = 2;
|
|
434
434
|
}
|
|
435
|
+
`;
|
|
436
|
+
export const drive_api = `syntax = "proto3";
|
|
437
|
+
|
|
438
|
+
package tdx.volt_api.volt.v1;
|
|
439
|
+
|
|
440
|
+
import "tdx/volt_api/volt/v1/status.proto";
|
|
441
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
442
|
+
|
|
443
|
+
// The Drive API allows clients to create and manage Volt Drive resources.
|
|
444
|
+
service DriveAPI {
|
|
445
|
+
// Create or update a drive connection resource.
|
|
446
|
+
// This is a privileged API call and requires volt:api-call / volt:save-drive permission.
|
|
447
|
+
rpc SaveDrive(SaveDriveRequest) returns (SaveDriveResponse);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
message SaveDriveRequest {
|
|
451
|
+
// Details of the drive to save.
|
|
452
|
+
Resource resource = 1;
|
|
453
|
+
|
|
454
|
+
// Set to indicate this is a new drive.
|
|
455
|
+
bool create = 2;
|
|
456
|
+
|
|
457
|
+
// The id of the folder resource in which a new drive should be created.
|
|
458
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
459
|
+
string create_in_parent_id = 3;
|
|
460
|
+
|
|
461
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
462
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
463
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
464
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
465
|
+
bool purge_attributes = 4;
|
|
466
|
+
|
|
467
|
+
// The id of the synapse resource that stores the drive data.
|
|
468
|
+
string source_synapse_id = 5;
|
|
469
|
+
|
|
470
|
+
// The local path of the folder to sync.
|
|
471
|
+
string target_folder = 6;
|
|
472
|
+
|
|
473
|
+
// The comma-separated include patterns.
|
|
474
|
+
string include = 7;
|
|
475
|
+
|
|
476
|
+
// The comma-separated exclude patterns.
|
|
477
|
+
string exclude = 8;
|
|
478
|
+
|
|
479
|
+
// The DID of the identity that should be used to authenticate with the remote Volt. If omitted, the authenticated identity will be used.
|
|
480
|
+
// The identity must have a private key stored in the Volt key store.
|
|
481
|
+
string identity_did = 9;
|
|
482
|
+
|
|
483
|
+
// The DID of the remote Volt.
|
|
484
|
+
string remote_volt_identity = 10;
|
|
485
|
+
|
|
486
|
+
// Optional address of the remote Volt. Either this or the relay address must be provided.
|
|
487
|
+
string remote_volt_address = 11;
|
|
488
|
+
|
|
489
|
+
// Optional HTTP address of the remote Volt.
|
|
490
|
+
string remote_volt_http_address = 12;
|
|
491
|
+
|
|
492
|
+
// Optional CA of the remote Volt. Either this or the relay CA must be provided.
|
|
493
|
+
string remote_volt_ca = 13;
|
|
494
|
+
|
|
495
|
+
// Optional address of the relay. Either this or the remote Volt address must be provided.
|
|
496
|
+
string relay_address = 14;
|
|
497
|
+
|
|
498
|
+
// Optional CA of the relay. Either this or the remote Volt CA must be provided.
|
|
499
|
+
string relay_ca = 15;
|
|
500
|
+
|
|
501
|
+
// Optional challenge of the relay.
|
|
502
|
+
string relay_challenge = 16;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
message SaveDriveResponse {
|
|
506
|
+
// Details of any error that occurred on the call.
|
|
507
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
508
|
+
|
|
509
|
+
// The updated drive resource.
|
|
510
|
+
Resource resource = 2;
|
|
511
|
+
}
|
|
512
|
+
|
|
435
513
|
`;
|
|
436
514
|
export const file = `syntax = "proto3";
|
|
437
515
|
|
|
@@ -823,6 +901,8 @@ service SsiAPI {
|
|
|
823
901
|
rpc RegisterDIDDocument(RegisterDIDDocumentRequest) returns (RegisterDIDDocumentResponse);
|
|
824
902
|
|
|
825
903
|
// Save a verifiable credential.
|
|
904
|
+
// If the credential is to be issued by the Volt, this is a privileged API call and requires volt:api-call / volt:save-verifiable-credential permission.
|
|
905
|
+
// If the credential is to be issued by an identity other than the Volt root, the authenticated session must have the associated identity id (or be the Volt root).
|
|
826
906
|
rpc SaveCredential(SaveCredentialRequest) returns (SaveCredentialResponse);
|
|
827
907
|
|
|
828
908
|
// Search the DID registry.
|
|
@@ -1049,8 +1129,8 @@ export const sync_api = `syntax = "proto3";
|
|
|
1049
1129
|
|
|
1050
1130
|
package tdx.volt_api.volt.v1;
|
|
1051
1131
|
|
|
1132
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
1052
1133
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
1053
|
-
import "tdx/volt_api/volt/v1/volt_api.proto";
|
|
1054
1134
|
|
|
1055
1135
|
// The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
|
|
1056
1136
|
service SyncAPI {
|
|
@@ -1058,12 +1138,18 @@ service SyncAPI {
|
|
|
1058
1138
|
// A synapse connection defines a bi-directional syncronisation between two Volt synapses. 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
1139
|
// 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
1140
|
// The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
|
|
1061
|
-
rpc CreateSynapseConnection(
|
|
1062
|
-
|
|
1141
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1142
|
+
|
|
1063
1143
|
// Delete a document from the synapse.
|
|
1064
1144
|
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1065
1145
|
|
|
1066
|
-
//
|
|
1146
|
+
// Create or update a synapse resource.
|
|
1147
|
+
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
1148
|
+
|
|
1149
|
+
// Create or update a sync database resource.
|
|
1150
|
+
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
1151
|
+
|
|
1152
|
+
// Set the metadata for a synapse document.
|
|
1067
1153
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1068
1154
|
|
|
1069
1155
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1076,6 +1162,60 @@ service SyncAPI {
|
|
|
1076
1162
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1077
1163
|
}
|
|
1078
1164
|
|
|
1165
|
+
message CreateSynapseConnectionRequest {
|
|
1166
|
+
// Details of the synapse connection to create.
|
|
1167
|
+
Resource resource = 1;
|
|
1168
|
+
|
|
1169
|
+
// Set to indicate this is a new synapse connection.
|
|
1170
|
+
bool create = 2;
|
|
1171
|
+
|
|
1172
|
+
// The id of the folder resource in which a new synapse connection should be created.
|
|
1173
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1174
|
+
string create_in_parent_id = 3;
|
|
1175
|
+
|
|
1176
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1177
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1178
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1179
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1180
|
+
bool purge_attributes = 4;
|
|
1181
|
+
|
|
1182
|
+
// The id of the synapse on the local Volt.
|
|
1183
|
+
string local_synapse_id = 5;
|
|
1184
|
+
|
|
1185
|
+
// The id of the synapse on the remote Volt.
|
|
1186
|
+
string remote_synapse_id = 6;
|
|
1187
|
+
|
|
1188
|
+
// The DID of the remote Volt.
|
|
1189
|
+
string remote_volt_identity = 7;
|
|
1190
|
+
|
|
1191
|
+
// The address of the remote Volt.
|
|
1192
|
+
string remote_volt_address = 8;
|
|
1193
|
+
|
|
1194
|
+
// The HTTP address of the remote Volt.
|
|
1195
|
+
string remote_volt_http_address = 9;
|
|
1196
|
+
|
|
1197
|
+
// The CA of the remote Volt.
|
|
1198
|
+
string remote_volt_ca = 10;
|
|
1199
|
+
|
|
1200
|
+
// Optional DID of the account to use when connecting to the remote Volt. If omitted, the local Volt DID will be used.
|
|
1201
|
+
// The identity must have a private key stored in the Volt key store.
|
|
1202
|
+
string remote_identity = 11;
|
|
1203
|
+
|
|
1204
|
+
// Optional address of the relay to use when connecting to the remote Volt.
|
|
1205
|
+
string relay_address = 12;
|
|
1206
|
+
|
|
1207
|
+
// Optional CA of the relay.
|
|
1208
|
+
string relay_ca = 13;
|
|
1209
|
+
|
|
1210
|
+
// Optional challenge of the relay.
|
|
1211
|
+
string relay_challenge = 14;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
message CreateSynapseConnectionResponse {
|
|
1215
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1216
|
+
Resource resource = 2;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1079
1219
|
message DeleteSynapseDocumentMetadataRequest {
|
|
1080
1220
|
// DEPRECATED: Use synapse_id instead.
|
|
1081
1221
|
string database_id = 1;
|
|
@@ -1091,6 +1231,79 @@ message DeleteSynapseDocumentMetadataResponse {
|
|
|
1091
1231
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
1092
1232
|
}
|
|
1093
1233
|
|
|
1234
|
+
message SaveSyncDatabaseRequest {
|
|
1235
|
+
// Details of the database to save.
|
|
1236
|
+
Resource resource = 1;
|
|
1237
|
+
|
|
1238
|
+
// Set to indicate this is a new database.
|
|
1239
|
+
bool create = 2;
|
|
1240
|
+
|
|
1241
|
+
// The id of the folder resource in which a new database should be created.
|
|
1242
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1243
|
+
string create_in_parent_id = 3;
|
|
1244
|
+
|
|
1245
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1246
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1247
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1248
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1249
|
+
bool purge_attributes = 4;
|
|
1250
|
+
|
|
1251
|
+
// Set to encrypt the database.
|
|
1252
|
+
bool encrypted = 5;
|
|
1253
|
+
|
|
1254
|
+
// Set to audit all SELECT database operations.
|
|
1255
|
+
bool read_audit = 6;
|
|
1256
|
+
|
|
1257
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
1258
|
+
bool write_audit = 7;
|
|
1259
|
+
|
|
1260
|
+
// By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the database and improve performance, but will also reduce the ability to rollback to a previous state.
|
|
1261
|
+
bool no_snapshots = 8;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
message SaveSyncDatabaseResponse {
|
|
1265
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1266
|
+
Resource resource = 2;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
message SaveSynapseRequest {
|
|
1270
|
+
// Details of the synapse to save.
|
|
1271
|
+
Resource resource = 1;
|
|
1272
|
+
|
|
1273
|
+
// Set to indicate this is a new synapse.
|
|
1274
|
+
bool create = 2;
|
|
1275
|
+
|
|
1276
|
+
// The id of the folder resource in which a new synapse should be created.
|
|
1277
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1278
|
+
string create_in_parent_id = 3;
|
|
1279
|
+
|
|
1280
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1281
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1282
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1283
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1284
|
+
bool purge_attributes = 4;
|
|
1285
|
+
|
|
1286
|
+
// Set to encrypt the synapse.
|
|
1287
|
+
bool encrypted = 5;
|
|
1288
|
+
|
|
1289
|
+
// Set to audit all SELECT synapse operations.
|
|
1290
|
+
bool read_audit = 6;
|
|
1291
|
+
|
|
1292
|
+
// Set to audit all INSERT, UPDATE, and DELETE synapse operations.
|
|
1293
|
+
bool write_audit = 7;
|
|
1294
|
+
|
|
1295
|
+
// By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the synapse and improve performance, but will also reduce the ability to rollback to a previous state.
|
|
1296
|
+
bool no_snapshots = 8;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
message SaveSynapseResponse {
|
|
1300
|
+
// Details of any error that occurred on the call.
|
|
1301
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1302
|
+
|
|
1303
|
+
// The updated synapse resource.
|
|
1304
|
+
Resource resource = 2;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1094
1307
|
message SynapseDocumentMetadata {
|
|
1095
1308
|
// The name of the top-level shared type in the document.
|
|
1096
1309
|
string name = 1;
|
|
@@ -2030,6 +2243,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2030
2243
|
// 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.
|
|
2031
2244
|
service VoltAPI {
|
|
2032
2245
|
// Add a relay connection resource to this volt.
|
|
2246
|
+
// This is a privileged API call and requires volt:api-call / volt:add-relay permission.
|
|
2033
2247
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2034
2248
|
|
|
2035
2249
|
// Issues a request to authenticate on the volt.
|
|
@@ -2058,6 +2272,7 @@ service VoltAPI {
|
|
|
2058
2272
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2059
2273
|
|
|
2060
2274
|
// Remove a custom access rule, such as a file share.
|
|
2275
|
+
// This is a privileged API call and requires volt:api-call / volt:delete-access permission. Resource owners have this privilege by default.
|
|
2061
2276
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2062
2277
|
|
|
2063
2278
|
// Delete a resource from this volt.
|
|
@@ -2084,11 +2299,11 @@ service VoltAPI {
|
|
|
2084
2299
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2085
2300
|
|
|
2086
2301
|
// Retrieve the Volt parameters.
|
|
2087
|
-
// This is a privileged API call and requires
|
|
2302
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2088
2303
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2089
2304
|
|
|
2090
2305
|
// Retrieve the active Volt policy.
|
|
2091
|
-
// This is a privileged API call and requires
|
|
2306
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2092
2307
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2093
2308
|
|
|
2094
2309
|
// Get resource from this volt.
|
|
@@ -2118,15 +2333,18 @@ service VoltAPI {
|
|
|
2118
2333
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2119
2334
|
|
|
2120
2335
|
// Create or update an access rule.
|
|
2336
|
+
// This is a privileged API call and requires volt:api-call / volt:save-access permission. Resource owners have this privilege by default.
|
|
2121
2337
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2122
2338
|
|
|
2123
2339
|
// Create or update a static file HTTP server.
|
|
2340
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-file-server permission.
|
|
2124
2341
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2125
2342
|
|
|
2126
2343
|
// Create or update an HTTP forwarder resource.
|
|
2127
2344
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2128
2345
|
|
|
2129
2346
|
// Create or update an HTTP REST API server.
|
|
2347
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
|
|
2130
2348
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2131
2349
|
|
|
2132
2350
|
// Create or update an HTTP REST API node.
|
|
@@ -2139,44 +2357,41 @@ service VoltAPI {
|
|
|
2139
2357
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2140
2358
|
|
|
2141
2359
|
// Create or update a mirrored link resource.
|
|
2360
|
+
// This is a privileged API call and requires volt:api-call / volt:save-mirrored-link permission.
|
|
2142
2361
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2143
2362
|
|
|
2144
|
-
// Create or update a sync database resource.
|
|
2145
|
-
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
2146
|
-
|
|
2147
|
-
// Create or update a synapse resource.
|
|
2148
|
-
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
2149
|
-
|
|
2150
|
-
// Create a synapse connection resource.
|
|
2151
|
-
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
2152
|
-
|
|
2153
2363
|
// Update Volt parameters.
|
|
2154
|
-
// This is a privileged call
|
|
2364
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2155
2365
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2156
2366
|
|
|
2157
2367
|
// Create or update resource in this volt.
|
|
2158
2368
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2159
2369
|
|
|
2160
2370
|
// Create or update a symbolic link resource.
|
|
2371
|
+
// This is a privileged API call and requires volt:api-call / volt:save-symbolic-link permission.ß
|
|
2161
2372
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2162
2373
|
|
|
2163
2374
|
// Save a session.
|
|
2375
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2164
2376
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2165
2377
|
|
|
2166
2378
|
// Set Volt access request decision.
|
|
2167
|
-
// This is a privileged call
|
|
2379
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2168
2380
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2169
2381
|
|
|
2382
|
+
// Set Volt policy.
|
|
2383
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2170
2384
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2171
2385
|
|
|
2172
2386
|
// Set the status of a Volt service.
|
|
2173
2387
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2174
2388
|
|
|
2175
2389
|
// Used to shutdown remote Volts.
|
|
2176
|
-
// This is a privileged call
|
|
2390
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2177
2391
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2178
2392
|
|
|
2179
2393
|
// Sign or verify an arbitrary message using the Volt key.
|
|
2394
|
+
// For signing using an \`identity_did\` other than the authenticated account, the authenticated session must have \`volt:sign\` permission for the given \`identity_did\`.
|
|
2180
2395
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2181
2396
|
}
|
|
2182
2397
|
|
|
@@ -3067,49 +3282,37 @@ message SaveResourceResponse {
|
|
|
3067
3282
|
}
|
|
3068
3283
|
|
|
3069
3284
|
message SaveDatabaseRequest {
|
|
3285
|
+
// Details of the database to save.
|
|
3070
3286
|
Resource resource = 1;
|
|
3071
|
-
bool create = 2;
|
|
3072
|
-
string create_in_parent_id = 3;
|
|
3073
|
-
bool purge_attributes = 4;
|
|
3074
|
-
bool encrypted = 5;
|
|
3075
|
-
bool read_audit = 6;
|
|
3076
|
-
bool write_audit = 7;
|
|
3077
|
-
}
|
|
3078
3287
|
|
|
3079
|
-
|
|
3080
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3081
|
-
Resource resource = 2;
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
message SaveSyncDatabaseRequest {
|
|
3085
|
-
Resource resource = 1;
|
|
3288
|
+
// Set to indicate this is a new database.
|
|
3086
3289
|
bool create = 2;
|
|
3087
|
-
string create_in_parent_id = 3;
|
|
3088
|
-
bool purge_attributes = 4;
|
|
3089
|
-
bool encrypted = 5;
|
|
3090
|
-
bool read_audit = 6;
|
|
3091
|
-
bool write_audit = 7;
|
|
3092
|
-
bool no_snapshots = 8;
|
|
3093
|
-
}
|
|
3094
|
-
|
|
3095
|
-
message SaveSyncDatabaseResponse {
|
|
3096
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3097
|
-
Resource resource = 2;
|
|
3098
|
-
}
|
|
3099
3290
|
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
bool create = 2;
|
|
3291
|
+
// The id of the folder resource in which a new database should be created.
|
|
3292
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
3103
3293
|
string create_in_parent_id = 3;
|
|
3294
|
+
|
|
3295
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
3296
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
3297
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
3298
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
3104
3299
|
bool purge_attributes = 4;
|
|
3300
|
+
|
|
3301
|
+
// Set to encrypt the database.
|
|
3105
3302
|
bool encrypted = 5;
|
|
3303
|
+
|
|
3304
|
+
// Set to audit all SELECT database operations.
|
|
3106
3305
|
bool read_audit = 6;
|
|
3306
|
+
|
|
3307
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3107
3308
|
bool write_audit = 7;
|
|
3108
|
-
bool no_snapshots = 8;
|
|
3109
3309
|
}
|
|
3110
3310
|
|
|
3111
|
-
message
|
|
3311
|
+
message SaveDatabaseResponse {
|
|
3312
|
+
// Details of any error that occurred on the call.
|
|
3112
3313
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3314
|
+
|
|
3315
|
+
// The updated database resource.
|
|
3113
3316
|
Resource resource = 2;
|
|
3114
3317
|
}
|
|
3115
3318
|
|
|
@@ -3181,28 +3384,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3181
3384
|
Resource resource = 2;
|
|
3182
3385
|
}
|
|
3183
3386
|
|
|
3184
|
-
message CreateSynapseConnectionRequest {
|
|
3185
|
-
Resource resource = 1;
|
|
3186
|
-
bool create = 2;
|
|
3187
|
-
string create_in_parent_id = 3;
|
|
3188
|
-
bool purge_attributes = 4;
|
|
3189
|
-
string local_synapse_id = 5;
|
|
3190
|
-
string remote_synapse_id = 6;
|
|
3191
|
-
string remote_volt_identity = 7;
|
|
3192
|
-
string remote_volt_address = 8;
|
|
3193
|
-
string remote_volt_http_address = 9;
|
|
3194
|
-
string remote_volt_ca = 10;
|
|
3195
|
-
string remote_identity = 11;
|
|
3196
|
-
string relay_address = 12;
|
|
3197
|
-
string relay_ca = 13;
|
|
3198
|
-
string relay_challenge = 14;
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
message CreateSynapseConnectionResponse {
|
|
3202
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3203
|
-
Resource resource = 2;
|
|
3204
|
-
}
|
|
3205
|
-
|
|
3206
3387
|
message SaveSessionRequest {
|
|
3207
3388
|
Session session = 1;
|
|
3208
3389
|
}
|
|
@@ -3391,4 +3572,4 @@ message SubscribeWireResponse {
|
|
|
3391
3572
|
}
|
|
3392
3573
|
|
|
3393
3574
|
`;
|
|
3394
|
-
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];
|
|
3575
|
+
export const voltProtos = [sqlite, sqlite_database_api, sqlite_server_api, proto_db_sync, proxy_api, relay_api, discovery_api, drive_api, file, file_api, remote, ssi, ssi_api, status, sync_api, terminal_api, volt, volt_api, wire_api];
|