// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as EarlyHintsAPI from 'cloudflaredev/resources/zones/settings/early-hints';
export class EarlyHints extends APIResource {
    /**
     * When enabled, Cloudflare will attempt to speed up overall page loads by serving
     * `103` responses with `Link` headers from the final response. Refer to
     * [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for
     * more information.
     */
    edit(params, options) {
        const { zone_id, ...body } = params;
        return this._client.patch(`/zones/${zone_id}/settings/early_hints`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * When enabled, Cloudflare will attempt to speed up overall page loads by serving
     * `103` responses with `Link` headers from the final response. Refer to
     * [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for
     * more information.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/settings/early_hints`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (EarlyHints) {
    EarlyHints.EarlyHints = EarlyHintsAPI.EarlyHints;
})(EarlyHints || (EarlyHints = {}));
//# sourceMappingURL=early-hints.mjs.map