@tdxvolt/volt-client-grpc 0.20.18 → 0.20.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -991,11 +991,11 @@ import "tdx/volt_api/volt/v1/volt.proto";
991
991
  // The Drive API allows clients to create and manage Volt Drive resources.
992
992
  service DriveAPI {
993
993
  // Create or update a drive connection resource.
994
- // This is a privileged API call and requires volt:api-call / volt:save-drive permission.
995
- rpc SaveDrive(SaveDriveRequest) returns (SaveDriveResponse);
994
+ // This is a privileged API call and requires volt:api-call / volt:save-drive-instance permission.
995
+ rpc SaveDriveInstance(SaveDriveInstanceRequest) returns (SaveDriveInstanceResponse);
996
996
  }
997
997
 
998
- message SaveDriveRequest {
998
+ message SaveDriveInstanceRequest {
999
999
  // Details of the drive to save.
1000
1000
  Resource resource = 1;
1001
1001
 
@@ -1013,7 +1013,7 @@ message SaveDriveRequest {
1013
1013
  bool purge_attributes = 4;
1014
1014
 
1015
1015
  // The id of the synapse resource that stores the drive data.
1016
- string source_synapse_id = 5;
1016
+ string synapse_id = 5;
1017
1017
 
1018
1018
  // The local path of the folder to sync.
1019
1019
  string target_folder = 6;
@@ -1029,7 +1029,7 @@ message SaveDriveRequest {
1029
1029
  string identity_did = 9;
1030
1030
 
1031
1031
  // The DID of the remote Volt.
1032
- string remote_volt_identity = 10;
1032
+ string remote_volt_did = 10;
1033
1033
 
1034
1034
  // Optional address of the remote Volt. Either this or the relay address must be provided.
1035
1035
  string remote_volt_address = 11;
@@ -1050,7 +1050,7 @@ message SaveDriveRequest {
1050
1050
  string relay_challenge = 16;
1051
1051
  }
1052
1052
 
1053
- message SaveDriveResponse {
1053
+ message SaveDriveInstanceResponse {
1054
1054
  // Details of any error that occurred on the call.
1055
1055
  tdx.volt_api.volt.v1.Status status = 1;
1056
1056
 
@@ -1662,14 +1662,13 @@ const status = `syntax = "proto3";
1662
1662
  package tdx.volt_api.volt.v1;
1663
1663
 
1664
1664
  message Status {
1665
- // A simple error code that can be easily handled by the client.
1666
- // Mirrors the grpc StatusCode enum, 0 => OK
1665
+ // Mirrors the grpc StatusCode enum, 0 => OK, see https://grpc.github.io/grpc/core/md_doc_statuscodes.html
1667
1666
  int32 code = 1;
1668
1667
 
1669
- // A developer-facing human-readable error message in English. It should both explain the error and offer an actionable resolution to it.
1668
+ // A developer-facing human-readable error message, e.g. 'invalidArguments'.
1670
1669
  string message = 2;
1671
1670
 
1672
- // Long form error description.
1671
+ // A description of the error, e.g. 'The \`database_id\` is missing'.
1673
1672
  string description = 3;
1674
1673
  }
1675
1674
  `;
@@ -1687,6 +1686,9 @@ service SyncAPI {
1687
1686
  // The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
1688
1687
  // The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
1689
1688
  rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
1689
+
1690
+ // Delete a synapse connection. This will terminate any ongoing syncronisation between the two synapses and delete the connection resource.
1691
+ rpc DeleteSynapseConnection(DeleteSynapseConnectionRequest) returns (DeleteSynapseConnectionResponse);
1690
1692
 
1691
1693
  // Delete a document from the synapse.
1692
1694
  rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
@@ -1760,10 +1762,23 @@ message CreateSynapseConnectionRequest {
1760
1762
  }
1761
1763
 
1762
1764
  message CreateSynapseConnectionResponse {
1765
+ // Details of any error that occurred on the call.
1763
1766
  tdx.volt_api.volt.v1.Status status = 1;
1767
+
1768
+ // The created synapse connection resource.
1764
1769
  Resource resource = 2;
1765
1770
  }
1766
1771
 
1772
+ message DeleteSynapseConnectionRequest {
1773
+ // The id of the synapse connection to delete.
1774
+ string synapse_connection_id = 1;
1775
+ }
1776
+
1777
+ message DeleteSynapseConnectionResponse {
1778
+ // Details of any error that occurred on the call.
1779
+ tdx.volt_api.volt.v1.Status status = 1;
1780
+ }
1781
+
1767
1782
  message DeleteSynapseDocumentMetadataRequest {
1768
1783
  // DEPRECATED: Use synapse_id instead.
1769
1784
  string database_id = 1;
@@ -6265,6 +6280,10 @@ class VoltClient extends EventEmitter__default["default"] {
6265
6280
  return unaryCallInternal.call(this, "CreateSynapseConnection", request);
6266
6281
  }
6267
6282
 
6283
+ DeleteSynapseConnection(request) {
6284
+ return unaryCallInternal.call(this, "DeleteSynapseConnection", request);
6285
+ }
6286
+
6268
6287
  SaveSymbolicLink(request) {
6269
6288
  return unaryCallInternal.call(this, "SaveSymbolicLink", request);
6270
6289
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.20.18",
6
+ "version": "0.20.19",
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.18",
36
+ "@tdxvolt/volt-client-web": "^0.20.19",
37
37
  "@tdxvolt/volt-utility": "^0.20.18",
38
38
  "debug": "^4.1.1",
39
39
  "ip": "^1.1.5",
@@ -415,6 +415,10 @@ export class VoltClient extends EventEmitter {
415
415
  return unaryCallInternal.call(this, "CreateSynapseConnection", request);
416
416
  }
417
417
 
418
+ DeleteSynapseConnection(request) {
419
+ return unaryCallInternal.call(this, "DeleteSynapseConnection", request);
420
+ }
421
+
418
422
  SaveSymbolicLink(request) {
419
423
  return unaryCallInternal.call(this, "SaveSymbolicLink", request);
420
424
  }
@@ -443,11 +443,11 @@ import "tdx/volt_api/volt/v1/volt.proto";
443
443
  // The Drive API allows clients to create and manage Volt Drive resources.
444
444
  service DriveAPI {
445
445
  // Create or update a drive connection resource.
446
- // This is a privileged API call and requires volt:api-call / volt:save-drive permission.
447
- rpc SaveDrive(SaveDriveRequest) returns (SaveDriveResponse);
446
+ // This is a privileged API call and requires volt:api-call / volt:save-drive-instance permission.
447
+ rpc SaveDriveInstance(SaveDriveInstanceRequest) returns (SaveDriveInstanceResponse);
448
448
  }
449
449
 
450
- message SaveDriveRequest {
450
+ message SaveDriveInstanceRequest {
451
451
  // Details of the drive to save.
452
452
  Resource resource = 1;
453
453
 
@@ -465,7 +465,7 @@ message SaveDriveRequest {
465
465
  bool purge_attributes = 4;
466
466
 
467
467
  // The id of the synapse resource that stores the drive data.
468
- string source_synapse_id = 5;
468
+ string synapse_id = 5;
469
469
 
470
470
  // The local path of the folder to sync.
471
471
  string target_folder = 6;
@@ -481,7 +481,7 @@ message SaveDriveRequest {
481
481
  string identity_did = 9;
482
482
 
483
483
  // The DID of the remote Volt.
484
- string remote_volt_identity = 10;
484
+ string remote_volt_did = 10;
485
485
 
486
486
  // Optional address of the remote Volt. Either this or the relay address must be provided.
487
487
  string remote_volt_address = 11;
@@ -502,7 +502,7 @@ message SaveDriveRequest {
502
502
  string relay_challenge = 16;
503
503
  }
504
504
 
505
- message SaveDriveResponse {
505
+ message SaveDriveInstanceResponse {
506
506
  // Details of any error that occurred on the call.
507
507
  tdx.volt_api.volt.v1.Status status = 1;
508
508
 
@@ -1114,14 +1114,13 @@ export const status = `syntax = "proto3";
1114
1114
  package tdx.volt_api.volt.v1;
1115
1115
 
1116
1116
  message Status {
1117
- // A simple error code that can be easily handled by the client.
1118
- // Mirrors the grpc StatusCode enum, 0 => OK
1117
+ // Mirrors the grpc StatusCode enum, 0 => OK, see https://grpc.github.io/grpc/core/md_doc_statuscodes.html
1119
1118
  int32 code = 1;
1120
1119
 
1121
- // A developer-facing human-readable error message in English. It should both explain the error and offer an actionable resolution to it.
1120
+ // A developer-facing human-readable error message, e.g. 'invalidArguments'.
1122
1121
  string message = 2;
1123
1122
 
1124
- // Long form error description.
1123
+ // A description of the error, e.g. 'The \`database_id\` is missing'.
1125
1124
  string description = 3;
1126
1125
  }
1127
1126
  `;
@@ -1139,6 +1138,9 @@ service SyncAPI {
1139
1138
  // The remote Volt is identified by its DID or address. If a relay address is provided, the connection will be established via the relay.
1140
1139
  // The authenticated account must have \`volt:resource-create\` access to the local synapse resource.
1141
1140
  rpc CreateSynapseConnection(CreateSynapseConnectionRequest) returns (CreateSynapseConnectionResponse);
1141
+
1142
+ // Delete a synapse connection. This will terminate any ongoing syncronisation between the two synapses and delete the connection resource.
1143
+ rpc DeleteSynapseConnection(DeleteSynapseConnectionRequest) returns (DeleteSynapseConnectionResponse);
1142
1144
 
1143
1145
  // Delete a document from the synapse.
1144
1146
  rpc DeleteSynapseDocumentMetadata(DeleteSynapseDocumentMetadataRequest) returns (DeleteSynapseDocumentMetadataResponse);
@@ -1212,10 +1214,23 @@ message CreateSynapseConnectionRequest {
1212
1214
  }
1213
1215
 
1214
1216
  message CreateSynapseConnectionResponse {
1217
+ // Details of any error that occurred on the call.
1215
1218
  tdx.volt_api.volt.v1.Status status = 1;
1219
+
1220
+ // The created synapse connection resource.
1216
1221
  Resource resource = 2;
1217
1222
  }
1218
1223
 
1224
+ message DeleteSynapseConnectionRequest {
1225
+ // The id of the synapse connection to delete.
1226
+ string synapse_connection_id = 1;
1227
+ }
1228
+
1229
+ message DeleteSynapseConnectionResponse {
1230
+ // Details of any error that occurred on the call.
1231
+ tdx.volt_api.volt.v1.Status status = 1;
1232
+ }
1233
+
1219
1234
  message DeleteSynapseDocumentMetadataRequest {
1220
1235
  // DEPRECATED: Use synapse_id instead.
1221
1236
  string database_id = 1;