UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

41 lines • 1.38 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 origin locations of layer 3 attacks. * * @example * ```ts * const response = * await client.radar.attacks.layer3.top.locations.origin(); * ``` */ origin(query = {}, options) { return this._client.get('/radar/attacks/layer3/top/locations/origin', { query, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves the target locations of layer 3 attacks. * * @example * ```ts * const response = * await client.radar.attacks.layer3.top.locations.target(); * ``` */ target(query = {}, options) { return this._client.get('/radar/attacks/layer3/top/locations/target', { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseLocations._key = Object.freeze([ 'radar', 'attacks', 'layer3', 'top', 'locations', ]); return BaseLocations; })(); export class Locations extends BaseLocations { } //# sourceMappingURL=locations.mjs.map