@tdxvolt/volt-client-grpc 0.20.21 → 0.20.29

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
@@ -756,11 +756,15 @@ package tdx.volt_api.data.v1;
756
756
  import "tdx/volt_api/volt/v1/status.proto";
757
757
  import "tdx/volt_api/volt/v1/volt.proto";
758
758
 
759
- // The Sqlite Server API provides database management functions.
760
- // Use the VoltAPI DeleteResource function to delete a database.
759
+ // The Sqlite Server API provides database and view management functions.
760
+ // Use the VoltAPI DeleteResource function to delete a database or data view.
761
761
  service SqliteServerAPI {
762
762
  // Create a new database resource.
763
763
  rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse);
764
+
765
+ // Create or update a data view resource.
766
+ //Note that when creating a data view, the authenticated account must have access to the source database resource. For 'read-only' views that are \`SELECT\` only, this requires \`volt:database-read\` access to the source database. Any non-\`SELECT\` views require \`volt:database-write\` access to the source database.
767
+ rpc SaveDataView(SaveDataViewRequest) returns (SaveDataViewResponse);
764
768
  }
765
769
 
766
770
  message CreateDatabaseRequest {
@@ -799,6 +803,55 @@ message CreateDatabaseResponse {
799
803
  tdx.volt_api.volt.v1.Resource resource = 2;
800
804
  }
801
805
 
806
+ message DataViewParameter {
807
+ // The parameter name referenced in the SQL template.
808
+ string name = 1;
809
+
810
+ // The parameter data type.
811
+ tdx.volt_api.volt.v1.AttributeDataType data_type = 2;
812
+
813
+ // Optional default value for the parameter.
814
+ tdx.volt_api.volt.v1.AttributeValue default_value = 3;
815
+
816
+ // Set when default_value should be applied.
817
+ bool include_default_value = 4;
818
+ }
819
+
820
+ message SaveDataViewRequest {
821
+ // Details of the data view to save.
822
+ tdx.volt_api.volt.v1.Resource resource = 1;
823
+
824
+ // Set to indicate this is a new data view.
825
+ bool create = 2;
826
+
827
+ // The id of the folder resource in which a new data view should be created.
828
+ // If omitted, the home folder of the currently authenticated identity will be used.
829
+ string create_in_parent_id = 3;
830
+
831
+ // Set to indicate the resource attributes should be purged before saving the resource.
832
+ bool purge_attributes = 4;
833
+
834
+ // The id of the source database on which this view is based.
835
+ // The authenticated account must have the relevant access to the source database, for example to create a 'SELECT' view the account must have 'volt:database-read' access to the source database. To create an 'INSERT' view the account must have 'volt:database-write' access to the source database.
836
+ string source_database_id = 5;
837
+
838
+ // The SQL template for the view.
839
+ string sql = 6;
840
+
841
+ // Set to allow sub-selects in the view SQL.
842
+ bool allow_sub_select = 7;
843
+
844
+ // Parameters defined for the view SQL template.
845
+ repeated DataViewParameter parameter = 8;
846
+ }
847
+
848
+ message SaveDataViewResponse {
849
+ // Details of any error that occurred on the call.
850
+ tdx.volt_api.volt.v1.Status status = 1;
851
+
852
+ // The saved data view resource.
853
+ tdx.volt_api.volt.v1.Resource resource = 2;
854
+ }
802
855
  `;
803
856
  const proto_db_sync = `syntax = "proto3";
804
857
 
@@ -1489,6 +1542,10 @@ message DeleteDIDRequest {
1489
1542
 
1490
1543
  // Optional passphrase of the DID controller key. Required if the key is encrypted.
1491
1544
  string key_passphrase = 3;
1545
+
1546
+ // When true and \`did\` is set, hard-delete the DID from the local registry without requiring controller keys or signatures, and without synchronising with other registries. Ignored when \`origin_volt\`.
1547
+ // Requires \`volt:delete-did\` API privilege.
1548
+ bool force = 4;
1492
1549
  }
1493
1550
 
1494
1551
  message DeleteDIDResponse {
@@ -1570,6 +1627,13 @@ message ResolveDIDRequest {
1570
1627
 
1571
1628
  // Set to search all known registries rather than just the local registry.
1572
1629
  bool include_registries = 2;
1630
+
1631
+ // Per-DID document version. 0 = latest; 1..N = ordinal in the op log.
1632
+ uint64 version = 3;
1633
+
1634
+ // Milliseconds since epoch. Resolves the document active at that time.
1635
+ // Mutually exclusive with version.
1636
+ uint64 at_timestamp = 4;
1573
1637
  }
1574
1638
 
1575
1639
  message ResolveDIDResponse {
@@ -1708,6 +1772,18 @@ service SyncAPI {
1708
1772
 
1709
1773
  // Write a single value to a given synapse JSON path.
1710
1774
  rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1775
+
1776
+ // List stored versions of a document in a sync database.
1777
+ rpc ListSyncDocumentVersions(ListSyncDocumentVersionsRequest) returns (ListSyncDocumentVersionsResponse);
1778
+
1779
+ // Get a stored version of a document in a sync database.
1780
+ rpc GetSyncDocumentVersion(GetSyncDocumentVersionRequest) returns (GetSyncDocumentVersionResponse);
1781
+
1782
+ // Create a version checkpoint for a document in a sync database.
1783
+ rpc CreateSyncDocumentVersion(CreateSyncDocumentVersionRequest) returns (CreateSyncDocumentVersionResponse);
1784
+
1785
+ // Revert a document in a sync database to a stored version.
1786
+ rpc RevertSyncDocumentVersion(RevertSyncDocumentVersionRequest) returns (RevertSyncDocumentVersionResponse);
1711
1787
  }
1712
1788
 
1713
1789
  message CreateSynapseConnectionRequest {
@@ -1821,8 +1897,8 @@ message SaveSyncDatabaseRequest {
1821
1897
  // Set to audit all INSERT, UPDATE, and DELETE database operations.
1822
1898
  bool write_audit = 7;
1823
1899
 
1824
- // By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the database and improve performance, but will also reduce the ability to rollback to a previous state.
1825
- bool no_snapshots = 8;
1900
+ // By default, yjs updates are periodically compacted. Set this flag to disable compaction. This will reduce the size of the database but will remove the ability to version the documents in the database.
1901
+ bool no_compaction = 8;
1826
1902
 
1827
1903
  // The number of updates to batch before flushing to the database. Defaults to 100.
1828
1904
  uint32 batch_size = 9;
@@ -1859,8 +1935,8 @@ message SaveSynapseRequest {
1859
1935
  // Set to audit all INSERT, UPDATE, and DELETE synapse operations.
1860
1936
  bool write_audit = 7;
1861
1937
 
1862
- // By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the synapse and improve performance, but will also reduce the ability to rollback to a previous state.
1863
- bool no_snapshots = 8;
1938
+ // By default, yjs updates are periodically compacted. Set this flag to disable compaction. This will reduce the size of the database but will remove the ability to version the documents in the database.
1939
+ bool no_compaction = 8;
1864
1940
  }
1865
1941
 
1866
1942
  message SaveSynapseResponse {
@@ -1897,6 +1973,14 @@ message SetSynapseDocumentMetadataRequest {
1897
1973
 
1898
1974
  // Any additional application-specific JSON to attach to the document.
1899
1975
  string json = 4;
1976
+
1977
+ // Set to true when the caller intends to write the document's content
1978
+ // separately, after this metadata call (a metadata-first create). The sync
1979
+ // server uses this to defer __hash bootstrapping until the content actually
1980
+ // arrives, so the hash is not computed over an empty document. Leave false
1981
+ // (the default) for empty documents or content-first flows where the content
1982
+ // is already present.
1983
+ bool content_pending = 6;
1900
1984
  }
1901
1985
 
1902
1986
  message SetSynapseDocumentMetadataResponse {
@@ -2052,6 +2136,83 @@ message WriteSynapsePathResponse {
2052
2136
  tdx.volt_api.volt.v1.Status status = 1;
2053
2137
  }
2054
2138
 
2139
+ message SyncDocumentVersionSummary {
2140
+ // Globally unique version identifier (UUID).
2141
+ string version_id = 1;
2142
+
2143
+ // Milliseconds since Unix epoch when the version was created.
2144
+ uint64 timestamp = 2;
2145
+
2146
+ // Identity that created the version.
2147
+ string identity = 3;
2148
+
2149
+ // Optional user-provided label.
2150
+ string label = 4;
2151
+
2152
+ // Document hash (__hash) at the time of the version, when available.
2153
+ string document_hash = 5;
2154
+ }
2155
+
2156
+ message ListSyncDocumentVersionsRequest {
2157
+ // The id of the sync database that contains the document.
2158
+ string database_id = 1;
2159
+
2160
+ // The id of the document.
2161
+ string document_id = 2;
2162
+
2163
+ // Maximum number of versions to return. Defaults to 50.
2164
+ uint32 limit = 3;
2165
+
2166
+ // Number of versions to skip from the newest end.
2167
+ uint32 offset = 4;
2168
+ }
2169
+
2170
+ message ListSyncDocumentVersionsResponse {
2171
+ tdx.volt_api.volt.v1.Status status = 1;
2172
+ repeated SyncDocumentVersionSummary versions = 2;
2173
+ }
2174
+
2175
+ message GetSyncDocumentVersionRequest {
2176
+ string database_id = 1;
2177
+ string document_id = 2;
2178
+ string version_id = 3;
2179
+ }
2180
+
2181
+ message GetSyncDocumentVersionResponse {
2182
+ tdx.volt_api.volt.v1.Status status = 1;
2183
+ SyncDocumentVersionSummary info = 2;
2184
+
2185
+ // Full Yjs v2 document state at this version. Clients materialize locally.
2186
+ bytes state_update = 3;
2187
+ }
2188
+
2189
+ message CreateSyncDocumentVersionRequest {
2190
+ string database_id = 1;
2191
+ string document_id = 2;
2192
+ string label = 3;
2193
+ }
2194
+
2195
+ message CreateSyncDocumentVersionResponse {
2196
+ tdx.volt_api.volt.v1.Status status = 1;
2197
+ string version_id = 2;
2198
+ }
2199
+
2200
+ message RevertSyncDocumentVersionRequest {
2201
+ string database_id = 1;
2202
+ string document_id = 2;
2203
+ string version_id = 3;
2204
+
2205
+ // Optional label for the audit version created after revert.
2206
+ string label = 4;
2207
+ }
2208
+
2209
+ message RevertSyncDocumentVersionResponse {
2210
+ tdx.volt_api.volt.v1.Status status = 1;
2211
+
2212
+ // Version id of the audit checkpoint created after revert.
2213
+ string version_id = 2;
2214
+ }
2215
+
2055
2216
  `;
2056
2217
  const terminal_api = `syntax = "proto3";
2057
2218
 
@@ -2061,6 +2222,7 @@ import "tdx/volt_api/volt/v1/status.proto";
2061
2222
 
2062
2223
  service TerminalAPI {
2063
2224
  // Bidirectional streaming RPC for real-time terminal control and data exchange.
2225
+ // Note that \`volt:command-invoke\` access is required to invoke this API. An optional allow-list of comma-separated commands can be specified in the \`extra\` string of the access policy.
2064
2226
  rpc CommandStream(stream CommandStreamRequest) returns (stream CommandStreamResponse);
2065
2227
  }
2066
2228
 
@@ -2716,7 +2878,18 @@ message Access {
2716
2878
  // Requested access.
2717
2879
  string access = 10;
2718
2880
 
2719
- // Optional extra data.
2881
+ // Optional extra data that further constrains the access being granted. How this string is interpreted depends on the value of \`access\` above:
2882
+ //
2883
+ // - \`volt:api-call\`: a single API method name. The access only applies when the invoked API method matches this value (policy attribute \`volt:action-api-call\`). Leave empty to allow all API methods.
2884
+ //
2885
+ // - \`volt:command-invoke\` (CommandStream API): a comma-separated allow-list of commands. The access is permitted (or denied depending on the rule decision) when the invoked command matches any entry in the list (policy attribute \`volt:action-command\`). A trailing \`*\` acts as a prefix wildcard (e.g. \`/usr/bin/*\` allows any command beginning with \`/usr/bin/\`). Leave empty to allow all commands.
2886
+ // Example: "ls,git,/usr/bin/python3"
2887
+ //
2888
+ // - Otherwise: a comma-separated list of \`[attributeId]|[value]\` pairs, each matched against the named resource attribute (trailing \`*\` acts as a prefix wildcard). The sync-database case below is a specialisation of this general form.
2889
+ //
2890
+ // - Sync databases (\`volt:sync-database\` resources, e.g. with \`volt:database-read\` / \`volt:database-write\` access): a comma-separated list of \`[attributeId]|[value]\` pairs restricting the access to specific documents. Document ids use the \`volt:resource-sync-document-id\` attribute id, so each entry has the form \`volt:resource-sync-document-id|[documentId]\`. A trailing \`*\` on the value acts as a prefix wildcard. Leave empty to target all documents in the database.
2891
+ // Example: "volt:resource-sync-document-id|doc-123,volt:resource-sync-document-id|report-*"
2892
+ //
2720
2893
  string extra = 11;
2721
2894
 
2722
2895
  // Assigned decision.
@@ -2891,8 +3064,9 @@ service VoltAPI {
2891
3064
  rpc DiscoverServices(DiscoverServicesRequest) returns (DiscoverServicesResponse);
2892
3065
 
2893
3066
  // Get access rule details.
2894
- // Only rules in which the authenticated identity participates will be retrieved, in addition to any rules that target a resource that is owned by the authenticated identity.
2895
3067
  // If the authenticated identity is the Volt root, all rules will be retrieved that match the criteria.
3068
+ // All rules for which the authenticated account has volt:api-call / volt:get-access permission to the rule resource will be retrieved.
3069
+ // Otherwise, only rules in which the authenticated identity participates will be retrieved, in addition to any rules that target a resource that is owned by the authenticated identity.
2896
3070
  rpc GetAccess(GetAccessRequest) returns (GetAccessResponse);
2897
3071
 
2898
3072
  // Retrieve identities matching the given criteria.
@@ -2949,8 +3123,14 @@ service VoltAPI {
2949
3123
  rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2950
3124
 
2951
3125
  // Create or update an HTTP forwarder resource.
3126
+ // This is a privileged API call and requires volt:api-call / volt:save-http-forwarder permission.
2952
3127
  rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
2953
3128
 
3129
+ // Create or update an OAuth/OIDC client registration (used when this Volt
3130
+ // acts as an OpenID Provider). Clients are stored as \`volt:oidc-client\`
3131
+ // resources.
3132
+ rpc SaveOidcClient(SaveOidcClientRequest) returns (SaveOidcClientResponse);
3133
+
2954
3134
  // Create or update an HTTP REST API server.
2955
3135
  // This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
2956
3136
  rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
@@ -3102,6 +3282,10 @@ message CanAccessResourceRequest {
3102
3282
 
3103
3283
  // The type of access that is required.
3104
3284
  string access = 4;
3285
+
3286
+ // Optional additional information about the access request.
3287
+ // For volt:api-call, the extra data is the API method lookup, e.g. volt:get-access.
3288
+ string extra = 5;
3105
3289
  }
3106
3290
 
3107
3291
  message CanAccessResourceResponse {
@@ -3929,74 +4113,242 @@ message SaveDatabaseResponse {
3929
4113
  }
3930
4114
 
3931
4115
  message SaveHttpForwarderRequest {
4116
+ // Details of the resource to save.
3932
4117
  Resource resource = 1;
4118
+
4119
+ // Set to indicate this is a new resource.
3933
4120
  bool create = 2;
4121
+
4122
+ // The id of the folder resource in which a new resource should be created.
4123
+ // If omitted, the home folder of the currently authenticated identity will be used.
3934
4124
  string create_in_parent_id = 3;
4125
+
4126
+ // Set to indicate the resource attributes should be purged before saving the resource.
3935
4127
  bool purge_attributes = 4;
4128
+
4129
+ // The domain to forward requests to.
3936
4130
  string domain = 5;
4131
+
4132
+ // The host to forward requests to.
3937
4133
  string host = 6;
4134
+
4135
+ // The port to forward requests to.
3938
4136
  int32 port = 7;
4137
+
4138
+ // Set to indicate that the host header should reflect the proxy domain rather than the target host.
3939
4139
  bool forward_host = 8;
4140
+
4141
+ // Optional path prefix (e.g. "/myapp") for path-based forwarding. May be used on its own (path forwarding on the Volt's own host) or together with \`domain\` (sub-domain + path, e.g. sub.acme.com/myapp). At least one of \`domain\` or \`path\` must be set.
4142
+ string path = 9;
4143
+
4144
+ // When a \`path\` prefix is configured, keep that prefix on the request path when forwarding. The default (false) is standard reverse-proxy behaviour: the prefix is stripped so the target receives the request at its own root (e.g. "/drive/assets/x.js" -> "/assets/x.js"), which suits plain static file servers and root-mounted backends. Set to true for targets that are themselves configured under the same sub-path and expect to receive the prefix. The \`X-Forwarded-Prefix\` header is always sent.
4145
+ bool keep_path = 10;
4146
+
4147
+ // When true, incoming HTTP requests to this forwarder must carry a valid authenticated session (established via the OIDC sign-in flow) and pass the policy check before being proxied, except for the public-path and manifest exceptions on \`auth_public_paths\`. Unauthenticated top-level document navigations are redirected to the configured OpenID Provider; other unauthenticated requests receive 401. An authenticated session that fails the policy check receives 403. The Volt session cookie is stripped from the HTTP hop to the target. WebSocket and SSE upgrades are not gated.
4148
+ bool auth_enabled = 11;
4149
+
4150
+ // OpenID Provider issuer URL used for discovery (\`<issuer>/.well-known/openid-configuration\`). May be a Volt acting as an OpenID Provider, or any external OIDC provider. Required when \`auth_enabled\` is set.
4151
+ string oidc_issuer = 12;
4152
+
4153
+ // OAuth 2.0 client identifier registered with the OpenID Provider.
4154
+ string oidc_client_id = 13;
4155
+
4156
+ // OAuth 2.0 client secret. Stored encrypted and redacted on read.
4157
+ string oidc_client_secret = 14;
4158
+
4159
+ // Space separated OAuth scopes. Defaults to "openid email" when empty.
4160
+ string oidc_scopes = 15;
4161
+
4162
+ // Optional override for the reserved callback path on the app host. Defaults to "/__volt-auth/oidc/callback".
4163
+ string oidc_redirect_path = 16;
4164
+
4165
+ // Email verification mode for OIDC-gated sign-in when the OpenID Provider is a Volt: "code" (default) or "link".
4166
+ string email_verification_mode = 17;
4167
+
4168
+ // Effective-path patterns that may be fetched without a session (GET/HEAD). A trailing \`/*\` matches descendants on segment boundaries (e.g. \`/icon/*\`). Used for PWA icons and similar public chrome; the manifest itself is allowed via \`Sec-Fetch-Dest: manifest\` and does not need to be listed.
4169
+ repeated string auth_public_paths = 18;
3940
4170
  }
3941
4171
 
3942
4172
  message SaveHttpForwarderResponse {
4173
+ // Details of any error that occurred on the call.
3943
4174
  tdx.volt_api.volt.v1.Status status = 1;
4175
+
4176
+ // The updated resource.
4177
+ Resource resource = 2;
4178
+ }
4179
+
4180
+ message SaveOidcClientRequest {
4181
+ // Details of the resource to save.
4182
+ Resource resource = 1;
4183
+
4184
+ // Set to indicate this is a new resource.
4185
+ bool create = 2;
4186
+
4187
+ // The id of the folder resource in which a new resource should be created.
4188
+ // If omitted, the home folder of the currently authenticated identity will be used.
4189
+ string create_in_parent_id = 3;
4190
+
4191
+ // Set to indicate the resource attributes should be purged before saving the resource.
4192
+ bool purge_attributes = 4;
4193
+
4194
+ // Human-friendly name for the client (also used as resource name when the resource name is empty).
4195
+ string client_name = 5;
4196
+
4197
+ // OAuth 2.0 client_id. Required.
4198
+ string client_id = 6;
4199
+
4200
+ // OAuth 2.0 client_secret. Stored encrypted and redacted on read. Only (re)written when non-empty so updates can omit it to keep the existing secret.
4201
+ string client_secret = 7;
4202
+
4203
+ // Comma- or space-separated list of allowed redirect URIs.
4204
+ string redirect_uris = 8;
4205
+ }
4206
+
4207
+ message SaveOidcClientResponse {
4208
+ // Details of any error that occurred on the call.
4209
+ tdx.volt_api.volt.v1.Status status = 1;
4210
+
4211
+ // The updated resource.
3944
4212
  Resource resource = 2;
3945
4213
  }
3946
4214
 
3947
4215
  message SaveHttpFileServerRequest {
4216
+ // Details of the resource to save.
3948
4217
  Resource resource = 1;
4218
+
4219
+ // Set to indicate this is a new resource.
3949
4220
  bool create = 2;
4221
+
4222
+ // The id of the folder resource in which a new resource should be created.
4223
+ // If omitted, the home folder of the currently authenticated identity will be used.
3950
4224
  string create_in_parent_id = 3;
4225
+
4226
+ // Set to indicate the resource attributes should be purged before saving the resource.
3951
4227
  bool purge_attributes = 4;
4228
+
4229
+ // The path to serve files from.
3952
4230
  string path = 5;
4231
+
4232
+ // The host to serve files from.
3953
4233
  string host = 6;
4234
+
4235
+ // The port to serve files from.
3954
4236
  int32 port = 7;
4237
+
4238
+ // Set to indicate the server is enabled.
3955
4239
  bool enabled = 8;
4240
+
4241
+ // The cache timeout in seconds.
3956
4242
  int32 cache_timeout = 9;
4243
+
4244
+ // Set to indicate the catch all is enabled.
3957
4245
  bool catch_all_enabled = 10;
4246
+
4247
+ // The catch all path, e.g. '/'.
3958
4248
  string catch_all = 11;
4249
+
4250
+ // Set to indicate the dynamic index is enabled, which will return a dynamic index page for the path if it exists.
4251
+ bool dynamic_index_enabled = 12;
3959
4252
  }
3960
4253
 
3961
4254
  message SaveHttpFileServerResponse {
4255
+ // Details of any error that occurred on the call.
3962
4256
  tdx.volt_api.volt.v1.Status status = 1;
4257
+
4258
+ // The updated resource.
3963
4259
  Resource resource = 2;
3964
4260
  }
3965
4261
 
3966
4262
  message SaveHttpRestApiServerRequest {
4263
+ // Details of the resource to save.
3967
4264
  Resource resource = 1;
4265
+
4266
+ // Set to indicate this is a new resource.
3968
4267
  bool create = 2;
4268
+
4269
+ // The id of the folder resource in which a new resource should be created.
4270
+ // If omitted, the home folder of the currently authenticated identity will be used.
3969
4271
  string create_in_parent_id = 3;
4272
+
4273
+ // Set to indicate the resource attributes should be purged before saving the resource.
3970
4274
  bool purge_attributes = 4;
4275
+
4276
+ // The host to serve the API from.
3971
4277
  string host = 5;
4278
+
4279
+ // The port to serve the API from.
3972
4280
  int32 port = 6;
4281
+
4282
+ // Set to indicate the server is enabled.
3973
4283
  bool enabled = 7;
4284
+
4285
+ // Set to indicate the CORS is enabled.
3974
4286
  bool cors_enabled = 8;
4287
+
4288
+ // Set to indicate the API is a literal.
4289
+ bool is_literal = 9;
4290
+
4291
+ // The literal JSON to serve the API from.
4292
+ string literal_json = 10;
4293
+
4294
+ // The database ID to serve the API from.
4295
+ string database_id = 11;
4296
+
4297
+ // The SQL to execute for this node.
4298
+ string sql = 12;
4299
+
4300
+ // The parameters to inject into the SQL.
4301
+ repeated string parameter = 13;
3975
4302
  }
3976
4303
 
3977
4304
  message SaveHttpRestApiServerResponse {
4305
+ // Details of any error that occurred on the call.
3978
4306
  tdx.volt_api.volt.v1.Status status = 1;
4307
+
4308
+ // The updated resource.
3979
4309
  Resource resource = 2;
3980
4310
  }
3981
4311
 
3982
4312
  message SaveHttpRestApiNodeRequest {
4313
+ // Details of the resource to save.
3983
4314
  Resource resource = 1;
4315
+
4316
+ // Set to indicate this is a new resource.
3984
4317
  bool create = 2;
4318
+
4319
+ // The id of the folder resource in which a new resource should be created.
4320
+ // If omitted, the home folder of the currently authenticated identity will be used.
3985
4321
  string create_in_parent_id = 3;
4322
+
4323
+ // Set to indicate the resource attributes should be purged before saving the resource.
3986
4324
  bool purge_attributes = 4;
4325
+
4326
+ // Set to indicate the node is a literal.
3987
4327
  bool is_literal = 5;
4328
+
4329
+ // The literal JSON to serve the node from.
3988
4330
  string literal_json = 6;
4331
+
4332
+ // The database ID to serve the node from.
3989
4333
  string database_id = 7;
4334
+
4335
+ // The SQL to execute for this node.
3990
4336
  string sql = 8;
4337
+
4338
+ // The parameters to inject into the SQL.
3991
4339
  repeated string parameter = 9;
3992
4340
  }
3993
4341
 
3994
4342
  message SaveHttpRestApiNodeResponse {
4343
+ // Details of any error that occurred on the call.
3995
4344
  tdx.volt_api.volt.v1.Status status = 1;
4345
+
4346
+ // The updated resource.
3996
4347
  Resource resource = 2;
3997
4348
  }
3998
4349
 
3999
4350
  message SaveSessionRequest {
4351
+ // Details of the session to save.
4000
4352
  Session session = 1;
4001
4353
  }
4002
4354
 
@@ -4004,6 +4356,7 @@ message SaveSessionResponse {
4004
4356
  // Details of any error that occurred on the call.
4005
4357
  tdx.volt_api.volt.v1.Status status = 1;
4006
4358
 
4359
+ // The updated session.
4007
4360
  Session session = 2;
4008
4361
  }
4009
4362
 
@@ -5809,7 +6162,10 @@ class VoltCredential {
5809
6162
  if (!this._voltPublicKey) {
5810
6163
  // Extract the public key from the Volt CA cert.
5811
6164
  const voltCA = new crypto__default["default"].X509Certificate(this._voltConfig.ca_pem);
5812
- this._voltPublicKey = voltCA.publicKey.export({ type: 'spki', format: 'pem' });
6165
+ this._voltPublicKey = voltCA.publicKey.export({
6166
+ type: "spki",
6167
+ format: "pem"
6168
+ });
5813
6169
  }
5814
6170
 
5815
6171
  const voltKey = keyFromPem(this._voltPublicKey).publicKey;
@@ -5921,7 +6277,7 @@ class VoltCredential {
5921
6277
  }
5922
6278
 
5923
6279
  saveCache() {
5924
- this._config = {...this._config, credential: { ...this._cryptoCache } };
6280
+ this._config.credential = {...this._cryptoCache};
5925
6281
  const clone = { ...this._config };
5926
6282
  if (this._config.p) {
5927
6283
  // A passphrase option exists => encrypt the key before writing the cache file.
@@ -6519,6 +6875,10 @@ class VoltClient extends EventEmitter__default["default"] {
6519
6875
  return unaryCallInternal.call(this, "CreateDatabase", request);
6520
6876
  }
6521
6877
 
6878
+ SaveDataView(request) {
6879
+ return unaryCallInternal.call(this, "SaveDataView", request);
6880
+ }
6881
+
6522
6882
  /**
6523
6883
  * SqliteDatabaseAPI
6524
6884
  */
@@ -6628,6 +6988,10 @@ class VoltClient extends EventEmitter__default["default"] {
6628
6988
  return publishCall.start(grpcClient, request);
6629
6989
  }
6630
6990
 
6991
+ SaveWire(request) {
6992
+ return unaryCallInternal.call(this, "SaveWire", request);
6993
+ }
6994
+
6631
6995
  SubscribeWire(request) {
6632
6996
  const grpcClient = this.getVoltAPIClient();
6633
6997
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.20.21",
6
+ "version": "0.20.29",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
@@ -33,8 +33,8 @@
33
33
  "author": "toby.ealden@gmail.com",
34
34
  "license": "ISC",
35
35
  "dependencies": {
36
- "@tdxvolt/volt-client-web": "^0.20.21",
37
- "@tdxvolt/volt-utility": "^0.20.21",
36
+ "@tdxvolt/volt-client-web": "^0.20.29",
37
+ "@tdxvolt/volt-utility": "^0.20.29",
38
38
  "debug": "^4.1.1",
39
39
  "ip": "^1.1.5",
40
40
  "jsonwebtoken": "^8.5.1",
@@ -597,6 +597,10 @@ export class VoltClient extends EventEmitter {
597
597
  return unaryCallInternal.call(this, "CreateDatabase", request);
598
598
  }
599
599
 
600
+ SaveDataView(request) {
601
+ return unaryCallInternal.call(this, "SaveDataView", request);
602
+ }
603
+
600
604
  /**
601
605
  * SqliteDatabaseAPI
602
606
  */
@@ -706,6 +710,10 @@ export class VoltClient extends EventEmitter {
706
710
  return publishCall.start(grpcClient, request);
707
711
  }
708
712
 
713
+ SaveWire(request) {
714
+ return unaryCallInternal.call(this, "SaveWire", request);
715
+ }
716
+
709
717
  SubscribeWire(request) {
710
718
  const grpcClient = this.getVoltAPIClient();
711
719
 
@@ -58,7 +58,10 @@ export class VoltCredential {
58
58
  if (!this._voltPublicKey) {
59
59
  // Extract the public key from the Volt CA cert.
60
60
  const voltCA = new crypto.X509Certificate(this._voltConfig.ca_pem);
61
- this._voltPublicKey = voltCA.publicKey.export({ type: 'spki', format: 'pem' });
61
+ this._voltPublicKey = voltCA.publicKey.export({
62
+ type: "spki",
63
+ format: "pem"
64
+ });
62
65
  }
63
66
 
64
67
  const voltKey = keyFromPem(this._voltPublicKey).publicKey;
@@ -170,7 +173,7 @@ export class VoltCredential {
170
173
  }
171
174
 
172
175
  saveCache() {
173
- this._config = {...this._config, credential: { ...this._cryptoCache } };
176
+ this._config.credential = {...this._cryptoCache};
174
177
  const clone = { ...this._config };
175
178
  if (this._config.p) {
176
179
  // A passphrase option exists => encrypt the key before writing the cache file.
@@ -208,11 +208,15 @@ package tdx.volt_api.data.v1;
208
208
  import "tdx/volt_api/volt/v1/status.proto";
209
209
  import "tdx/volt_api/volt/v1/volt.proto";
210
210
 
211
- // The Sqlite Server API provides database management functions.
212
- // Use the VoltAPI DeleteResource function to delete a database.
211
+ // The Sqlite Server API provides database and view management functions.
212
+ // Use the VoltAPI DeleteResource function to delete a database or data view.
213
213
  service SqliteServerAPI {
214
214
  // Create a new database resource.
215
215
  rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse);
216
+
217
+ // Create or update a data view resource.
218
+ //Note that when creating a data view, the authenticated account must have access to the source database resource. For 'read-only' views that are \`SELECT\` only, this requires \`volt:database-read\` access to the source database. Any non-\`SELECT\` views require \`volt:database-write\` access to the source database.
219
+ rpc SaveDataView(SaveDataViewRequest) returns (SaveDataViewResponse);
216
220
  }
217
221
 
218
222
  message CreateDatabaseRequest {
@@ -251,6 +255,55 @@ message CreateDatabaseResponse {
251
255
  tdx.volt_api.volt.v1.Resource resource = 2;
252
256
  }
253
257
 
258
+ message DataViewParameter {
259
+ // The parameter name referenced in the SQL template.
260
+ string name = 1;
261
+
262
+ // The parameter data type.
263
+ tdx.volt_api.volt.v1.AttributeDataType data_type = 2;
264
+
265
+ // Optional default value for the parameter.
266
+ tdx.volt_api.volt.v1.AttributeValue default_value = 3;
267
+
268
+ // Set when default_value should be applied.
269
+ bool include_default_value = 4;
270
+ }
271
+
272
+ message SaveDataViewRequest {
273
+ // Details of the data view to save.
274
+ tdx.volt_api.volt.v1.Resource resource = 1;
275
+
276
+ // Set to indicate this is a new data view.
277
+ bool create = 2;
278
+
279
+ // The id of the folder resource in which a new data view should be created.
280
+ // If omitted, the home folder of the currently authenticated identity will be used.
281
+ string create_in_parent_id = 3;
282
+
283
+ // Set to indicate the resource attributes should be purged before saving the resource.
284
+ bool purge_attributes = 4;
285
+
286
+ // The id of the source database on which this view is based.
287
+ // The authenticated account must have the relevant access to the source database, for example to create a 'SELECT' view the account must have 'volt:database-read' access to the source database. To create an 'INSERT' view the account must have 'volt:database-write' access to the source database.
288
+ string source_database_id = 5;
289
+
290
+ // The SQL template for the view.
291
+ string sql = 6;
292
+
293
+ // Set to allow sub-selects in the view SQL.
294
+ bool allow_sub_select = 7;
295
+
296
+ // Parameters defined for the view SQL template.
297
+ repeated DataViewParameter parameter = 8;
298
+ }
299
+
300
+ message SaveDataViewResponse {
301
+ // Details of any error that occurred on the call.
302
+ tdx.volt_api.volt.v1.Status status = 1;
303
+
304
+ // The saved data view resource.
305
+ tdx.volt_api.volt.v1.Resource resource = 2;
306
+ }
254
307
  `;
255
308
  export const proto_db_sync = `syntax = "proto3";
256
309
 
@@ -941,6 +994,10 @@ message DeleteDIDRequest {
941
994
 
942
995
  // Optional passphrase of the DID controller key. Required if the key is encrypted.
943
996
  string key_passphrase = 3;
997
+
998
+ // When true and \`did\` is set, hard-delete the DID from the local registry without requiring controller keys or signatures, and without synchronising with other registries. Ignored when \`origin_volt\`.
999
+ // Requires \`volt:delete-did\` API privilege.
1000
+ bool force = 4;
944
1001
  }
945
1002
 
946
1003
  message DeleteDIDResponse {
@@ -1022,6 +1079,13 @@ message ResolveDIDRequest {
1022
1079
 
1023
1080
  // Set to search all known registries rather than just the local registry.
1024
1081
  bool include_registries = 2;
1082
+
1083
+ // Per-DID document version. 0 = latest; 1..N = ordinal in the op log.
1084
+ uint64 version = 3;
1085
+
1086
+ // Milliseconds since epoch. Resolves the document active at that time.
1087
+ // Mutually exclusive with version.
1088
+ uint64 at_timestamp = 4;
1025
1089
  }
1026
1090
 
1027
1091
  message ResolveDIDResponse {
@@ -1160,6 +1224,18 @@ service SyncAPI {
1160
1224
 
1161
1225
  // Write a single value to a given synapse JSON path.
1162
1226
  rpc WriteSynapsePath(WriteSynapsePathRequest) returns (WriteSynapsePathResponse);
1227
+
1228
+ // List stored versions of a document in a sync database.
1229
+ rpc ListSyncDocumentVersions(ListSyncDocumentVersionsRequest) returns (ListSyncDocumentVersionsResponse);
1230
+
1231
+ // Get a stored version of a document in a sync database.
1232
+ rpc GetSyncDocumentVersion(GetSyncDocumentVersionRequest) returns (GetSyncDocumentVersionResponse);
1233
+
1234
+ // Create a version checkpoint for a document in a sync database.
1235
+ rpc CreateSyncDocumentVersion(CreateSyncDocumentVersionRequest) returns (CreateSyncDocumentVersionResponse);
1236
+
1237
+ // Revert a document in a sync database to a stored version.
1238
+ rpc RevertSyncDocumentVersion(RevertSyncDocumentVersionRequest) returns (RevertSyncDocumentVersionResponse);
1163
1239
  }
1164
1240
 
1165
1241
  message CreateSynapseConnectionRequest {
@@ -1273,8 +1349,8 @@ message SaveSyncDatabaseRequest {
1273
1349
  // Set to audit all INSERT, UPDATE, and DELETE database operations.
1274
1350
  bool write_audit = 7;
1275
1351
 
1276
- // By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the database and improve performance, but will also reduce the ability to rollback to a previous state.
1277
- bool no_snapshots = 8;
1352
+ // By default, yjs updates are periodically compacted. Set this flag to disable compaction. This will reduce the size of the database but will remove the ability to version the documents in the database.
1353
+ bool no_compaction = 8;
1278
1354
 
1279
1355
  // The number of updates to batch before flushing to the database. Defaults to 100.
1280
1356
  uint32 batch_size = 9;
@@ -1311,8 +1387,8 @@ message SaveSynapseRequest {
1311
1387
  // Set to audit all INSERT, UPDATE, and DELETE synapse operations.
1312
1388
  bool write_audit = 7;
1313
1389
 
1314
- // By default, yjs updates are periodically compressed and stored as snapshots. Set this flag to disable snapshots. This will reduce the size of the synapse and improve performance, but will also reduce the ability to rollback to a previous state.
1315
- bool no_snapshots = 8;
1390
+ // By default, yjs updates are periodically compacted. Set this flag to disable compaction. This will reduce the size of the database but will remove the ability to version the documents in the database.
1391
+ bool no_compaction = 8;
1316
1392
  }
1317
1393
 
1318
1394
  message SaveSynapseResponse {
@@ -1349,6 +1425,14 @@ message SetSynapseDocumentMetadataRequest {
1349
1425
 
1350
1426
  // Any additional application-specific JSON to attach to the document.
1351
1427
  string json = 4;
1428
+
1429
+ // Set to true when the caller intends to write the document's content
1430
+ // separately, after this metadata call (a metadata-first create). The sync
1431
+ // server uses this to defer __hash bootstrapping until the content actually
1432
+ // arrives, so the hash is not computed over an empty document. Leave false
1433
+ // (the default) for empty documents or content-first flows where the content
1434
+ // is already present.
1435
+ bool content_pending = 6;
1352
1436
  }
1353
1437
 
1354
1438
  message SetSynapseDocumentMetadataResponse {
@@ -1504,6 +1588,83 @@ message WriteSynapsePathResponse {
1504
1588
  tdx.volt_api.volt.v1.Status status = 1;
1505
1589
  }
1506
1590
 
1591
+ message SyncDocumentVersionSummary {
1592
+ // Globally unique version identifier (UUID).
1593
+ string version_id = 1;
1594
+
1595
+ // Milliseconds since Unix epoch when the version was created.
1596
+ uint64 timestamp = 2;
1597
+
1598
+ // Identity that created the version.
1599
+ string identity = 3;
1600
+
1601
+ // Optional user-provided label.
1602
+ string label = 4;
1603
+
1604
+ // Document hash (__hash) at the time of the version, when available.
1605
+ string document_hash = 5;
1606
+ }
1607
+
1608
+ message ListSyncDocumentVersionsRequest {
1609
+ // The id of the sync database that contains the document.
1610
+ string database_id = 1;
1611
+
1612
+ // The id of the document.
1613
+ string document_id = 2;
1614
+
1615
+ // Maximum number of versions to return. Defaults to 50.
1616
+ uint32 limit = 3;
1617
+
1618
+ // Number of versions to skip from the newest end.
1619
+ uint32 offset = 4;
1620
+ }
1621
+
1622
+ message ListSyncDocumentVersionsResponse {
1623
+ tdx.volt_api.volt.v1.Status status = 1;
1624
+ repeated SyncDocumentVersionSummary versions = 2;
1625
+ }
1626
+
1627
+ message GetSyncDocumentVersionRequest {
1628
+ string database_id = 1;
1629
+ string document_id = 2;
1630
+ string version_id = 3;
1631
+ }
1632
+
1633
+ message GetSyncDocumentVersionResponse {
1634
+ tdx.volt_api.volt.v1.Status status = 1;
1635
+ SyncDocumentVersionSummary info = 2;
1636
+
1637
+ // Full Yjs v2 document state at this version. Clients materialize locally.
1638
+ bytes state_update = 3;
1639
+ }
1640
+
1641
+ message CreateSyncDocumentVersionRequest {
1642
+ string database_id = 1;
1643
+ string document_id = 2;
1644
+ string label = 3;
1645
+ }
1646
+
1647
+ message CreateSyncDocumentVersionResponse {
1648
+ tdx.volt_api.volt.v1.Status status = 1;
1649
+ string version_id = 2;
1650
+ }
1651
+
1652
+ message RevertSyncDocumentVersionRequest {
1653
+ string database_id = 1;
1654
+ string document_id = 2;
1655
+ string version_id = 3;
1656
+
1657
+ // Optional label for the audit version created after revert.
1658
+ string label = 4;
1659
+ }
1660
+
1661
+ message RevertSyncDocumentVersionResponse {
1662
+ tdx.volt_api.volt.v1.Status status = 1;
1663
+
1664
+ // Version id of the audit checkpoint created after revert.
1665
+ string version_id = 2;
1666
+ }
1667
+
1507
1668
  `;
1508
1669
  export const terminal_api = `syntax = "proto3";
1509
1670
 
@@ -1513,6 +1674,7 @@ import "tdx/volt_api/volt/v1/status.proto";
1513
1674
 
1514
1675
  service TerminalAPI {
1515
1676
  // Bidirectional streaming RPC for real-time terminal control and data exchange.
1677
+ // Note that \`volt:command-invoke\` access is required to invoke this API. An optional allow-list of comma-separated commands can be specified in the \`extra\` string of the access policy.
1516
1678
  rpc CommandStream(stream CommandStreamRequest) returns (stream CommandStreamResponse);
1517
1679
  }
1518
1680
 
@@ -2168,7 +2330,18 @@ message Access {
2168
2330
  // Requested access.
2169
2331
  string access = 10;
2170
2332
 
2171
- // Optional extra data.
2333
+ // Optional extra data that further constrains the access being granted. How this string is interpreted depends on the value of \`access\` above:
2334
+ //
2335
+ // - \`volt:api-call\`: a single API method name. The access only applies when the invoked API method matches this value (policy attribute \`volt:action-api-call\`). Leave empty to allow all API methods.
2336
+ //
2337
+ // - \`volt:command-invoke\` (CommandStream API): a comma-separated allow-list of commands. The access is permitted (or denied depending on the rule decision) when the invoked command matches any entry in the list (policy attribute \`volt:action-command\`). A trailing \`*\` acts as a prefix wildcard (e.g. \`/usr/bin/*\` allows any command beginning with \`/usr/bin/\`). Leave empty to allow all commands.
2338
+ // Example: "ls,git,/usr/bin/python3"
2339
+ //
2340
+ // - Otherwise: a comma-separated list of \`[attributeId]|[value]\` pairs, each matched against the named resource attribute (trailing \`*\` acts as a prefix wildcard). The sync-database case below is a specialisation of this general form.
2341
+ //
2342
+ // - Sync databases (\`volt:sync-database\` resources, e.g. with \`volt:database-read\` / \`volt:database-write\` access): a comma-separated list of \`[attributeId]|[value]\` pairs restricting the access to specific documents. Document ids use the \`volt:resource-sync-document-id\` attribute id, so each entry has the form \`volt:resource-sync-document-id|[documentId]\`. A trailing \`*\` on the value acts as a prefix wildcard. Leave empty to target all documents in the database.
2343
+ // Example: "volt:resource-sync-document-id|doc-123,volt:resource-sync-document-id|report-*"
2344
+ //
2172
2345
  string extra = 11;
2173
2346
 
2174
2347
  // Assigned decision.
@@ -2343,8 +2516,9 @@ service VoltAPI {
2343
2516
  rpc DiscoverServices(DiscoverServicesRequest) returns (DiscoverServicesResponse);
2344
2517
 
2345
2518
  // Get access rule details.
2346
- // Only rules in which the authenticated identity participates will be retrieved, in addition to any rules that target a resource that is owned by the authenticated identity.
2347
2519
  // If the authenticated identity is the Volt root, all rules will be retrieved that match the criteria.
2520
+ // All rules for which the authenticated account has volt:api-call / volt:get-access permission to the rule resource will be retrieved.
2521
+ // Otherwise, only rules in which the authenticated identity participates will be retrieved, in addition to any rules that target a resource that is owned by the authenticated identity.
2348
2522
  rpc GetAccess(GetAccessRequest) returns (GetAccessResponse);
2349
2523
 
2350
2524
  // Retrieve identities matching the given criteria.
@@ -2401,8 +2575,14 @@ service VoltAPI {
2401
2575
  rpc SaveHttpFileServer(SaveHttpFileServerRequest) returns (SaveHttpFileServerResponse);
2402
2576
 
2403
2577
  // Create or update an HTTP forwarder resource.
2578
+ // This is a privileged API call and requires volt:api-call / volt:save-http-forwarder permission.
2404
2579
  rpc SaveHttpForwarder(SaveHttpForwarderRequest) returns (SaveHttpForwarderResponse);
2405
2580
 
2581
+ // Create or update an OAuth/OIDC client registration (used when this Volt
2582
+ // acts as an OpenID Provider). Clients are stored as \`volt:oidc-client\`
2583
+ // resources.
2584
+ rpc SaveOidcClient(SaveOidcClientRequest) returns (SaveOidcClientResponse);
2585
+
2406
2586
  // Create or update an HTTP REST API server.
2407
2587
  // This is a privileged API call and requires volt:api-call / volt:save-http-rest-api-server permission.
2408
2588
  rpc SaveHttpRestApiServer(SaveHttpRestApiServerRequest) returns (SaveHttpRestApiServerResponse);
@@ -2554,6 +2734,10 @@ message CanAccessResourceRequest {
2554
2734
 
2555
2735
  // The type of access that is required.
2556
2736
  string access = 4;
2737
+
2738
+ // Optional additional information about the access request.
2739
+ // For volt:api-call, the extra data is the API method lookup, e.g. volt:get-access.
2740
+ string extra = 5;
2557
2741
  }
2558
2742
 
2559
2743
  message CanAccessResourceResponse {
@@ -3381,74 +3565,242 @@ message SaveDatabaseResponse {
3381
3565
  }
3382
3566
 
3383
3567
  message SaveHttpForwarderRequest {
3568
+ // Details of the resource to save.
3384
3569
  Resource resource = 1;
3570
+
3571
+ // Set to indicate this is a new resource.
3385
3572
  bool create = 2;
3573
+
3574
+ // The id of the folder resource in which a new resource should be created.
3575
+ // If omitted, the home folder of the currently authenticated identity will be used.
3386
3576
  string create_in_parent_id = 3;
3577
+
3578
+ // Set to indicate the resource attributes should be purged before saving the resource.
3387
3579
  bool purge_attributes = 4;
3580
+
3581
+ // The domain to forward requests to.
3388
3582
  string domain = 5;
3583
+
3584
+ // The host to forward requests to.
3389
3585
  string host = 6;
3586
+
3587
+ // The port to forward requests to.
3390
3588
  int32 port = 7;
3589
+
3590
+ // Set to indicate that the host header should reflect the proxy domain rather than the target host.
3391
3591
  bool forward_host = 8;
3592
+
3593
+ // Optional path prefix (e.g. "/myapp") for path-based forwarding. May be used on its own (path forwarding on the Volt's own host) or together with \`domain\` (sub-domain + path, e.g. sub.acme.com/myapp). At least one of \`domain\` or \`path\` must be set.
3594
+ string path = 9;
3595
+
3596
+ // When a \`path\` prefix is configured, keep that prefix on the request path when forwarding. The default (false) is standard reverse-proxy behaviour: the prefix is stripped so the target receives the request at its own root (e.g. "/drive/assets/x.js" -> "/assets/x.js"), which suits plain static file servers and root-mounted backends. Set to true for targets that are themselves configured under the same sub-path and expect to receive the prefix. The \`X-Forwarded-Prefix\` header is always sent.
3597
+ bool keep_path = 10;
3598
+
3599
+ // When true, incoming HTTP requests to this forwarder must carry a valid authenticated session (established via the OIDC sign-in flow) and pass the policy check before being proxied, except for the public-path and manifest exceptions on \`auth_public_paths\`. Unauthenticated top-level document navigations are redirected to the configured OpenID Provider; other unauthenticated requests receive 401. An authenticated session that fails the policy check receives 403. The Volt session cookie is stripped from the HTTP hop to the target. WebSocket and SSE upgrades are not gated.
3600
+ bool auth_enabled = 11;
3601
+
3602
+ // OpenID Provider issuer URL used for discovery (\`<issuer>/.well-known/openid-configuration\`). May be a Volt acting as an OpenID Provider, or any external OIDC provider. Required when \`auth_enabled\` is set.
3603
+ string oidc_issuer = 12;
3604
+
3605
+ // OAuth 2.0 client identifier registered with the OpenID Provider.
3606
+ string oidc_client_id = 13;
3607
+
3608
+ // OAuth 2.0 client secret. Stored encrypted and redacted on read.
3609
+ string oidc_client_secret = 14;
3610
+
3611
+ // Space separated OAuth scopes. Defaults to "openid email" when empty.
3612
+ string oidc_scopes = 15;
3613
+
3614
+ // Optional override for the reserved callback path on the app host. Defaults to "/__volt-auth/oidc/callback".
3615
+ string oidc_redirect_path = 16;
3616
+
3617
+ // Email verification mode for OIDC-gated sign-in when the OpenID Provider is a Volt: "code" (default) or "link".
3618
+ string email_verification_mode = 17;
3619
+
3620
+ // Effective-path patterns that may be fetched without a session (GET/HEAD). A trailing \`/*\` matches descendants on segment boundaries (e.g. \`/icon/*\`). Used for PWA icons and similar public chrome; the manifest itself is allowed via \`Sec-Fetch-Dest: manifest\` and does not need to be listed.
3621
+ repeated string auth_public_paths = 18;
3392
3622
  }
3393
3623
 
3394
3624
  message SaveHttpForwarderResponse {
3625
+ // Details of any error that occurred on the call.
3626
+ tdx.volt_api.volt.v1.Status status = 1;
3627
+
3628
+ // The updated resource.
3629
+ Resource resource = 2;
3630
+ }
3631
+
3632
+ message SaveOidcClientRequest {
3633
+ // Details of the resource to save.
3634
+ Resource resource = 1;
3635
+
3636
+ // Set to indicate this is a new resource.
3637
+ bool create = 2;
3638
+
3639
+ // The id of the folder resource in which a new resource should be created.
3640
+ // If omitted, the home folder of the currently authenticated identity will be used.
3641
+ string create_in_parent_id = 3;
3642
+
3643
+ // Set to indicate the resource attributes should be purged before saving the resource.
3644
+ bool purge_attributes = 4;
3645
+
3646
+ // Human-friendly name for the client (also used as resource name when the resource name is empty).
3647
+ string client_name = 5;
3648
+
3649
+ // OAuth 2.0 client_id. Required.
3650
+ string client_id = 6;
3651
+
3652
+ // OAuth 2.0 client_secret. Stored encrypted and redacted on read. Only (re)written when non-empty so updates can omit it to keep the existing secret.
3653
+ string client_secret = 7;
3654
+
3655
+ // Comma- or space-separated list of allowed redirect URIs.
3656
+ string redirect_uris = 8;
3657
+ }
3658
+
3659
+ message SaveOidcClientResponse {
3660
+ // Details of any error that occurred on the call.
3395
3661
  tdx.volt_api.volt.v1.Status status = 1;
3662
+
3663
+ // The updated resource.
3396
3664
  Resource resource = 2;
3397
3665
  }
3398
3666
 
3399
3667
  message SaveHttpFileServerRequest {
3668
+ // Details of the resource to save.
3400
3669
  Resource resource = 1;
3670
+
3671
+ // Set to indicate this is a new resource.
3401
3672
  bool create = 2;
3673
+
3674
+ // The id of the folder resource in which a new resource should be created.
3675
+ // If omitted, the home folder of the currently authenticated identity will be used.
3402
3676
  string create_in_parent_id = 3;
3677
+
3678
+ // Set to indicate the resource attributes should be purged before saving the resource.
3403
3679
  bool purge_attributes = 4;
3680
+
3681
+ // The path to serve files from.
3404
3682
  string path = 5;
3683
+
3684
+ // The host to serve files from.
3405
3685
  string host = 6;
3686
+
3687
+ // The port to serve files from.
3406
3688
  int32 port = 7;
3689
+
3690
+ // Set to indicate the server is enabled.
3407
3691
  bool enabled = 8;
3692
+
3693
+ // The cache timeout in seconds.
3408
3694
  int32 cache_timeout = 9;
3695
+
3696
+ // Set to indicate the catch all is enabled.
3409
3697
  bool catch_all_enabled = 10;
3698
+
3699
+ // The catch all path, e.g. '/'.
3410
3700
  string catch_all = 11;
3701
+
3702
+ // Set to indicate the dynamic index is enabled, which will return a dynamic index page for the path if it exists.
3703
+ bool dynamic_index_enabled = 12;
3411
3704
  }
3412
3705
 
3413
3706
  message SaveHttpFileServerResponse {
3707
+ // Details of any error that occurred on the call.
3414
3708
  tdx.volt_api.volt.v1.Status status = 1;
3709
+
3710
+ // The updated resource.
3415
3711
  Resource resource = 2;
3416
3712
  }
3417
3713
 
3418
3714
  message SaveHttpRestApiServerRequest {
3715
+ // Details of the resource to save.
3419
3716
  Resource resource = 1;
3717
+
3718
+ // Set to indicate this is a new resource.
3420
3719
  bool create = 2;
3720
+
3721
+ // The id of the folder resource in which a new resource should be created.
3722
+ // If omitted, the home folder of the currently authenticated identity will be used.
3421
3723
  string create_in_parent_id = 3;
3724
+
3725
+ // Set to indicate the resource attributes should be purged before saving the resource.
3422
3726
  bool purge_attributes = 4;
3727
+
3728
+ // The host to serve the API from.
3423
3729
  string host = 5;
3730
+
3731
+ // The port to serve the API from.
3424
3732
  int32 port = 6;
3733
+
3734
+ // Set to indicate the server is enabled.
3425
3735
  bool enabled = 7;
3736
+
3737
+ // Set to indicate the CORS is enabled.
3426
3738
  bool cors_enabled = 8;
3739
+
3740
+ // Set to indicate the API is a literal.
3741
+ bool is_literal = 9;
3742
+
3743
+ // The literal JSON to serve the API from.
3744
+ string literal_json = 10;
3745
+
3746
+ // The database ID to serve the API from.
3747
+ string database_id = 11;
3748
+
3749
+ // The SQL to execute for this node.
3750
+ string sql = 12;
3751
+
3752
+ // The parameters to inject into the SQL.
3753
+ repeated string parameter = 13;
3427
3754
  }
3428
3755
 
3429
3756
  message SaveHttpRestApiServerResponse {
3757
+ // Details of any error that occurred on the call.
3430
3758
  tdx.volt_api.volt.v1.Status status = 1;
3759
+
3760
+ // The updated resource.
3431
3761
  Resource resource = 2;
3432
3762
  }
3433
3763
 
3434
3764
  message SaveHttpRestApiNodeRequest {
3765
+ // Details of the resource to save.
3435
3766
  Resource resource = 1;
3767
+
3768
+ // Set to indicate this is a new resource.
3436
3769
  bool create = 2;
3770
+
3771
+ // The id of the folder resource in which a new resource should be created.
3772
+ // If omitted, the home folder of the currently authenticated identity will be used.
3437
3773
  string create_in_parent_id = 3;
3774
+
3775
+ // Set to indicate the resource attributes should be purged before saving the resource.
3438
3776
  bool purge_attributes = 4;
3777
+
3778
+ // Set to indicate the node is a literal.
3439
3779
  bool is_literal = 5;
3780
+
3781
+ // The literal JSON to serve the node from.
3440
3782
  string literal_json = 6;
3783
+
3784
+ // The database ID to serve the node from.
3441
3785
  string database_id = 7;
3786
+
3787
+ // The SQL to execute for this node.
3442
3788
  string sql = 8;
3789
+
3790
+ // The parameters to inject into the SQL.
3443
3791
  repeated string parameter = 9;
3444
3792
  }
3445
3793
 
3446
3794
  message SaveHttpRestApiNodeResponse {
3795
+ // Details of any error that occurred on the call.
3447
3796
  tdx.volt_api.volt.v1.Status status = 1;
3797
+
3798
+ // The updated resource.
3448
3799
  Resource resource = 2;
3449
3800
  }
3450
3801
 
3451
3802
  message SaveSessionRequest {
3803
+ // Details of the session to save.
3452
3804
  Session session = 1;
3453
3805
  }
3454
3806
 
@@ -3456,6 +3808,7 @@ message SaveSessionResponse {
3456
3808
  // Details of any error that occurred on the call.
3457
3809
  tdx.volt_api.volt.v1.Status status = 1;
3458
3810
 
3811
+ // The updated session.
3459
3812
  Session session = 2;
3460
3813
  }
3461
3814