import type { FilesClient } from '@databricks/sdk-files/v2'; import type { AttachmentPutInput, AttachmentRef, AttachmentStore, StoredAttachment } from '@fabric-harness/sdk'; /** * Unity Catalog Volumes attachment backend (v2 migration, workstream C2). * * Implements the SDK {@link AttachmentStore} contract on a UC Volume via the * Databricks Files API, so attachment bytes are governed by Unity Catalog * grants like every other Databricks asset. Layout under the volume: * * ``` * /Volumes/////// * /Volumes///////.json * ``` * * The bare `` file holds the raw bytes; the `.json` sidecar * holds the {@link AttachmentRef} metadata and doubles as the record's * existence marker: `put` is first-write-wins per `(scope, digest)` — when the * sidecar already exists the put is a no-op, so the first stored ref metadata * is retained (contract semantics). * * Binary transfer and pagination use the official Databricks Files SDK client. */ export interface UcVolumesAttachmentStoreOptions { client: Pick; catalog: string; schema: string; volume: string; /** Directory under the volume root holding all attachments. Default `fh-attachments`. */ rootPrefix?: string; } export declare class UcVolumesAttachmentStore implements AttachmentStore { private readonly client; private readonly volumeRoot; private readonly rootPrefix; constructor(options: UcVolumesAttachmentStoreOptions); put(input: AttachmentPutInput): Promise; get(scope: string, digest: string): Promise; getByAttachmentId(scope: string, attachmentId: string): Promise; list(scope: string): Promise; delete(scope: string, digest: string): Promise; private scopeDir; private bytesPath; private refPath; private writeFile; /** Raw file bytes, or `null` when the file does not exist (404). */ private readFile; /** True when the file existed and was deleted; false on 404. */ private deleteFile; /** Immediate children of a directory; empty for a missing directory (404). */ private listDirectory; } //# sourceMappingURL=volumes-attachment-store.d.ts.map