@tdxvolt/volt-client-grpc 0.20.11 → 0.20.16

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 CHANGED
@@ -1345,7 +1345,8 @@ import "tdx/volt_api/volt/v1/ssi.proto";
1345
1345
  import "tdx/volt_api/volt/v1/status.proto";
1346
1346
 
1347
1347
  service SsiAPI {
1348
- rpc CacheEmailCredential(CacheEmailCredentialRequest) returns (CacheEmailCredentialResponse);
1348
+ // Creates a verifiable credential binding an email address to an identity.
1349
+ rpc CreateEmailCredential(CreateEmailCredentialRequest) returns (CreateEmailCredentialResponse);
1349
1350
 
1350
1351
  // Delete a DID document or all DID documents originating from a given Volt.
1351
1352
  // Requires \`volt:delete-did\` API privilege.
@@ -1376,20 +1377,21 @@ service SsiAPI {
1376
1377
  rpc SearchDIDRegistry(SearchDIDRegistryRequest) returns (SearchDIDRegistryResponse);
1377
1378
  }
1378
1379
 
1379
- message CacheEmailCredentialRequest {
1380
+ message CreateEmailCredentialRequest {
1381
+ // The DID of the identity to bind to. If not specified the DID of the currently authenticated account is used.
1380
1382
  string identity_did = 1;
1381
1383
 
1384
+ // The email address to bind to the identity.
1382
1385
  string email_address = 2;
1383
1386
 
1387
+ // The identity provider to use.
1384
1388
  string identity_provider = 3;
1385
1389
 
1390
+ // The passphrase for the identity key, if required (i.e. the key is encrypted).
1386
1391
  string key_passphrase = 4;
1387
-
1388
- // The time to live for the token, in seconds.
1389
- uint32 ttl = 5;
1390
1392
  }
1391
1393
 
1392
- message CacheEmailCredentialResponse {
1394
+ message CreateEmailCredentialResponse {
1393
1395
  // Details of any error that occurred on the call.
1394
1396
  tdx.volt_api.volt.v1.Status status = 1;
1395
1397
 
@@ -1596,14 +1598,77 @@ const sync_api = `syntax = "proto3";
1596
1598
  package tdx.volt_api.volt.v1;
1597
1599
 
1598
1600
  import "tdx/volt_api/volt/v1/status.proto";
1601
+ import "tdx/volt_api/volt/v1/volt_api.proto";
1599
1602
 
1600
1603
  // The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
1601
1604
  service SyncAPI {
1605
+ // Create a synapse connection resource.
1606
+ // 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
+ // 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
+ // The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
1609
+ rpc CreateSynapseConnection(SaveResourceRequest) returns (SaveResourceResponse);
1610
+
1611
+ // Delete a document from the synapse.
1612
+ rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
1613
+
1614
+ // Set the metadata for a synapse document.
1615
+ rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
1616
+
1602
1617
  // Bidirectional streaming RPC for real-time document synchronization
1603
1618
  rpc SyncDocument(stream SyncDocumentRequest) returns (stream SyncDocumentResponse);
1604
1619
 
1605
- // Simple RPC to fetch current document state as JSON
1606
- rpc GetDocumentJSON(GetDocumentJSONRequest) returns (GetDocumentJSONResponse);
1620
+ // Watch synapse paths for changes.
1621
+ rpc WatchSynapsePath(stream WatchSynapsePathRequest) returns (stream WatchSynapsePathResponse);
1622
+
1623
+ // Write a single value to a given synapse JSON path.
1624
+ rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1625
+ }
1626
+
1627
+ message DeleteSynapseDocumentMetadataRequest {
1628
+ // DEPRECATED: Use synapse_id instead.
1629
+ string database_id = 1;
1630
+
1631
+ // The id of the synapse that contains the document.
1632
+ string synapse_id = 3;
1633
+
1634
+ // The id of the document to delete.
1635
+ string document_id = 2;
1636
+ }
1637
+
1638
+ message DeleteSynapseDocumentMetadataResponse {
1639
+ tdx.volt_api.volt.v1.Status status = 1;
1640
+ }
1641
+
1642
+ message SynapseDocumentMetadata {
1643
+ // The name of the top-level shared type in the document.
1644
+ string name = 1;
1645
+
1646
+ // The type of the shared type, e.g. "map", "array" or "text".
1647
+ string type = 2;
1648
+
1649
+ // The JSON schema that describes the data that is stored in this shared type.
1650
+ string json_schema = 3;
1651
+ }
1652
+
1653
+ message SetSynapseDocumentMetadataRequest {
1654
+ // DEPRECATED: Use synapse_id instead.
1655
+ string database_id = 1;
1656
+
1657
+ // The id of the synapse that contains the document.
1658
+ string synapse_id = 5;
1659
+
1660
+ // The id of the document to set the metadata for.
1661
+ string document_id = 2;
1662
+
1663
+ // The metadata to set for the document.
1664
+ repeated SynapseDocumentMetadata metadata = 3;
1665
+
1666
+ // Any additional application-specific JSON to attach to the document.
1667
+ string json = 4;
1668
+ }
1669
+
1670
+ message SetSynapseDocumentMetadataResponse {
1671
+ tdx.volt_api.volt.v1.Status status = 1;
1607
1672
  }
1608
1673
 
1609
1674
  enum SyncState {
@@ -1667,20 +1732,94 @@ message SyncDocumentResponse {
1667
1732
  bool is_read_only = 5;
1668
1733
  }
1669
1734
 
1670
- message GetDocumentJSONRequest {
1735
+ // Parameters to start watching synapse paths. Sent as the first message.
1736
+ message WatchSynapsePathStart {
1737
+ // DEPRECATED: Use synapse_id instead.
1671
1738
  string database_id = 1;
1739
+
1740
+ // The id of the synapse that contains the document.
1741
+ string synapse_id = 4;
1742
+
1743
+ // The id of the document to watch.
1672
1744
  string document_id = 2;
1745
+
1746
+ // The JSON paths to watch.
1747
+ repeated string path = 3;
1748
+ }
1749
+
1750
+ message WatchSynapsePathRequest {
1751
+ oneof payload {
1752
+ // Start watching the given paths; must be sent as the first message.
1753
+ WatchSynapsePathStart start = 1;
1754
+
1755
+ // Request to stop the watch.
1756
+ bool stop = 2;
1757
+ }
1673
1758
  }
1674
1759
 
1675
- message GetDocumentJSONResponse {
1760
+ enum SynapsePathUpdateType {
1761
+ SYNAPSE_PATH_UPDATE_TYPE_UNKNOWN = 0;
1762
+ SYNAPSE_PATH_UPDATE_TYPE_ADD = 1;
1763
+ SYNAPSE_PATH_UPDATE_TYPE_UPDATE = 2;
1764
+ SYNAPSE_PATH_UPDATE_TYPE_DELETE = 3;
1765
+ }
1766
+
1767
+ message WatchSynapsePathUpdate {
1768
+ // The JSON path that was updated.
1769
+ string watch_path = 1;
1770
+
1771
+ // The actual JSON path for this match (e.g. $.content["Atlantic Star"].lat).
1772
+ // Enables clients to identify which array element or map key the update refers to when using wildcard matches such as $.content[*]
1773
+ string event_path = 2;
1774
+
1775
+ // The type of update.
1776
+ SynapsePathUpdateType update_type = 3;
1777
+
1778
+ // The JSON value that was updated.
1779
+ string value = 4;
1780
+
1781
+ // The previous JSON value before the update.
1782
+ string previous_value = 5;
1783
+
1784
+ // The zero-based index of the update.
1785
+ uint32 index = 6;
1786
+
1787
+ // The total number of updates.
1788
+ uint32 total = 7;
1789
+ }
1790
+
1791
+ message WatchSynapsePathResponse {
1676
1792
  oneof result {
1677
1793
  // Details of any error that occurred on the call.
1678
- tdx.volt_api.volt.v1.Status error = 1;
1794
+ tdx.volt_api.volt.v1.Status status = 1;
1679
1795
 
1680
- // The current JSON snapshot of the document
1681
- string json = 2;
1796
+ // The update to the path.
1797
+ WatchSynapsePathUpdate update = 2;
1682
1798
  }
1683
1799
  }
1800
+
1801
+ message WriteSynapsePathRequest {
1802
+ // DEPRECATED: Use synapse_id instead.
1803
+ string database_id = 1;
1804
+
1805
+ // The id of the synapse that contains the document.
1806
+ string synapse_id = 5;
1807
+
1808
+ // The id of the document to write to.
1809
+ string document_id = 2;
1810
+
1811
+ // The JSON path to write to.
1812
+ string path = 3;
1813
+
1814
+ // The JSON value to write.
1815
+ string json = 4;
1816
+ }
1817
+
1818
+ message WriteSynapsePathResponse {
1819
+ // Details of any error that occurred on the call.
1820
+ tdx.volt_api.volt.v1.Status status = 1;
1821
+ }
1822
+
1684
1823
  `;
1685
1824
  const terminal_api = `syntax = "proto3";
1686
1825
 
@@ -2438,6 +2577,9 @@ import "tdx/volt_api/volt/v1/volt.proto";
2438
2577
  // A client certificate can be obtained from the \`Authenticate\` method.
2439
2578
  // 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.
2440
2579
  service VoltAPI {
2580
+ // Add a relay connection resource to this volt.
2581
+ rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
2582
+
2441
2583
  // Issues a request to authenticate on the volt.
2442
2584
  // All clients must successfully authenticate in order to gain any kind of access.
2443
2585
  // A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
@@ -2527,17 +2669,35 @@ service VoltAPI {
2527
2669
  rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
2528
2670
 
2529
2671
  // Create or update a static file HTTP server.
2530
- rpc SaveHttpFileServer(SaveResourceRequest) returns (SaveResourceResponse);
2672
+ rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2673
+
2674
+ // Create or update an HTTP forwarder resource.
2675
+ rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
2531
2676
 
2532
2677
  // Create or update an HTTP REST API server.
2533
- rpc SaveHttpApiServer(SaveResourceRequest) returns (SaveResourceResponse);
2678
+ rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
2679
+
2680
+ // Create or update an HTTP REST API node.
2681
+ rpc SaveHttpRestApiNode(SaveHttpRestApiNodeRequest) returns (SaveHttpRestApiNodeResponse);
2534
2682
 
2535
2683
  // Create or update an identity.
2536
2684
  rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
2537
2685
 
2686
+ // Create or update a database resource.
2687
+ rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
2688
+
2538
2689
  // Create or update a mirrored link resource.
2539
2690
  rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
2540
2691
 
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
+
2541
2701
  // Update Volt parameters.
2542
2702
  // This is a privileged call that requires Volt root access.
2543
2703
  rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
@@ -3454,6 +3614,143 @@ message SaveResourceResponse {
3454
3614
  Resource resource = 2;
3455
3615
  }
3456
3616
 
3617
+ message SaveDatabaseRequest {
3618
+ Resource resource = 1;
3619
+ bool create = 2;
3620
+ string create_in_parent_id = 3;
3621
+ bool purge_attributes = 4;
3622
+ bool encrypted = 5;
3623
+ bool read_audit = 6;
3624
+ bool write_audit = 7;
3625
+ }
3626
+
3627
+ message SaveDatabaseResponse {
3628
+ tdx.volt_api.volt.v1.Status status = 1;
3629
+ Resource resource = 2;
3630
+ }
3631
+
3632
+ message SaveSyncDatabaseRequest {
3633
+ Resource resource = 1;
3634
+ 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
+
3648
+ message SaveSynapseRequest {
3649
+ Resource resource = 1;
3650
+ bool create = 2;
3651
+ string create_in_parent_id = 3;
3652
+ bool purge_attributes = 4;
3653
+ bool encrypted = 5;
3654
+ bool read_audit = 6;
3655
+ bool write_audit = 7;
3656
+ bool no_snapshots = 8;
3657
+ }
3658
+
3659
+ message SaveSynapseResponse {
3660
+ tdx.volt_api.volt.v1.Status status = 1;
3661
+ Resource resource = 2;
3662
+ }
3663
+
3664
+ message SaveHttpForwarderRequest {
3665
+ Resource resource = 1;
3666
+ bool create = 2;
3667
+ string create_in_parent_id = 3;
3668
+ bool purge_attributes = 4;
3669
+ string domain = 5;
3670
+ string host = 6;
3671
+ int32 port = 7;
3672
+ bool forward_host = 8;
3673
+ }
3674
+
3675
+ message SaveHttpForwarderResponse {
3676
+ tdx.volt_api.volt.v1.Status status = 1;
3677
+ Resource resource = 2;
3678
+ }
3679
+
3680
+ message SaveHttpFileServerRequest {
3681
+ Resource resource = 1;
3682
+ bool create = 2;
3683
+ string create_in_parent_id = 3;
3684
+ bool purge_attributes = 4;
3685
+ string path = 5;
3686
+ string host = 6;
3687
+ int32 port = 7;
3688
+ bool enabled = 8;
3689
+ int32 cache_timeout = 9;
3690
+ bool catch_all_enabled = 10;
3691
+ string catch_all = 11;
3692
+ }
3693
+
3694
+ message SaveHttpFileServerResponse {
3695
+ tdx.volt_api.volt.v1.Status status = 1;
3696
+ Resource resource = 2;
3697
+ }
3698
+
3699
+ message SaveHttpRestApiServerRequest {
3700
+ Resource resource = 1;
3701
+ bool create = 2;
3702
+ string create_in_parent_id = 3;
3703
+ bool purge_attributes = 4;
3704
+ string host = 5;
3705
+ int32 port = 6;
3706
+ bool enabled = 7;
3707
+ bool cors_enabled = 8;
3708
+ }
3709
+
3710
+ message SaveHttpRestApiServerResponse {
3711
+ tdx.volt_api.volt.v1.Status status = 1;
3712
+ Resource resource = 2;
3713
+ }
3714
+
3715
+ message SaveHttpRestApiNodeRequest {
3716
+ Resource resource = 1;
3717
+ bool create = 2;
3718
+ string create_in_parent_id = 3;
3719
+ bool purge_attributes = 4;
3720
+ bool is_literal = 5;
3721
+ string literal_json = 6;
3722
+ string database_id = 7;
3723
+ string sql = 8;
3724
+ repeated string parameter = 9;
3725
+ }
3726
+
3727
+ message SaveHttpRestApiNodeResponse {
3728
+ tdx.volt_api.volt.v1.Status status = 1;
3729
+ Resource resource = 2;
3730
+ }
3731
+
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
+
3457
3754
  message SaveSessionRequest {
3458
3755
  Session session = 1;
3459
3756
  }
@@ -3560,17 +3857,47 @@ const wire_api = `syntax = "proto3";
3560
3857
  package tdx.volt_api.volt.v1;
3561
3858
 
3562
3859
  import "tdx/volt_api/volt/v1/status.proto";
3860
+ import "tdx/volt_api/volt/v1/volt.proto";
3563
3861
 
3564
3862
  // The Wire API allows clients to subscribe and publish to Volt wire resources.
3565
3863
  service WireAPI {
3864
+
3566
3865
  // Establishes a client-streaming call to the wire resource.
3567
3866
  rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
3568
3867
 
3868
+ // Saves a wire resource.
3869
+ rpc SaveWire(SaveWireRequest) returns (SaveWireResponse);
3870
+
3569
3871
  // Establishes a bi-directional streaming call to the wire resource.
3570
3872
  // Although we're only really interested in receiving data from the wire, a bi-directional stream is required so that we can gracefully stop the subscription.
3571
3873
  rpc SubscribeWire(stream SubscribeWireRequest) returns (stream SubscribeWireResponse);
3572
3874
  }
3573
3875
 
3876
+ message SaveWireRequest {
3877
+ // The wire resource to save.
3878
+ Resource resource = 1;
3879
+
3880
+ // Set to create a new wire resource.
3881
+ bool create = 2;
3882
+
3883
+ // The id of the folder resource in which to create the wire resource.
3884
+ string create_in_parent_id = 3;
3885
+
3886
+ // Set to purge the wire resource attributes before saving.
3887
+ bool purge_attributes = 4;
3888
+
3889
+ // Set to persist the wire messages.
3890
+ bool persist = 5;
3891
+
3892
+ // The table to persist the wire messages to.
3893
+ string persist_table = 6;
3894
+ }
3895
+
3896
+ message SaveWireResponse {
3897
+ tdx.volt_api.volt.v1.Status status = 1;
3898
+ tdx.volt_api.volt.v1.Resource resource = 2;
3899
+ }
3900
+
3574
3901
  // Because the publish RPC is streaming, the policy will not be checked until the first message arrives. This can mean that the \`PublishWire\` call appears to succeed but then fails after the first attempt to publish a message.
3575
3902
  // To avoid this, clients can immediately send a message with the \`wire_id\` set and no \`chunk\` set. This will establish that the correct permissions are in place and fail fast if not.
3576
3903
  message PublishWireRequest {
@@ -5672,10 +5999,18 @@ class VoltClient extends EventEmitter__default["default"] {
5672
5999
  * VoltAPI - resource management
5673
6000
  */
5674
6001
 
6002
+ AddRelay(request) {
6003
+ return unaryCallInternal.call(this, "AddRelay", request);
6004
+ }
6005
+
5675
6006
  CanAccessResource(request) {
5676
6007
  return unaryCallInternal.call(this, "CanAccessResource", request);
5677
6008
  }
5678
6009
 
6010
+ CopyResource(request) {
6011
+ return unaryCallInternal.call(this, "CopyResource", request);
6012
+ }
6013
+
5679
6014
  DeleteResource(request) {
5680
6015
  return unaryCallInternal.call(this, "DeleteResource", request);
5681
6016
  }
@@ -5700,6 +6035,10 @@ class VoltClient extends EventEmitter__default["default"] {
5700
6035
  return unaryCallInternal.call(this, "GetResourceDescendants", request);
5701
6036
  }
5702
6037
 
6038
+ MoveResource(request) {
6039
+ return unaryCallInternal.call(this, "MoveResource", request);
6040
+ }
6041
+
5703
6042
  RequestAccess(request) {
5704
6043
  return unaryCallInternal.call(this, "RequestAccess", request);
5705
6044
  }
@@ -5708,8 +6047,44 @@ class VoltClient extends EventEmitter__default["default"] {
5708
6047
  return unaryCallInternal.call(this, "SaveResource", request);
5709
6048
  }
5710
6049
 
5711
- SaveResourceAttribute(request) {
5712
- return unaryCallInternal.call(this, "SaveResourceAttribute", request);
6050
+ SaveDatabase(request) {
6051
+ return unaryCallInternal.call(this, "SaveDatabase", request);
6052
+ }
6053
+
6054
+ SaveHttpFileServer(request) {
6055
+ return unaryCallInternal.call(this, "SaveHttpFileServer", request);
6056
+ }
6057
+
6058
+ SaveHttpForwarder(request) {
6059
+ return unaryCallInternal.call(this, "SaveHttpForwarder", request);
6060
+ }
6061
+
6062
+ SaveHttpRestApiServer(request) {
6063
+ return unaryCallInternal.call(this, "SaveHttpRestApiServer", request);
6064
+ }
6065
+
6066
+ SaveHttpRestApiNode(request) {
6067
+ return unaryCallInternal.call(this, "SaveHttpRestApiNode", request);
6068
+ }
6069
+
6070
+ SaveMirroredLink(request) {
6071
+ return unaryCallInternal.call(this, "SaveMirroredLink", request);
6072
+ }
6073
+
6074
+ SaveSyncDatabase(request) {
6075
+ return unaryCallInternal.call(this, "SaveSyncDatabase", request);
6076
+ }
6077
+
6078
+ SaveSynapse(request) {
6079
+ return unaryCallInternal.call(this, "SaveSynapse", request);
6080
+ }
6081
+
6082
+ CreateSynapseConnection(request) {
6083
+ return unaryCallInternal.call(this, "CreateSynapseConnection", request);
6084
+ }
6085
+
6086
+ SaveSymbolicLink(request) {
6087
+ return unaryCallInternal.call(this, "SaveSymbolicLink", request);
5713
6088
  }
5714
6089
 
5715
6090
  SetServiceStatus(request) {
@@ -5724,26 +6099,18 @@ class VoltClient extends EventEmitter__default["default"] {
5724
6099
  return unaryCallInternal.call(this, "Authenticate", request);
5725
6100
  }
5726
6101
 
5727
- Bind(request) {
5728
- return unaryCallInternal.call(this, "Bind", request);
6102
+ CheckCompatibility(request) {
6103
+ return unaryCallInternal.call(this, "CheckCompatibility", request);
5729
6104
  }
5730
6105
 
5731
6106
  DeleteAccess(request) {
5732
6107
  return unaryCallInternal.call(this, "DeleteAccess", request);
5733
6108
  }
5734
6109
 
5735
- DeleteVolt(request) {
5736
- return unaryCallInternal.call(this, "DeleteVolt", request);
5737
- }
5738
-
5739
6110
  GetAccess(request) {
5740
6111
  return unaryCallInternal.call(this, "GetAccess", request);
5741
6112
  }
5742
6113
 
5743
- GetBindings(request) {
5744
- return unaryCallInternal.call(this, "GetBindings", request);
5745
- }
5746
-
5747
6114
  GetIdentities(request) {
5748
6115
  return unaryCallInternal.call(this, "GetIdentities", request);
5749
6116
  }
@@ -5752,40 +6119,44 @@ class VoltClient extends EventEmitter__default["default"] {
5752
6119
  return unaryCallInternal.call(this, "GetIdentity", request);
5753
6120
  }
5754
6121
 
5755
- GetIdentityToken(request) {
5756
- return unaryCallInternal.call(this, "GetIdentityToken", request);
6122
+ GetOneTimeToken(request) {
6123
+ return unaryCallInternal.call(this, "GetOneTimeToken", request);
6124
+ }
6125
+
6126
+ GetParameters(request) {
6127
+ return unaryCallInternal.call(this, "GetParameters", request);
5757
6128
  }
5758
6129
 
5759
6130
  GetPolicy(request) {
5760
6131
  return unaryCallInternal.call(this, "GetPolicy", request);
5761
6132
  }
5762
6133
 
5763
- GetSettings(request) {
5764
- return unaryCallInternal.call(this, "GetSettings", request);
6134
+ GetSessions(request) {
6135
+ return unaryCallInternal.call(this, "GetSessions", request);
5765
6136
  }
5766
6137
 
5767
6138
  SaveAccess(request) {
5768
6139
  return unaryCallInternal.call(this, "SaveAccess", request);
5769
6140
  }
5770
6141
 
5771
- SaveCloudConnection(request) {
5772
- return unaryCallInternal.call(this, "SaveCloudConnection", request);
5773
- }
5774
-
5775
6142
  SaveIdentity(request) {
5776
6143
  return unaryCallInternal.call(this, "SaveIdentity", request);
5777
6144
  }
5778
6145
 
5779
- SaveSettings(request) {
5780
- return unaryCallInternal.call(this, "SaveSettings", request);
6146
+ SaveParameters(request) {
6147
+ return unaryCallInternal.call(this, "SaveParameters", request);
6148
+ }
6149
+
6150
+ SaveSession(request) {
6151
+ return unaryCallInternal.call(this, "SaveSession", request);
5781
6152
  }
5782
6153
 
5783
6154
  SetAccessRequestDecision(request) {
5784
6155
  return unaryCallInternal.call(this, "SetAccessRequestDecision", request);
5785
6156
  }
5786
6157
 
5787
- SetBindingDecision(request) {
5788
- return unaryCallInternal.call(this, "SetBindingDecision", request);
6158
+ SetPolicy(request) {
6159
+ return unaryCallInternal.call(this, "SetPolicy", request);
5789
6160
  }
5790
6161
 
5791
6162
  Shutdown(request) {
@@ -5796,6 +6167,16 @@ class VoltClient extends EventEmitter__default["default"] {
5796
6167
  return unaryCallInternal.call(this, "SignVerify", request);
5797
6168
  }
5798
6169
 
6170
+ /**
6171
+ * VoltAPI - streaming (bidi). Use connect() for Connect stream.
6172
+ * Invoke is for relay proxying; returns a duplex stream of InvokeRequest/InvokeResponse.
6173
+ */
6174
+ Invoke(request) {
6175
+ const grpcClient = this.getVoltAPIClient();
6176
+ const invokeCall = new GRPCCall(this, "Invoke", "METHOD_TYPE_BIDI");
6177
+ return invokeCall.start(grpcClient, request);
6178
+ }
6179
+
5799
6180
  /**
5800
6181
  * FileAPI
5801
6182
  */
@@ -6010,6 +6391,9 @@ class VoltClient extends EventEmitter__default["default"] {
6010
6391
  return subscribeCall.start(grpcClient, request);
6011
6392
  }
6012
6393
 
6394
+ /**
6395
+ * SyncAPI
6396
+ */
6013
6397
  SyncDocument(request) {
6014
6398
  const grpcClient = this.getVoltAPIClient();
6015
6399
 
@@ -6020,6 +6404,29 @@ class VoltClient extends EventEmitter__default["default"] {
6020
6404
  );
6021
6405
  return syncDocumentCall.start(grpcClient, request);
6022
6406
  }
6407
+
6408
+ DeleteSynapseDocumentMetadata(request) {
6409
+ return unaryCallInternal.call(this, "DeleteSynapseDocumentMetadata", request);
6410
+ }
6411
+
6412
+ SetSynapseDocumentMetadata(request) {
6413
+ return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
6414
+ }
6415
+
6416
+ WatchSynapsePath(request) {
6417
+ const grpcClient = this.getVoltAPIClient();
6418
+
6419
+ const watchPathCall = new GRPCCall(
6420
+ this,
6421
+ "WatchSynapsePath",
6422
+ "METHOD_TYPE_BIDI"
6423
+ );
6424
+ return watchPathCall.start(grpcClient, request);
6425
+ }
6426
+
6427
+ WriteSynapsePath(request) {
6428
+ return unaryCallInternal.call(this, "WriteSynapsePath", request);
6429
+ }
6023
6430
  }
6024
6431
 
6025
6432
  Object.defineProperty(exports, 'SyncProvider', {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.20.11",
6
+ "version": "0.20.16",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
@@ -33,7 +33,7 @@
33
33
  "author": "toby.ealden@gmail.com",
34
34
  "license": "ISC",
35
35
  "dependencies": {
36
- "@tdxvolt/volt-client-web": "^0.20.10",
36
+ "@tdxvolt/volt-client-web": "^0.20.16",
37
37
  "@tdxvolt/volt-utility": "^0.20.10",
38
38
  "debug": "^4.1.1",
39
39
  "ip": "^1.1.5",
@@ -43,4 +43,4 @@
43
43
  "protobufjs": "^7.4.0",
44
44
  "uuid": "^8.1.0"
45
45
  }
46
- }
46
+ }
@@ -331,10 +331,18 @@ export class VoltClient extends EventEmitter {
331
331
  * VoltAPI - resource management
332
332
  */
333
333
 
334
+ AddRelay(request) {
335
+ return unaryCallInternal.call(this, "AddRelay", request);
336
+ }
337
+
334
338
  CanAccessResource(request) {
335
339
  return unaryCallInternal.call(this, "CanAccessResource", request);
336
340
  }
337
341
 
342
+ CopyResource(request) {
343
+ return unaryCallInternal.call(this, "CopyResource", request);
344
+ }
345
+
338
346
  DeleteResource(request) {
339
347
  return unaryCallInternal.call(this, "DeleteResource", request);
340
348
  }
@@ -359,6 +367,10 @@ export class VoltClient extends EventEmitter {
359
367
  return unaryCallInternal.call(this, "GetResourceDescendants", request);
360
368
  }
361
369
 
370
+ MoveResource(request) {
371
+ return unaryCallInternal.call(this, "MoveResource", request);
372
+ }
373
+
362
374
  RequestAccess(request) {
363
375
  return unaryCallInternal.call(this, "RequestAccess", request);
364
376
  }
@@ -367,8 +379,44 @@ export class VoltClient extends EventEmitter {
367
379
  return unaryCallInternal.call(this, "SaveResource", request);
368
380
  }
369
381
 
370
- SaveResourceAttribute(request) {
371
- return unaryCallInternal.call(this, "SaveResourceAttribute", request);
382
+ SaveDatabase(request) {
383
+ return unaryCallInternal.call(this, "SaveDatabase", request);
384
+ }
385
+
386
+ SaveHttpFileServer(request) {
387
+ return unaryCallInternal.call(this, "SaveHttpFileServer", request);
388
+ }
389
+
390
+ SaveHttpForwarder(request) {
391
+ return unaryCallInternal.call(this, "SaveHttpForwarder", request);
392
+ }
393
+
394
+ SaveHttpRestApiServer(request) {
395
+ return unaryCallInternal.call(this, "SaveHttpRestApiServer", request);
396
+ }
397
+
398
+ SaveHttpRestApiNode(request) {
399
+ return unaryCallInternal.call(this, "SaveHttpRestApiNode", request);
400
+ }
401
+
402
+ SaveMirroredLink(request) {
403
+ return unaryCallInternal.call(this, "SaveMirroredLink", request);
404
+ }
405
+
406
+ SaveSyncDatabase(request) {
407
+ return unaryCallInternal.call(this, "SaveSyncDatabase", request);
408
+ }
409
+
410
+ SaveSynapse(request) {
411
+ return unaryCallInternal.call(this, "SaveSynapse", request);
412
+ }
413
+
414
+ CreateSynapseConnection(request) {
415
+ return unaryCallInternal.call(this, "CreateSynapseConnection", request);
416
+ }
417
+
418
+ SaveSymbolicLink(request) {
419
+ return unaryCallInternal.call(this, "SaveSymbolicLink", request);
372
420
  }
373
421
 
374
422
  SetServiceStatus(request) {
@@ -383,26 +431,18 @@ export class VoltClient extends EventEmitter {
383
431
  return unaryCallInternal.call(this, "Authenticate", request);
384
432
  }
385
433
 
386
- Bind(request) {
387
- return unaryCallInternal.call(this, "Bind", request);
434
+ CheckCompatibility(request) {
435
+ return unaryCallInternal.call(this, "CheckCompatibility", request);
388
436
  }
389
437
 
390
438
  DeleteAccess(request) {
391
439
  return unaryCallInternal.call(this, "DeleteAccess", request);
392
440
  }
393
441
 
394
- DeleteVolt(request) {
395
- return unaryCallInternal.call(this, "DeleteVolt", request);
396
- }
397
-
398
442
  GetAccess(request) {
399
443
  return unaryCallInternal.call(this, "GetAccess", request);
400
444
  }
401
445
 
402
- GetBindings(request) {
403
- return unaryCallInternal.call(this, "GetBindings", request);
404
- }
405
-
406
446
  GetIdentities(request) {
407
447
  return unaryCallInternal.call(this, "GetIdentities", request);
408
448
  }
@@ -411,40 +451,44 @@ export class VoltClient extends EventEmitter {
411
451
  return unaryCallInternal.call(this, "GetIdentity", request);
412
452
  }
413
453
 
414
- GetIdentityToken(request) {
415
- return unaryCallInternal.call(this, "GetIdentityToken", request);
454
+ GetOneTimeToken(request) {
455
+ return unaryCallInternal.call(this, "GetOneTimeToken", request);
456
+ }
457
+
458
+ GetParameters(request) {
459
+ return unaryCallInternal.call(this, "GetParameters", request);
416
460
  }
417
461
 
418
462
  GetPolicy(request) {
419
463
  return unaryCallInternal.call(this, "GetPolicy", request);
420
464
  }
421
465
 
422
- GetSettings(request) {
423
- return unaryCallInternal.call(this, "GetSettings", request);
466
+ GetSessions(request) {
467
+ return unaryCallInternal.call(this, "GetSessions", request);
424
468
  }
425
469
 
426
470
  SaveAccess(request) {
427
471
  return unaryCallInternal.call(this, "SaveAccess", request);
428
472
  }
429
473
 
430
- SaveCloudConnection(request) {
431
- return unaryCallInternal.call(this, "SaveCloudConnection", request);
432
- }
433
-
434
474
  SaveIdentity(request) {
435
475
  return unaryCallInternal.call(this, "SaveIdentity", request);
436
476
  }
437
477
 
438
- SaveSettings(request) {
439
- return unaryCallInternal.call(this, "SaveSettings", request);
478
+ SaveParameters(request) {
479
+ return unaryCallInternal.call(this, "SaveParameters", request);
480
+ }
481
+
482
+ SaveSession(request) {
483
+ return unaryCallInternal.call(this, "SaveSession", request);
440
484
  }
441
485
 
442
486
  SetAccessRequestDecision(request) {
443
487
  return unaryCallInternal.call(this, "SetAccessRequestDecision", request);
444
488
  }
445
489
 
446
- SetBindingDecision(request) {
447
- return unaryCallInternal.call(this, "SetBindingDecision", request);
490
+ SetPolicy(request) {
491
+ return unaryCallInternal.call(this, "SetPolicy", request);
448
492
  }
449
493
 
450
494
  Shutdown(request) {
@@ -455,6 +499,16 @@ export class VoltClient extends EventEmitter {
455
499
  return unaryCallInternal.call(this, "SignVerify", request);
456
500
  }
457
501
 
502
+ /**
503
+ * VoltAPI - streaming (bidi). Use connect() for Connect stream.
504
+ * Invoke is for relay proxying; returns a duplex stream of InvokeRequest/InvokeResponse.
505
+ */
506
+ Invoke(request) {
507
+ const grpcClient = this.getVoltAPIClient();
508
+ const invokeCall = new GRPCCall(this, "Invoke", "METHOD_TYPE_BIDI");
509
+ return invokeCall.start(grpcClient, request);
510
+ }
511
+
458
512
  /**
459
513
  * FileAPI
460
514
  */
@@ -671,6 +725,9 @@ export class VoltClient extends EventEmitter {
671
725
  return subscribeCall.start(grpcClient, request);
672
726
  }
673
727
 
728
+ /**
729
+ * SyncAPI
730
+ */
674
731
  SyncDocument(request) {
675
732
  const grpcClient = this.getVoltAPIClient();
676
733
 
@@ -681,4 +738,27 @@ export class VoltClient extends EventEmitter {
681
738
  );
682
739
  return syncDocumentCall.start(grpcClient, request);
683
740
  }
741
+
742
+ DeleteSynapseDocumentMetadata(request) {
743
+ return unaryCallInternal.call(this, "DeleteSynapseDocumentMetadata", request);
744
+ }
745
+
746
+ SetSynapseDocumentMetadata(request) {
747
+ return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
748
+ }
749
+
750
+ WatchSynapsePath(request) {
751
+ const grpcClient = this.getVoltAPIClient();
752
+
753
+ const watchPathCall = new GRPCCall(
754
+ this,
755
+ "WatchSynapsePath",
756
+ "METHOD_TYPE_BIDI"
757
+ );
758
+ return watchPathCall.start(grpcClient, request);
759
+ }
760
+
761
+ WriteSynapsePath(request) {
762
+ return unaryCallInternal.call(this, "WriteSynapsePath", request);
763
+ }
684
764
  }
@@ -797,7 +797,8 @@ import "tdx/volt_api/volt/v1/ssi.proto";
797
797
  import "tdx/volt_api/volt/v1/status.proto";
798
798
 
799
799
  service SsiAPI {
800
- rpc CacheEmailCredential(CacheEmailCredentialRequest) returns (CacheEmailCredentialResponse);
800
+ // Creates a verifiable credential binding an email address to an identity.
801
+ rpc CreateEmailCredential(CreateEmailCredentialRequest) returns (CreateEmailCredentialResponse);
801
802
 
802
803
  // Delete a DID document or all DID documents originating from a given Volt.
803
804
  // Requires \`volt:delete-did\` API privilege.
@@ -828,20 +829,21 @@ service SsiAPI {
828
829
  rpc SearchDIDRegistry(SearchDIDRegistryRequest) returns (SearchDIDRegistryResponse);
829
830
  }
830
831
 
831
- message CacheEmailCredentialRequest {
832
+ message CreateEmailCredentialRequest {
833
+ // The DID of the identity to bind to. If not specified the DID of the currently authenticated account is used.
832
834
  string identity_did = 1;
833
835
 
836
+ // The email address to bind to the identity.
834
837
  string email_address = 2;
835
838
 
839
+ // The identity provider to use.
836
840
  string identity_provider = 3;
837
841
 
842
+ // The passphrase for the identity key, if required (i.e. the key is encrypted).
838
843
  string key_passphrase = 4;
839
-
840
- // The time to live for the token, in seconds.
841
- uint32 ttl = 5;
842
844
  }
843
845
 
844
- message CacheEmailCredentialResponse {
846
+ message CreateEmailCredentialResponse {
845
847
  // Details of any error that occurred on the call.
846
848
  tdx.volt_api.volt.v1.Status status = 1;
847
849
 
@@ -1048,14 +1050,77 @@ export const sync_api = `syntax = "proto3";
1048
1050
  package tdx.volt_api.volt.v1;
1049
1051
 
1050
1052
  import "tdx/volt_api/volt/v1/status.proto";
1053
+ import "tdx/volt_api/volt/v1/volt_api.proto";
1051
1054
 
1052
1055
  // The Sync API allows clients to collaboratively read and write JSON data to a shared resource.
1053
1056
  service SyncAPI {
1057
+ // Create a synapse connection resource.
1058
+ // 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
+ // The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
1060
+ // The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
1061
+ rpc CreateSynapseConnection(SaveResourceRequest) returns (SaveResourceResponse);
1062
+
1063
+ // Delete a document from the synapse.
1064
+ rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
1065
+
1066
+ // Set the metadata for a synapse document.
1067
+ rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
1068
+
1054
1069
  // Bidirectional streaming RPC for real-time document synchronization
1055
1070
  rpc SyncDocument(stream SyncDocumentRequest) returns (stream SyncDocumentResponse);
1056
1071
 
1057
- // Simple RPC to fetch current document state as JSON
1058
- rpc GetDocumentJSON(GetDocumentJSONRequest) returns (GetDocumentJSONResponse);
1072
+ // Watch synapse paths for changes.
1073
+ rpc WatchSynapsePath(stream WatchSynapsePathRequest) returns (stream WatchSynapsePathResponse);
1074
+
1075
+ // Write a single value to a given synapse JSON path.
1076
+ rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1077
+ }
1078
+
1079
+ message DeleteSynapseDocumentMetadataRequest {
1080
+ // DEPRECATED: Use synapse_id instead.
1081
+ string database_id = 1;
1082
+
1083
+ // The id of the synapse that contains the document.
1084
+ string synapse_id = 3;
1085
+
1086
+ // The id of the document to delete.
1087
+ string document_id = 2;
1088
+ }
1089
+
1090
+ message DeleteSynapseDocumentMetadataResponse {
1091
+ tdx.volt_api.volt.v1.Status status = 1;
1092
+ }
1093
+
1094
+ message SynapseDocumentMetadata {
1095
+ // The name of the top-level shared type in the document.
1096
+ string name = 1;
1097
+
1098
+ // The type of the shared type, e.g. "map", "array" or "text".
1099
+ string type = 2;
1100
+
1101
+ // The JSON schema that describes the data that is stored in this shared type.
1102
+ string json_schema = 3;
1103
+ }
1104
+
1105
+ message SetSynapseDocumentMetadataRequest {
1106
+ // DEPRECATED: Use synapse_id instead.
1107
+ string database_id = 1;
1108
+
1109
+ // The id of the synapse that contains the document.
1110
+ string synapse_id = 5;
1111
+
1112
+ // The id of the document to set the metadata for.
1113
+ string document_id = 2;
1114
+
1115
+ // The metadata to set for the document.
1116
+ repeated SynapseDocumentMetadata metadata = 3;
1117
+
1118
+ // Any additional application-specific JSON to attach to the document.
1119
+ string json = 4;
1120
+ }
1121
+
1122
+ message SetSynapseDocumentMetadataResponse {
1123
+ tdx.volt_api.volt.v1.Status status = 1;
1059
1124
  }
1060
1125
 
1061
1126
  enum SyncState {
@@ -1119,20 +1184,94 @@ message SyncDocumentResponse {
1119
1184
  bool is_read_only = 5;
1120
1185
  }
1121
1186
 
1122
- message GetDocumentJSONRequest {
1187
+ // Parameters to start watching synapse paths. Sent as the first message.
1188
+ message WatchSynapsePathStart {
1189
+ // DEPRECATED: Use synapse_id instead.
1123
1190
  string database_id = 1;
1191
+
1192
+ // The id of the synapse that contains the document.
1193
+ string synapse_id = 4;
1194
+
1195
+ // The id of the document to watch.
1124
1196
  string document_id = 2;
1197
+
1198
+ // The JSON paths to watch.
1199
+ repeated string path = 3;
1200
+ }
1201
+
1202
+ message WatchSynapsePathRequest {
1203
+ oneof payload {
1204
+ // Start watching the given paths; must be sent as the first message.
1205
+ WatchSynapsePathStart start = 1;
1206
+
1207
+ // Request to stop the watch.
1208
+ bool stop = 2;
1209
+ }
1210
+ }
1211
+
1212
+ enum SynapsePathUpdateType {
1213
+ SYNAPSE_PATH_UPDATE_TYPE_UNKNOWN = 0;
1214
+ SYNAPSE_PATH_UPDATE_TYPE_ADD = 1;
1215
+ SYNAPSE_PATH_UPDATE_TYPE_UPDATE = 2;
1216
+ SYNAPSE_PATH_UPDATE_TYPE_DELETE = 3;
1125
1217
  }
1126
1218
 
1127
- message GetDocumentJSONResponse {
1219
+ message WatchSynapsePathUpdate {
1220
+ // The JSON path that was updated.
1221
+ string watch_path = 1;
1222
+
1223
+ // The actual JSON path for this match (e.g. $.content["Atlantic Star"].lat).
1224
+ // Enables clients to identify which array element or map key the update refers to when using wildcard matches such as $.content[*]
1225
+ string event_path = 2;
1226
+
1227
+ // The type of update.
1228
+ SynapsePathUpdateType update_type = 3;
1229
+
1230
+ // The JSON value that was updated.
1231
+ string value = 4;
1232
+
1233
+ // The previous JSON value before the update.
1234
+ string previous_value = 5;
1235
+
1236
+ // The zero-based index of the update.
1237
+ uint32 index = 6;
1238
+
1239
+ // The total number of updates.
1240
+ uint32 total = 7;
1241
+ }
1242
+
1243
+ message WatchSynapsePathResponse {
1128
1244
  oneof result {
1129
1245
  // Details of any error that occurred on the call.
1130
- tdx.volt_api.volt.v1.Status error = 1;
1246
+ tdx.volt_api.volt.v1.Status status = 1;
1131
1247
 
1132
- // The current JSON snapshot of the document
1133
- string json = 2;
1248
+ // The update to the path.
1249
+ WatchSynapsePathUpdate update = 2;
1134
1250
  }
1135
1251
  }
1252
+
1253
+ message WriteSynapsePathRequest {
1254
+ // DEPRECATED: Use synapse_id instead.
1255
+ string database_id = 1;
1256
+
1257
+ // The id of the synapse that contains the document.
1258
+ string synapse_id = 5;
1259
+
1260
+ // The id of the document to write to.
1261
+ string document_id = 2;
1262
+
1263
+ // The JSON path to write to.
1264
+ string path = 3;
1265
+
1266
+ // The JSON value to write.
1267
+ string json = 4;
1268
+ }
1269
+
1270
+ message WriteSynapsePathResponse {
1271
+ // Details of any error that occurred on the call.
1272
+ tdx.volt_api.volt.v1.Status status = 1;
1273
+ }
1274
+
1136
1275
  `;
1137
1276
  export const terminal_api = `syntax = "proto3";
1138
1277
 
@@ -1890,6 +2029,9 @@ import "tdx/volt_api/volt/v1/volt.proto";
1890
2029
  // A client certificate can be obtained from the \`Authenticate\` method.
1891
2030
  // 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.
1892
2031
  service VoltAPI {
2032
+ // Add a relay connection resource to this volt.
2033
+ rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
2034
+
1893
2035
  // Issues a request to authenticate on the volt.
1894
2036
  // All clients must successfully authenticate in order to gain any kind of access.
1895
2037
  // A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
@@ -1979,17 +2121,35 @@ service VoltAPI {
1979
2121
  rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
1980
2122
 
1981
2123
  // Create or update a static file HTTP server.
1982
- rpc SaveHttpFileServer(SaveResourceRequest) returns (SaveResourceResponse);
2124
+ rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2125
+
2126
+ // Create or update an HTTP forwarder resource.
2127
+ rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
1983
2128
 
1984
2129
  // Create or update an HTTP REST API server.
1985
- rpc SaveHttpApiServer(SaveResourceRequest) returns (SaveResourceResponse);
2130
+ rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
2131
+
2132
+ // Create or update an HTTP REST API node.
2133
+ rpc SaveHttpRestApiNode(SaveHttpRestApiNodeRequest) returns (SaveHttpRestApiNodeResponse);
1986
2134
 
1987
2135
  // Create or update an identity.
1988
2136
  rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
1989
2137
 
2138
+ // Create or update a database resource.
2139
+ rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
2140
+
1990
2141
  // Create or update a mirrored link resource.
1991
2142
  rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
1992
2143
 
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
+
1993
2153
  // Update Volt parameters.
1994
2154
  // This is a privileged call that requires Volt root access.
1995
2155
  rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
@@ -2906,6 +3066,143 @@ message SaveResourceResponse {
2906
3066
  Resource resource = 2;
2907
3067
  }
2908
3068
 
3069
+ message SaveDatabaseRequest {
3070
+ 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
+
3079
+ message SaveDatabaseResponse {
3080
+ tdx.volt_api.volt.v1.Status status = 1;
3081
+ Resource resource = 2;
3082
+ }
3083
+
3084
+ message SaveSyncDatabaseRequest {
3085
+ Resource resource = 1;
3086
+ bool create = 2;
3087
+ string create_in_parent_id = 3;
3088
+ bool purge_attributes = 4;
3089
+ bool encrypted = 5;
3090
+ bool read_audit = 6;
3091
+ bool write_audit = 7;
3092
+ bool no_snapshots = 8;
3093
+ }
3094
+
3095
+ message SaveSyncDatabaseResponse {
3096
+ tdx.volt_api.volt.v1.Status status = 1;
3097
+ Resource resource = 2;
3098
+ }
3099
+
3100
+ message SaveSynapseRequest {
3101
+ Resource resource = 1;
3102
+ bool create = 2;
3103
+ string create_in_parent_id = 3;
3104
+ bool purge_attributes = 4;
3105
+ bool encrypted = 5;
3106
+ bool read_audit = 6;
3107
+ bool write_audit = 7;
3108
+ bool no_snapshots = 8;
3109
+ }
3110
+
3111
+ message SaveSynapseResponse {
3112
+ tdx.volt_api.volt.v1.Status status = 1;
3113
+ Resource resource = 2;
3114
+ }
3115
+
3116
+ message SaveHttpForwarderRequest {
3117
+ Resource resource = 1;
3118
+ bool create = 2;
3119
+ string create_in_parent_id = 3;
3120
+ bool purge_attributes = 4;
3121
+ string domain = 5;
3122
+ string host = 6;
3123
+ int32 port = 7;
3124
+ bool forward_host = 8;
3125
+ }
3126
+
3127
+ message SaveHttpForwarderResponse {
3128
+ tdx.volt_api.volt.v1.Status status = 1;
3129
+ Resource resource = 2;
3130
+ }
3131
+
3132
+ message SaveHttpFileServerRequest {
3133
+ Resource resource = 1;
3134
+ bool create = 2;
3135
+ string create_in_parent_id = 3;
3136
+ bool purge_attributes = 4;
3137
+ string path = 5;
3138
+ string host = 6;
3139
+ int32 port = 7;
3140
+ bool enabled = 8;
3141
+ int32 cache_timeout = 9;
3142
+ bool catch_all_enabled = 10;
3143
+ string catch_all = 11;
3144
+ }
3145
+
3146
+ message SaveHttpFileServerResponse {
3147
+ tdx.volt_api.volt.v1.Status status = 1;
3148
+ Resource resource = 2;
3149
+ }
3150
+
3151
+ message SaveHttpRestApiServerRequest {
3152
+ Resource resource = 1;
3153
+ bool create = 2;
3154
+ string create_in_parent_id = 3;
3155
+ bool purge_attributes = 4;
3156
+ string host = 5;
3157
+ int32 port = 6;
3158
+ bool enabled = 7;
3159
+ bool cors_enabled = 8;
3160
+ }
3161
+
3162
+ message SaveHttpRestApiServerResponse {
3163
+ tdx.volt_api.volt.v1.Status status = 1;
3164
+ Resource resource = 2;
3165
+ }
3166
+
3167
+ message SaveHttpRestApiNodeRequest {
3168
+ Resource resource = 1;
3169
+ bool create = 2;
3170
+ string create_in_parent_id = 3;
3171
+ bool purge_attributes = 4;
3172
+ bool is_literal = 5;
3173
+ string literal_json = 6;
3174
+ string database_id = 7;
3175
+ string sql = 8;
3176
+ repeated string parameter = 9;
3177
+ }
3178
+
3179
+ message SaveHttpRestApiNodeResponse {
3180
+ tdx.volt_api.volt.v1.Status status = 1;
3181
+ Resource resource = 2;
3182
+ }
3183
+
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
+
2909
3206
  message SaveSessionRequest {
2910
3207
  Session session = 1;
2911
3208
  }
@@ -3012,17 +3309,47 @@ export const wire_api = `syntax = "proto3";
3012
3309
  package tdx.volt_api.volt.v1;
3013
3310
 
3014
3311
  import "tdx/volt_api/volt/v1/status.proto";
3312
+ import "tdx/volt_api/volt/v1/volt.proto";
3015
3313
 
3016
3314
  // The Wire API allows clients to subscribe and publish to Volt wire resources.
3017
3315
  service WireAPI {
3316
+
3018
3317
  // Establishes a client-streaming call to the wire resource.
3019
3318
  rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
3020
3319
 
3320
+ // Saves a wire resource.
3321
+ rpc SaveWire(SaveWireRequest) returns (SaveWireResponse);
3322
+
3021
3323
  // Establishes a bi-directional streaming call to the wire resource.
3022
3324
  // Although we're only really interested in receiving data from the wire, a bi-directional stream is required so that we can gracefully stop the subscription.
3023
3325
  rpc SubscribeWire(stream SubscribeWireRequest) returns (stream SubscribeWireResponse);
3024
3326
  }
3025
3327
 
3328
+ message SaveWireRequest {
3329
+ // The wire resource to save.
3330
+ Resource resource = 1;
3331
+
3332
+ // Set to create a new wire resource.
3333
+ bool create = 2;
3334
+
3335
+ // The id of the folder resource in which to create the wire resource.
3336
+ string create_in_parent_id = 3;
3337
+
3338
+ // Set to purge the wire resource attributes before saving.
3339
+ bool purge_attributes = 4;
3340
+
3341
+ // Set to persist the wire messages.
3342
+ bool persist = 5;
3343
+
3344
+ // The table to persist the wire messages to.
3345
+ string persist_table = 6;
3346
+ }
3347
+
3348
+ message SaveWireResponse {
3349
+ tdx.volt_api.volt.v1.Status status = 1;
3350
+ tdx.volt_api.volt.v1.Resource resource = 2;
3351
+ }
3352
+
3026
3353
  // Because the publish RPC is streaming, the policy will not be checked until the first message arrives. This can mean that the \`PublishWire\` call appears to succeed but then fails after the first attempt to publish a message.
3027
3354
  // To avoid this, clients can immediately send a message with the \`wire_id\` set and no \`chunk\` set. This will establish that the correct permissions are in place and fail fast if not.
3028
3355
  message PublishWireRequest {