@tdxvolt/volt-client-grpc 0.20.12 → 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 +302 -79
- package/package.json +3 -3
- package/src/grpc-call.js +6 -2
- package/src/volt-client.js +18 -3
- package/src/volt-proto-literals.js +282 -75
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,18 +1677,27 @@ 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 {
|
|
1605
1685
|
// Create a synapse connection resource.
|
|
1606
|
-
// A synapse connection defines a bi-directional syncronisation between two Volt
|
|
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(
|
|
1689
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1690
|
+
|
|
1691
|
+
// Delete a document from the synapse.
|
|
1692
|
+
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1610
1693
|
|
|
1611
|
-
//
|
|
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.
|
|
1612
1701
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1613
1702
|
|
|
1614
1703
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1621,6 +1710,147 @@ service SyncAPI {
|
|
|
1621
1710
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1622
1711
|
}
|
|
1623
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
|
+
|
|
1767
|
+
message DeleteSynapseDocumentMetadataRequest {
|
|
1768
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1769
|
+
string database_id = 1;
|
|
1770
|
+
|
|
1771
|
+
// The id of the synapse that contains the document.
|
|
1772
|
+
string synapse_id = 3;
|
|
1773
|
+
|
|
1774
|
+
// The id of the document to delete.
|
|
1775
|
+
string document_id = 2;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
message DeleteSynapseDocumentMetadataResponse {
|
|
1779
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1780
|
+
}
|
|
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
|
+
}
|
|
1624
1854
|
|
|
1625
1855
|
message SynapseDocumentMetadata {
|
|
1626
1856
|
// The name of the top-level shared type in the document.
|
|
@@ -1634,9 +1864,12 @@ message SynapseDocumentMetadata {
|
|
|
1634
1864
|
}
|
|
1635
1865
|
|
|
1636
1866
|
message SetSynapseDocumentMetadataRequest {
|
|
1637
|
-
//
|
|
1867
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1638
1868
|
string database_id = 1;
|
|
1639
1869
|
|
|
1870
|
+
// The id of the synapse that contains the document.
|
|
1871
|
+
string synapse_id = 5;
|
|
1872
|
+
|
|
1640
1873
|
// The id of the document to set the metadata for.
|
|
1641
1874
|
string document_id = 2;
|
|
1642
1875
|
|
|
@@ -1714,9 +1947,12 @@ message SyncDocumentResponse {
|
|
|
1714
1947
|
|
|
1715
1948
|
// Parameters to start watching synapse paths. Sent as the first message.
|
|
1716
1949
|
message WatchSynapsePathStart {
|
|
1717
|
-
//
|
|
1950
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1718
1951
|
string database_id = 1;
|
|
1719
1952
|
|
|
1953
|
+
// The id of the synapse that contains the document.
|
|
1954
|
+
string synapse_id = 4;
|
|
1955
|
+
|
|
1720
1956
|
// The id of the document to watch.
|
|
1721
1957
|
string document_id = 2;
|
|
1722
1958
|
|
|
@@ -1776,9 +2012,12 @@ message WatchSynapsePathResponse {
|
|
|
1776
2012
|
}
|
|
1777
2013
|
|
|
1778
2014
|
message WriteSynapsePathRequest {
|
|
1779
|
-
//
|
|
2015
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1780
2016
|
string database_id = 1;
|
|
1781
2017
|
|
|
2018
|
+
// The id of the synapse that contains the document.
|
|
2019
|
+
string synapse_id = 5;
|
|
2020
|
+
|
|
1782
2021
|
// The id of the document to write to.
|
|
1783
2022
|
string document_id = 2;
|
|
1784
2023
|
|
|
@@ -2552,6 +2791,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2552
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.
|
|
2553
2792
|
service VoltAPI {
|
|
2554
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.
|
|
2555
2795
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2556
2796
|
|
|
2557
2797
|
// Issues a request to authenticate on the volt.
|
|
@@ -2580,6 +2820,7 @@ service VoltAPI {
|
|
|
2580
2820
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2581
2821
|
|
|
2582
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.
|
|
2583
2824
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2584
2825
|
|
|
2585
2826
|
// Delete a resource from this volt.
|
|
@@ -2606,11 +2847,11 @@ service VoltAPI {
|
|
|
2606
2847
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2607
2848
|
|
|
2608
2849
|
// Retrieve the Volt parameters.
|
|
2609
|
-
// This is a privileged API call and requires
|
|
2850
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2610
2851
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2611
2852
|
|
|
2612
2853
|
// Retrieve the active Volt policy.
|
|
2613
|
-
// This is a privileged API call and requires
|
|
2854
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2614
2855
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2615
2856
|
|
|
2616
2857
|
// Get resource from this volt.
|
|
@@ -2640,15 +2881,18 @@ service VoltAPI {
|
|
|
2640
2881
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2641
2882
|
|
|
2642
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.
|
|
2643
2885
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2644
2886
|
|
|
2645
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.
|
|
2646
2889
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2647
2890
|
|
|
2648
2891
|
// Create or update an HTTP forwarder resource.
|
|
2649
2892
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2650
2893
|
|
|
2651
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.
|
|
2652
2896
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2653
2897
|
|
|
2654
2898
|
// Create or update an HTTP REST API node.
|
|
@@ -2661,44 +2905,41 @@ service VoltAPI {
|
|
|
2661
2905
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2662
2906
|
|
|
2663
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.
|
|
2664
2909
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2665
2910
|
|
|
2666
|
-
// Create or update a sync database resource.
|
|
2667
|
-
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
2668
|
-
|
|
2669
|
-
// Create or update a synapse resource.
|
|
2670
|
-
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
2671
|
-
|
|
2672
|
-
// Create a synapse connection resource.
|
|
2673
|
-
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
2674
|
-
|
|
2675
2911
|
// Update Volt parameters.
|
|
2676
|
-
// This is a privileged call
|
|
2912
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2677
2913
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2678
2914
|
|
|
2679
2915
|
// Create or update resource in this volt.
|
|
2680
2916
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2681
2917
|
|
|
2682
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.ß
|
|
2683
2920
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2684
2921
|
|
|
2685
2922
|
// Save a session.
|
|
2923
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2686
2924
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2687
2925
|
|
|
2688
2926
|
// Set Volt access request decision.
|
|
2689
|
-
// This is a privileged call
|
|
2927
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2690
2928
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2691
2929
|
|
|
2930
|
+
// Set Volt policy.
|
|
2931
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2692
2932
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2693
2933
|
|
|
2694
2934
|
// Set the status of a Volt service.
|
|
2695
2935
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2696
2936
|
|
|
2697
2937
|
// Used to shutdown remote Volts.
|
|
2698
|
-
// This is a privileged call
|
|
2938
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2699
2939
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2700
2940
|
|
|
2701
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\`.
|
|
2702
2943
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2703
2944
|
}
|
|
2704
2945
|
|
|
@@ -3589,49 +3830,37 @@ message SaveResourceResponse {
|
|
|
3589
3830
|
}
|
|
3590
3831
|
|
|
3591
3832
|
message SaveDatabaseRequest {
|
|
3833
|
+
// Details of the database to save.
|
|
3592
3834
|
Resource resource = 1;
|
|
3593
|
-
bool create = 2;
|
|
3594
|
-
string create_in_parent_id = 3;
|
|
3595
|
-
bool purge_attributes = 4;
|
|
3596
|
-
bool encrypted = 5;
|
|
3597
|
-
bool read_audit = 6;
|
|
3598
|
-
bool write_audit = 7;
|
|
3599
|
-
}
|
|
3600
3835
|
|
|
3601
|
-
|
|
3602
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3603
|
-
Resource resource = 2;
|
|
3604
|
-
}
|
|
3605
|
-
|
|
3606
|
-
message SaveSyncDatabaseRequest {
|
|
3607
|
-
Resource resource = 1;
|
|
3836
|
+
// Set to indicate this is a new database.
|
|
3608
3837
|
bool create = 2;
|
|
3609
|
-
string create_in_parent_id = 3;
|
|
3610
|
-
bool purge_attributes = 4;
|
|
3611
|
-
bool encrypted = 5;
|
|
3612
|
-
bool read_audit = 6;
|
|
3613
|
-
bool write_audit = 7;
|
|
3614
|
-
bool no_snapshots = 8;
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
|
-
message SaveSyncDatabaseResponse {
|
|
3618
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3619
|
-
Resource resource = 2;
|
|
3620
|
-
}
|
|
3621
3838
|
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
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.
|
|
3625
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.
|
|
3626
3847
|
bool purge_attributes = 4;
|
|
3848
|
+
|
|
3849
|
+
// Set to encrypt the database.
|
|
3627
3850
|
bool encrypted = 5;
|
|
3851
|
+
|
|
3852
|
+
// Set to audit all SELECT database operations.
|
|
3628
3853
|
bool read_audit = 6;
|
|
3854
|
+
|
|
3855
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3629
3856
|
bool write_audit = 7;
|
|
3630
|
-
bool no_snapshots = 8;
|
|
3631
3857
|
}
|
|
3632
3858
|
|
|
3633
|
-
message
|
|
3859
|
+
message SaveDatabaseResponse {
|
|
3860
|
+
// Details of any error that occurred on the call.
|
|
3634
3861
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3862
|
+
|
|
3863
|
+
// The updated database resource.
|
|
3635
3864
|
Resource resource = 2;
|
|
3636
3865
|
}
|
|
3637
3866
|
|
|
@@ -3703,28 +3932,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3703
3932
|
Resource resource = 2;
|
|
3704
3933
|
}
|
|
3705
3934
|
|
|
3706
|
-
message CreateSynapseConnectionRequest {
|
|
3707
|
-
Resource resource = 1;
|
|
3708
|
-
bool create = 2;
|
|
3709
|
-
string create_in_parent_id = 3;
|
|
3710
|
-
bool purge_attributes = 4;
|
|
3711
|
-
string local_synapse_id = 5;
|
|
3712
|
-
string remote_synapse_id = 6;
|
|
3713
|
-
string remote_volt_identity = 7;
|
|
3714
|
-
string remote_volt_address = 8;
|
|
3715
|
-
string remote_volt_http_address = 9;
|
|
3716
|
-
string remote_volt_ca = 10;
|
|
3717
|
-
string remote_identity = 11;
|
|
3718
|
-
string relay_address = 12;
|
|
3719
|
-
string relay_ca = 13;
|
|
3720
|
-
string relay_challenge = 14;
|
|
3721
|
-
}
|
|
3722
|
-
|
|
3723
|
-
message CreateSynapseConnectionResponse {
|
|
3724
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3725
|
-
Resource resource = 2;
|
|
3726
|
-
}
|
|
3727
|
-
|
|
3728
3935
|
message SaveSessionRequest {
|
|
3729
3936
|
Session session = 1;
|
|
3730
3937
|
}
|
|
@@ -3913,7 +4120,7 @@ message SubscribeWireResponse {
|
|
|
3913
4120
|
}
|
|
3914
4121
|
|
|
3915
4122
|
`;
|
|
3916
|
-
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];
|
|
3917
4124
|
|
|
3918
4125
|
debug__default["default"]("volt-client-grpc:proto-utils");
|
|
3919
4126
|
|
|
@@ -4369,9 +4576,10 @@ class GRPCCall extends EventEmitter__default["default"] {
|
|
|
4369
4576
|
} else if (parsedResponse.payload) {
|
|
4370
4577
|
// Interpret a non-empty status message as an error.
|
|
4371
4578
|
if (parsedResponse.payload?.status?.message) {
|
|
4579
|
+
const { message, description, code } = parsedResponse.payload.status;
|
|
4372
4580
|
this.emit(
|
|
4373
4581
|
"error",
|
|
4374
|
-
new
|
|
4582
|
+
new js.VoltClientError(message, { description, code })
|
|
4375
4583
|
);
|
|
4376
4584
|
} else {
|
|
4377
4585
|
this.emit("data", parsedResponse.payload);
|
|
@@ -6365,6 +6573,13 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6365
6573
|
return subscribeCall.start(grpcClient, request);
|
|
6366
6574
|
}
|
|
6367
6575
|
|
|
6576
|
+
/**
|
|
6577
|
+
* DriveAPI
|
|
6578
|
+
*/
|
|
6579
|
+
SaveDrive(request) {
|
|
6580
|
+
return unaryCallInternal.call(this, "SaveDrive", request);
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6368
6583
|
/**
|
|
6369
6584
|
* SyncAPI
|
|
6370
6585
|
*/
|
|
@@ -6378,7 +6593,15 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6378
6593
|
);
|
|
6379
6594
|
return syncDocumentCall.start(grpcClient, request);
|
|
6380
6595
|
}
|
|
6381
|
-
|
|
6596
|
+
|
|
6597
|
+
DeleteSynapseDocumentMetadata(request) {
|
|
6598
|
+
return unaryCallInternal.call(
|
|
6599
|
+
this,
|
|
6600
|
+
"DeleteSynapseDocumentMetadata",
|
|
6601
|
+
request
|
|
6602
|
+
);
|
|
6603
|
+
}
|
|
6604
|
+
|
|
6382
6605
|
SetSynapseDocumentMetadata(request) {
|
|
6383
6606
|
return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
|
|
6384
6607
|
}
|
|
@@ -6387,8 +6610,8 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6387
6610
|
const grpcClient = this.getVoltAPIClient();
|
|
6388
6611
|
|
|
6389
6612
|
const watchPathCall = new GRPCCall(
|
|
6390
|
-
this,
|
|
6391
|
-
"WatchSynapsePath",
|
|
6613
|
+
this,
|
|
6614
|
+
"WatchSynapsePath",
|
|
6392
6615
|
"METHOD_TYPE_BIDI"
|
|
6393
6616
|
);
|
|
6394
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,7 +745,15 @@ export class VoltClient extends EventEmitter {
|
|
|
738
745
|
);
|
|
739
746
|
return syncDocumentCall.start(grpcClient, request);
|
|
740
747
|
}
|
|
741
|
-
|
|
748
|
+
|
|
749
|
+
DeleteSynapseDocumentMetadata(request) {
|
|
750
|
+
return unaryCallInternal.call(
|
|
751
|
+
this,
|
|
752
|
+
"DeleteSynapseDocumentMetadata",
|
|
753
|
+
request
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
|
|
742
757
|
SetSynapseDocumentMetadata(request) {
|
|
743
758
|
return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
|
|
744
759
|
}
|
|
@@ -747,8 +762,8 @@ export class VoltClient extends EventEmitter {
|
|
|
747
762
|
const grpcClient = this.getVoltAPIClient();
|
|
748
763
|
|
|
749
764
|
const watchPathCall = new GRPCCall(
|
|
750
|
-
this,
|
|
751
|
-
"WatchSynapsePath",
|
|
765
|
+
this,
|
|
766
|
+
"WatchSynapsePath",
|
|
752
767
|
"METHOD_TYPE_BIDI"
|
|
753
768
|
);
|
|
754
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,18 +1129,27 @@ 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 {
|
|
1057
1137
|
// Create a synapse connection resource.
|
|
1058
|
-
// A synapse connection defines a bi-directional syncronisation between two Volt
|
|
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(
|
|
1141
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1142
|
+
|
|
1143
|
+
// Delete a document from the synapse.
|
|
1144
|
+
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1145
|
+
|
|
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);
|
|
1062
1151
|
|
|
1063
|
-
|
|
1152
|
+
// Set the metadata for a synapse document.
|
|
1064
1153
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1065
1154
|
|
|
1066
1155
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1073,6 +1162,147 @@ service SyncAPI {
|
|
|
1073
1162
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1074
1163
|
}
|
|
1075
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
|
+
|
|
1219
|
+
message DeleteSynapseDocumentMetadataRequest {
|
|
1220
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1221
|
+
string database_id = 1;
|
|
1222
|
+
|
|
1223
|
+
// The id of the synapse that contains the document.
|
|
1224
|
+
string synapse_id = 3;
|
|
1225
|
+
|
|
1226
|
+
// The id of the document to delete.
|
|
1227
|
+
string document_id = 2;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
message DeleteSynapseDocumentMetadataResponse {
|
|
1231
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1232
|
+
}
|
|
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
|
+
}
|
|
1076
1306
|
|
|
1077
1307
|
message SynapseDocumentMetadata {
|
|
1078
1308
|
// The name of the top-level shared type in the document.
|
|
@@ -1086,9 +1316,12 @@ message SynapseDocumentMetadata {
|
|
|
1086
1316
|
}
|
|
1087
1317
|
|
|
1088
1318
|
message SetSynapseDocumentMetadataRequest {
|
|
1089
|
-
//
|
|
1319
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1090
1320
|
string database_id = 1;
|
|
1091
1321
|
|
|
1322
|
+
// The id of the synapse that contains the document.
|
|
1323
|
+
string synapse_id = 5;
|
|
1324
|
+
|
|
1092
1325
|
// The id of the document to set the metadata for.
|
|
1093
1326
|
string document_id = 2;
|
|
1094
1327
|
|
|
@@ -1166,9 +1399,12 @@ message SyncDocumentResponse {
|
|
|
1166
1399
|
|
|
1167
1400
|
// Parameters to start watching synapse paths. Sent as the first message.
|
|
1168
1401
|
message WatchSynapsePathStart {
|
|
1169
|
-
//
|
|
1402
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1170
1403
|
string database_id = 1;
|
|
1171
1404
|
|
|
1405
|
+
// The id of the synapse that contains the document.
|
|
1406
|
+
string synapse_id = 4;
|
|
1407
|
+
|
|
1172
1408
|
// The id of the document to watch.
|
|
1173
1409
|
string document_id = 2;
|
|
1174
1410
|
|
|
@@ -1228,9 +1464,12 @@ message WatchSynapsePathResponse {
|
|
|
1228
1464
|
}
|
|
1229
1465
|
|
|
1230
1466
|
message WriteSynapsePathRequest {
|
|
1231
|
-
//
|
|
1467
|
+
// DEPRECATED: Use synapse_id instead.
|
|
1232
1468
|
string database_id = 1;
|
|
1233
1469
|
|
|
1470
|
+
// The id of the synapse that contains the document.
|
|
1471
|
+
string synapse_id = 5;
|
|
1472
|
+
|
|
1234
1473
|
// The id of the document to write to.
|
|
1235
1474
|
string document_id = 2;
|
|
1236
1475
|
|
|
@@ -2004,6 +2243,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2004
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.
|
|
2005
2244
|
service VoltAPI {
|
|
2006
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.
|
|
2007
2247
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2008
2248
|
|
|
2009
2249
|
// Issues a request to authenticate on the volt.
|
|
@@ -2032,6 +2272,7 @@ service VoltAPI {
|
|
|
2032
2272
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2033
2273
|
|
|
2034
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.
|
|
2035
2276
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2036
2277
|
|
|
2037
2278
|
// Delete a resource from this volt.
|
|
@@ -2058,11 +2299,11 @@ service VoltAPI {
|
|
|
2058
2299
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2059
2300
|
|
|
2060
2301
|
// Retrieve the Volt parameters.
|
|
2061
|
-
// This is a privileged API call and requires
|
|
2302
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2062
2303
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2063
2304
|
|
|
2064
2305
|
// Retrieve the active Volt policy.
|
|
2065
|
-
// This is a privileged API call and requires
|
|
2306
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2066
2307
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2067
2308
|
|
|
2068
2309
|
// Get resource from this volt.
|
|
@@ -2092,15 +2333,18 @@ service VoltAPI {
|
|
|
2092
2333
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2093
2334
|
|
|
2094
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.
|
|
2095
2337
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2096
2338
|
|
|
2097
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.
|
|
2098
2341
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2099
2342
|
|
|
2100
2343
|
// Create or update an HTTP forwarder resource.
|
|
2101
2344
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2102
2345
|
|
|
2103
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.
|
|
2104
2348
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2105
2349
|
|
|
2106
2350
|
// Create or update an HTTP REST API node.
|
|
@@ -2113,44 +2357,41 @@ service VoltAPI {
|
|
|
2113
2357
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2114
2358
|
|
|
2115
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.
|
|
2116
2361
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2117
2362
|
|
|
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
|
-
|
|
2127
2363
|
// Update Volt parameters.
|
|
2128
|
-
// This is a privileged call
|
|
2364
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2129
2365
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2130
2366
|
|
|
2131
2367
|
// Create or update resource in this volt.
|
|
2132
2368
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2133
2369
|
|
|
2134
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.ß
|
|
2135
2372
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2136
2373
|
|
|
2137
2374
|
// Save a session.
|
|
2375
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2138
2376
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2139
2377
|
|
|
2140
2378
|
// Set Volt access request decision.
|
|
2141
|
-
// This is a privileged call
|
|
2379
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2142
2380
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2143
2381
|
|
|
2382
|
+
// Set Volt policy.
|
|
2383
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2144
2384
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2145
2385
|
|
|
2146
2386
|
// Set the status of a Volt service.
|
|
2147
2387
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2148
2388
|
|
|
2149
2389
|
// Used to shutdown remote Volts.
|
|
2150
|
-
// This is a privileged call
|
|
2390
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2151
2391
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2152
2392
|
|
|
2153
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\`.
|
|
2154
2395
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2155
2396
|
}
|
|
2156
2397
|
|
|
@@ -3041,49 +3282,37 @@ message SaveResourceResponse {
|
|
|
3041
3282
|
}
|
|
3042
3283
|
|
|
3043
3284
|
message SaveDatabaseRequest {
|
|
3285
|
+
// Details of the database to save.
|
|
3044
3286
|
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
3287
|
|
|
3053
|
-
|
|
3054
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3055
|
-
Resource resource = 2;
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
message SaveSyncDatabaseRequest {
|
|
3059
|
-
Resource resource = 1;
|
|
3288
|
+
// Set to indicate this is a new database.
|
|
3060
3289
|
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
3290
|
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
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.
|
|
3077
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.
|
|
3078
3299
|
bool purge_attributes = 4;
|
|
3300
|
+
|
|
3301
|
+
// Set to encrypt the database.
|
|
3079
3302
|
bool encrypted = 5;
|
|
3303
|
+
|
|
3304
|
+
// Set to audit all SELECT database operations.
|
|
3080
3305
|
bool read_audit = 6;
|
|
3306
|
+
|
|
3307
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3081
3308
|
bool write_audit = 7;
|
|
3082
|
-
bool no_snapshots = 8;
|
|
3083
3309
|
}
|
|
3084
3310
|
|
|
3085
|
-
message
|
|
3311
|
+
message SaveDatabaseResponse {
|
|
3312
|
+
// Details of any error that occurred on the call.
|
|
3086
3313
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3314
|
+
|
|
3315
|
+
// The updated database resource.
|
|
3087
3316
|
Resource resource = 2;
|
|
3088
3317
|
}
|
|
3089
3318
|
|
|
@@ -3155,28 +3384,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3155
3384
|
Resource resource = 2;
|
|
3156
3385
|
}
|
|
3157
3386
|
|
|
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
|
-
|
|
3180
3387
|
message SaveSessionRequest {
|
|
3181
3388
|
Session session = 1;
|
|
3182
3389
|
}
|
|
@@ -3365,4 +3572,4 @@ message SubscribeWireResponse {
|
|
|
3365
3572
|
}
|
|
3366
3573
|
|
|
3367
3574
|
`;
|
|
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];
|
|
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];
|