import { ChangeFieldType, EthereumAddress, HexString, StreamID, StreamPartID, UserID } from '@streamr/utils';
import { type StrictStreamrClientConfig } from '../Config';
import { StorageNodeRegistry } from '../contracts/StorageNodeRegistry';
import { StreamMessage } from '../protocol/StreamMessage';
import { LoggerFactory } from '../utils/LoggerFactory';
import { PushPipeline } from '../utils/PushPipeline';
import { MessagePipelineFactory } from './MessagePipelineFactory';
export interface ResendRef {
    timestamp: number | Date | string;
    sequenceNumber?: number;
}
/**
 * Resend the latest "n" messages.
 */
export interface ResendLastOptions {
    last: number;
}
/**
 * Resend messages starting from a given point in time.
 */
export interface ResendFromOptions {
    from: ResendRef;
    publisherId?: HexString;
}
/**
 * Resend messages between two points in time.
 */
export interface ResendRangeOptions {
    from: ResendRef;
    to: ResendRef;
    msgChainId?: string;
    publisherId?: HexString;
}
/**
 * The supported resend types.
 */
export type ResendOptions = ResendLastOptions | ResendFromOptions | ResendRangeOptions;
export type InternalResendOptions = ResendLastOptions | ChangeFieldType<ResendFromOptions, 'publisherId', UserID | undefined> | ChangeFieldType<ResendRangeOptions, 'publisherId', UserID | undefined>;
export type ResendType = 'last' | 'from' | 'range';
export declare const toInternalResendOptions: (options: ResendOptions) => InternalResendOptions;
export declare class Resends {
    private readonly storageNodeRegistry;
    private readonly messagePipelineFactory;
    private readonly config;
    private readonly logger;
    constructor(storageNodeRegistry: StorageNodeRegistry, messagePipelineFactory: MessagePipelineFactory, config: StrictStreamrClientConfig, loggerFactory: LoggerFactory);
    resend(streamPartId: StreamPartID, options: InternalResendOptions & {
        raw?: boolean;
    }, getStorageNodes: (streamId: StreamID) => Promise<EthereumAddress[]>, abortSignal?: AbortSignal): Promise<PushPipeline<StreamMessage, StreamMessage>>;
    private fetchStream;
}
