@tdxvolt/volt-client-grpc 0.20.27 → 0.20.31

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
@@ -763,6 +763,7 @@ service SqliteServerAPI {
763
763
  rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse);
764
764
 
765
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.
766
767
  rpc SaveDataView(SaveDataViewRequest) returns (SaveDataViewResponse);
767
768
  }
768
769
 
@@ -1541,6 +1542,10 @@ message DeleteDIDRequest {
1541
1542
 
1542
1543
  // Optional passphrase of the DID controller key. Required if the key is encrypted.
1543
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;
1544
1549
  }
1545
1550
 
1546
1551
  message DeleteDIDResponse {
@@ -1779,6 +1784,15 @@ service SyncAPI {
1779
1784
 
1780
1785
  // Revert a document in a sync database to a stored version.
1781
1786
  rpc RevertSyncDocumentVersion(RevertSyncDocumentVersionRequest) returns (RevertSyncDocumentVersionResponse);
1787
+
1788
+ // Check whether a content-addressed blob exists in a synapse.
1789
+ rpc HasSynapseBlob(HasSynapseBlobRequest) returns (HasSynapseBlobResponse);
1790
+
1791
+ // Upload a content-addressed blob. The first message must be \`start\` with the expected sha256 (base64url) hash and size; subsequent messages carry payload chunks. Idempotent if the hash is already stored. The server verifies the received bytes match \`hash\` before committing.
1792
+ rpc PutSynapseBlob(stream PutSynapseBlobRequest) returns (stream PutSynapseBlobResponse);
1793
+
1794
+ // Download a content-addressed blob by hash.
1795
+ rpc GetSynapseBlob(GetSynapseBlobRequest) returns (stream GetSynapseBlobResponse);
1782
1796
  }
1783
1797
 
1784
1798
  message CreateSynapseConnectionRequest {
@@ -1946,36 +1960,31 @@ message SynapseDocumentMetadata {
1946
1960
  // The name of the top-level shared type in the document.
1947
1961
  string name = 1;
1948
1962
 
1949
- // The type of the shared type, e.g. "map", "array" or "text".
1963
+ // The type of the document root. Yjs shared types are "map", "array" or "text". The "blob" type means the payload is a content-addressed object in the synapse blob store (PutSynapseBlob / GetSynapseBlob). There is no Yjs shared type for a blob document. A blob document's schema must be a single entry of type "blob"; it cannot be mixed with map, array, or text roots. The server writes \`__hash\` when the document is bound to a stored blob (see SetSynapseDocumentMetadata.blob_hash).
1950
1964
  string type = 2;
1951
1965
 
1952
- // The JSON schema that describes the data that is stored in this shared type.
1966
+ // The JSON schema that describes the data stored in this shared type.
1953
1967
  string json_schema = 3;
1954
1968
  }
1955
1969
 
1956
1970
  message SetSynapseDocumentMetadataRequest {
1957
- // DEPRECATED: Use synapse_id instead.
1958
- string database_id = 1;
1959
-
1960
1971
  // The id of the synapse that contains the document.
1961
1972
  string synapse_id = 5;
1962
1973
 
1963
1974
  // The id of the document to set the metadata for.
1964
1975
  string document_id = 2;
1965
1976
 
1966
- // The metadata to set for the document.
1977
+ // The metadata to set for the document. Each entry names a top-level shared type (map/array/text). For a blob document this must contain exactly one entry with type "blob".
1967
1978
  repeated SynapseDocumentMetadata metadata = 3;
1968
1979
 
1969
1980
  // Any additional application-specific JSON to attach to the document.
1970
1981
  string json = 4;
1971
1982
 
1972
- // Set to true when the caller intends to write the document's content
1973
- // separately, after this metadata call (a metadata-first create). The sync
1974
- // server uses this to defer __hash bootstrapping until the content actually
1975
- // arrives, so the hash is not computed over an empty document. Leave false
1976
- // (the default) for empty documents or content-first flows where the content
1977
- // is already present.
1978
- bool content_pending = 6;
1983
+ // Set to true when the document content is already present (content-first) or the document is intentionally empty, so the server bootstraps \`__hash\` immediately. Leave false (the default) when content will be written after this call.
1984
+ bool content_ready = 6;
1985
+
1986
+ // For blob documents, the content hash to bind. The server verifies the blob is stored (or the hash is sha256 of empty bytes) and writes \`__hash\`. Omit for a metadata-first create. Must not be set for map/array/text documents; the server computes those hashes from Yjs content.
1987
+ string blob_hash = 7;
1979
1988
  }
1980
1989
 
1981
1990
  message SetSynapseDocumentMetadataResponse {
@@ -2208,6 +2217,64 @@ message RevertSyncDocumentVersionResponse {
2208
2217
  string version_id = 2;
2209
2218
  }
2210
2219
 
2220
+ message HasSynapseBlobRequest {
2221
+ // The id of the synapse that stores the blob.
2222
+ string synapse_id = 1;
2223
+
2224
+ // sha256 of the raw file bytes, encoded as unpadded base64url (same family
2225
+ // as VoltDrive content hashes).
2226
+ string hash = 2;
2227
+ }
2228
+
2229
+ message HasSynapseBlobResponse {
2230
+ tdx.volt_api.volt.v1.Status status = 1;
2231
+
2232
+ // True if a blob with this hash is already stored.
2233
+ bool exists = 2;
2234
+ }
2235
+
2236
+ message PutSynapseBlobStart {
2237
+ string synapse_id = 1;
2238
+
2239
+ // Expected sha256 (base64url) of the concatenated payload bytes.
2240
+ string hash = 2;
2241
+
2242
+ // Total payload size in bytes. Zero means no blob row (empty file).
2243
+ uint64 size = 3;
2244
+ }
2245
+
2246
+ message PutSynapseBlobRequest {
2247
+ oneof payload {
2248
+ // Must be sent as the first message.
2249
+ PutSynapseBlobStart start = 1;
2250
+
2251
+ // The next chunk of blob data.
2252
+ bytes block = 2;
2253
+ }
2254
+ }
2255
+
2256
+ message PutSynapseBlobResponse {
2257
+ tdx.volt_api.volt.v1.Status status = 1;
2258
+
2259
+ // Number of payload blocks received. Zero until the stream finishes.
2260
+ uint32 ack = 2;
2261
+
2262
+ // True if the hash was already present (put is a no-op).
2263
+ bool exists = 3;
2264
+ }
2265
+
2266
+ message GetSynapseBlobRequest {
2267
+ string synapse_id = 1;
2268
+ string hash = 2;
2269
+ }
2270
+
2271
+ message GetSynapseBlobResponse {
2272
+ oneof payload {
2273
+ bytes block = 1;
2274
+ tdx.volt_api.volt.v1.Status status = 2;
2275
+ }
2276
+ }
2277
+
2211
2278
  `;
2212
2279
  const terminal_api = `syntax = "proto3";
2213
2280
 
@@ -4108,41 +4175,41 @@ message SaveDatabaseResponse {
4108
4175
  }
4109
4176
 
4110
4177
  message SaveHttpForwarderRequest {
4178
+ // Details of the resource to save.
4111
4179
  Resource resource = 1;
4180
+
4181
+ // Set to indicate this is a new resource.
4112
4182
  bool create = 2;
4183
+
4184
+ // The id of the folder resource in which a new resource should be created.
4185
+ // If omitted, the home folder of the currently authenticated identity will be used.
4113
4186
  string create_in_parent_id = 3;
4187
+
4188
+ // Set to indicate the resource attributes should be purged before saving the resource.
4114
4189
  bool purge_attributes = 4;
4190
+
4191
+ // The domain to forward requests to.
4115
4192
  string domain = 5;
4193
+
4194
+ // The host to forward requests to.
4116
4195
  string host = 6;
4196
+
4197
+ // The port to forward requests to.
4117
4198
  int32 port = 7;
4199
+
4200
+ // Set to indicate that the host header should reflect the proxy domain rather than the target host.
4118
4201
  bool forward_host = 8;
4119
4202
 
4120
- // Optional path prefix (e.g. "/myapp") for path-based forwarding. May be used
4121
- // on its own (path forwarding on the Volt's own host) or together with
4122
- // \`domain\` (sub-domain + path, e.g. sub.acme.com/myapp). At least one of
4123
- // \`domain\` or \`path\` must be set.
4203
+ // 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.
4124
4204
  string path = 9;
4125
4205
 
4126
- // When a \`path\` prefix is configured, controls whether that prefix is removed
4127
- // from the request path before forwarding (standard reverse-proxy behaviour).
4128
- // Defaults to true when unset: the target then receives the request at its
4129
- // own root (e.g. "/drive/assets/x.js" -> "/assets/x.js"), which suits plain
4130
- // static file servers and root-mounted backends. Set to false for targets
4131
- // that are themselves configured under the same sub-path and expect to
4132
- // receive the prefix. The \`X-Forwarded-Prefix\` header is always sent.
4133
- optional bool strip_path = 10;
4134
-
4135
- // When true, incoming requests to this forwarder must carry a valid
4136
- // authenticated session (established via the OIDC sign-in flow) and pass the
4137
- // policy check before being proxied to the target. Unauthenticated requests
4138
- // are redirected to the configured OpenID Provider. The session is never
4139
- // exposed to the target (the session cookie is stripped before forwarding).
4206
+ // 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.
4207
+ bool keep_path = 10;
4208
+
4209
+ // 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.
4140
4210
  bool auth_enabled = 11;
4141
4211
 
4142
- // OpenID Provider issuer URL used for discovery
4143
- // (\`<issuer>/.well-known/openid-configuration\`). May be a Volt acting as an
4144
- // OpenID Provider, or any external OIDC provider. Required when
4145
- // \`auth_enabled\` is set.
4212
+ // 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.
4146
4213
  string oidc_issuer = 12;
4147
4214
 
4148
4215
  // OAuth 2.0 client identifier registered with the OpenID Provider.
@@ -4154,36 +4221,45 @@ message SaveHttpForwarderRequest {
4154
4221
  // Space separated OAuth scopes. Defaults to "openid email" when empty.
4155
4222
  string oidc_scopes = 15;
4156
4223
 
4157
- // Optional override for the reserved callback path on the app host. Defaults
4158
- // to "/__volt-auth/oidc/callback".
4224
+ // Optional override for the reserved callback path on the app host. Defaults to "/__volt-auth/oidc/callback".
4159
4225
  string oidc_redirect_path = 16;
4160
4226
 
4161
- // Email verification mode for OIDC-gated sign-in when the OpenID Provider is
4162
- // a Volt: "link" (default) or "code".
4227
+ // Email verification mode for OIDC-gated sign-in when the OpenID Provider is a Volt: "code" (default) or "link".
4163
4228
  string email_verification_mode = 17;
4229
+
4230
+ // 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.
4231
+ repeated string auth_public_paths = 18;
4164
4232
  }
4165
4233
 
4166
4234
  message SaveHttpForwarderResponse {
4235
+ // Details of any error that occurred on the call.
4167
4236
  tdx.volt_api.volt.v1.Status status = 1;
4237
+
4238
+ // The updated resource.
4168
4239
  Resource resource = 2;
4169
4240
  }
4170
4241
 
4171
4242
  message SaveOidcClientRequest {
4243
+ // Details of the resource to save.
4172
4244
  Resource resource = 1;
4245
+
4246
+ // Set to indicate this is a new resource.
4173
4247
  bool create = 2;
4248
+
4249
+ // The id of the folder resource in which a new resource should be created.
4250
+ // If omitted, the home folder of the currently authenticated identity will be used.
4174
4251
  string create_in_parent_id = 3;
4252
+
4253
+ // Set to indicate the resource attributes should be purged before saving the resource.
4175
4254
  bool purge_attributes = 4;
4176
4255
 
4177
- // Human-friendly name for the client (also used as resource name when the
4178
- // resource name is empty).
4256
+ // Human-friendly name for the client (also used as resource name when the resource name is empty).
4179
4257
  string client_name = 5;
4180
4258
 
4181
4259
  // OAuth 2.0 client_id. Required.
4182
4260
  string client_id = 6;
4183
4261
 
4184
- // OAuth 2.0 client_secret. Stored encrypted and redacted on read. Only
4185
- // (re)written when non-empty so updates can omit it to keep the existing
4186
- // secret.
4262
+ // 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.
4187
4263
  string client_secret = 7;
4188
4264
 
4189
4265
  // Comma- or space-separated list of allowed redirect URIs.
@@ -4191,69 +4267,150 @@ message SaveOidcClientRequest {
4191
4267
  }
4192
4268
 
4193
4269
  message SaveOidcClientResponse {
4270
+ // Details of any error that occurred on the call.
4194
4271
  tdx.volt_api.volt.v1.Status status = 1;
4272
+
4273
+ // The updated resource.
4195
4274
  Resource resource = 2;
4196
4275
  }
4197
4276
 
4198
4277
  message SaveHttpFileServerRequest {
4278
+ // Details of the resource to save.
4199
4279
  Resource resource = 1;
4280
+
4281
+ // Set to indicate this is a new resource.
4200
4282
  bool create = 2;
4283
+
4284
+ // The id of the folder resource in which a new resource should be created.
4285
+ // If omitted, the home folder of the currently authenticated identity will be used.
4201
4286
  string create_in_parent_id = 3;
4287
+
4288
+ // Set to indicate the resource attributes should be purged before saving the resource.
4202
4289
  bool purge_attributes = 4;
4290
+
4291
+ // The path to serve files from.
4203
4292
  string path = 5;
4293
+
4294
+ // The host to serve files from.
4204
4295
  string host = 6;
4296
+
4297
+ // The port to serve files from.
4205
4298
  int32 port = 7;
4299
+
4300
+ // Set to indicate the server is enabled.
4206
4301
  bool enabled = 8;
4302
+
4303
+ // The cache timeout in seconds.
4207
4304
  int32 cache_timeout = 9;
4305
+
4306
+ // Set to indicate the catch all is enabled.
4208
4307
  bool catch_all_enabled = 10;
4308
+
4309
+ // The catch all path, e.g. '/'.
4209
4310
  string catch_all = 11;
4311
+
4312
+ // Set to indicate the dynamic index is enabled, which will return a dynamic index page for the path if it exists.
4210
4313
  bool dynamic_index_enabled = 12;
4211
4314
  }
4212
4315
 
4213
4316
  message SaveHttpFileServerResponse {
4317
+ // Details of any error that occurred on the call.
4214
4318
  tdx.volt_api.volt.v1.Status status = 1;
4319
+
4320
+ // The updated resource.
4215
4321
  Resource resource = 2;
4216
4322
  }
4217
4323
 
4218
4324
  message SaveHttpRestApiServerRequest {
4325
+ // Details of the resource to save.
4219
4326
  Resource resource = 1;
4327
+
4328
+ // Set to indicate this is a new resource.
4220
4329
  bool create = 2;
4330
+
4331
+ // The id of the folder resource in which a new resource should be created.
4332
+ // If omitted, the home folder of the currently authenticated identity will be used.
4221
4333
  string create_in_parent_id = 3;
4334
+
4335
+ // Set to indicate the resource attributes should be purged before saving the resource.
4222
4336
  bool purge_attributes = 4;
4337
+
4338
+ // The host to serve the API from.
4223
4339
  string host = 5;
4340
+
4341
+ // The port to serve the API from.
4224
4342
  int32 port = 6;
4343
+
4344
+ // Set to indicate the server is enabled.
4225
4345
  bool enabled = 7;
4346
+
4347
+ // Set to indicate the CORS is enabled.
4226
4348
  bool cors_enabled = 8;
4349
+
4350
+ // Set to indicate the API is a literal.
4227
4351
  bool is_literal = 9;
4352
+
4353
+ // The literal JSON to serve the API from.
4228
4354
  string literal_json = 10;
4355
+
4356
+ // The database ID to serve the API from.
4229
4357
  string database_id = 11;
4358
+
4359
+ // The SQL to execute for this node.
4230
4360
  string sql = 12;
4361
+
4362
+ // The parameters to inject into the SQL.
4231
4363
  repeated string parameter = 13;
4232
4364
  }
4233
4365
 
4234
4366
  message SaveHttpRestApiServerResponse {
4367
+ // Details of any error that occurred on the call.
4235
4368
  tdx.volt_api.volt.v1.Status status = 1;
4369
+
4370
+ // The updated resource.
4236
4371
  Resource resource = 2;
4237
4372
  }
4238
4373
 
4239
4374
  message SaveHttpRestApiNodeRequest {
4375
+ // Details of the resource to save.
4240
4376
  Resource resource = 1;
4377
+
4378
+ // Set to indicate this is a new resource.
4241
4379
  bool create = 2;
4380
+
4381
+ // The id of the folder resource in which a new resource should be created.
4382
+ // If omitted, the home folder of the currently authenticated identity will be used.
4242
4383
  string create_in_parent_id = 3;
4384
+
4385
+ // Set to indicate the resource attributes should be purged before saving the resource.
4243
4386
  bool purge_attributes = 4;
4387
+
4388
+ // Set to indicate the node is a literal.
4244
4389
  bool is_literal = 5;
4390
+
4391
+ // The literal JSON to serve the node from.
4245
4392
  string literal_json = 6;
4393
+
4394
+ // The database ID to serve the node from.
4246
4395
  string database_id = 7;
4396
+
4397
+ // The SQL to execute for this node.
4247
4398
  string sql = 8;
4399
+
4400
+ // The parameters to inject into the SQL.
4248
4401
  repeated string parameter = 9;
4249
4402
  }
4250
4403
 
4251
4404
  message SaveHttpRestApiNodeResponse {
4405
+ // Details of any error that occurred on the call.
4252
4406
  tdx.volt_api.volt.v1.Status status = 1;
4407
+
4408
+ // The updated resource.
4253
4409
  Resource resource = 2;
4254
4410
  }
4255
4411
 
4256
4412
  message SaveSessionRequest {
4413
+ // Details of the session to save.
4257
4414
  Session session = 1;
4258
4415
  }
4259
4416
 
@@ -4261,6 +4418,7 @@ message SaveSessionResponse {
4261
4418
  // Details of any error that occurred on the call.
4262
4419
  tdx.volt_api.volt.v1.Status status = 1;
4263
4420
 
4421
+ // The updated session.
4264
4422
  Session session = 2;
4265
4423
  }
4266
4424
 
@@ -6970,6 +7128,32 @@ class VoltClient extends EventEmitter__default["default"] {
6970
7128
  WriteSynapsePath(request) {
6971
7129
  return unaryCallInternal.call(this, "WriteSynapsePath", request);
6972
7130
  }
7131
+
7132
+ HasSynapseBlob(request) {
7133
+ return unaryCallInternal.call(this, "HasSynapseBlob", request);
7134
+ }
7135
+
7136
+ PutSynapseBlob(request) {
7137
+ const grpcClient = this.getVoltAPIClient();
7138
+
7139
+ const putBlobCall = new GRPCCall(
7140
+ this,
7141
+ "PutSynapseBlob",
7142
+ "METHOD_TYPE_BIDI"
7143
+ );
7144
+ return putBlobCall.start(grpcClient, request);
7145
+ }
7146
+
7147
+ GetSynapseBlob(request) {
7148
+ const grpcClient = this.getVoltAPIClient();
7149
+
7150
+ const getBlobCall = new GRPCCall(
7151
+ this,
7152
+ "GetSynapseBlob",
7153
+ "METHOD_TYPE_SERVER_STREAM"
7154
+ );
7155
+ return getBlobCall.start(grpcClient, request);
7156
+ }
6973
7157
  }
6974
7158
 
6975
7159
  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.27",
6
+ "version": "0.20.31",
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.27",
37
- "@tdxvolt/volt-utility": "^0.20.27",
36
+ "@tdxvolt/volt-client-web": "^0.20.31",
37
+ "@tdxvolt/volt-utility": "^0.20.31",
38
38
  "debug": "^4.1.1",
39
39
  "ip": "^1.1.5",
40
40
  "jsonwebtoken": "^8.5.1",
@@ -788,4 +788,30 @@ export class VoltClient extends EventEmitter {
788
788
  WriteSynapsePath(request) {
789
789
  return unaryCallInternal.call(this, "WriteSynapsePath", request);
790
790
  }
791
+
792
+ HasSynapseBlob(request) {
793
+ return unaryCallInternal.call(this, "HasSynapseBlob", request);
794
+ }
795
+
796
+ PutSynapseBlob(request) {
797
+ const grpcClient = this.getVoltAPIClient();
798
+
799
+ const putBlobCall = new GRPCCall(
800
+ this,
801
+ "PutSynapseBlob",
802
+ "METHOD_TYPE_BIDI"
803
+ );
804
+ return putBlobCall.start(grpcClient, request);
805
+ }
806
+
807
+ GetSynapseBlob(request) {
808
+ const grpcClient = this.getVoltAPIClient();
809
+
810
+ const getBlobCall = new GRPCCall(
811
+ this,
812
+ "GetSynapseBlob",
813
+ "METHOD_TYPE_SERVER_STREAM"
814
+ );
815
+ return getBlobCall.start(grpcClient, request);
816
+ }
791
817
  }
@@ -215,6 +215,7 @@ service SqliteServerAPI {
215
215
  rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse);
216
216
 
217
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.
218
219
  rpc SaveDataView(SaveDataViewRequest) returns (SaveDataViewResponse);
219
220
  }
220
221
 
@@ -993,6 +994,10 @@ message DeleteDIDRequest {
993
994
 
994
995
  // Optional passphrase of the DID controller key. Required if the key is encrypted.
995
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;
996
1001
  }
997
1002
 
998
1003
  message DeleteDIDResponse {
@@ -1231,6 +1236,15 @@ service SyncAPI {
1231
1236
 
1232
1237
  // Revert a document in a sync database to a stored version.
1233
1238
  rpc RevertSyncDocumentVersion(RevertSyncDocumentVersionRequest) returns (RevertSyncDocumentVersionResponse);
1239
+
1240
+ // Check whether a content-addressed blob exists in a synapse.
1241
+ rpc HasSynapseBlob(HasSynapseBlobRequest) returns (HasSynapseBlobResponse);
1242
+
1243
+ // Upload a content-addressed blob. The first message must be \`start\` with the expected sha256 (base64url) hash and size; subsequent messages carry payload chunks. Idempotent if the hash is already stored. The server verifies the received bytes match \`hash\` before committing.
1244
+ rpc PutSynapseBlob(stream PutSynapseBlobRequest) returns (stream PutSynapseBlobResponse);
1245
+
1246
+ // Download a content-addressed blob by hash.
1247
+ rpc GetSynapseBlob(GetSynapseBlobRequest) returns (stream GetSynapseBlobResponse);
1234
1248
  }
1235
1249
 
1236
1250
  message CreateSynapseConnectionRequest {
@@ -1398,36 +1412,31 @@ message SynapseDocumentMetadata {
1398
1412
  // The name of the top-level shared type in the document.
1399
1413
  string name = 1;
1400
1414
 
1401
- // The type of the shared type, e.g. "map", "array" or "text".
1415
+ // The type of the document root. Yjs shared types are "map", "array" or "text". The "blob" type means the payload is a content-addressed object in the synapse blob store (PutSynapseBlob / GetSynapseBlob). There is no Yjs shared type for a blob document. A blob document's schema must be a single entry of type "blob"; it cannot be mixed with map, array, or text roots. The server writes \`__hash\` when the document is bound to a stored blob (see SetSynapseDocumentMetadata.blob_hash).
1402
1416
  string type = 2;
1403
1417
 
1404
- // The JSON schema that describes the data that is stored in this shared type.
1418
+ // The JSON schema that describes the data stored in this shared type.
1405
1419
  string json_schema = 3;
1406
1420
  }
1407
1421
 
1408
1422
  message SetSynapseDocumentMetadataRequest {
1409
- // DEPRECATED: Use synapse_id instead.
1410
- string database_id = 1;
1411
-
1412
1423
  // The id of the synapse that contains the document.
1413
1424
  string synapse_id = 5;
1414
1425
 
1415
1426
  // The id of the document to set the metadata for.
1416
1427
  string document_id = 2;
1417
1428
 
1418
- // The metadata to set for the document.
1429
+ // The metadata to set for the document. Each entry names a top-level shared type (map/array/text). For a blob document this must contain exactly one entry with type "blob".
1419
1430
  repeated SynapseDocumentMetadata metadata = 3;
1420
1431
 
1421
1432
  // Any additional application-specific JSON to attach to the document.
1422
1433
  string json = 4;
1423
1434
 
1424
- // Set to true when the caller intends to write the document's content
1425
- // separately, after this metadata call (a metadata-first create). The sync
1426
- // server uses this to defer __hash bootstrapping until the content actually
1427
- // arrives, so the hash is not computed over an empty document. Leave false
1428
- // (the default) for empty documents or content-first flows where the content
1429
- // is already present.
1430
- bool content_pending = 6;
1435
+ // Set to true when the document content is already present (content-first) or the document is intentionally empty, so the server bootstraps \`__hash\` immediately. Leave false (the default) when content will be written after this call.
1436
+ bool content_ready = 6;
1437
+
1438
+ // For blob documents, the content hash to bind. The server verifies the blob is stored (or the hash is sha256 of empty bytes) and writes \`__hash\`. Omit for a metadata-first create. Must not be set for map/array/text documents; the server computes those hashes from Yjs content.
1439
+ string blob_hash = 7;
1431
1440
  }
1432
1441
 
1433
1442
  message SetSynapseDocumentMetadataResponse {
@@ -1660,6 +1669,64 @@ message RevertSyncDocumentVersionResponse {
1660
1669
  string version_id = 2;
1661
1670
  }
1662
1671
 
1672
+ message HasSynapseBlobRequest {
1673
+ // The id of the synapse that stores the blob.
1674
+ string synapse_id = 1;
1675
+
1676
+ // sha256 of the raw file bytes, encoded as unpadded base64url (same family
1677
+ // as VoltDrive content hashes).
1678
+ string hash = 2;
1679
+ }
1680
+
1681
+ message HasSynapseBlobResponse {
1682
+ tdx.volt_api.volt.v1.Status status = 1;
1683
+
1684
+ // True if a blob with this hash is already stored.
1685
+ bool exists = 2;
1686
+ }
1687
+
1688
+ message PutSynapseBlobStart {
1689
+ string synapse_id = 1;
1690
+
1691
+ // Expected sha256 (base64url) of the concatenated payload bytes.
1692
+ string hash = 2;
1693
+
1694
+ // Total payload size in bytes. Zero means no blob row (empty file).
1695
+ uint64 size = 3;
1696
+ }
1697
+
1698
+ message PutSynapseBlobRequest {
1699
+ oneof payload {
1700
+ // Must be sent as the first message.
1701
+ PutSynapseBlobStart start = 1;
1702
+
1703
+ // The next chunk of blob data.
1704
+ bytes block = 2;
1705
+ }
1706
+ }
1707
+
1708
+ message PutSynapseBlobResponse {
1709
+ tdx.volt_api.volt.v1.Status status = 1;
1710
+
1711
+ // Number of payload blocks received. Zero until the stream finishes.
1712
+ uint32 ack = 2;
1713
+
1714
+ // True if the hash was already present (put is a no-op).
1715
+ bool exists = 3;
1716
+ }
1717
+
1718
+ message GetSynapseBlobRequest {
1719
+ string synapse_id = 1;
1720
+ string hash = 2;
1721
+ }
1722
+
1723
+ message GetSynapseBlobResponse {
1724
+ oneof payload {
1725
+ bytes block = 1;
1726
+ tdx.volt_api.volt.v1.Status status = 2;
1727
+ }
1728
+ }
1729
+
1663
1730
  `;
1664
1731
  export const terminal_api = `syntax = "proto3";
1665
1732
 
@@ -3560,41 +3627,41 @@ message SaveDatabaseResponse {
3560
3627
  }
3561
3628
 
3562
3629
  message SaveHttpForwarderRequest {
3630
+ // Details of the resource to save.
3563
3631
  Resource resource = 1;
3632
+
3633
+ // Set to indicate this is a new resource.
3564
3634
  bool create = 2;
3635
+
3636
+ // The id of the folder resource in which a new resource should be created.
3637
+ // If omitted, the home folder of the currently authenticated identity will be used.
3565
3638
  string create_in_parent_id = 3;
3639
+
3640
+ // Set to indicate the resource attributes should be purged before saving the resource.
3566
3641
  bool purge_attributes = 4;
3642
+
3643
+ // The domain to forward requests to.
3567
3644
  string domain = 5;
3645
+
3646
+ // The host to forward requests to.
3568
3647
  string host = 6;
3648
+
3649
+ // The port to forward requests to.
3569
3650
  int32 port = 7;
3651
+
3652
+ // Set to indicate that the host header should reflect the proxy domain rather than the target host.
3570
3653
  bool forward_host = 8;
3571
3654
 
3572
- // Optional path prefix (e.g. "/myapp") for path-based forwarding. May be used
3573
- // on its own (path forwarding on the Volt's own host) or together with
3574
- // \`domain\` (sub-domain + path, e.g. sub.acme.com/myapp). At least one of
3575
- // \`domain\` or \`path\` must be set.
3655
+ // 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.
3576
3656
  string path = 9;
3577
3657
 
3578
- // When a \`path\` prefix is configured, controls whether that prefix is removed
3579
- // from the request path before forwarding (standard reverse-proxy behaviour).
3580
- // Defaults to true when unset: the target then receives the request at its
3581
- // own root (e.g. "/drive/assets/x.js" -> "/assets/x.js"), which suits plain
3582
- // static file servers and root-mounted backends. Set to false for targets
3583
- // that are themselves configured under the same sub-path and expect to
3584
- // receive the prefix. The \`X-Forwarded-Prefix\` header is always sent.
3585
- optional bool strip_path = 10;
3586
-
3587
- // When true, incoming requests to this forwarder must carry a valid
3588
- // authenticated session (established via the OIDC sign-in flow) and pass the
3589
- // policy check before being proxied to the target. Unauthenticated requests
3590
- // are redirected to the configured OpenID Provider. The session is never
3591
- // exposed to the target (the session cookie is stripped before forwarding).
3658
+ // 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.
3659
+ bool keep_path = 10;
3660
+
3661
+ // 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.
3592
3662
  bool auth_enabled = 11;
3593
3663
 
3594
- // OpenID Provider issuer URL used for discovery
3595
- // (\`<issuer>/.well-known/openid-configuration\`). May be a Volt acting as an
3596
- // OpenID Provider, or any external OIDC provider. Required when
3597
- // \`auth_enabled\` is set.
3664
+ // 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.
3598
3665
  string oidc_issuer = 12;
3599
3666
 
3600
3667
  // OAuth 2.0 client identifier registered with the OpenID Provider.
@@ -3606,36 +3673,45 @@ message SaveHttpForwarderRequest {
3606
3673
  // Space separated OAuth scopes. Defaults to "openid email" when empty.
3607
3674
  string oidc_scopes = 15;
3608
3675
 
3609
- // Optional override for the reserved callback path on the app host. Defaults
3610
- // to "/__volt-auth/oidc/callback".
3676
+ // Optional override for the reserved callback path on the app host. Defaults to "/__volt-auth/oidc/callback".
3611
3677
  string oidc_redirect_path = 16;
3612
3678
 
3613
- // Email verification mode for OIDC-gated sign-in when the OpenID Provider is
3614
- // a Volt: "link" (default) or "code".
3679
+ // Email verification mode for OIDC-gated sign-in when the OpenID Provider is a Volt: "code" (default) or "link".
3615
3680
  string email_verification_mode = 17;
3681
+
3682
+ // 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.
3683
+ repeated string auth_public_paths = 18;
3616
3684
  }
3617
3685
 
3618
3686
  message SaveHttpForwarderResponse {
3687
+ // Details of any error that occurred on the call.
3619
3688
  tdx.volt_api.volt.v1.Status status = 1;
3689
+
3690
+ // The updated resource.
3620
3691
  Resource resource = 2;
3621
3692
  }
3622
3693
 
3623
3694
  message SaveOidcClientRequest {
3695
+ // Details of the resource to save.
3624
3696
  Resource resource = 1;
3697
+
3698
+ // Set to indicate this is a new resource.
3625
3699
  bool create = 2;
3700
+
3701
+ // The id of the folder resource in which a new resource should be created.
3702
+ // If omitted, the home folder of the currently authenticated identity will be used.
3626
3703
  string create_in_parent_id = 3;
3704
+
3705
+ // Set to indicate the resource attributes should be purged before saving the resource.
3627
3706
  bool purge_attributes = 4;
3628
3707
 
3629
- // Human-friendly name for the client (also used as resource name when the
3630
- // resource name is empty).
3708
+ // Human-friendly name for the client (also used as resource name when the resource name is empty).
3631
3709
  string client_name = 5;
3632
3710
 
3633
3711
  // OAuth 2.0 client_id. Required.
3634
3712
  string client_id = 6;
3635
3713
 
3636
- // OAuth 2.0 client_secret. Stored encrypted and redacted on read. Only
3637
- // (re)written when non-empty so updates can omit it to keep the existing
3638
- // secret.
3714
+ // 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.
3639
3715
  string client_secret = 7;
3640
3716
 
3641
3717
  // Comma- or space-separated list of allowed redirect URIs.
@@ -3643,69 +3719,150 @@ message SaveOidcClientRequest {
3643
3719
  }
3644
3720
 
3645
3721
  message SaveOidcClientResponse {
3722
+ // Details of any error that occurred on the call.
3646
3723
  tdx.volt_api.volt.v1.Status status = 1;
3724
+
3725
+ // The updated resource.
3647
3726
  Resource resource = 2;
3648
3727
  }
3649
3728
 
3650
3729
  message SaveHttpFileServerRequest {
3730
+ // Details of the resource to save.
3651
3731
  Resource resource = 1;
3732
+
3733
+ // Set to indicate this is a new resource.
3652
3734
  bool create = 2;
3735
+
3736
+ // The id of the folder resource in which a new resource should be created.
3737
+ // If omitted, the home folder of the currently authenticated identity will be used.
3653
3738
  string create_in_parent_id = 3;
3739
+
3740
+ // Set to indicate the resource attributes should be purged before saving the resource.
3654
3741
  bool purge_attributes = 4;
3742
+
3743
+ // The path to serve files from.
3655
3744
  string path = 5;
3745
+
3746
+ // The host to serve files from.
3656
3747
  string host = 6;
3748
+
3749
+ // The port to serve files from.
3657
3750
  int32 port = 7;
3751
+
3752
+ // Set to indicate the server is enabled.
3658
3753
  bool enabled = 8;
3754
+
3755
+ // The cache timeout in seconds.
3659
3756
  int32 cache_timeout = 9;
3757
+
3758
+ // Set to indicate the catch all is enabled.
3660
3759
  bool catch_all_enabled = 10;
3760
+
3761
+ // The catch all path, e.g. '/'.
3661
3762
  string catch_all = 11;
3763
+
3764
+ // Set to indicate the dynamic index is enabled, which will return a dynamic index page for the path if it exists.
3662
3765
  bool dynamic_index_enabled = 12;
3663
3766
  }
3664
3767
 
3665
3768
  message SaveHttpFileServerResponse {
3769
+ // Details of any error that occurred on the call.
3666
3770
  tdx.volt_api.volt.v1.Status status = 1;
3771
+
3772
+ // The updated resource.
3667
3773
  Resource resource = 2;
3668
3774
  }
3669
3775
 
3670
3776
  message SaveHttpRestApiServerRequest {
3777
+ // Details of the resource to save.
3671
3778
  Resource resource = 1;
3779
+
3780
+ // Set to indicate this is a new resource.
3672
3781
  bool create = 2;
3782
+
3783
+ // The id of the folder resource in which a new resource should be created.
3784
+ // If omitted, the home folder of the currently authenticated identity will be used.
3673
3785
  string create_in_parent_id = 3;
3786
+
3787
+ // Set to indicate the resource attributes should be purged before saving the resource.
3674
3788
  bool purge_attributes = 4;
3789
+
3790
+ // The host to serve the API from.
3675
3791
  string host = 5;
3792
+
3793
+ // The port to serve the API from.
3676
3794
  int32 port = 6;
3795
+
3796
+ // Set to indicate the server is enabled.
3677
3797
  bool enabled = 7;
3798
+
3799
+ // Set to indicate the CORS is enabled.
3678
3800
  bool cors_enabled = 8;
3801
+
3802
+ // Set to indicate the API is a literal.
3679
3803
  bool is_literal = 9;
3804
+
3805
+ // The literal JSON to serve the API from.
3680
3806
  string literal_json = 10;
3807
+
3808
+ // The database ID to serve the API from.
3681
3809
  string database_id = 11;
3810
+
3811
+ // The SQL to execute for this node.
3682
3812
  string sql = 12;
3813
+
3814
+ // The parameters to inject into the SQL.
3683
3815
  repeated string parameter = 13;
3684
3816
  }
3685
3817
 
3686
3818
  message SaveHttpRestApiServerResponse {
3819
+ // Details of any error that occurred on the call.
3687
3820
  tdx.volt_api.volt.v1.Status status = 1;
3821
+
3822
+ // The updated resource.
3688
3823
  Resource resource = 2;
3689
3824
  }
3690
3825
 
3691
3826
  message SaveHttpRestApiNodeRequest {
3827
+ // Details of the resource to save.
3692
3828
  Resource resource = 1;
3829
+
3830
+ // Set to indicate this is a new resource.
3693
3831
  bool create = 2;
3832
+
3833
+ // The id of the folder resource in which a new resource should be created.
3834
+ // If omitted, the home folder of the currently authenticated identity will be used.
3694
3835
  string create_in_parent_id = 3;
3836
+
3837
+ // Set to indicate the resource attributes should be purged before saving the resource.
3695
3838
  bool purge_attributes = 4;
3839
+
3840
+ // Set to indicate the node is a literal.
3696
3841
  bool is_literal = 5;
3842
+
3843
+ // The literal JSON to serve the node from.
3697
3844
  string literal_json = 6;
3845
+
3846
+ // The database ID to serve the node from.
3698
3847
  string database_id = 7;
3848
+
3849
+ // The SQL to execute for this node.
3699
3850
  string sql = 8;
3851
+
3852
+ // The parameters to inject into the SQL.
3700
3853
  repeated string parameter = 9;
3701
3854
  }
3702
3855
 
3703
3856
  message SaveHttpRestApiNodeResponse {
3857
+ // Details of any error that occurred on the call.
3704
3858
  tdx.volt_api.volt.v1.Status status = 1;
3859
+
3860
+ // The updated resource.
3705
3861
  Resource resource = 2;
3706
3862
  }
3707
3863
 
3708
3864
  message SaveSessionRequest {
3865
+ // Details of the session to save.
3709
3866
  Session session = 1;
3710
3867
  }
3711
3868
 
@@ -3713,6 +3870,7 @@ message SaveSessionResponse {
3713
3870
  // Details of any error that occurred on the call.
3714
3871
  tdx.volt_api.volt.v1.Status status = 1;
3715
3872
 
3873
+ // The updated session.
3716
3874
  Session session = 2;
3717
3875
  }
3718
3876