UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

66 lines 2.33 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as EarlyHintsAPI from 'cloudflare/resources/zones/settings/early-hints'; export declare 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: EarlyHintEditParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingEarlyHints>; /** * 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: EarlyHintGetParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingEarlyHints>; } /** * 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. */ export interface ZoneSettingEarlyHints { /** * ID of the zone setting. */ id: 'early_hints'; /** * Current value of the zone setting. */ value: 'on' | 'off'; /** * Whether or not this setting can be modified for this zone (based on your * Cloudflare plan level). */ editable?: true | false; /** * last time this setting was modified. */ modified_on?: string | null; } export interface EarlyHintEditParams { /** * Path param: Identifier */ zone_id: string; /** * Body param: Value of the zone setting. */ value: 'on' | 'off'; } export interface EarlyHintGetParams { /** * Identifier */ zone_id: string; } export declare namespace EarlyHints { export import ZoneSettingEarlyHints = EarlyHintsAPI.ZoneSettingEarlyHints; export import EarlyHintEditParams = EarlyHintsAPI.EarlyHintEditParams; export import EarlyHintGetParams = EarlyHintsAPI.EarlyHintGetParams; } //# sourceMappingURL=early-hints.d.ts.map