cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.5 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as LocationsAPI from "./locations.mjs";
import { BaseLocations, Locations } from "./locations.mjs";
export var BaseTrafficAnomalies = /* @__PURE__ */ (() => {
class BaseTrafficAnomalies extends APIResource {
/**
* Retrieves the latest Internet traffic anomalies, which are signals that might
* indicate an outage. These alerts are automatically detected by Radar and
* manually verified by our team.
*
* @example
* ```ts
* const trafficAnomaly =
* await client.radar.trafficAnomalies.get();
* ```
*/
get(query = {}, options) {
return this._client.get('/radar/traffic_anomalies', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseTrafficAnomalies._key = Object.freeze([
'radar',
'trafficAnomalies',
]);
return BaseTrafficAnomalies;
})();
export var TrafficAnomalies = /* @__PURE__ */ (() => {
class TrafficAnomalies extends BaseTrafficAnomalies {
constructor() {
super(...arguments);
this.locations = new LocationsAPI.Locations(this._client);
}
}
TrafficAnomalies.Locations = Locations;
TrafficAnomalies.BaseLocations = BaseLocations;
return TrafficAnomalies;
})();
//# sourceMappingURL=traffic-anomalies.mjs.map