UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

45 lines • 1.71 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../../core/resource.mjs"; export var BaseLocations = /* @__PURE__ */ (() => { class BaseLocations extends 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; })(); export class Locations extends BaseLocations { } //# sourceMappingURL=locations.mjs.map