UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

40 lines • 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ASN = exports.BaseASN = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const path_1 = require("../../internal/utils/path.js"); var BaseASN = /* @__PURE__ */ (() => { class BaseASN extends resource_1.APIResource { /** * Gets all the data the botnet tracking database has for a given ASN registered to * user account for given date. If no date is given, it will return results for the * previous day. */ dayReport(asnID, params, options) { const { account_id, ...query } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/botnet_feed/asn/${asnID}/day_report`, { query, ...options, })._thenUnwrap((obj) => obj.result); } /** * Gets all the data the botnet threat feed tracking database has for a given ASN * registered to user account. */ fullReport(asnID, params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/botnet_feed/asn/${asnID}/full_report`, options)._thenUnwrap((obj) => obj.result); } } BaseASN._key = Object.freeze([ 'botnetFeed', 'asn', ]); return BaseASN; })(); exports.BaseASN = BaseASN; class ASN extends BaseASN { } exports.ASN = ASN; //# sourceMappingURL=asn.js.map