/** * React hook for using backend storage API as a StorageSource */ import { StorageSource } from "@rebasepro/types"; export interface BackendStorageSourceProps { /** * Backend API URL (e.g., 'http://localhost:3001') */ apiUrl: string; /** * The path the backend mounts its API under. Defaults to the server's own * default; pass the backend's `basePath` if it was configured otherwise. */ apiPath?: string; /** * Function to get the current auth token */ getAuthToken: () => Promise; } /** * Hook to create a StorageSource that uses the backend storage REST API. * Use this for self-hosted Rebase with local or S3 storage. * * @example * ```tsx * const storageSource = useBackendStorageSource({ * apiUrl: 'http://localhost:3001', * getAuthToken: authController.getAuthToken * }); * * // Then pass to Rebase: * * ``` */ export declare function useBackendStorageSource({ apiUrl, apiPath, getAuthToken }: BackendStorageSourceProps): StorageSource;