UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

50 lines • 1.65 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseSession = /* @__PURE__ */ (() => { class BaseSession extends APIResource { /** * List active browser sessions. * * @example * ```ts * const sessions = * await client.browserRendering.devtools.session.list({ * account_id: 'account_id', * }); * ``` */ list(params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/browser-rendering/devtools/session`, { query, ...options, }); } /** * Get details for a specific browser session. * * @example * ```ts * const session = * await client.browserRendering.devtools.session.get( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * { account_id: 'account_id' }, * ); * ``` */ get(sessionID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/browser-rendering/devtools/session/${sessionID}`, options); } } BaseSession._key = Object.freeze([ 'browserRendering', 'devtools', 'session', ]); return BaseSession; })(); export class Session extends BaseSession { } //# sourceMappingURL=session.mjs.map