cloudflare
Version:
The official TypeScript library for the Cloudflare API
59 lines • 2.25 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as HijacksAPI from "./hijacks/hijacks.mjs";
import { BaseHijacks, Hijacks } from "./hijacks/hijacks.mjs";
import * as IPsAPI from "./ips/ips.mjs";
import { BaseIPs, IPs } from "./ips/ips.mjs";
import * as LeaksAPI from "./leaks/leaks.mjs";
import { BaseLeaks, Leaks } from "./leaks/leaks.mjs";
import * as RoutesAPI from "./routes/routes.mjs";
import { BaseRoutes, Routes, } from "./routes/routes.mjs";
import * as RPKIAPI from "./rpki/rpki.mjs";
import { BaseRPKI, RPKI } from "./rpki/rpki.mjs";
import * as TopAPI from "./top/top.mjs";
import { BaseTop, Top } from "./top/top.mjs";
export var BaseBGP = /* @__PURE__ */ (() => {
class BaseBGP extends APIResource {
/**
* Retrieves BGP updates over time. When requesting updates for an autonomous
* system, only BGP updates of type announcement are returned.
*
* @example
* ```ts
* const response = await client.radar.bgp.timeseries();
* ```
*/
timeseries(query = {}, options) {
return this._client.get('/radar/bgp/timeseries', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseBGP._key = Object.freeze(['radar', 'bgp']);
return BaseBGP;
})();
export var BGP = /* @__PURE__ */ (() => {
class BGP extends BaseBGP {
constructor() {
super(...arguments);
this.leaks = new LeaksAPI.Leaks(this._client);
this.top = new TopAPI.Top(this._client);
this.hijacks = new HijacksAPI.Hijacks(this._client);
this.routes = new RoutesAPI.Routes(this._client);
this.ips = new IPsAPI.IPs(this._client);
this.rpki = new RPKIAPI.RPKI(this._client);
}
}
BGP.Leaks = Leaks;
BGP.BaseLeaks = BaseLeaks;
BGP.Top = Top;
BGP.BaseTop = BaseTop;
BGP.Hijacks = Hijacks;
BGP.BaseHijacks = BaseHijacks;
BGP.Routes = Routes;
BGP.BaseRoutes = BaseRoutes;
BGP.IPs = IPs;
BGP.BaseIPs = BaseIPs;
BGP.RPKI = RPKI;
BGP.BaseRPKI = BaseRPKI;
return BGP;
})();
//# sourceMappingURL=bgp.mjs.map