UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

29 lines • 1.04 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 BasePublish = /* @__PURE__ */ (() => { class BasePublish extends APIResource { /** * Publish current Zaraz preview configuration for a zone. * * @example * ```ts * const publish = await client.zaraz.publish.create({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ create(params, options) { const { zone_id, body } = params; return this._client.post(path `/zones/${zone_id}/settings/zaraz/publish`, { body: body, ...options, })._thenUnwrap((obj) => obj.result); } } BasePublish._key = Object.freeze(['zaraz', 'publish']); return BasePublish; })(); export class Publish extends BasePublish { } //# sourceMappingURL=publish.mjs.map