cloudflare
Version:
The official TypeScript library for the Cloudflare API
45 lines • 1.83 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TrafficAnomalies = exports.BaseTrafficAnomalies = void 0;
const tslib_1 = require("../../../internal/tslib.js");
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const LocationsAPI = tslib_1.__importStar(require("./locations.js"));
const locations_1 = require("./locations.js");
var BaseTrafficAnomalies = /* @__PURE__ */ (() => {
class BaseTrafficAnomalies extends resource_1.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;
})();
exports.BaseTrafficAnomalies = BaseTrafficAnomalies;
var TrafficAnomalies = /* @__PURE__ */ (() => {
class TrafficAnomalies extends BaseTrafficAnomalies {
constructor() {
super(...arguments);
this.locations = new LocationsAPI.Locations(this._client);
}
}
TrafficAnomalies.Locations = locations_1.Locations;
TrafficAnomalies.BaseLocations = locations_1.BaseLocations;
return TrafficAnomalies;
})();
exports.TrafficAnomalies = TrafficAnomalies;
//# sourceMappingURL=traffic-anomalies.js.map