UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.47 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { SinglePage } from "../../core/pagination.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BasePrioritize = /* @__PURE__ */ (() => { class BasePrioritize extends APIResource { /** * If a zone has multiple SSL certificates, you can set the order in which they * should be used during a request. The higher priority will break ties across * overlapping 'legacy_custom' certificates. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const customCertificate of client.customCertificates.prioritize.update( * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * certificates: [{}, {}], * }, * )) { * // ... * } * ``` */ update(params, options) { const { zone_id, ...body } = params; return this._client.getAPIList(path `/zones/${zone_id}/custom_certificates/prioritize`, (SinglePage), { body, method: 'put', ...options }); } } BasePrioritize._key = Object.freeze([ 'customCertificates', 'prioritize', ]); return BasePrioritize; })(); export class Prioritize extends BasePrioritize { } //# sourceMappingURL=prioritize.mjs.map