UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

35 lines • 1.28 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 BaseContent = /* @__PURE__ */ (() => { class BaseContent extends APIResource { /** * Returns the SQL query content for a transformer. Without query params, returns * the latest version. With `version_id`, returns the specified version. * * @example * ```ts * const content = * await client.logpush.transformers.content.get(42, { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(transformerID, params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/logpush/transformers/${transformerID}/content`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseContent._key = Object.freeze([ 'logpush', 'transformers', 'content', ]); return BaseContent; })(); export class Content extends BaseContent { } //# sourceMappingURL=content.mjs.map