UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkPath = exports.BaseNetworkPath = 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 BaseNetworkPath = /* @__PURE__ */ (() => { class BaseNetworkPath extends resource_1.APIResource { /** * Get a breakdown of hops and performance metrics for a specific traceroute test * run * * @example * ```ts * const networkPath = * await client.zeroTrust.dex.tracerouteTestResults.networkPath.get( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '01a7362d577a6c3019a474fd6f485823' }, * ); * ``` */ get(testResultID, params, options) { const { account_id } = params; return this._client.get((0, path_1.path) `/accounts/${account_id}/dex/traceroute-test-results/${testResultID}/network-path`, options)._thenUnwrap((obj) => obj.result); } } BaseNetworkPath._key = Object.freeze(['zeroTrust', 'dex', 'tracerouteTestResults', 'networkPath']); return BaseNetworkPath; })(); exports.BaseNetworkPath = BaseNetworkPath; class NetworkPath extends BaseNetworkPath { } exports.NetworkPath = NetworkPath; //# sourceMappingURL=network-path.js.map