/** * @example * { * id: "HydraDoc1234" * } */ export interface HandlerContextMetadataUpdateRequest { /** Source ID */ id: string; /** * ACL, when present, REPLACES the source's access-control list without * re-ingestion (PRO-1684): pass the COMPLETE new allow-list (adding a * third user means sending all three), an empty list to make the source * private, or ["__public__"] to open it to every identified caller. A * pointer so omitted (nil, ACL untouched) is distinguishable from an * explicit empty list (private). * ACL uses RawMessage so the handler can tell three wire states apart: * absent (leave the stored ACL untouched), explicit null (revoke to * nobody, JSON-merge-patch semantics), and a list (replace). A plain * *[]string cannot: encoding/json leaves the pointer nil for BOTH * absent and null, which silently ignored an explicit null revocation. */ acl?: string[]; /** Free-form key-value pairs to merge into the source's `additional_metadata`. The only accepted spelling for document metadata on this endpoint. Capped at 1 KiB, measured on the compact JSON encoding of the whole map in UTF-8 bytes — keys, quotes, commas and braces count toward the budget. Over-cap returns 400 with the actual byte count. */ additionalMetadata?: Record; /** Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated). */ collection?: string; /** * Database/Collection are the canonical v2 names; TenantID/SubTenantID are * their deprecated aliases. The TenantAliases middleware reconciles them in * the request body before binding, so the handler reads TenantID/SubTenantID. */ database?: string; /** Schema-backed metadata fields to merge into the source's `metadata` (database metadata). Canonical name; `tenant_metadata` is a deprecated alias. Capped at 16 KiB, measured on the compact JSON encoding of the whole map in UTF-8 bytes — keys, quotes, commas and braces count toward the budget. Over-cap returns 400 with the actual byte count. */ databaseMetadata?: Record; /** Not accepted on this endpoint. Sending any non-null value returns 400 (`document_metadata is not accepted; use additional_metadata`), regardless of size. Use `additional_metadata` instead. Accepted as an alias on /context/ingest only. */ documentMetadata?: Record; /** deprecated: use collection */ subTenantId?: string; /** deprecated: use database */ tenantId?: string; /** Deprecated alias for `database_metadata`, still accepted here; `database_metadata` wins when both are sent. Capped at 16 KiB, measured on the compact JSON encoding of the whole map in UTF-8 bytes — keys, quotes, commas and braces count toward the budget. Over-cap returns 400 with the actual byte count. */ tenantMetadata?: Record; }