import { LogContext } from '@rocicorp/logger';
import { Database } from '../../../../../zqlite/src/db.ts';
import type { ShardConfig } from '../../../types/shards.ts';
import type { ChangeSource } from '../../change-streamer/change-streamer-service.ts';
import { type SubscriptionState } from '../../replicator/schema/replication-state.ts';
/**
 * Initializes a Custom change source before streaming changes from the
 * corresponding logical replication stream.
 */
export declare function initializeCustomChangeSource(lc: LogContext, upstreamURI: string, shard: ShardConfig, replicaDbFile: string): Promise<{
    subscriptionState: SubscriptionState;
    changeSource: ChangeSource;
}>;
/**
 * Initial sync for a custom change source makes a request to the
 * change source endpoint with no `replicaVersion` or `lastWatermark`.
 * The initial transaction returned by the endpoint is treated as
 * the initial sync, and the commit watermark of that transaction
 * becomes the `replicaVersion` of the initialized replica.
 *
 * Note that this is equivalent to how the LSN of the Postgres WAL
 * at initial sync time is the `replicaVersion` (and starting
 * version for all initially-synced rows).
 */
export declare function initialSync(lc: LogContext, shard: ShardConfig, tx: Database, upstreamURI: string): Promise<void>;
//# sourceMappingURL=change-source.d.ts.map