UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

44 lines • 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ASN = exports.BaseASN = void 0; const tslib_1 = require("../../../internal/tslib.js"); // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const SubnetsAPI = tslib_1.__importStar(require("./subnets.js")); const subnets_1 = require("./subnets.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseASN = /* @__PURE__ */ (() => { class BaseASN extends resource_1.APIResource { /** * Gets an overview of the Autonomous System Number (ASN) and a list of subnets for * it. * * @example * ```ts * const asn = await client.intel.asn.get(0, { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(asn, params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/intel/asn/${asn}`, options)._thenUnwrap((obj) => obj.result); } } BaseASN._key = Object.freeze(['intel', 'asn']); return BaseASN; })(); exports.BaseASN = BaseASN; var ASN = /* @__PURE__ */ (() => { class ASN extends BaseASN { constructor() { super(...arguments); this.subnets = new SubnetsAPI.Subnets(this._client); } } ASN.Subnets = subnets_1.Subnets; ASN.BaseSubnets = subnets_1.BaseSubnets; return ASN; })(); exports.ASN = ASN; //# sourceMappingURL=asn.js.map