cloudflare
Version:
The official TypeScript library for the Cloudflare API
263 lines • 7.73 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseASPA extends APIResource {
static readonly _key: readonly ['radar', 'bgp', 'rpki', 'aspa'];
/**
* Retrieves ASPA (Autonomous System Provider Authorization) changes over time.
* Returns daily aggregated changes including additions, removals, and
* modifications of ASPA objects.
*
* @example
* ```ts
* const response = await client.radar.bgp.rpki.aspa.changes();
* ```
*/
changes(query?: ASPAChangesParams | null | undefined, options?: RequestOptions): APIPromise<ASPAChangesResponse>;
/**
* Retrieves current or historical ASPA (Autonomous System Provider Authorization)
* objects. ASPA objects define which ASNs are authorized upstream providers for a
* customer ASN.
*
* @example
* ```ts
* const response =
* await client.radar.bgp.rpki.aspa.snapshot();
* ```
*/
snapshot(query?: ASPASnapshotParams | null | undefined, options?: RequestOptions): APIPromise<ASPASnapshotResponse>;
/**
* Retrieves ASPA (Autonomous System Provider Authorization) object count over
* time. Supports filtering by RIR or location (country code) to generate multiple
* named series. If no RIR or location filter is specified, returns total count.
*
* @example
* ```ts
* const response =
* await client.radar.bgp.rpki.aspa.timeseries();
* ```
*/
timeseries(query?: ASPATimeseriesParams | null | undefined, options?: RequestOptions): APIPromise<ASPATimeseriesResponse>;
}
export declare class ASPA extends BaseASPA {
}
export interface ASPAChangesResponse {
asnInfo: ASPAChangesResponse.ASNInfo;
changes: Array<ASPAChangesResponse.Change>;
meta: ASPAChangesResponse.Meta;
}
export declare namespace ASPAChangesResponse {
interface ASNInfo {
'13335': ASNInfo._13335;
}
namespace ASNInfo {
interface _13335 {
/**
* ASN number.
*/
asn: number;
/**
* Alpha-2 country code.
*/
country: string;
/**
* AS name.
*/
name: string;
}
}
interface Change {
/**
* Number of new ASPA objects created.
*/
customersAdded: number;
/**
* Number of ASPA objects deleted.
*/
customersRemoved: number;
/**
* Date of the changes in ISO 8601 format.
*/
date: string;
entries: Array<Change.Entry>;
/**
* Number of providers added to existing objects.
*/
providersAdded: number;
/**
* Number of providers removed from existing objects.
*/
providersRemoved: number;
/**
* Running total of active ASPA objects after this day.
*/
totalCount: number;
}
namespace Change {
interface Entry {
/**
* The customer ASN affected.
*/
customerAsn: number;
providers: Array<number>;
type: 'CustomerAdded' | 'CustomerRemoved' | 'ProvidersAdded' | 'ProvidersRemoved';
}
}
interface Meta {
/**
* Timestamp of the underlying data.
*/
dataTime: string;
/**
* Timestamp when the query was executed.
*/
queryTime: string;
}
}
export interface ASPASnapshotResponse {
asnInfo: ASPASnapshotResponse.ASNInfo;
aspaObjects: Array<ASPASnapshotResponse.ASPAObject>;
meta: ASPASnapshotResponse.Meta;
}
export declare namespace ASPASnapshotResponse {
interface ASNInfo {
'13335': ASNInfo._13335;
}
namespace ASNInfo {
interface _13335 {
/**
* ASN number.
*/
asn: number;
/**
* Alpha-2 country code.
*/
country: string;
/**
* AS name.
*/
name: string;
}
}
interface ASPAObject {
/**
* The customer ASN publishing the ASPA object.
*/
customerAsn: number;
providers: Array<number>;
}
interface Meta {
/**
* Timestamp of the underlying data.
*/
dataTime: string;
/**
* Timestamp when the query was executed.
*/
queryTime: string;
/**
* Total number of ASPA objects.
*/
totalCount: number;
}
}
export interface ASPATimeseriesResponse {
meta: ASPATimeseriesResponse.Meta;
serie_0: ASPATimeseriesResponse.Serie0;
}
export declare namespace ASPATimeseriesResponse {
interface Meta {
/**
* Timestamp of the underlying data.
*/
dataTime: string;
/**
* Timestamp when the query was executed.
*/
queryTime: string;
}
interface Serie0 {
timestamps: Array<string>;
values: Array<string>;
}
}
export interface ASPAChangesParams {
/**
* Filter changes involving this ASN (as customer or provider).
*/
asn?: number;
/**
* 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';
/**
* Include ASN metadata (name, country) in response.
*/
includeAsnInfo?: boolean;
}
export interface ASPASnapshotParams {
/**
* Filter by customer ASN (the ASN publishing the ASPA object).
*/
customerAsn?: number;
/**
* Filters results by the specified datetime (ISO 8601).
*/
date?: string;
/**
* Format in which results will be returned.
*/
format?: 'JSON' | 'CSV';
/**
* Include ASN metadata (name, country) in response.
*/
includeAsnInfo?: boolean;
/**
* Filter by provider ASN (an authorized upstream provider in ASPA objects).
*/
providerAsn?: number;
}
export interface ASPATimeseriesParams {
/**
* 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';
/**
* Filters results by location. Specify a comma-separated list of alpha-2 location
* codes.
*/
location?: Array<string>;
/**
* Array of names used to label the series in the response.
*/
name?: Array<string>;
/**
* Filter by Regional Internet Registry (RIR). Multiple RIRs generate multiple
* series.
*/
rir?: Array<'RIPE_NCC' | 'ARIN' | 'APNIC' | 'LACNIC' | 'AFRINIC'>;
}
export declare namespace ASPA {
export { type ASPAChangesResponse as ASPAChangesResponse, type ASPASnapshotResponse as ASPASnapshotResponse, type ASPATimeseriesResponse as ASPATimeseriesResponse, type ASPAChangesParams as ASPAChangesParams, type ASPASnapshotParams as ASPASnapshotParams, type ASPATimeseriesParams as ASPATimeseriesParams, };
}
//# sourceMappingURL=aspa.d.ts.map