cloudflare
Version:
The official TypeScript library for the Cloudflare API
50 lines • 1.9 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Locations = exports.BaseLocations = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../../../core/resource.js");
var BaseLocations = /* @__PURE__ */ (() => {
class BaseLocations extends resource_1.APIResource {
/**
* Retrieves the top origin locations of layer 7 attacks. Values are percentages of
* the total layer 7 attacks, with the origin location determined by the client IP
* address.
*
* @example
* ```ts
* const response =
* await client.radar.attacks.layer7.top.locations.origin();
* ```
*/
origin(query = {}, options) {
return this._client.get('/radar/attacks/layer7/top/locations/origin', { query, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Retrieves the top target locations of and by layer 7 attacks. Values are a
* percentage out of the total layer 7 attacks. The target location is determined
* by the attacked zone's billing country, when available.
*
* @example
* ```ts
* const response =
* await client.radar.attacks.layer7.top.locations.target();
* ```
*/
target(query = {}, options) {
return this._client.get('/radar/attacks/layer7/top/locations/target', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseLocations._key = Object.freeze([
'radar',
'attacks',
'layer7',
'top',
'locations',
]);
return BaseLocations;
})();
exports.BaseLocations = BaseLocations;
class Locations extends BaseLocations {
}
exports.Locations = Locations;
//# sourceMappingURL=locations.js.map