@tdxvolt/volt-client-grpc 0.20.11 → 0.20.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs 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,57 @@ 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 databases. The connection is created as a child of the local synapse resource, and a symbolic link is also placed in the system-wide 'connection' folder.
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
+ // Set the metadata for a synapse document.
1612
+ rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
1613
+
1602
1614
  // Bidirectional streaming RPC for real-time document synchronization
1603
1615
  rpc SyncDocument(stream SyncDocumentRequest) returns (stream SyncDocumentResponse);
1604
1616
 
1605
- // Simple RPC to fetch current document state as JSON
1606
- rpc GetDocumentJSON(GetDocumentJSONRequest) returns (GetDocumentJSONResponse);
1617
+ // Watch synapse paths for changes.
1618
+ rpc WatchSynapsePath(stream WatchSynapsePathRequest) returns (stream WatchSynapsePathResponse);
1619
+
1620
+ // Write a single value to a given synapse JSON path.
1621
+ rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1622
+ }
1623
+
1624
+
1625
+ message SynapseDocumentMetadata {
1626
+ // The name of the top-level shared type in the document.
1627
+ string name = 1;
1628
+
1629
+ // The type of the shared type, e.g. "map", "array" or "text".
1630
+ string type = 2;
1631
+
1632
+ // The JSON schema that describes the data that is stored in this shared type.
1633
+ string json_schema = 3;
1634
+ }
1635
+
1636
+ message SetSynapseDocumentMetadataRequest {
1637
+ // The id of the synapse.
1638
+ string database_id = 1;
1639
+
1640
+ // The id of the document to set the metadata for.
1641
+ string document_id = 2;
1642
+
1643
+ // The metadata to set for the document.
1644
+ repeated SynapseDocumentMetadata metadata = 3;
1645
+
1646
+ // Any additional application-specific JSON to attach to the document.
1647
+ string json = 4;
1648
+ }
1649
+
1650
+ message SetSynapseDocumentMetadataResponse {
1651
+ tdx.volt_api.volt.v1.Status status = 1;
1607
1652
  }
1608
1653
 
