UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Connections = exports.BaseConnections = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const pagination_1 = require("../../../../core/pagination.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseConnections = /* @__PURE__ */ (() => { class BaseConnections extends resource_1.APIResource { /** * Fetches connection details for a WARP Connector Tunnel. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const connectionGetResponse of client.zeroTrust.tunnels.warpConnector.connections.get( * 'f70ff985-a4ef-4643-bbbc-4a0ed4fc8415', * { account_id: '699d98642c564d2e855e9661899b7252' }, * )) { * // ... * } * ``` */ get(tunnelID, params, options) { const { account_id } = params; return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/warp_connector/${tunnelID}/connections`, (pagination_1.SinglePage), options); } } BaseConnections._key = Object.freeze(['zeroTrust', 'tunnels', 'warpConnector', 'connections']); return BaseConnections; })(); exports.BaseConnections = BaseConnections; class Connections extends BaseConnections { } exports.Connections = Connections; //# sourceMappingURL=connections.js.map