cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.33 kB
JavaScript
;
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 {
/**
* Delete an ASN from botnet threat feed for a given user.
*/
delete(asnID, params, options) {
const { account_id } = params;
return this._client.delete((0, path_1.path) `/accounts/${account_id}/botnet_feed/configs/asn/${asnID}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.
*/
get(params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/botnet_feed/configs/asn`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseASN._key = Object.freeze([
'botnetFeed',
'configs',
'asn',
]);
return BaseASN;
})();
exports.BaseASN = BaseASN;
class ASN extends BaseASN {
}
exports.ASN = ASN;
//# sourceMappingURL=asn.js.map