1609
1654
  enum SyncState {
@@ -1667,20 +1712,88 @@ message SyncDocumentResponse {
1667
1712
  bool is_read_only = 5;
1668
1713
  }
1669
1714
 
1670
- message GetDocumentJSONRequest {
1715
+ // Parameters to start watching synapse paths. Sent as the first message.
1716
+ message WatchSynapsePathStart {
1717
+ // The id of the database that contains the document.
1671
1718
  string database_id = 1;
1719
+
1720
+ // The id of the document to watch.
1672
1721
  string document_id = 2;
1722
+
1723
+ // The JSON paths to watch.
1724
+ repeated string path = 3;
1725
+ }
1726
+
1727
+ message WatchSynapsePathRequest {
1728
+ oneof payload {
1729
+ // Start watching the given paths; must be sent as the first message.
1730
+ WatchSynapsePathStart start = 1;
1731
+
1732
+ // Request to stop the watch.
1733
+ bool stop = 2;
1734
+ }
1735
+ }
1736
+
1737
+ enum SynapsePathUpdateType {
1738
+ SYNAPSE_PATH_UPDATE_TYPE_UNKNOWN = 0;
1739
+ SYNAPSE_PATH_UPDATE_TYPE_ADD = 1;
1740
+ SYNAPSE_PATH_UPDATE_TYPE_UPDATE = 2;
1741
+ SYNAPSE_PATH_UPDATE_TYPE_DELETE = 3;
1673
1742
  }
1674
1743
 
1675
- message GetDocumentJSONResponse {
1744
+ message WatchSynapsePathUpdate {
1745
+ // The JSON path that was updated.
1746
+ string watch_path = 1;
1747
+
1748
+ // The actual JSON path for this match (e.g. $.content["Atlantic Star"].lat).
1749
+ // Enables clients to identify which array element or map key the update refers to when using wildcard matches such as $.content[*]
1750
+ string event_path = 2;
1751
+
1752
+ // The type of update.
1753
+ SynapsePathUpdateType update_type = 3;
1754
+
1755
+ // The JSON value that was updated.
1756
+ string value = 4;
1757
+
1758
+ // The previous JSON value before the update.
1759
+ string previous_value = 5;
1760
+
1761
+ // The zero-based index of the update.
1762
+ uint32 index = 6;
1763
+
1764
+ // The total number of updates.
1765
+ uint32 total = 7;
1766
+ }
1767
+
1768
+ message WatchSynapsePathResponse {
1676
1769
  oneof result {
1677
1770
  // Details of any error that occurred on the call.
1678
- tdx.volt_api.volt.v1.Status error = 1;
1771
+ tdx.volt_api.volt.v1.Status status = 1;
1679
1772
 
1680
- // The current JSON snapshot of the document
1681
- string json = 2;
1773
+ // The update to the path.
1774
+ WatchSynapsePathUpdate update = 2;
1682
1775
  }
1683
1776
  }
1777
+
1778
+ message WriteSynapsePathRequest {
1779
+ // The id of the database that contains the document.
1780
+ string database_id = 1;
1781
+
1782
+ // The id of the document to write to.
1783
+ string document_id = 2;
1784
+
1785
+ // The JSON path to write to.
1786
+ string path = 3;
1787
+
1788
+ // The JSON value to write.
1789
+ string json = 4;
1790
+ }
1791
+
1792
+ message WriteSynapsePathResponse {
1793
+ // Details of any error that occurred on the call.
1794
+ tdx.volt_api.volt.v1.Status status = 1;
1795
+ }
1796
+
1684
1797
  `;
1685
1798
  const terminal_api = `syntax = "proto3";
1686
1799
 
@@ -2438,6 +2551,9 @@ import "tdx/volt_api/volt/v1/volt.proto";
2438
2551
  // A client certificate can be obtained from the \`Authenticate\` method.
2439
2552
  // 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
2553
  service VoltAPI {
2554
+ // Add a relay connection resource to this volt.
2555
+ rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
2556
+
2441
2557
  // Issues a request to authenticate on the volt.
2442
2558
  // All clients must successfully authenticate in order to gain any kind of access.
2443
2559
  // A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
@@ -2527,17 +2643,35 @@ service VoltAPI {
2527
2643
  rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
2528
2644
 
2529
2645
  // Create or update a static file HTTP server.
2530
- rpc SaveHttpFileServer(SaveResourceRequest) returns (SaveResourceResponse);
2646
+ rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2647
+
2648
+ // Create or update an HTTP forwarder resource.
2649
+ rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
2531
2650
 
2532
2651
  // Create or update an HTTP REST API server.
2533
- rpc SaveHttpApiServer(SaveResourceRequest) returns (SaveResourceResponse);
2652
+ rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
2653
+
2654
+ // Create or update an HTTP REST API node.
2655
+ rpc SaveHttpRestApiNode(SaveHttpRestApiNodeRequest) returns (SaveHttpRestApiNodeResponse);
2534
2656
 
2535
2657
  // Create or update an identity.
2536
2658
  rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
2537
2659
 
2660
+ // Create or update a database resource.
2661
+ rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
2662
+
2538
2663
  // Create or update a mirrored link resource.
2539
2664
  rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
2540
2665
 
2666
+ // Create or update a sync database resource.
2667
+ rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
2668
+
2669
+ // Create or update a synapse resource.
2670
+ rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
2671
+
2672
+ // Create a synapse connection resource.
2673
+ rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
2674
+
2541
2675
  // Update Volt parameters.
2542
2676
  // This is a privileged call that requires Volt root access.
2543
2677
  rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
@@ -3454,6 +3588,143 @@ message SaveResourceResponse {
3454
3588
  Resource resource = 2;
3455
3589
  }
3456
3590
 
3591
+ message SaveDatabaseRequest {
3592
+ Resource resource = 1;
3593
+ bool create = 2;
3594
+ string create_in_parent_id = 3;
3595
+ bool purge_attributes = 4;
3596
+ bool encrypted = 5;
3597
+ bool read_audit = 6;
3598
+ bool write_audit = 7;
3599
+ }
3600
+
3601
+ message SaveDatabaseResponse {
3602
+ tdx.volt_api.volt.v1.Status status = 1;
3603
+ Resource resource = 2;
3604
+ }
3605
+
3606
+ message SaveSyncDatabaseRequest {
3607
+ Resource resource = 1;
3608
+ bool create = 2;
3609
+ string create_in_parent_id = 3;
3610
+ bool purge_attributes = 4;
3611
+ bool encrypted = 5;
3612
+ bool read_audit = 6;
3613
+ bool write_audit = 7;
3614
+ bool no_snapshots = 8;
3615
+ }
3616
+
3617
+ message SaveSyncDatabaseResponse {
3618
+ tdx.volt_api.volt.v1.Status status = 1;
3619
+ Resource resource = 2;
3620
+ }
3621
+
3622
+ message SaveSynapseRequest {
3623
+ Resource resource = 1;
3624
+ bool create = 2;
3625
+ string create_in_parent_id = 3;
3626
+ bool purge_attributes = 4;
3627
+ bool encrypted = 5;
3628
+ bool read_audit = 6;
3629
+ bool write_audit = 7;
3630
+ bool no_snapshots = 8;
3631
+ }
3632
+
3633
+ message SaveSynapseResponse {
3634
+ tdx.volt_api.volt.v1.Status status = 1;
3635
+ Resource resource = 2;
3636
+ }
3637
+
3638
+ message SaveHttpForwarderRequest {
3639
+ Resource resource = 1;
3640
+ bool create = 2;
3641
+ string create_in_parent_id = 3;
3642
+ bool purge_attributes = 4;
3643
+ string domain = 5;
3644
+ string host = 6;
3645
+ int32 port = 7;
3646
+ bool forward_host = 8;
3647
+ }
3648
+
3649
+ message SaveHttpForwarderResponse {
3650
+ tdx.volt_api.volt.v1.Status status = 1;
3651
+ Resource resource = 2;
3652
+ }
3653
+
3654
+ message SaveHttpFileServerRequest {
3655
+ Resource resource = 1;
3656
+ bool create = 2;
3657
+ string create_in_parent_id = 3;
3658
+ bool purge_attributes = 4;
3659
+ string path = 5;
3660
+ string host = 6;
3661
+ int32 port = 7;
3662
+ bool enabled = 8;
3663
+ int32 cache_timeout = 9;
3664
+ bool catch_all_enabled = 10;
3665
+ string catch_all = 11;
3666
+ }
3667
+
3668
+ message SaveHttpFileServerResponse {
3669
+ tdx.volt_api.volt.v1.Status status = 1;
3670
+ Resource resource = 2;
3671
+ }
3672
+
3673
+ message SaveHttpRestApiServerRequest {
3674
+ Resource resource = 1;
3675
+ bool create = 2;
3676
+ string create_in_parent_id = 3;
3677
+ bool purge_attributes = 4;
3678
+ string host = 5;
3679
+ int32 port = 6;
3680
+ bool enabled = 7;
3681
+ bool cors_enabled = 8;
3682
+ }
3683
+
3684
+ message SaveHttpRestApiServerResponse {
3685
+ tdx.volt_api.volt.v1.Status status = 1;
3686
+ Resource resource = 2;
3687
+ }
3688
+
3689
+ message SaveHttpRestApiNodeRequest {
3690
+ Resource resource = 1;
3691
+ bool create = 2;
3692
+ string create_in_parent_id = 3;
3693
+ bool purge_attributes = 4;
3694
+ bool is_literal = 5;
3695
+ string literal_json = 6;
3696
+ string database_id = 7;
3697
+ string sql = 8;
3698
+ repeated string parameter = 9;
3699
+ }
3700
+
3701
+ message SaveHttpRestApiNodeResponse {
3702
+ tdx.volt_api.volt.v1.Status status = 1;
3703
+ Resource resource = 2;
3704
+ }
3705
+
3706
+ message CreateSynapseConnectionRequest {
3707
+ Resource resource = 1;
3708
+ bool create = 2;
3709
+ string create_in_parent_id = 3;
3710
+ bool purge_attributes = 4;
3711
+ string local_synapse_id = 5;
3712
+ string remote_synapse_id = 6;
3713
+ string remote_volt_identity = 7;
3714
+ string remote_volt_address = 8;
3715
+ string remote_volt_http_address = 9;
3716
+ string remote_volt_ca = 10;
3717
+ string remote_identity = 11;
3718
+ string relay_address = 12;
3719
+ string relay_ca = 13;
3720
+ string relay_challenge = 14;
3721
+ }
3722
+
3723
+ message CreateSynapseConnectionResponse {
3724
+ tdx.volt_api.volt.v1.Status status = 1;
3725
+ Resource resource = 2;
3726
+ }
3727
+
3457
3728
  message SaveSessionRequest {
3458
3729
  Session session = 1;
3459
3730
  }
@@ -3560,17 +3831,47 @@ const wire_api = `syntax = "proto3";
3560
3831
  package tdx.volt_api.volt.v1;
3561
3832
 
3562
3833
  import "tdx/volt_api/volt/v1/status.proto";
3834
+ import "tdx/volt_api/volt/v1/volt.proto";
3563
3835
 
3564
3836
  // The Wire API allows clients to subscribe and publish to Volt wire resources.
3565
3837
  service WireAPI {
3838
+
3566
3839
  // Establishes a client-streaming call to the wire resource.
3567
3840
  rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
3568
3841
 
3842
+ // Saves a wire resource.
3843
+ rpc SaveWire(SaveWireRequest) returns (SaveWireResponse);
3844
+
3569
3845
  // Establishes a bi-directional streaming call to the wire resource.
3570
3846
  // 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
3847
  rpc SubscribeWire(stream SubscribeWireRequest) returns (stream SubscribeWireResponse);
3572
3848
  }
3573
3849
 
3850
+ message SaveWireRequest {
3851
+ // The wire resource to save.
3852
+ Resource resource = 1;
3853
+
3854
+ // Set to create a new wire resource.
3855
+ bool create = 2;
3856
+
3857
+ // The id of the folder resource in which to create the wire resource.
3858
+ string create_in_parent_id = 3;
3859
+
3860
+ // Set to purge the wire resource attributes before saving.
3861
+ bool purge_attributes = 4;
3862
+
3863
+ // Set to persist the wire messages.
3864
+ bool persist = 5;
3865
+
3866
+ // The table to persist the wire messages to.
3867
+ string persist_table = 6;
3868
+ }
3869
+
3870
+ message SaveWireResponse {
3871
+ tdx.volt_api.volt.v1.Status status = 1;
3872
+ tdx.volt_api.volt.v1.Resource resource = 2;
3873
+ }
3874
+
3574
3875
  // 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
3876
  // 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
3877
  message PublishWireRequest {
@@ -5672,10 +5973,18 @@ class VoltClient extends EventEmitter__default["default"] {
5672
5973
  * VoltAPI - resource management
5673
5974
  */
5674
5975
 
5976
+ AddRelay(request) {
5977
+ return unaryCallInternal.call(this, "AddRelay", request);
5978
+ }
5979
+
5675
5980
  CanAccessResource(request) {
5676
5981
  return unaryCallInternal.call(this, "CanAccessResource", request);
5677
5982
  }
5678
5983
 
5984
+ CopyResource(request) {
5985
+ return unaryCallInternal.call(this, "CopyResource", request);
5986
+ }
5987
+
5679
5988
  DeleteResource(request) {
5680
5989
  return unaryCallInternal.call(this, "DeleteResource", request);
5681
5990
  }
@@ -5700,6 +6009,10 @@ class VoltClient extends EventEmitter__default["default"] {
5700
6009
  return unaryCallInternal.call(this, "GetResourceDescendants", request);
5701
6010
  }
5702
6011
 
6012
+ MoveResource(request) {
6013
+ return unaryCallInternal.call(this, "MoveResource", request);
6014
+ }
6015
+
5703
6016
  RequestAccess(request) {
5704
6017
  return unaryCallInternal.call(this, "RequestAccess", request);
5705
6018
  }
@@ -5708,8 +6021,44 @@ class VoltClient extends EventEmitter__default["default"] {
5708
6021
  return unaryCallInternal.call(this, "SaveResource", request);
5709
6022
  }
5710
6023
 
5711
- SaveResourceAttribute(request) {
5712
- return unaryCallInternal.call(this, "SaveResourceAttribute", request);
6024
+ SaveDatabase(request) {
6025
+ return unaryCallInternal.call(this, "SaveDatabase", request);
6026
+ }
6027
+
6028
+ SaveHttpFileServer(request) {
6029
+ return unaryCallInternal.call(this, "SaveHttpFileServer", request);
6030
+ }
6031
+
6032
+ SaveHttpForwarder(request) {
6033
+ return unaryCallInternal.call(this, "SaveHttpForwarder", request);
6034
+ }
6035
+
6036
+ SaveHttpRestApiServer(request) {
6037
+ return unaryCallInternal.call(this, "SaveHttpRestApiServer", request);
6038
+ }
6039
+
6040
+ SaveHttpRestApiNode(request) {
6041
+ return unaryCallInternal.call(this, "SaveHttpRestApiNode", request);
6042
+ }
6043
+
6044
+ SaveMirroredLink(request) {
6045
+ return unaryCallInternal.call(this, "SaveMirroredLink", request);
6046
+ }
6047
+
6048
+ SaveSyncDatabase(request) {
6049
+ return unaryCallInternal.call(this, "SaveSyncDatabase", request);
6050
+ }
6051
+
6052
+ SaveSynapse(request) {
6053
+ return unaryCallInternal.call(this, "SaveSynapse", request);
6054
+ }
6055
+
6056
+ CreateSynapseConnection(request) {
6057
+ return unaryCallInternal.call(this, "CreateSynapseConnection", request);
6058
+ }
6059
+
6060
+ SaveSymbolicLink(request) {
6061
+ return unaryCallInternal.call(this, "SaveSymbolicLink", request);
5713
6062
  }
5714
6063
 
5715
6064
  SetServiceStatus(request) {
@@ -5724,26 +6073,18 @@ class VoltClient extends EventEmitter__default["default"] {
5724
6073
  return unaryCallInternal.call(this, "Authenticate", request);
5725
6074
  }
5726
6075
 
5727
- Bind(request) {
5728
- return unaryCallInternal.call(this, "Bind", request);
6076
+ CheckCompatibility(request) {
6077
+ return unaryCallInternal.call(this, "CheckCompatibility", request);
5729
6078
  }
5730
6079
 
5731
6080
  DeleteAccess(request) {
5732
6081
  return unaryCallInternal.call(this, "DeleteAccess", request);
5733
6082
  }
5734
6083
 
5735
- DeleteVolt(request) {
5736
- return unaryCallInternal.call(this, "DeleteVolt", request);
5737
- }
5738
-
5739
6084
  GetAccess(request) {
5740
6085
  return unaryCallInternal.call(this, "GetAccess", request);
5741
6086
  }
5742
6087
 
5743
- GetBindings(request) {
5744
- return unaryCallInternal.call(this, "GetBindings", request);
5745
- }
5746
-
5747
6088
  GetIdentities(request) {
5748
6089
  return unaryCallInternal.call(this, "GetIdentities", request);
5749
6090
  }
@@ -5752,40 +6093,44 @@ class VoltClient extends EventEmitter__default["default"] {
5752
6093
  return unaryCallInternal.call(this, "GetIdentity", request);
5753
6094
  }
5754
6095
 
5755
- GetIdentityToken(request) {
5756
- return unaryCallInternal.call(this, "GetIdentityToken", request);
6096
+ GetOneTimeToken(request) {
6097
+ return unaryCallInternal.call(this, "GetOneTimeToken", request);
6098
+ }
6099
+
6100
+ GetParameters(request) {
6101
+ return unaryCallInternal.call(this, "GetParameters", request);
5757
6102
  }
5758
6103
 
5759
6104
  GetPolicy(request) {
5760
6105
  return unaryCallInternal.call(this, "GetPolicy", request);
5761
6106
  }
5762
6107
 
5763
- GetSettings(request) {
5764
- return unaryCallInternal.call(this, "GetSettings", request);
6108
+ GetSessions(request) {
6109
+ return unaryCallInternal.call(this, "GetSessions", request);
5765
6110
  }
5766
6111
 
5767
6112
  SaveAccess(request) {
5768
6113
  return unaryCallInternal.call(this, "SaveAccess", request);
5769
6114
  }
5770
6115
 
5771
- SaveCloudConnection(request) {
5772
- return unaryCallInternal.call(this, "SaveCloudConnection", request);
5773
- }
5774
-
5775
6116
  SaveIdentity(request) {
5776
6117
  return unaryCallInternal.call(this, "SaveIdentity", request);
5777
6118
  }
5778
6119
 
5779
- SaveSettings(request) {
5780
- return unaryCallInternal.call(this, "SaveSettings", request);
6120
+ SaveParameters(request) {
6121
+ return unaryCallInternal.call(this, "SaveParameters", request);
6122
+ }
6123
+
6124
+ SaveSession(request) {
6125
+ return unaryCallInternal.call(this, "SaveSession", request);
5781
6126
  }
5782
6127
 
5783
6128
  SetAccessRequestDecision(request) {
5784
6129
  return unaryCallInternal.call(this, "SetAccessRequestDecision", request);
5785
6130
  }
5786
6131
 
5787
- SetBindingDecision(request) {
5788
- return unaryCallInternal.call(this, "SetBindingDecision", request);
6132
+ SetPolicy(request) {
6133
+ return unaryCallInternal.call(this, "SetPolicy", request);
5789
6134
  }
5790
6135
 
5791
6136
  Shutdown(request) {
@@ -5796,6 +6141,16 @@ class VoltClient extends EventEmitter__default["default"] {
5796
6141
  return unaryCallInternal.call(this, "SignVerify", request);
5797
6142
  }
5798
6143
 
6144
+ /**
6145
+ * VoltAPI - streaming (bidi). Use connect() for Connect stream.
6146
+ * Invoke is for relay proxying; returns a duplex stream of InvokeRequest/InvokeResponse.
6147
+ */
6148
+ Invoke(request) {
6149
+ const grpcClient = this.getVoltAPIClient();
6150
+ const invokeCall = new GRPCCall(this, "Invoke", "METHOD_TYPE_BIDI");
6151
+ return invokeCall.start(grpcClient, request);
6152
+ }
6153
+
5799
6154
  /**
5800
6155
  * FileAPI
5801
6156
  */
@@ -6010,6 +6365,9 @@ class VoltClient extends EventEmitter__default["default"] {
6010
6365
  return subscribeCall.start(grpcClient, request);
6011
6366
  }
6012
6367
 
6368
+ /**
6369
+ * SyncAPI
6370
+ */
6013
6371
  SyncDocument(request) {
6014
6372
  const grpcClient = this.getVoltAPIClient();
6015
6373
 
@@ -6020,6 +6378,25 @@ class VoltClient extends EventEmitter__default["default"] {
6020
6378
  );
6021
6379
  return syncDocumentCall.start(grpcClient, request);
6022
6380
  }
6381
+
6382
+ SetSynapseDocumentMetadata(request) {
6383
+ return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
6384
+ }
6385
+
6386
+ WatchSynapsePath(request) {
6387
+ const grpcClient = this.getVoltAPIClient();
6388
+
6389
+ const watchPathCall = new GRPCCall(
6390
+ this,
6391
+ "WatchSynapsePath",
6392
+ "METHOD_TYPE_BIDI"
6393
+ );
6394
+ return watchPathCall.start(grpcClient, request);
6395
+ }
6396
+
6397
+ WriteSynapsePath(request) {
6398
+ return unaryCallInternal.call(this, "WriteSynapsePath", request);
6399
+ }
6023
6400
  }
6024
6401
 
6025
6402
  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.12",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
@@ -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,23 @@ export class VoltClient extends EventEmitter {
681
738
  );
682
739
  return syncDocumentCall.start(grpcClient, request);
683
740
  }
741
+
742
+ SetSynapseDocumentMetadata(request) {
743
+ return unaryCallInternal.call(this, "SetSynapseDocumentMetadata", request);
744
+ }
745
+
746
+ WatchSynapsePath(request) {
747
+ const grpcClient = this.getVoltAPIClient();
748
+
749
+ const watchPathCall = new GRPCCall(
750
+ this,
751
+ "WatchSynapsePath",
752
+ "METHOD_TYPE_BIDI"
753
+ );
754
+ return watchPathCall.start(grpcClient, request);
755
+ }
756
+
757
+ WriteSynapsePath(request) {
758
+ return unaryCallInternal.call(this, "WriteSynapsePath", request);
759
+ }
684
760
  }
@@ -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,57 @@ 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 databases. The connection is created as a child of the local synapse resource, and a symbolic link is also placed in the system-wide 'connection' folder.
1059
+ // The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
1060
+ // The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
1061
+ rpc CreateSynapseConnection(SaveResourceRequest) returns (SaveResourceResponse);
1062
+
1063
+ // Set the metadata for a synapse document.
1064
+ rpc SetSynapseDocumentMetadata(SetSynapseDocumentMetadataRequest) returns (SetSynapseDocumentMetadataResponse);
1065
+
1054
1066
  // Bidirectional streaming RPC for real-time document synchronization
1055
1067
  rpc SyncDocument(stream SyncDocumentRequest) returns (stream SyncDocumentResponse);
1056
1068
 
1057
- // Simple RPC to fetch current document state as JSON
1058
- rpc GetDocumentJSON(GetDocumentJSONRequest) returns (GetDocumentJSONResponse);
1069
+ // Watch synapse paths for changes.
1070
+ rpc WatchSynapsePath(stream WatchSynapsePathRequest) returns (stream WatchSynapsePathResponse);
1071
+
1072
+ // Write a single value to a given synapse JSON path.
1073
+ rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1074
+ }
1075
+
1076
+
1077
+ message SynapseDocumentMetadata {
1078
+ // The name of the top-level shared type in the document.
1079
+ string name = 1;
1080
+
1081
+ // The type of the shared type, e.g. "map", "array" or "text".
1082
+ string type = 2;
1083
+
1084
+ // The JSON schema that describes the data that is stored in this shared type.
1085
+ string json_schema = 3;
1086
+ }
1087
+
1088
+ message SetSynapseDocumentMetadataRequest {
1089
+ // The id of the synapse.
1090
+ string database_id = 1;
1091
+
1092
+ // The id of the document to set the metadata for.
1093
+ string document_id = 2;
1094
+
1095
+ // The metadata to set for the document.
1096
+ repeated SynapseDocumentMetadata metadata = 3;
1097
+
1098
+ // Any additional application-specific JSON to attach to the document.
1099
+ string json = 4;
1100
+ }
1101
+
1102
+ message SetSynapseDocumentMetadataResponse {
1103
+ tdx.volt_api.volt.v1.Status status = 1;
1059
1104
  }
1060
1105
 
1061
1106
  enum SyncState {
@@ -1119,20 +1164,88 @@ message SyncDocumentResponse {
1119
1164
  bool is_read_only = 5;
1120
1165
  }
1121
1166
 
1122
- message GetDocumentJSONRequest {
1167
+ // Parameters to start watching synapse paths. Sent as the first message.
1168
+ message WatchSynapsePathStart {
1169
+ // The id of the database that contains the document.
1123
1170
  string database_id = 1;
1171
+
1172
+ // The id of the document to watch.
1124
1173
  string document_id = 2;
1174
+
1175
+ // The JSON paths to watch.
1176
+ repeated string path = 3;
1177
+ }
1178
+
1179
+ message WatchSynapsePathRequest {
1180
+ oneof payload {
1181
+ // Start watching the given paths; must be sent as the first message.
1182
+ WatchSynapsePathStart start = 1;
1183
+
1184
+ // Request to stop the watch.
1185
+ bool stop = 2;
1186
+ }
1187
+ }
1188
+
1189
+ enum SynapsePathUpdateType {
1190
+ SYNAPSE_PATH_UPDATE_TYPE_UNKNOWN = 0;
1191
+ SYNAPSE_PATH_UPDATE_TYPE_ADD = 1;
1192
+ SYNAPSE_PATH_UPDATE_TYPE_UPDATE = 2;
1193
+ SYNAPSE_PATH_UPDATE_TYPE_DELETE = 3;
1125
1194
  }
1126
1195
 
1127
- message GetDocumentJSONResponse {
1196
+ message WatchSynapsePathUpdate {
1197
+ // The JSON path that was updated.
1198
+ string watch_path = 1;
1199
+
1200
+ // The actual JSON path for this match (e.g. $.content["Atlantic Star"].lat).
1201
+ // Enables clients to identify which array element or map key the update refers to when using wildcard matches such as $.content[*]
1202
+ string event_path = 2;
1203
+
1204
+ // The type of update.
1205
+ SynapsePathUpdateType update_type = 3;
1206
+
1207
+ // The JSON value that was updated.
1208
+ string value = 4;
1209
+
1210
+ // The previous JSON value before the update.
1211
+ string previous_value = 5;
1212
+
1213
+ // The zero-based index of the update.
1214
+ uint32 index = 6;
1215
+
1216
+ // The total number of updates.
1217
+ uint32 total = 7;
1218
+ }
1219
+
1220
+ message WatchSynapsePathResponse {
1128
1221
  oneof result {
1129
1222
  // Details of any error that occurred on the call.
1130
- tdx.volt_api.volt.v1.Status error = 1;
1223
+ tdx.volt_api.volt.v1.Status status = 1;
1131
1224
 
1132
- // The current JSON snapshot of the document
1133
- string json = 2;
1225
+ // The update to the path.
1226
+ WatchSynapsePathUpdate update = 2;
1134
1227
  }
1135
1228
  }
1229
+
1230
+ message WriteSynapsePathRequest {
1231
+ // The id of the database that contains the document.
1232
+ string database_id = 1;
1233
+
1234
+ // The id of the document to write to.
1235
+ string document_id = 2;
1236
+
1237
+ // The JSON path to write to.
1238
+ string path = 3;
1239
+
1240
+ // The JSON value to write.
1241
+ string json = 4;
1242
+ }
1243
+
1244
+ message WriteSynapsePathResponse {
1245
+ // Details of any error that occurred on the call.
1246
+ tdx.volt_api.volt.v1.Status status = 1;
1247
+ }
1248
+
1136
1249
  `;
1137
1250
  export const terminal_api = `syntax = "proto3";
1138
1251
 
@@ -1890,6 +2003,9 @@ import "tdx/volt_api/volt/v1/volt.proto";
1890
2003
  // A client certificate can be obtained from the \`Authenticate\` method.
1891
2004
  // All methods include a \`tdx.volt_api.volt.v1.Status\` in the response. If the status contains a non-OK error code the client should assume the remainder of the message is invalid, unless otherwise indicated in the response documentation.
1892
2005
  service VoltAPI {
2006
+ // Add a relay connection resource to this volt.
2007
+ rpc AddRelay(SaveResourceRequest) returns (SaveResourceResponse);
2008
+
1893
2009
  // Issues a request to authenticate on the volt.
1894
2010
  // All clients must successfully authenticate in order to gain any kind of access.
1895
2011
  // A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
@@ -1979,17 +2095,35 @@ service VoltAPI {
1979
2095
  rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
1980
2096
 
1981
2097
  // Create or update a static file HTTP server.
1982
- rpc SaveHttpFileServer(SaveResourceRequest) returns (SaveResourceResponse);
2098
+ rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2099
+
2100
+ // Create or update an HTTP forwarder resource.
2101
+ rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
1983
2102
 
1984
2103
  // Create or update an HTTP REST API server.
1985
- rpc SaveHttpApiServer(SaveResourceRequest) returns (SaveResourceResponse);
2104
+ rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
2105
+
2106
+ // Create or update an HTTP REST API node.
2107
+ rpc SaveHttpRestApiNode(SaveHttpRestApiNodeRequest) returns (SaveHttpRestApiNodeResponse);
1986
2108
 
1987
2109
  // Create or update an identity.
1988
2110
  rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
1989
2111
 
2112
+ // Create or update a database resource.
2113
+ rpc SaveDatabase(SaveDatabaseRequest) returns (SaveDatabaseResponse);
2114
+
1990
2115
  // Create or update a mirrored link resource.
1991
2116
  rpc SaveMirroredLink(SaveResourceRequest) returns (SaveResourceResponse);
1992
2117
 
2118
+ // Create or update a sync database resource.
2119
+ rpc SaveSyncDatabase(SaveSyncDatabaseRequest) returns (SaveSyncDatabaseResponse);
2120
+
2121
+ // Create or update a synapse resource.
2122
+ rpc SaveSynapse(SaveSynapseRequest) returns (SaveSynapseResponse);
2123
+
2124
+ // Create a synapse connection resource.
2125
+ rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
2126
+
1993
2127
  // Update Volt parameters.
1994
2128
  // This is a privileged call that requires Volt root access.
1995
2129
  rpc SaveParameters(SaveParametersRequest) returns (SaveParametersResponse);
@@ -2906,6 +3040,143 @@ message SaveResourceResponse {
2906
3040
  Resource resource = 2;
2907
3041
  }
2908
3042
 
3043
+ message SaveDatabaseRequest {
3044
+ Resource resource = 1;
3045
+ bool create = 2;
3046
+ string create_in_parent_id = 3;
3047
+ bool purge_attributes = 4;
3048
+ bool encrypted = 5;
3049
+ bool read_audit = 6;
3050
+ bool write_audit = 7;
3051
+ }
3052
+
3053
+ message SaveDatabaseResponse {
3054
+ tdx.volt_api.volt.v1.Status status = 1;
3055
+ Resource resource = 2;
3056
+ }
3057
+
3058
+ message SaveSyncDatabaseRequest {
3059
+ Resource resource = 1;
3060
+ bool create = 2;
3061
+ string create_in_parent_id = 3;
3062
+ bool purge_attributes = 4;
3063
+ bool encrypted = 5;
3064
+ bool read_audit = 6;
3065
+ bool write_audit = 7;
3066
+ bool no_snapshots = 8;
3067
+ }
3068
+
3069
+ message SaveSyncDatabaseResponse {
3070
+ tdx.volt_api.volt.v1.Status status = 1;
3071
+ Resource resource = 2;
3072
+ }
3073
+
3074
+ message SaveSynapseRequest {
3075
+ Resource resource = 1;
3076
+ bool create = 2;
3077
+ string create_in_parent_id = 3;
3078
+ bool purge_attributes = 4;
3079
+ bool encrypted = 5;
3080
+ bool read_audit = 6;
3081
+ bool write_audit = 7;
3082
+ bool no_snapshots = 8;
3083
+ }
3084
+
3085
+ message SaveSynapseResponse {
3086
+ tdx.volt_api.volt.v1.Status status = 1;
3087
+ Resource resource = 2;
3088
+ }
3089
+
3090
+ message SaveHttpForwarderRequest {
3091
+ Resource resource = 1;
3092
+ bool create = 2;
3093
+ string create_in_parent_id = 3;
3094
+ bool purge_attributes = 4;
3095
+ string domain = 5;
3096
+ string host = 6;
3097
+ int32 port = 7;
3098
+ bool forward_host = 8;
3099
+ }
3100
+
3101
+ message SaveHttpForwarderResponse {
3102
+ tdx.volt_api.volt.v1.Status status = 1;
3103
+ Resource resource = 2;
3104
+ }
3105
+
3106
+ message SaveHttpFileServerRequest {
3107
+ Resource resource = 1;
3108
+ bool create = 2;
3109
+ string create_in_parent_id = 3;
3110
+ bool purge_attributes = 4;
3111
+ string path = 5;
3112
+ string host = 6;
3113
+ int32 port = 7;
3114
+ bool enabled = 8;
3115
+ int32 cache_timeout = 9;
3116
+ bool catch_all_enabled = 10;
3117
+ string catch_all = 11;
3118
+ }
3119
+
3120
+ message SaveHttpFileServerResponse {
3121
+ tdx.volt_api.volt.v1.Status status = 1;
3122
+ Resource resource = 2;
3123
+ }
3124
+
3125
+ message SaveHttpRestApiServerRequest {
3126
+ Resource resource = 1;
3127
+ bool create = 2;
3128
+ string create_in_parent_id = 3;
3129
+ bool purge_attributes = 4;
3130
+ string host = 5;
3131
+ int32 port = 6;
3132
+ bool enabled = 7;
3133
+ bool cors_enabled = 8;
3134
+ }
3135
+
3136
+ message SaveHttpRestApiServerResponse {
3137
+ tdx.volt_api.volt.v1.Status status = 1;
3138
+ Resource resource = 2;
3139
+ }
3140
+
3141
+ message SaveHttpRestApiNodeRequest {
3142
+ Resource resource = 1;
3143
+ bool create = 2;
3144
+ string create_in_parent_id = 3;
3145
+ bool purge_attributes = 4;
3146
+ bool is_literal = 5;
3147
+ string literal_json = 6;
3148
+ string database_id = 7;
3149
+ string sql = 8;
3150
+ repeated string parameter = 9;
3151
+ }
3152
+
3153
+ message SaveHttpRestApiNodeResponse {
3154
+ tdx.volt_api.volt.v1.Status status = 1;
3155
+ Resource resource = 2;
3156
+ }
3157
+
3158
+ message CreateSynapseConnectionRequest {
3159
+ Resource resource = 1;
3160
+ bool create = 2;
3161
+ string create_in_parent_id = 3;
3162
+ bool purge_attributes = 4;
3163
+ string local_synapse_id = 5;
3164
+ string remote_synapse_id = 6;
3165
+ string remote_volt_identity = 7;
3166
+ string remote_volt_address = 8;
3167
+ string remote_volt_http_address = 9;
3168
+ string remote_volt_ca = 10;
3169
+ string remote_identity = 11;
3170
+ string relay_address = 12;
3171
+ string relay_ca = 13;
3172
+ string relay_challenge = 14;
3173
+ }
3174
+
3175
+ message CreateSynapseConnectionResponse {
3176
+ tdx.volt_api.volt.v1.Status status = 1;
3177
+ Resource resource = 2;
3178
+ }
3179
+
2909
3180
  message SaveSessionRequest {
2910
3181
  Session session = 1;
2911
3182
  }
@@ -3012,17 +3283,47 @@ export const wire_api = `syntax = "proto3";
3012
3283
  package tdx.volt_api.volt.v1;
3013
3284
 
3014
3285
  import "tdx/volt_api/volt/v1/status.proto";
3286
+ import "tdx/volt_api/volt/v1/volt.proto";
3015
3287
 
3016
3288
  // The Wire API allows clients to subscribe and publish to Volt wire resources.
3017
3289
  service WireAPI {
3290
+
3018
3291
  // Establishes a client-streaming call to the wire resource.
3019
3292
  rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
3020
3293
 
3294
+ // Saves a wire resource.
3295
+ rpc SaveWire(SaveWireRequest) returns (SaveWireResponse);
3296
+
3021
3297
  // Establishes a bi-directional streaming call to the wire resource.
3022
3298
  // Although we're only really interested in receiving data from the wire, a bi-directional stream is required so that we can gracefully stop the subscription.
3023
3299
  rpc SubscribeWire(stream SubscribeWireRequest) returns (stream SubscribeWireResponse);
3024
3300
  }
3025
3301
 
3302
+ message SaveWireRequest {
3303
+ // The wire resource to save.
3304
+ Resource resource = 1;
3305
+
3306
+ // Set to create a new wire resource.
3307
+ bool create = 2;
3308
+
3309
+ // The id of the folder resource in which to create the wire resource.
3310
+ string create_in_parent_id = 3;
3311
+
3312
+ // Set to purge the wire resource attributes before saving.
3313
+ bool purge_attributes = 4;
3314
+
3315
+ // Set to persist the wire messages.
3316
+ bool persist = 5;
3317
+
3318
+ // The table to persist the wire messages to.
3319
+ string persist_table = 6;
3320
+ }
3321
+
3322
+ message SaveWireResponse {
3323
+ tdx.volt_api.volt.v1.Status status = 1;
3324
+ tdx.volt_api.volt.v1.Resource resource = 2;
3325
+ }
3326
+
3026
3327
  // Because the publish RPC is streaming, the policy will not be checked until the first message arrives. This can mean that the \`PublishWire\` call appears to succeed but then fails after the first attempt to publish a message.
3027
3328
  // To avoid this, clients can immediately send a message with the \`wire_id\` set and no \`chunk\` set. This will establish that the correct permissions are in place and fail fast if not.
3028
3329
  message PublishWireRequest {