@tdxvolt/volt-client-grpc 0.20.16 → 0.20.19
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 +292 -80
- package/package.json +3 -3
- package/src/grpc-call.js +6 -2
- package/src/volt-client.js +19 -4
- package/src/volt-proto-literals.js +271 -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-instance permission.
|
|
995
|
+
rpc SaveDriveInstance(SaveDriveInstanceRequest) returns (SaveDriveInstanceResponse);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
message SaveDriveInstanceRequest {
|
|
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 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_did = 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 SaveDriveInstanceResponse {
|
|
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.
|
|
@@ -1582,14 +1662,13 @@ const status = `syntax = "proto3";
|
|
|
1582
1662
|
package tdx.volt_api.volt.v1;
|
|
1583
1663
|
|
|
1584
1664
|
message Status {
|
|
1585
|
-
//
|
|
1586
|
-
// Mirrors the grpc StatusCode enum, 0 => OK
|
|
1665
|
+
// Mirrors the grpc StatusCode enum, 0 => OK, see https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
|
1587
1666
|
int32 code = 1;
|
|
1588
1667
|
|
|
1589
|
-
// A developer-facing human-readable error message
|
|
1668
|
+
// A developer-facing human-readable error message, e.g. 'invalidArguments'.
|
|
1590
1669
|
string message = 2;
|
|
1591
1670
|
|
|
1592
|
-
//
|
|
1671
|
+
// A description of the error, e.g. 'The \`database_id\` is missing'.
|
|
1593
1672
|
string description = 3;
|
|
1594
1673
|
}
|
|
1595
1674
|
`;
|
|
@@ -1597,8 +1676,8 @@ const sync_api = `syntax = "proto3";
|
|
|
1597
1676
|
|
|
1598
1677
|
package tdx.volt_api.volt.v1;
|
|
1599
1678
|
|
|
1679
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
1600
1680
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
1601
|
-
import "tdx/volt_api/volt/v1/volt_api.proto";
|
|
1602
1681
|
|
|
1603
1682
|
// The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
|
|
1604
1683
|
service SyncAPI {
|
|
@@ -1606,12 +1685,21 @@ service SyncAPI {
|
|
|
1606
1685
|
// 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
1686
|
// 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
1687
|
// The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
|
|
1609
|
-
rpc CreateSynapseConnection(
|
|
1688
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1610
1689
|
|
|
1690
|
+
// Delete a synapse connection. This will terminate any ongoing syncronisation between the two synapses and delete the connection resource.
|
|
1691
|
+
rpc DeleteSynapseConnection(DeleteSynapseConnectionRequest) returns (DeleteSynapseConnectionResponse);
|
|
1692
|
+
|
|
1611
1693
|
// Delete a document from the synapse.
|
|
1612
1694
|
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1613
1695
|
|
|
1614
|
-
//
|
|
1696
|
+
// Create or update a synapse resource.
|
|
1697
|
+
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
1698
|
+
|
|
1699
|
+
// Create or update a sync database resource.
|
|
1700
|
+
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
1701
|
+
|
|
1702
|
+
// Set the metadata for a synapse document.
|
|
1615
1703
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1616
1704
|
|
|
1617
1705
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1624,6 +1712,73 @@ service SyncAPI {
|
|
|
1624
1712
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1625
1713
|
}
|
|
1626
1714
|
|
|
1715
|
+
message CreateSynapseConnectionRequest {
|
|
1716
|
+
// Details of the synapse connection to create.
|
|
1717
|
+
Resource resource = 1;
|
|
1718
|
+
|
|
1719
|
+
// Set to indicate this is a new synapse connection.
|
|
1720
|
+
bool create = 2;
|
|
1721
|
+
|
|
1722
|
+
// The id of the folder resource in which a new synapse connection should be created.
|
|
1723
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1724
|
+
string create_in_parent_id = 3;
|
|
1725
|
+
|
|
1726
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1727
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1728
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1729
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1730
|
+
bool purge_attributes = 4;
|
|
1731
|
+
|
|
1732
|
+
// The id of the synapse on the local Volt.
|
|
1733
|
+
string local_synapse_id = 5;
|
|
1734
|
+
|
|
1735
|
+
// The id of the synapse on the remote Volt.
|
|
1736
|
+
string remote_synapse_id = 6;
|
|
1737
|
+
|
|
1738
|
+
// The DID of the remote Volt.
|
|
1739
|
+
string remote_volt_identity = 7;
|
|
1740
|
+
|
|
1741
|
+
// The address of the remote Volt.
|
|
1742
|
+
string remote_volt_address = 8;
|
|
1743
|
+
|
|
1744
|
+
// The HTTP address of the remote Volt.
|
|
1745
|
+
string remote_volt_http_address = 9;
|
|
1746
|
+
|
|
1747
|
+
// The CA of the remote Volt.
|
|
1748
|
+
string remote_volt_ca = 10;
|
|
1749
|
+
|
|
1750
|
+
// Optional DID of the account to use when connecting to the remote Volt. If omitted, the local Volt DID will be used.
|
|
1751
|
+
// The identity must have a private key stored in the Volt key store.
|
|
1752
|
+
string remote_identity = 11;
|
|
1753
|
+
|
|
1754
|
+
// Optional address of the relay to use when connecting to the remote Volt.
|
|
1755
|
+
string relay_address = 12;
|
|
1756
|
+
|
|
1757
|
+
// Optional CA of the relay.
|
|
1758
|
+
string relay_ca = 13;
|
|
1759
|
+
|
|
1760
|
+
// Optional challenge of the relay.
|
|
1761
|
+
string relay_challenge = 14;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
message CreateSynapseConnectionResponse {
|
|
1765
|
+
// Details of any error that occurred on the call.
|
|
1766
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1767
|
+
|
|
1768
|
+
// The created synapse connection resource.
|
|
1769
|
+
Resource resource = 2;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
message DeleteSynapseConnectionRequest {
|
|
1773
|
+
// The id of the synapse connection to delete.
|
|
1774
|
+
string synapse_connection_id = 1;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
message DeleteSynapseConnectionResponse {
|
|
1778
|
+
// Details of any error that occurred on the call.
|
|
1779
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1627
1782
|
message DeleteSynapseDocumentMetadataRequest {
|
|
1628
1783
|
// DEPRECATED: Use synapse_id instead.
|
|
1629
1784
|
string database_id = 1;
|
|
@@ -1639,6 +1794,79 @@ message DeleteSynapseDocumentMetadataResponse {
|
|
|
1639
1794
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
1640
1795
|
}
|
|
1641
1796
|
|
|
1797
|
+
message SaveSyncDatabaseRequest {
|
|
1798
|
+
// Details of the database to save.
|
|
1799
|
+
Resource resource = 1;
|
|
1800
|
+
|
|
1801
|
+
// Set to indicate this is a new database.
|
|
1802
|
+
bool create = 2;
|
|
1803
|
+
|
|
1804
|
+
// The id of the folder resource in which a new database should be created.
|
|
1805
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1806
|
+
string create_in_parent_id = 3;
|
|
1807
|
+
|
|
1808
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1809
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1810
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1811
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1812
|
+
bool purge_attributes = 4;
|
|
1813
|
+
|
|
1814
|
+
// Set to encrypt the database.
|
|
1815
|
+
bool encrypted = 5;
|
|
1816
|
+
|
|
1817
|
+
// Set to audit all SELECT database operations.
|
|
1818
|
+
bool read_audit = 6;
|
|
1819
|
+
|
|
1820
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
1821
|
+
bool write_audit = 7;
|
|
1822
|
+
|
|
1823
|
+
// 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.
|
|
1824
|
+
bool no_snapshots = 8;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
message SaveSyncDatabaseResponse {
|
|
1828
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1829
|
+
Resource resource = 2;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
message SaveSynapseRequest {
|
|
1833
|
+
// Details of the synapse to save.
|
|
1834
|
+
Resource resource = 1;
|
|
1835
|
+
|
|
1836
|
+
// Set to indicate this is a new synapse.
|
|
1837
|
+
bool create = 2;
|
|
1838
|
+
|
|
1839
|
+
// The id of the folder resource in which a new synapse should be created.
|
|
1840
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1841
|
+
string create_in_parent_id = 3;
|
|
1842
|
+
|
|
1843
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1844
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1845
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1846
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1847
|
+
bool purge_attributes = 4;
|
|
1848
|
+
|
|
1849
|
+
// Set to encrypt the synapse.
|
|
1850
|
+
bool encrypted = 5;
|
|
1851
|
+
|
|
1852
|
+
// Set to audit all SELECT synapse operations.
|
|
1853
|
+
bool read_audit = 6;
|
|
1854
|
+
|
|
1855
|
+
// Set to audit all INSERT, UPDATE, and DELETE synapse operations.
|
|
1856
|
+
bool write_audit = 7;
|
|
1857
|
+
|
|
1858
|
+
// 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.
|
|
1859
|
+
bool no_snapshots = 8;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
message SaveSynapseResponse {
|
|
1863
|
+
// Details of any error that occurred on the call.
|
|
1864
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1865
|
+
|
|
1866
|
+
// The updated synapse resource.
|
|
1867
|
+
Resource resource = 2;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1642
1870
|
message SynapseDocumentMetadata {
|
|
1643
1871
|
// The name of the top-level shared type in the document.
|
|
1644
1872
|
string name = 1;
|
|
@@ -2578,6 +2806,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2578
2806
|
// 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
2807
|
service VoltAPI {
|
|
2580
2808
|
// Add a relay connection resource to this volt.
|
|
2809
|
+
// This is a privileged API call and requires volt:api-call / volt:add-relay permission.
|
|
2581
2810
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2582
2811
|
|
|
2583
2812
|
// Issues a request to authenticate on the volt.
|
|
@@ -2606,6 +2835,7 @@ service VoltAPI {
|
|
|
2606
2835
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2607
2836
|
|
|
2608
2837
|
// Remove a custom access rule, such as a file share.
|
|
2838
|
+
// This is a privileged API call and requires volt:api-call / volt:delete-access permission. Resource owners have this privilege by default.
|
|
2609
2839
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2610
2840
|
|
|
2611
2841
|
// Delete a resource from this volt.
|
|
@@ -2632,11 +2862,11 @@ service VoltAPI {
|
|
|
2632
2862
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2633
2863
|
|
|
2634
2864
|
// Retrieve the Volt parameters.
|
|
2635
|
-
// This is a privileged API call and requires
|
|
2865
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2636
2866
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2637
2867
|
|
|
2638
2868
|
// Retrieve the active Volt policy.
|
|
2639
|
-
// This is a privileged API call and requires
|
|
2869
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2640
2870
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2641
2871
|
|
|
2642
2872
|
// Get resource from this volt.
|
|
@@ -2666,15 +2896,18 @@ service VoltAPI {
|
|
|
2666
2896
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2667
2897
|
|
|
2668
2898
|
// Create or update an access rule.
|
|
2899
|
+
// This is a privileged API call and requires volt:api-call / volt:save-access permission. Resource owners have this privilege by default.
|
|
2669
2900
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2670
2901
|
|
|
2671
2902
|
// Create or update a static file HTTP server.
|
|
2903
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-file-server permission.
|
|
2672
2904
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2673
2905
|
|
|
2674
2906
|
// Create or update an HTTP forwarder resource.
|
|
2675
2907
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2676
2908
|
|
|
2677
2909
|
// Create or update an HTTP REST API server.
|
|
2910
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
|
|
2678
2911
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2679
2912
|
|
|
2680
2913
|
// Create or update an HTTP REST API node.
|
|
@@ -2687,44 +2920,41 @@ service VoltAPI {
|
|
|
2687
2920
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2688
2921
|
|
|
2689
2922
|
// Create or update a mirrored link resource.
|
|
2923
|
+
// This is a privileged API call and requires volt:api-call / volt:save-mirrored-link permission.
|
|
2690
2924
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2691
2925
|
|
|
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
2926
|
// Update Volt parameters.
|
|
2702
|
-
// This is a privileged call
|
|
2927
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2703
2928
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2704
2929
|
|
|
2705
2930
|
// Create or update resource in this volt.
|
|
2706
2931
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2707
2932
|
|
|
2708
2933
|
// Create or update a symbolic link resource.
|
|
2934
|
+
// This is a privileged API call and requires volt:api-call / volt:save-symbolic-link permission.ß
|
|
2709
2935
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2710
2936
|
|
|
2711
2937
|
// Save a session.
|
|
2938
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2712
2939
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2713
2940
|
|
|
2714
2941
|
// Set Volt access request decision.
|
|
2715
|
-
// This is a privileged call
|
|
2942
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2716
2943
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2717
2944
|
|
|
2945
|
+
// Set Volt policy.
|
|
2946
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2718
2947
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2719
2948
|
|
|
2720
2949
|
// Set the status of a Volt service.
|
|
2721
2950
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2722
2951
|
|
|
2723
2952
|
// Used to shutdown remote Volts.
|
|
2724
|
-
// This is a privileged call
|
|
2953
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2725
2954
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2726
2955
|
|
|
2727
2956
|
// Sign or verify an arbitrary message using the Volt key.
|
|
2957
|
+
// 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
2958
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2729
2959
|
}
|
|
2730
2960
|
|
|
@@ -3615,49 +3845,37 @@ message SaveResourceResponse {
|
|
|
3615
3845
|
}
|
|
3616
3846
|
|
|
3617
3847
|
message SaveDatabaseRequest {
|
|
3848
|
+
// Details of the database to save.
|
|
3618
3849
|
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
3850
|
|
|
3627
|
-
|
|
3628
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3629
|
-
Resource resource = 2;
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
|
-
message SaveSyncDatabaseRequest {
|
|
3633
|
-
Resource resource = 1;
|
|
3851
|
+
// Set to indicate this is a new database.
|
|
3634
3852
|
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
|
-
|
|
3643
|
-
message SaveSyncDatabaseResponse {
|
|
3644
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3645
|
-
Resource resource = 2;
|
|
3646
|
-
}
|
|
3647
3853
|
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
bool create = 2;
|
|
3854
|
+
// The id of the folder resource in which a new database should be created.
|
|
3855
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
3651
3856
|
string create_in_parent_id = 3;
|
|
3857
|
+
|
|
3858
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
3859
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
3860
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
3861
|
+
// 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
3862
|
bool purge_attributes = 4;
|
|
3863
|
+
|
|
3864
|
+
// Set to encrypt the database.
|
|
3653
3865
|
bool encrypted = 5;
|
|
3866
|
+
|
|
3867
|
+
// Set to audit all SELECT database operations.
|
|
3654
3868
|
bool read_audit = 6;
|
|
3869
|
+
|
|
3870
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3655
3871
|
bool write_audit = 7;
|
|
3656
|
-
bool no_snapshots = 8;
|
|
3657
3872
|
}
|
|
3658
3873
|
|
|
3659
|
-
message
|
|
3874
|
+
message SaveDatabaseResponse {
|
|
3875
|
+
// Details of any error that occurred on the call.
|
|
3660
3876
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3877
|
+
|
|
3878
|
+
// The updated database resource.
|
|
3661
3879
|
Resource resource = 2;
|
|
3662
3880
|
}
|
|
3663
3881
|
|
|
@@ -3729,28 +3947,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3729
3947
|
Resource resource = 2;
|
|
3730
3948
|
}
|
|
3731
3949
|
|
|
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
3950
|
message SaveSessionRequest {
|
|
3755
3951
|
Session session = 1;
|
|
3756
3952
|
}
|
|
@@ -3939,7 +4135,7 @@ message SubscribeWireResponse {
|
|
|
3939
4135
|
}
|
|
3940
4136
|
|
|
3941
4137
|
`;
|
|
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];
|
|
4138
|
+
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
4139
|
|
|
3944
4140
|
debug__default["default"]("volt-client-grpc:proto-utils");
|
|
3945
4141
|
|
|
@@ -4395,9 +4591,10 @@ class GRPCCall extends EventEmitter__default["default"] {
|
|
|
4395
4591
|
} else if (parsedResponse.payload) {
|
|
4396
4592
|
// Interpret a non-empty status message as an error.
|
|
4397
4593
|
if (parsedResponse.payload?.status?.message) {
|
|
4594
|
+
const { message, description, code } = parsedResponse.payload.status;
|
|
4398
4595
|
this.emit(
|
|
4399
4596
|
"error",
|
|
4400
|
-
new
|
|
4597
|
+
new js.VoltClientError(message, { description, code })
|
|
4401
4598
|
);
|
|
4402
4599
|
} else {
|
|
4403
4600
|
this.emit("data", parsedResponse.payload);
|
|
@@ -6083,6 +6280,10 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6083
6280
|
return unaryCallInternal.call(this, "CreateSynapseConnection", request);
|
|
6084
6281
|
}
|
|
6085
6282
|
|
|
6283
|
+
DeleteSynapseConnection(request) {
|
|
6284
|
+
return unaryCallInternal.call(this, "DeleteSynapseConnection", request);
|
|
6285
|
+
}
|
|
6286
|
+
|
|
6086
6287
|
SaveSymbolicLink(request) {
|
|
6087
6288
|
return unaryCallInternal.call(this, "SaveSymbolicLink", request);
|
|
6088
6289
|
}
|
|
@@ -6391,6 +6592,13 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6391
6592
|
return subscribeCall.start(grpcClient, request);
|
|
6392
6593
|
}
|
|
6393
6594
|
|
|
6595
|
+
/**
|
|
6596
|
+
* DriveAPI
|
|
6597
|
+
*/
|
|
6598
|
+
SaveDrive(request) {
|
|
6599
|
+
return unaryCallInternal.call(this, "SaveDrive", request);
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6394
6602
|
/**
|
|
6395
6603
|
* SyncAPI
|
|
6396
6604
|
*/
|
|
@@ -6404,9 +6612,13 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6404
6612
|
);
|
|
6405
6613
|
return syncDocumentCall.start(grpcClient, request);
|
|
6406
6614
|
}
|
|
6407
|
-
|
|
6615
|
+
|
|
6408
6616
|
DeleteSynapseDocumentMetadata(request) {
|
|
6409
|
-
return unaryCallInternal.call(
|
|
6617
|
+
return unaryCallInternal.call(
|
|
6618
|
+
this,
|
|
6619
|
+
"DeleteSynapseDocumentMetadata",
|
|
6620
|
+
request
|
|
6621
|
+
);
|
|
6410
6622
|
}
|
|
6411
6623
|
|
|
6412
6624
|
SetSynapseDocumentMetadata(request) {
|
|
@@ -6417,8 +6629,8 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6417
6629
|
const grpcClient = this.getVoltAPIClient();
|
|
6418
6630
|
|
|
6419
6631
|
const watchPathCall = new GRPCCall(
|
|
6420
|
-
this,
|
|
6421
|
-
"WatchSynapsePath",
|
|
6632
|
+
this,
|
|
6633
|
+
"WatchSynapsePath",
|
|
6422
6634
|
"METHOD_TYPE_BIDI"
|
|
6423
6635
|
);
|
|
6424
6636
|
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.19",
|
|
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.19",
|
|
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
|
@@ -415,6 +415,10 @@ export class VoltClient extends EventEmitter {
|
|
|
415
415
|
return unaryCallInternal.call(this, "CreateSynapseConnection", request);
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
+
DeleteSynapseConnection(request) {
|
|
419
|
+
return unaryCallInternal.call(this, "DeleteSynapseConnection", request);
|
|
420
|
+
}
|
|
421
|
+
|
|
418
422
|
SaveSymbolicLink(request) {
|
|
419
423
|
return unaryCallInternal.call(this, "SaveSymbolicLink", request);
|
|
420
424
|
}
|
|
@@ -725,6 +729,13 @@ export class VoltClient extends EventEmitter {
|
|
|
725
729
|
return subscribeCall.start(grpcClient, request);
|
|
726
730
|
}
|
|
727
731
|
|
|
732
|
+
/**
|
|
733
|
+
* DriveAPI
|
|
734
|
+
*/
|
|
735
|
+
SaveDrive(request) {
|
|
736
|
+
return unaryCallInternal.call(this, "SaveDrive", request);
|
|
737
|
+
}
|
|
738
|
+
|
|
728
739
|
/**
|
|
729
740
|
* SyncAPI
|
|
730
741
|
*/
|
|
@@ -738,9 +749,13 @@ export class VoltClient extends EventEmitter {
|
|
|
738
749
|
);
|
|
739
750
|
return syncDocumentCall.start(grpcClient, request);
|
|
740
751
|
}
|
|
741
|
-
|
|
752
|
+
|
|
742
753
|
DeleteSynapseDocumentMetadata(request) {
|
|
743
|
-
return unaryCallInternal.call(
|
|
754
|
+
return unaryCallInternal.call(
|
|
755
|
+
this,
|
|
756
|
+
"DeleteSynapseDocumentMetadata",
|
|
757
|
+
request
|
|
758
|
+
);
|
|
744
759
|
}
|
|
745
760
|
|
|
746
761
|
SetSynapseDocumentMetadata(request) {
|
|
@@ -751,8 +766,8 @@ export class VoltClient extends EventEmitter {
|
|
|
751
766
|
const grpcClient = this.getVoltAPIClient();
|
|
752
767
|
|
|
753
768
|
const watchPathCall = new GRPCCall(
|
|
754
|
-
this,
|
|
755
|
-
"WatchSynapsePath",
|
|
769
|
+
this,
|
|
770
|
+
"WatchSynapsePath",
|
|
756
771
|
"METHOD_TYPE_BIDI"
|
|
757
772
|
);
|
|
758
773
|
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-instance permission.
|
|
447
|
+
rpc SaveDriveInstance(SaveDriveInstanceRequest) returns (SaveDriveInstanceResponse);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
message SaveDriveInstanceRequest {
|
|
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 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_did = 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 SaveDriveInstanceResponse {
|
|
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.
|
|
@@ -1034,14 +1114,13 @@ export const status = `syntax = "proto3";
|
|
|
1034
1114
|
package tdx.volt_api.volt.v1;
|
|
1035
1115
|
|
|
1036
1116
|
message Status {
|
|
1037
|
-
//
|
|
1038
|
-
// Mirrors the grpc StatusCode enum, 0 => OK
|
|
1117
|
+
// Mirrors the grpc StatusCode enum, 0 => OK, see https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
|
1039
1118
|
int32 code = 1;
|
|
1040
1119
|
|
|
1041
|
-
// A developer-facing human-readable error message
|
|
1120
|
+
// A developer-facing human-readable error message, e.g. 'invalidArguments'.
|
|
1042
1121
|
string message = 2;
|
|
1043
1122
|
|
|
1044
|
-
//
|
|
1123
|
+
// A description of the error, e.g. 'The \`database_id\` is missing'.
|
|
1045
1124
|
string description = 3;
|
|
1046
1125
|
}
|
|
1047
1126
|
`;
|
|
@@ -1049,8 +1128,8 @@ export const sync_api = `syntax = "proto3";
|
|
|
1049
1128
|
|
|
1050
1129
|
package tdx.volt_api.volt.v1;
|
|
1051
1130
|
|
|
1131
|
+
import "tdx/volt_api/volt/v1/volt.proto";
|
|
1052
1132
|
import "tdx/volt_api/volt/v1/status.proto";
|
|
1053
|
-
import "tdx/volt_api/volt/v1/volt_api.proto";
|
|
1054
1133
|
|
|
1055
1134
|
// The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
|
|
1056
1135
|
service SyncAPI {
|
|
@@ -1058,12 +1137,21 @@ service SyncAPI {
|
|
|
1058
1137
|
// 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
1138
|
// 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
1139
|
// The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
|
|
1061
|
-
rpc CreateSynapseConnection(
|
|
1140
|
+
rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
|
|
1062
1141
|
|
|
1142
|
+
// Delete a synapse connection. This will terminate any ongoing syncronisation between the two synapses and delete the connection resource.
|
|
1143
|
+
rpc DeleteSynapseConnection(DeleteSynapseConnectionRequest) returns (DeleteSynapseConnectionResponse);
|
|
1144
|
+
|
|
1063
1145
|
// Delete a document from the synapse.
|
|
1064
1146
|
rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
|
|
1065
1147
|
|
|
1066
|
-
//
|
|
1148
|
+
// Create or update a synapse resource.
|
|
1149
|
+
rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
|
|
1150
|
+
|
|
1151
|
+
// Create or update a sync database resource.
|
|
1152
|
+
rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
|
|
1153
|
+
|
|
1154
|
+
// Set the metadata for a synapse document.
|
|
1067
1155
|
rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
|
|
1068
1156
|
|
|
1069
1157
|
// Bidirectional streaming RPC for real-time document synchronization
|
|
@@ -1076,6 +1164,73 @@ service SyncAPI {
|
|
|
1076
1164
|
rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
|
|
1077
1165
|
}
|
|
1078
1166
|
|
|
1167
|
+
message CreateSynapseConnectionRequest {
|
|
1168
|
+
// Details of the synapse connection to create.
|
|
1169
|
+
Resource resource = 1;
|
|
1170
|
+
|
|
1171
|
+
// Set to indicate this is a new synapse connection.
|
|
1172
|
+
bool create = 2;
|
|
1173
|
+
|
|
1174
|
+
// The id of the folder resource in which a new synapse connection should be created.
|
|
1175
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1176
|
+
string create_in_parent_id = 3;
|
|
1177
|
+
|
|
1178
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1179
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1180
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1181
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1182
|
+
bool purge_attributes = 4;
|
|
1183
|
+
|
|
1184
|
+
// The id of the synapse on the local Volt.
|
|
1185
|
+
string local_synapse_id = 5;
|
|
1186
|
+
|
|
1187
|
+
// The id of the synapse on the remote Volt.
|
|
1188
|
+
string remote_synapse_id = 6;
|
|
1189
|
+
|
|
1190
|
+
// The DID of the remote Volt.
|
|
1191
|
+
string remote_volt_identity = 7;
|
|
1192
|
+
|
|
1193
|
+
// The address of the remote Volt.
|
|
1194
|
+
string remote_volt_address = 8;
|
|
1195
|
+
|
|
1196
|
+
// The HTTP address of the remote Volt.
|
|
1197
|
+
string remote_volt_http_address = 9;
|
|
1198
|
+
|
|
1199
|
+
// The CA of the remote Volt.
|
|
1200
|
+
string remote_volt_ca = 10;
|
|
1201
|
+
|
|
1202
|
+
// Optional DID of the account to use when connecting to the remote Volt. If omitted, the local Volt DID will be used.
|
|
1203
|
+
// The identity must have a private key stored in the Volt key store.
|
|
1204
|
+
string remote_identity = 11;
|
|
1205
|
+
|
|
1206
|
+
// Optional address of the relay to use when connecting to the remote Volt.
|
|
1207
|
+
string relay_address = 12;
|
|
1208
|
+
|
|
1209
|
+
// Optional CA of the relay.
|
|
1210
|
+
string relay_ca = 13;
|
|
1211
|
+
|
|
1212
|
+
// Optional challenge of the relay.
|
|
1213
|
+
string relay_challenge = 14;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
message CreateSynapseConnectionResponse {
|
|
1217
|
+
// Details of any error that occurred on the call.
|
|
1218
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1219
|
+
|
|
1220
|
+
// The created synapse connection resource.
|
|
1221
|
+
Resource resource = 2;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
message DeleteSynapseConnectionRequest {
|
|
1225
|
+
// The id of the synapse connection to delete.
|
|
1226
|
+
string synapse_connection_id = 1;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
message DeleteSynapseConnectionResponse {
|
|
1230
|
+
// Details of any error that occurred on the call.
|
|
1231
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1079
1234
|
message DeleteSynapseDocumentMetadataRequest {
|
|
1080
1235
|
// DEPRECATED: Use synapse_id instead.
|
|
1081
1236
|
string database_id = 1;
|
|
@@ -1091,6 +1246,79 @@ message DeleteSynapseDocumentMetadataResponse {
|
|
|
1091
1246
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
1092
1247
|
}
|
|
1093
1248
|
|
|
1249
|
+
message SaveSyncDatabaseRequest {
|
|
1250
|
+
// Details of the database to save.
|
|
1251
|
+
Resource resource = 1;
|
|
1252
|
+
|
|
1253
|
+
// Set to indicate this is a new database.
|
|
1254
|
+
bool create = 2;
|
|
1255
|
+
|
|
1256
|
+
// The id of the folder resource in which a new database should be created.
|
|
1257
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1258
|
+
string create_in_parent_id = 3;
|
|
1259
|
+
|
|
1260
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1261
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1262
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1263
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1264
|
+
bool purge_attributes = 4;
|
|
1265
|
+
|
|
1266
|
+
// Set to encrypt the database.
|
|
1267
|
+
bool encrypted = 5;
|
|
1268
|
+
|
|
1269
|
+
// Set to audit all SELECT database operations.
|
|
1270
|
+
bool read_audit = 6;
|
|
1271
|
+
|
|
1272
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
1273
|
+
bool write_audit = 7;
|
|
1274
|
+
|
|
1275
|
+
// 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.
|
|
1276
|
+
bool no_snapshots = 8;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
message SaveSyncDatabaseResponse {
|
|
1280
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1281
|
+
Resource resource = 2;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
message SaveSynapseRequest {
|
|
1285
|
+
// Details of the synapse to save.
|
|
1286
|
+
Resource resource = 1;
|
|
1287
|
+
|
|
1288
|
+
// Set to indicate this is a new synapse.
|
|
1289
|
+
bool create = 2;
|
|
1290
|
+
|
|
1291
|
+
// The id of the folder resource in which a new synapse should be created.
|
|
1292
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
1293
|
+
string create_in_parent_id = 3;
|
|
1294
|
+
|
|
1295
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
1296
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
1297
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
1298
|
+
// This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update.
|
|
1299
|
+
bool purge_attributes = 4;
|
|
1300
|
+
|
|
1301
|
+
// Set to encrypt the synapse.
|
|
1302
|
+
bool encrypted = 5;
|
|
1303
|
+
|
|
1304
|
+
// Set to audit all SELECT synapse operations.
|
|
1305
|
+
bool read_audit = 6;
|
|
1306
|
+
|
|
1307
|
+
// Set to audit all INSERT, UPDATE, and DELETE synapse operations.
|
|
1308
|
+
bool write_audit = 7;
|
|
1309
|
+
|
|
1310
|
+
// 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.
|
|
1311
|
+
bool no_snapshots = 8;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
message SaveSynapseResponse {
|
|
1315
|
+
// Details of any error that occurred on the call.
|
|
1316
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
1317
|
+
|
|
1318
|
+
// The updated synapse resource.
|
|
1319
|
+
Resource resource = 2;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1094
1322
|
message SynapseDocumentMetadata {
|
|
1095
1323
|
// The name of the top-level shared type in the document.
|
|
1096
1324
|
string name = 1;
|
|
@@ -2030,6 +2258,7 @@ import "tdx/volt_api/volt/v1/volt.proto";
|
|
|
2030
2258
|
// 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
2259
|
service VoltAPI {
|
|
2032
2260
|
// Add a relay connection resource to this volt.
|
|
2261
|
+
// This is a privileged API call and requires volt:api-call / volt:add-relay permission.
|
|
2033
2262
|
rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2034
2263
|
|
|
2035
2264
|
// Issues a request to authenticate on the volt.
|
|
@@ -2058,6 +2287,7 @@ service VoltAPI {
|
|
|
2058
2287
|
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
2059
2288
|
|
|
2060
2289
|
// Remove a custom access rule, such as a file share.
|
|
2290
|
+
// This is a privileged API call and requires volt:api-call / volt:delete-access permission. Resource owners have this privilege by default.
|
|
2061
2291
|
rpc DeleteAccess(DeleteAccessRequest) returns (DeleteAccessResponse);
|
|
2062
2292
|
|
|
2063
2293
|
// Delete a resource from this volt.
|
|
@@ -2084,11 +2314,11 @@ service VoltAPI {
|
|
|
2084
2314
|
rpc GetOneTimeToken(GetOneTimeTokenRequest) returns (GetOneTimeTokenResponse);
|
|
2085
2315
|
|
|
2086
2316
|
// Retrieve the Volt parameters.
|
|
2087
|
-
// This is a privileged API call and requires
|
|
2317
|
+
// This is a privileged API call and requires volt:api-call / volt:get-parameters permission.
|
|
2088
2318
|
rpc GetParameters(GetParametersRequest) returns (GetParametersResponse);
|
|
2089
2319
|
|
|
2090
2320
|
// Retrieve the active Volt policy.
|
|
2091
|
-
// This is a privileged API call and requires
|
|
2321
|
+
// This is a privileged API call and requires volt:api-call / volt:get-policy permission.
|
|
2092
2322
|
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse);
|
|
2093
2323
|
|
|
2094
2324
|
// Get resource from this volt.
|
|
@@ -2118,15 +2348,18 @@ service VoltAPI {
|
|
|
2118
2348
|
rpc RequestAccess(RequestAccessRequest) returns (RequestAccessResponse);
|
|
2119
2349
|
|
|
2120
2350
|
// Create or update an access rule.
|
|
2351
|
+
// This is a privileged API call and requires volt:api-call / volt:save-access permission. Resource owners have this privilege by default.
|
|
2121
2352
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
2122
2353
|
|
|
2123
2354
|
// Create or update a static file HTTP server.
|
|
2355
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-file-server permission.
|
|
2124
2356
|
rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
|
|
2125
2357
|
|
|
2126
2358
|
// Create or update an HTTP forwarder resource.
|
|
2127
2359
|
rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
|
|
2128
2360
|
|
|
2129
2361
|
// Create or update an HTTP REST API server.
|
|
2362
|
+
// This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
|
|
2130
2363
|
rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
|
|
2131
2364
|
|
|
2132
2365
|
// Create or update an HTTP REST API node.
|
|
@@ -2139,44 +2372,41 @@ service VoltAPI {
|
|
|
2139
2372
|
rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
|
|
2140
2373
|
|
|
2141
2374
|
// Create or update a mirrored link resource.
|
|
2375
|
+
// This is a privileged API call and requires volt:api-call / volt:save-mirrored-link permission.
|
|
2142
2376
|
rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2143
2377
|
|
|
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
2378
|
// Update Volt parameters.
|
|
2154
|
-
// This is a privileged call
|
|
2379
|
+
// This is a privileged API call and requires volt:api-call / volt:save-parameters permission.
|
|
2155
2380
|
rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
|
|
2156
2381
|
|
|
2157
2382
|
// Create or update resource in this volt.
|
|
2158
2383
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2159
2384
|
|
|
2160
2385
|
// Create or update a symbolic link resource.
|
|
2386
|
+
// This is a privileged API call and requires volt:api-call / volt:save-symbolic-link permission.ß
|
|
2161
2387
|
rpc SaveSymbolicLink(SaveResourceRequest) returns (SaveResourceResponse);
|
|
2162
2388
|
|
|
2163
2389
|
// Save a session.
|
|
2390
|
+
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2164
2391
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2165
2392
|
|
|
2166
2393
|
// Set Volt access request decision.
|
|
2167
|
-
// This is a privileged call
|
|
2394
|
+
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2168
2395
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
2169
2396
|
|
|
2397
|
+
// Set Volt policy.
|
|
2398
|
+
// This is a privileged API call and requires volt:api-call / volt:set-policy permission.
|
|
2170
2399
|
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
|
|
2171
2400
|
|
|
2172
2401
|
// Set the status of a Volt service.
|
|
2173
2402
|
rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
|
|
2174
2403
|
|
|
2175
2404
|
// Used to shutdown remote Volts.
|
|
2176
|
-
// This is a privileged call
|
|
2405
|
+
// This is a privileged API call and requires volt:api-call / volt:shutdown permission.
|
|
2177
2406
|
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
|
|
2178
2407
|
|
|
2179
2408
|
// Sign or verify an arbitrary message using the Volt key.
|
|
2409
|
+
// 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
2410
|
rpc SignVerify(SignVerifyRequest) returns (SignVerifyResponse);
|
|
2181
2411
|
}
|
|
2182
2412
|
|
|
@@ -3067,49 +3297,37 @@ message SaveResourceResponse {
|
|
|
3067
3297
|
}
|
|
3068
3298
|
|
|
3069
3299
|
message SaveDatabaseRequest {
|
|
3300
|
+
// Details of the database to save.
|
|
3070
3301
|
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
3302
|
|
|
3079
|
-
|
|
3080
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3081
|
-
Resource resource = 2;
|
|
3082
|
-
}
|
|
3083
|
-
|
|
3084
|
-
message SaveSyncDatabaseRequest {
|
|
3085
|
-
Resource resource = 1;
|
|
3303
|
+
// Set to indicate this is a new database.
|
|
3086
3304
|
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
3305
|
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
Resource resource = 2;
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
message SaveSynapseRequest {
|
|
3101
|
-
Resource resource = 1;
|
|
3102
|
-
bool create = 2;
|
|
3306
|
+
// The id of the folder resource in which a new database should be created.
|
|
3307
|
+
// If omitted, the home folder of the currently authenticated identity will be used.
|
|
3103
3308
|
string create_in_parent_id = 3;
|
|
3309
|
+
|
|
3310
|
+
// Set to indicate the resource attributes should be purged before saving the resource.
|
|
3311
|
+
// If the \`resource\` field contains attributes they will be saved after the purge.
|
|
3312
|
+
// If the \`resource\` field does not contain attributes this effectively deletes all attributes for this resource.
|
|
3313
|
+
// 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
3314
|
bool purge_attributes = 4;
|
|
3315
|
+
|
|
3316
|
+
// Set to encrypt the database.
|
|
3105
3317
|
bool encrypted = 5;
|
|
3318
|
+
|
|
3319
|
+
// Set to audit all SELECT database operations.
|
|
3106
3320
|
bool read_audit = 6;
|
|
3321
|
+
|
|
3322
|
+
// Set to audit all INSERT, UPDATE, and DELETE database operations.
|
|
3107
3323
|
bool write_audit = 7;
|
|
3108
|
-
bool no_snapshots = 8;
|
|
3109
3324
|
}
|
|
3110
3325
|
|
|
3111
|
-
message
|
|
3326
|
+
message SaveDatabaseResponse {
|
|
3327
|
+
// Details of any error that occurred on the call.
|
|
3112
3328
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
3329
|
+
|
|
3330
|
+
// The updated database resource.
|
|
3113
3331
|
Resource resource = 2;
|
|
3114
3332
|
}
|
|
3115
3333
|
|
|
@@ -3181,28 +3399,6 @@ message SaveHttpRestApiNodeResponse {
|
|
|
3181
3399
|
Resource resource = 2;
|
|
3182
3400
|
}
|
|
3183
3401
|
|
|
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
3402
|
message SaveSessionRequest {
|
|
3207
3403
|
Session session = 1;
|
|
3208
3404
|
}
|
|
@@ -3391,4 +3587,4 @@ message SubscribeWireResponse {
|
|
|
3391
3587
|
}
|
|
3392
3588
|
|
|
3393
3589
|
`;
|
|
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];
|
|
3590
|
+
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];
|