import type { Bucket, StorageFile, StorageRecommendation, StorageStats } from "../_internal/types.gen"; import type { RequestOptions } from "../base-client"; import { RequestBuilder } from "../request-builder"; /** * Platform-level storage management. * * Provides access to global storage statistics and bucket administration. * Buckets are provisioned in GCS (production) or MinIO (development). * Processing-type (internal) buckets are excluded from listings by default. */ export declare function createStorageNamespace(rb: RequestBuilder): { /** * Retrieves platform-wide storage statistics. * * Pass a `workspaceId` to scope results to a single workspace. * * @param workspaceId - Optional workspace ID to filter statistics. * @param options - Optional request options. * @returns Storage statistics record with byte counts and file totals. */ stats: (workspaceId?: string, options?: RequestOptions) => Promise; buckets: { /** * Lists all storage buckets, excluding processing-type buckets by default. * * @param options - Optional request options. * @returns Array of Bucket objects. */ list: (options?: RequestOptions) => Promise; /** * Fetches a single bucket by ID. * * @param id - Bucket ID. * @param options - Optional request options. * @returns The Bucket record. */ get: (id: string, options?: RequestOptions) => Promise; /** * Fetches a bucket with the `storage_used` calculation. * * Returns total bytes across all workspace files stored in this bucket. * * @param id - Bucket ID. * @param options - Optional request options. * @returns Bucket record including computed `storage_used` field. */ stats: (id: string, options?: RequestOptions) => Promise; }; /** * Sub-namespace for admin storage file operations. */ files: { /** Lists storage files. */ list: (options?: RequestOptions) => Promise; /** Retrieves a single storage file by ID. */ get: (id: string, options?: RequestOptions) => Promise; /** Archives a file. */ archive: (id: string, options?: RequestOptions) => Promise; /** Restores an archived file. */ restore: (id: string, options?: RequestOptions) => Promise; /** Confirms a presigned upload. */ confirmUpload: (id: string, attributes?: Record, options?: RequestOptions) => Promise; /** Soft-deletes a file. */ softDelete: (id: string, options?: RequestOptions) => Promise; /** Replaces tags on a file. */ tag: (id: string, tags: string[], options?: RequestOptions) => Promise; /** Merges new metadata into the file's existing metadata. */ updateMetadata: (id: string, newMetadata: Record, options?: RequestOptions) => Promise; /** Finds files by checksum for deduplication. */ byChecksum: (checksum: string, options?: RequestOptions) => Promise; /** Lists child files for a parent ID. */ listChildren: (parentId: string, options?: RequestOptions) => Promise; /** * Generate a short-lived presigned download URL for a file. * * @param id - The UUID of the file to download. * @param params - Optional parameters (e.g., custom `expires_in` seconds). * @param options - Optional request options. * @returns A promise resolving to the presigned URL and its expiry. */ requestDownloadUrl: (id: string, params?: { expires_in?: number; }, options?: RequestOptions) => Promise<{ url: string; expires_at: string; }>; }; /** * Sub-namespace for AI-generated storage recommendations. * * Recommendations include duplicate detection, stale file cleanup, * and retention policy improvements. */ recommendations: { /** Lists all recommendations. */ list: (options?: RequestOptions) => Promise; /** Lists pending (unresolved) recommendations. */ listPending: (options?: RequestOptions) => Promise; /** Accepts a recommendation. */ accept: (id: string, options?: RequestOptions) => Promise; /** Dismisses a recommendation. */ dismiss: (id: string, options?: RequestOptions) => Promise; }; }; //# sourceMappingURL=storage.d.ts.map