export interface RoadrunnerConfig {
    baseUrl: string;
    keyId: string;
    secret: string;
    webhookSecret?: string;
    pickupAddress?: string;
    pickupLocationId?: string;
    depotLat?: number;
    depotLng?: number;
    maxRadiusKm?: number;
}
export interface RoadrunnerMoney {
    amount: number;
    currency: string;
}
export interface RoadrunnerQuote {
    id: string;
    serviceable: boolean;
    pricing_mode: string;
    distance_metres: number | null;
    delivery_fee: RoadrunnerMoney;
    fee_reason: string;
    expires_at: string;
}
export interface RoadrunnerDelivery {
    id: string;
    client_reference: string;
    status: string;
    test_mode: boolean;
    tracking_url: string;
    courier: {
        name: string | null;
        phone: string | null;
    } | null;
    eta: string | null;
    pricing: {
        subtotal: RoadrunnerMoney | null;
        delivery_fee: RoadrunnerMoney | null;
        tax: RoadrunnerMoney | null;
        total: RoadrunnerMoney | null;
    };
    hold: {
        reasons: string[];
        message: string | null;
        since: string | null;
    } | null;
    created_at: string | null;
    updated_at: string | null;
    dispatched_at: string | null;
    delivered_at: string | null;
    cancelled_at: string | null;
    cancellation_reason: string | null;
}
export interface RoadrunnerEvent {
    id: string;
    type: string;
    status: string;
    occurred_at: string;
    source: string;
    data: Record<string, unknown> | null;
}
export declare class RoadrunnerError extends Error {
    readonly status: number;
    readonly type: string;
    readonly code: string;
    readonly requestId?: string | undefined;
    constructor(status: number, type: string, code: string, message: string, requestId?: string | undefined);
}
export declare class RoadrunnerClient {
    private readonly logger;
    ping(cfg: RoadrunnerConfig): Promise<{
        ok: boolean;
        client: string;
        scopes: string[] | string;
        test_mode: boolean | string;
        server_time: string;
    }>;
    createQuote(cfg: RoadrunnerConfig, body: Record<string, unknown>): Promise<RoadrunnerQuote>;
    createDelivery(cfg: RoadrunnerConfig, body: Record<string, unknown>, idempotencyKey: string): Promise<RoadrunnerDelivery>;
    getDelivery(cfg: RoadrunnerConfig, id: string): Promise<RoadrunnerDelivery>;
    getEvents(cfg: RoadrunnerConfig, id: string): Promise<{
        data: RoadrunnerEvent[];
        has_more: boolean;
    }>;
    cancelDelivery(cfg: RoadrunnerConfig, id: string, reason: string, note?: string): Promise<RoadrunnerDelivery>;
    listPickupLocations(cfg: RoadrunnerConfig): Promise<{
        data: any;
    }>;
    verifyWebhook(secret: string, timestamp: string, signatureHeader: string, rawBody: Buffer | string): boolean;
    private request;
}
