UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

30 lines • 1.07 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 BaseSchemas = /* @__PURE__ */ (() => { class BaseSchemas extends APIResource { /** * Returns tracked web and API operations and their feature configuration rendered * as OpenAPI schemas. * * @example * ```ts * const schemas = await client.apiGateway.schemas.list({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ list(params, options) { const { zone_id, ...query } = params; return this._client.get(path `/zones/${zone_id}/api_gateway/schemas`, { query, ...options })._thenUnwrap((obj) => obj.result); } } BaseSchemas._key = Object.freeze([ 'apiGateway', 'schemas', ]); return BaseSchemas; })(); export class Schemas extends BaseSchemas { } //# sourceMappingURL=schemas.mjs.map