import * as zod_v4_core from 'zod/v4/core'; import * as zod from 'zod'; import * as SharedAdapters from '@geenius/adapters'; import { AdapterHealth as AdapterHealth$1, AdapterListOptions as AdapterListOptions$1, FileStorageAdapter as FileStorageAdapter$1, FileStorageMetadata as FileStorageMetadata$1, FileStorageMetadataValue as FileStorageMetadataValue$1, FileUploadOptions as FileUploadOptions$1, StorageAdapter as StorageAdapter$1, StorageErrorCode as StorageErrorCode$1, StorageObject as StorageObject$1, StorageWriteInput as StorageWriteInput$1, StoredFile as StoredFile$1 } from '@geenius/adapters'; /** * Health result returned by storage providers after checking object-store * connectivity and basic read/write availability. * * @example * ```ts * const health: AdapterHealth = await storage.getHealth(); * ``` */ type AdapterHealth = AdapterHealth$1; /** * Pagination and prefix options accepted by `StorageAdapter.listObjects()`. * * @example * ```ts * const options: AdapterListOptions = { limit: 25, prefix: "avatars/" }; * ``` */ type AdapterListOptions = AdapterListOptions$1; /** * JSON-compatible metadata value stored with file records. * * @example * ```ts * const value: FileStorageMetadataValue = true; * ``` */ type FileStorageMetadataValue = FileStorageMetadataValue$1; /** * Caller-controlled metadata map persisted with file records. * * @example * ```ts * const metadata: FileStorageMetadata = { owner: "u1", public: true }; * ``` */ type FileStorageMetadata = FileStorageMetadata$1; /** * SDK-free file storage adapter contract implemented by local/dev helpers, * downstream provider packages, and app-owned storage modules. * * @example * ```ts * const file = await fileStorage.upload(blob, { name: "avatar.png" }); * ``` */ type FileStorageAdapter = FileStorageAdapter$1; /** * Upload options accepted by `FileStorageAdapter.upload()`. * * @example * ```ts * const options: FileUploadOptions = { name: "avatar.png", metadata: { owner: "u1" } }; * ``` */ type FileUploadOptions = FileUploadOptions$1; /** * SDK-free object/blob storage adapter contract implemented by downstream * provider packages and app-owned storage modules. * * @example * ```ts * const object = await storage.getObject("avatars/u1.png"); * ``` */ type StorageAdapter = StorageAdapter$1; /** * Provider-level storage error codes used for file lifecycle failures. * * @example * ```ts * const code: StorageErrorCode = "NOT_FOUND"; * ``` */ type StorageErrorCode = StorageErrorCode$1; /** * Serializable storage object returned by `getObject`, `putObject`, and * `listObjects`, including payload body, metadata, size, and update time. * * @example * ```ts * const object: StorageObject = { key: "a.txt", body: "ok", size: 2, metadata: {}, updatedAt: new Date().toISOString() }; * ``` */ type StorageObject = StorageObject$1; /** * Serializable file metadata returned by file storage adapters. * * @example * ```ts * const file: StoredFile = { id: "f1", name: "a.txt", path: "/a.txt", size: 2, mimeType: "text/plain", url: "memory://a.txt", createdAt: new Date().toISOString() }; * ``` */ type StoredFile = StoredFile$1; /** * Provider-neutral write payload accepted by storage adapters for object/blob * creation or replacement. * * @example * ```ts * const input: StorageWriteInput = { key: "a.txt", body: "ok" }; * ``` */ type StorageWriteInput = StorageWriteInput$1; /** * Runtime validator for the common storage adapter health response. * * @example * ```ts * const health = AdapterHealthSchema.parse({ ok: true, checkedAt: new Date().toISOString() }); * ``` */ declare const AdapterHealthSchema: zod.ZodObject<{ ok: zod.ZodBoolean; checkedAt: zod.ZodString; latencyMs: zod.ZodOptional; message: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for storage list pagination and object-prefix filters. * * @example * ```ts * const options = AdapterListOptionsSchema.parse({ limit: 10, prefix: "logs/" }); * ``` */ declare const AdapterListOptionsSchema: zod.ZodObject<{ limit: zod.ZodOptional; cursor: zod.ZodOptional; prefix: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for file-storage metadata scalar values. * * @example * ```ts * const value = FileStorageMetadataValueSchema.parse("invoice"); * ``` */ declare const FileStorageMetadataValueSchema: zod.ZodUnion; /** * Runtime validator for caller-controlled file metadata maps. * * @example * ```ts * const metadata = FileStorageMetadataSchema.parse({ owner: "u1" }); * ``` */ declare const FileStorageMetadataSchema: zod.ZodRecord>; /** * Runtime validator for file upload options accepted by file storage adapters. * * @example * ```ts * const options = FileUploadOptionsSchema.parse({ name: "avatar.png" }); * ``` */ declare const FileUploadOptionsSchema: zod.ZodObject<{ name: zod.ZodOptional; metadata: zod.ZodOptional>>; }, zod_v4_core.$strip>; /** * Contract-layer error for invalid storage payloads or provider-boundary * violations before a concrete SDK receives the request. * * @example * ```ts * throw new StorageContractError("Invalid storage object"); * ``` */ declare const StorageContractError: typeof SharedAdapters.StorageContractError; /** * Provider-level storage error for file lifecycle and quota failures. * * @example * ```ts * throw new StorageError("File not found", "NOT_FOUND"); * ``` */ declare const StorageError: typeof SharedAdapters.StorageError; /** * Runtime validator for serialized storage objects returned by providers. * * @example * ```ts * const object = StorageObjectSchema.parse({ key: "a.txt", body: "ok", size: 2, updatedAt: new Date().toISOString() }); * ``` */ declare const StorageObjectSchema: zod.ZodObject<{ key: zod.ZodString; body: zod.ZodString; contentType: zod.ZodOptional; size: zod.ZodNumber; etag: zod.ZodOptional; metadata: zod.ZodDefault>; updatedAt: zod.ZodString; }, zod_v4_core.$strip>; /** * Runtime validator for provider-neutral object/blob write payloads. * * @example * ```ts * const input = StorageWriteInputSchema.parse({ key: "a.txt", body: "ok" }); * ``` */ declare const StorageWriteInputSchema: zod.ZodObject<{ key: zod.ZodString; body: zod.ZodString; contentType: zod.ZodOptional; metadata: zod.ZodOptional>; ttlSeconds: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for serialized file records returned by file storage * adapters. * * @example * ```ts * const file = StoredFileSchema.parse({ id: "f1", name: "a.txt", path: "/a.txt", size: 2, mimeType: "text/plain", url: "memory://a.txt", createdAt: new Date().toISOString() }); * ``` */ declare const StoredFileSchema: zod.ZodObject<{ id: zod.ZodString; name: zod.ZodString; path: zod.ZodString; size: zod.ZodNumber; mimeType: zod.ZodString; url: zod.ZodString; metadata: zod.ZodOptional>>; createdAt: zod.ZodString; }, zod_v4_core.$strip>; export { type AdapterHealth, AdapterHealthSchema, type AdapterListOptions, AdapterListOptionsSchema, type FileStorageAdapter, type FileStorageMetadata, FileStorageMetadataSchema, type FileStorageMetadataValue, FileStorageMetadataValueSchema, type FileUploadOptions, FileUploadOptionsSchema, type StorageAdapter, StorageContractError, StorageError, type StorageErrorCode, type StorageObject, StorageObjectSchema, type StorageWriteInput, StorageWriteInputSchema, type StoredFile, StoredFileSchema };