import { APIResource } from "../../../../core/resource.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseUpstreams extends APIResource {
    static readonly _key: readonly ['radar', 'bgp', 'routes', 'upstreams'];
    /**
     * Retrieves the share of an AS’s observed paths carried by each direct upstream
     * over time, derived from RouteViews RIB snapshots across all collectors (the
     * combined product). Each upstream ASN is returned as its own series of shares
     * (0–1); the least-significant upstreams beyond the requested limit are grouped
     * into an "OTHER" series. Series share a common set of timestamps.
     *
     * @example
     * ```ts
     * const response =
     *   await client.radar.bgp.routes.upstreams.timeseries(174);
     * ```
     */
    timeseries(asn: number, query?: UpstreamTimeseriesParams | null | undefined, options?: RequestOptions): APIPromise<UpstreamTimeseriesResponse>;
}
export declare class Upstreams extends BaseUpstreams {
}
export interface UpstreamTimeseriesResponse {
    meta: UpstreamTimeseriesResponse.Meta;
    serie_0: UpstreamTimeseriesResponse.Serie0;
}
export declare namespace UpstreamTimeseriesResponse {
    interface Meta {
        /**
         * Timestamp of the underlying RIB data.
         */
        dataTime: string | null;
        effectiveCollector: string | null;
        /**
         * Timestamp when the query was executed.
         */
        queryTime: string | null;
        stale: boolean;
    }
    interface Serie0 {
        timestamps: Array<string>;
        [k: string]: Array<string> | Array<string> | undefined;
    }
}
export interface UpstreamTimeseriesParams {
    /**
     * End of the date range (inclusive). Alternative to `dateRange`; provide together
     * with `dateStart`.
     */
    dateEnd?: string;
    /**
     * Start of the date range (inclusive). Alternative to `dateRange`; provide
     * together with `dateEnd`.
     */
    dateStart?: string;
    /**
     * Format in which results will be returned.
     */
    format?: 'JSON' | 'CSV';
    /**
     * Address family of the observed paths. Defaults to IPv4.
     */
    ipVersion?: 'IPv4' | 'IPv6';
    /**
     * Number of upstream ASNs to return as separate series, ranked by the first
     * bucket. Remaining upstreams are grouped into an "OTHER" series. Defaults to 5.
     */
    limit?: number;
}
export declare namespace Upstreams {
    export { type UpstreamTimeseriesResponse as UpstreamTimeseriesResponse, type UpstreamTimeseriesParams as UpstreamTimeseriesParams, };
}
//# sourceMappingURL=upstreams.d.ts.map