import { AbstractPowerSyncDatabase, SyncStreamStatus, SyncStreamSubscribeOptions } from '@powersync/common'; import { QuerySyncStreamOptions } from './watched/watch-types.js'; /** * A sync stream to subscribe to in {@link useSyncStream}. * * For more details on sync streams, see the [documentation](https://docs.powersync.com/usage/sync-streams). */ export interface UseSyncStreamOptions extends SyncStreamSubscribeOptions { /** * The name of the stream to subscribe to. */ name: string; /** * Parameters for the stream subscription. A single stream can have multiple subscriptions with different parameter * sets. */ parameters?: Record | null; } /** * Creates a PowerSync stream subscription. The subscription is kept alive as long as the React component calling this * function. When it unmounts, {@link SyncStreamSubscription.unsubscribe} is called * * For more details on sync streams, see the [documentation](https://docs.powersync.com/usage/sync-streams). * * @returns The status for that stream, or `null` if the stream is currently being resolved. */ export declare function useSyncStream(options: UseSyncStreamOptions): SyncStreamStatus | null; /** * @internal */ export declare function useAllSyncStreamsHaveSynced(db: AbstractPowerSyncDatabase, streams: QuerySyncStreamOptions[] | undefined): boolean;