UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

25 lines 1.03 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; export class Connections extends APIResource { /** * Removes connections that are in a disconnected or pending reconnect state. We * recommend running this command after shutting down a tunnel. */ delete(tunnelId, params, options) { const { account_id, body } = params; return this._client.delete(`/accounts/${account_id}/tunnels/${tunnelId}/connections`, { body: body, ...options, })._thenUnwrap((obj) => obj.result); } /** * Fetches connection details for a Cloudflare Tunnel. */ get(tunnelId, params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/cfd_tunnel/${tunnelId}/connections`, options)._thenUnwrap((obj) => obj.result); } } (function (Connections) { })(Connections || (Connections = {})); //# sourceMappingURL=connections.mjs.map