import type { PeerContractManifest, PeerEndpointContract } from '../contracts/index.js';
import type { PeerEndpointInput, PeerEndpointOutput, PeerTypedEndpointId } from '../contracts/index.js';
import type { HttpTransport } from '../transport-http/index.js';
import { type ContractInvokeOptions } from '../transport-http/index.js';
export interface PeerRemoteClientInvokeOptions extends ContractInvokeOptions {
}
type RequiredKeys<T extends object> = {
    [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
}[keyof T];
type MethodArgs<TInput, TOptions> = [
    TInput
] extends [undefined] ? [input?: undefined, options?: TOptions] : TInput extends object ? [RequiredKeys<TInput>] extends [never] ? [input?: TInput, options?: TOptions] : [input: TInput, options?: TOptions] : [input: TInput, options?: TOptions];
type WithoutKeys<TInput, TKeys extends PropertyKey> = [
    TInput
] extends [undefined] ? undefined : TInput extends object ? Omit<TInput, Extract<keyof TInput, TKeys>> : TInput;
type KnownEndpointArgs<TEndpointId extends PeerTypedEndpointId> = MethodArgs<PeerEndpointInput<TEndpointId>, PeerRemoteClientInvokeOptions>;
type KnownPathEndpointArgs<TEndpointId extends PeerTypedEndpointId, TKeys extends PropertyKey> = MethodArgs<WithoutKeys<PeerEndpointInput<TEndpointId>, TKeys>, PeerRemoteClientInvokeOptions>;
export interface PeerRemoteClient {
    readonly transport: HttpTransport;
    readonly contract: PeerContractManifest;
    listEndpoints(): readonly PeerEndpointContract[];
    getEndpoint(endpointId: string): PeerEndpointContract;
    invoke<TEndpointId extends PeerTypedEndpointId>(endpointId: TEndpointId, ...args: KnownEndpointArgs<TEndpointId>): Promise<PeerEndpointOutput<TEndpointId>>;
    invoke<T = unknown>(endpointId: string, input?: Record<string, unknown>, options?: PeerRemoteClientInvokeOptions): Promise<T>;
    readonly pairing: {
        request(...args: KnownEndpointArgs<'pair.request'>): Promise<PeerEndpointOutput<'pair.request'>>;
        verify(...args: KnownEndpointArgs<'pair.verify'>): Promise<PeerEndpointOutput<'pair.verify'>>;
    };
    readonly peer: {
        heartbeat(...args: KnownEndpointArgs<'peer.heartbeat'>): Promise<PeerEndpointOutput<'peer.heartbeat'>>;
    };
    readonly work: {
        pull(...args: KnownEndpointArgs<'work.pull'>): Promise<PeerEndpointOutput<'work.pull'>>;
        complete(workId: string, ...args: KnownPathEndpointArgs<'work.complete', 'workId'>): Promise<PeerEndpointOutput<'work.complete'>>;
    };
    readonly operator: {
        snapshot(...args: KnownEndpointArgs<'operator.snapshot'>): Promise<PeerEndpointOutput<'operator.snapshot'>>;
    };
}
export declare function createPeerRemoteClient(transport: HttpTransport, contract: PeerContractManifest): PeerRemoteClient;
export {};
//# sourceMappingURL=client-core.d.ts.map