From d187a0f433606911e0166ebdff9d8a6258fc315d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 20:14:33 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#1103) --- .stats.yml | 2 +- api.md | 373 +-- src/resources/zones/index.ts | 59 +- src/resources/zones/settings.ts | 2232 +++++++++++++++++ src/resources/zones/settings/advanced-ddos.ts | 38 - src/resources/zones/settings/always-online.ts | 40 - .../zones/settings/always-use-https.ts | 38 - .../settings/automatic-https-rewrites.ts | 36 - .../automatic-platform-optimization.ts | 47 - src/resources/zones/settings/brotli.ts | 37 - .../zones/settings/browser-cache-ttl.ts | 67 - src/resources/zones/settings/browser-check.ts | 40 - src/resources/zones/settings/cache-level.ts | 40 - src/resources/zones/settings/challenge-ttl.ts | 54 - src/resources/zones/settings/ciphers.ts | 37 - .../zones/settings/development-mode.ts | 48 - src/resources/zones/settings/early-hints.ts | 39 - .../zones/settings/email-obfuscation.ts | 37 - src/resources/zones/settings/font-settings.ts | 88 - .../zones/settings/h2-prioritization.ts | 38 - .../zones/settings/hotlink-protection.ts | 42 - src/resources/zones/settings/http2.ts | 36 - src/resources/zones/settings/http3.ts | 36 - .../zones/settings/image-resizing.ts | 39 - src/resources/zones/settings/index.ts | 64 - .../zones/settings/ip-geolocation.ts | 38 - src/resources/zones/settings/ipv6.ts | 37 - .../zones/settings/min-tls-version.ts | 38 - src/resources/zones/settings/minify.ts | 60 - src/resources/zones/settings/mirage.ts | 39 - .../zones/settings/mobile-redirect.ts | 65 - src/resources/zones/settings/nel.ts | 45 - .../settings/opportunistic-encryption.ts | 36 - .../zones/settings/opportunistic-onion.ts | 37 - .../zones/settings/orange-to-orange.ts | 37 - .../settings/origin-error-page-pass-thru.ts | 38 - .../zones/settings/origin-max-http-version.ts | 130 - src/resources/zones/settings/polish.ts | 41 - .../zones/settings/prefetch-preload.ts | 37 - .../zones/settings/proxy-read-timeout.ts | 36 - src/resources/zones/settings/pseudo-ipv4.ts | 36 - .../zones/settings/response-buffering.ts | 39 - src/resources/zones/settings/rocket-loader.ts | 45 - .../zones/settings/security-headers.ts | 75 - .../zones/settings/security-level.ts | 39 - .../zones/settings/server-side-excludes.ts | 46 - src/resources/zones/settings/settings.ts | 245 -- .../settings/sort-query-string-for-cache.ts | 38 - .../zones/settings/ssl-recommender.ts | 27 - src/resources/zones/settings/ssl.ts | 51 - src/resources/zones/settings/tls-1-3.ts | 36 - .../zones/settings/tls-client-auth.ts | 37 - .../zones/settings/true-client-ip-header.ts | 37 - src/resources/zones/settings/waf.ts | 45 - src/resources/zones/settings/webp.ts | 38 - src/resources/zones/settings/websocket.ts | 42 - src/resources/zones/settings/zero-rtt.ts | 36 - src/resources/zones/zones.ts | 57 +- ...font-settings.test.ts => settings.test.ts} | 12 +- .../settings/origin-max-http-version.test.ts | 52 - 60 files changed, 2410 insertions(+), 2944 deletions(-) create mode 100644 src/resources/zones/settings.ts delete mode 100644 src/resources/zones/settings/advanced-ddos.ts delete mode 100644 src/resources/zones/settings/always-online.ts delete mode 100644 src/resources/zones/settings/always-use-https.ts delete mode 100644 src/resources/zones/settings/automatic-https-rewrites.ts delete mode 100644 src/resources/zones/settings/automatic-platform-optimization.ts delete mode 100644 src/resources/zones/settings/brotli.ts delete mode 100644 src/resources/zones/settings/browser-cache-ttl.ts delete mode 100644 src/resources/zones/settings/browser-check.ts delete mode 100644 src/resources/zones/settings/cache-level.ts delete mode 100644 src/resources/zones/settings/challenge-ttl.ts delete mode 100644 src/resources/zones/settings/ciphers.ts delete mode 100644 src/resources/zones/settings/development-mode.ts delete mode 100644 src/resources/zones/settings/early-hints.ts delete mode 100644 src/resources/zones/settings/email-obfuscation.ts delete mode 100644 src/resources/zones/settings/font-settings.ts delete mode 100644 src/resources/zones/settings/h2-prioritization.ts delete mode 100644 src/resources/zones/settings/hotlink-protection.ts delete mode 100644 src/resources/zones/settings/http2.ts delete mode 100644 src/resources/zones/settings/http3.ts delete mode 100644 src/resources/zones/settings/image-resizing.ts delete mode 100644 src/resources/zones/settings/index.ts delete mode 100644 src/resources/zones/settings/ip-geolocation.ts delete mode 100644 src/resources/zones/settings/ipv6.ts delete mode 100644 src/resources/zones/settings/min-tls-version.ts delete mode 100644 src/resources/zones/settings/minify.ts delete mode 100644 src/resources/zones/settings/mirage.ts delete mode 100644 src/resources/zones/settings/mobile-redirect.ts delete mode 100644 src/resources/zones/settings/nel.ts delete mode 100644 src/resources/zones/settings/opportunistic-encryption.ts delete mode 100644 src/resources/zones/settings/opportunistic-onion.ts delete mode 100644 src/resources/zones/settings/orange-to-orange.ts delete mode 100644 src/resources/zones/settings/origin-error-page-pass-thru.ts delete mode 100644 src/resources/zones/settings/origin-max-http-version.ts delete mode 100644 src/resources/zones/settings/polish.ts delete mode 100644 src/resources/zones/settings/prefetch-preload.ts delete mode 100644 src/resources/zones/settings/proxy-read-timeout.ts delete mode 100644 src/resources/zones/settings/pseudo-ipv4.ts delete mode 100644 src/resources/zones/settings/response-buffering.ts delete mode 100644 src/resources/zones/settings/rocket-loader.ts delete mode 100644 src/resources/zones/settings/security-headers.ts delete mode 100644 src/resources/zones/settings/security-level.ts delete mode 100644 src/resources/zones/settings/server-side-excludes.ts delete mode 100644 src/resources/zones/settings/settings.ts delete mode 100644 src/resources/zones/settings/sort-query-string-for-cache.ts delete mode 100644 src/resources/zones/settings/ssl-recommender.ts delete mode 100644 src/resources/zones/settings/ssl.ts delete mode 100644 src/resources/zones/settings/tls-1-3.ts delete mode 100644 src/resources/zones/settings/tls-client-auth.ts delete mode 100644 src/resources/zones/settings/true-client-ip-header.ts delete mode 100644 src/resources/zones/settings/waf.ts delete mode 100644 src/resources/zones/settings/webp.ts delete mode 100644 src/resources/zones/settings/websocket.ts delete mode 100644 src/resources/zones/settings/zero-rtt.ts rename tests/api-resources/zones/{settings/font-settings.test.ts => settings.test.ts} (81%) delete mode 100644 tests/api-resources/zones/settings/origin-max-http-version.test.ts diff --git a/.stats.yml b/.stats.yml index 12e2b6fafa..c6fd4e3d54 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1256 +configured_endpoints: 1254 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4b5d09861a06c00be9bfe41e442a9ed48d4e0dca267ed70d7677ef78159ab997.yml diff --git a/api.md b/api.md index 18bc83b082..7e6935669c 100644 --- a/api.md +++ b/api.md @@ -268,323 +268,66 @@ Methods: ## Settings -### ZeroRTT - -Types: - -- ZeroRTT - -### AdvancedDDoS - -Types: - -- AdvancedDDoS - -### AlwaysOnline - -Types: - -- AlwaysOnline - -### AlwaysUseHTTPS - -Types: - -- AlwaysUseHTTPS - -### AutomaticHTTPSRewrites - -Types: - -- AutomaticHTTPSRewrites - -### AutomaticPlatformOptimization - -Types: - -- AutomaticPlatformOptimization - -### Brotli - -Types: - -- Brotli - -### BrowserCacheTTL - -Types: - -- BrowserCacheTTL - -### BrowserCheck - -Types: - -- BrowserCheck - -### CacheLevel - -Types: - -- CacheLevel - -### ChallengeTTL - -Types: - -- ChallengeTTL - -### Ciphers - -Types: - -- Ciphers - -### DevelopmentMode - -Types: - -- DevelopmentMode - -### EarlyHints - -Types: - -- EarlyHints - -### EmailObfuscation - -Types: - -- EmailObfuscation - -### H2Prioritization - -Types: - -- H2Prioritization - -### HotlinkProtection - -Types: - -- HotlinkProtection - -### HTTP2 - -Types: - -- HTTP2 - -### HTTP3 - -Types: - -- HTTP3 - -### ImageResizing - -Types: - -- ImageResizing - -### IPGeolocation - -Types: - -- IPGeolocation - -### IPV6 - -Types: - -- IPV6 - -### MinTLSVersion - -Types: - -- MinTLSVersion - -### Minify - Types: -- Minify - -### Mirage - -Types: - -- Mirage - -### MobileRedirect - -Types: - -- MobileRedirect - -### NEL - -Types: - -- NEL - -### OpportunisticEncryption - -Types: - -- OpportunisticEncryption - -### OpportunisticOnion - -Types: - -- OpportunisticOnion - -### OrangeToOrange - -Types: - -- OrangeToOrange - -### OriginErrorPagePassThru - -Types: - -- OriginErrorPagePassThru - -### OriginMaxHTTPVersion - -Types: - -- OriginMaxHTTPVersion -- OriginMaxHTTPVersionEditResponse -- OriginMaxHTTPVersionGetResponse - -Methods: - -- client.zones.settings.originMaxHTTPVersion.edit({ ...params }) -> OriginMaxHTTPVersionEditResponse -- client.zones.settings.originMaxHTTPVersion.get({ ...params }) -> OriginMaxHTTPVersionGetResponse - -### Polish - -Types: - -- Polish - -### PrefetchPreload - -Types: - -- PrefetchPreload - -### ProxyReadTimeout - -Types: - -- ProxyReadTimeout - -### PseudoIPV4 - -Types: - -- PseudoIPV4 - -### ResponseBuffering - -Types: - -- ResponseBuffering - -### RocketLoader - -Types: - -- RocketLoader - -### SecurityHeaders - -Types: - -- SecurityHeaders - -### SecurityLevel - -Types: - -- SecurityLevel - -### ServerSideExcludes - -Types: - -- ServerSideExcludes - -### SortQueryStringForCache - -Types: - -- SortQueryStringForCache - -### SSL - -Types: - -- SSL - -### SSLRecommender - -Types: - -- SSLRecommender - -### TLS1_3 - -Types: - -- TLS1_3 - -### TLSClientAuth - -Types: - -- TLSClientAuth - -### TrueClientIPHeader - -Types: - -- TrueClientIPHeader - -### WAF - -Types: - -- WAF - -### WebP - -Types: - -- WebP - -### Websocket - -Types: - -- Websocket - -### FontSettings - -Types: - -- FontSettings - -Methods: - -- client.zones.settings.fontSettings.edit({ ...params }) -> FontSettings -- client.zones.settings.fontSettings.get({ ...params }) -> FontSettings +- AdvancedDDoS +- AlwaysOnline +- AlwaysUseHTTPS +- AutomaticHTTPSRewrites +- AutomaticPlatformOptimization +- Brotli +- BrowserCacheTTL +- BrowserCheck +- CacheLevel +- ChallengeTTL +- Ciphers +- DevelopmentMode +- EarlyHints +- EmailObfuscation +- FontSettings +- H2Prioritization +- HotlinkProtection +- HTTP2 +- HTTP3 +- ImageResizing +- IPGeolocation +- IPV6 +- MinTLSVersion +- Minify +- Mirage +- MobileRedirect +- NEL +- OpportunisticEncryption +- OpportunisticOnion +- OrangeToOrange +- OriginErrorPagePassThru +- OriginMaxHTTPVersion +- Polish +- PrefetchPreload +- ProxyReadTimeout +- PseudoIPV4 +- ResponseBuffering +- RocketLoader +- SecurityHeaders +- SecurityLevel +- ServerSideExcludes +- SortQueryStringForCache +- SSL +- SSLRecommender +- TLS1_3 +- TLSClientAuth +- TrueClientIPHeader +- WAF +- WebP +- Websocket +- ZeroRTT +- SettingEditResponse +- SettingGetResponse + +Methods: + +- client.zones.settings.edit(settingId, { ...params }) -> SettingEditResponse +- client.zones.settings.get(settingId, { ...params }) -> SettingGetResponse ## CustomNameservers diff --git a/src/resources/zones/index.ts b/src/resources/zones/index.ts index 8a628468f2..ad23faf4e1 100644 --- a/src/resources/zones/index.ts +++ b/src/resources/zones/index.ts @@ -5,6 +5,64 @@ export { ActivationCheckTriggerParams, ActivationCheck, } from './activation-check'; +export { + AdvancedDDoS, + AlwaysOnline, + AlwaysUseHTTPS, + AutomaticHTTPSRewrites, + AutomaticPlatformOptimization, + Brotli, + BrowserCacheTTL, + BrowserCheck, + CacheLevel, + ChallengeTTL, + Ciphers, + DevelopmentMode, + EarlyHints, + EmailObfuscation, + FontSettings, + H2Prioritization, + HotlinkProtection, + HTTP2, + HTTP3, + ImageResizing, + IPGeolocation, + IPV6, + MinTLSVersion, + Minify, + Mirage, + MobileRedirect, + NEL, + OpportunisticEncryption, + OpportunisticOnion, + OrangeToOrange, + OriginErrorPagePassThru, + OriginMaxHTTPVersion, + Polish, + PrefetchPreload, + ProxyReadTimeout, + PseudoIPV4, + ResponseBuffering, + RocketLoader, + SecurityHeaders, + SecurityLevel, + ServerSideExcludes, + SortQueryStringForCache, + SSL, + SSLRecommender, + TLS1_3, + TLSClientAuth, + TrueClientIPHeader, + WAF, + WebP, + Websocket, + ZeroRTT, + SettingEditResponse, + SettingGetResponse, + SettingEditParams, + SettingGetParams, + Settings, +} from './settings'; export { CustomNameserverUpdateResponse, CustomNameserverGetResponse, @@ -12,7 +70,6 @@ export { CustomNameserverGetParams, CustomNameservers, } from './custom-nameservers'; -export { Settings } from './settings/index'; export { SubscriptionCreateResponse, SubscriptionGetResponse, diff --git a/src/resources/zones/settings.ts b/src/resources/zones/settings.ts new file mode 100644 index 0000000000..5495c197ce --- /dev/null +++ b/src/resources/zones/settings.ts @@ -0,0 +1,2232 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import * as SettingsAPI from './settings'; + +export class Settings extends APIResource { + /** + * Updates a single zone setting by the identifier + */ + edit( + settingId: string, + params: SettingEditParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.patch(`/zones/${zone_id}/settings/${settingId}`, options) as Core.APIPromise<{ + result: SettingEditResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Fetch a single zone setting by name + */ + get( + settingId: string, + params: SettingGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get(`/zones/${zone_id}/settings/${settingId}`, options) as Core.APIPromise<{ + result: SettingGetResponse; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +/** + * Advanced protection from Distributed Denial of Service (DDoS) attacks on your + * website. This is an uneditable value that is 'on' in the case of Business and + * Enterprise zones. + */ +export interface AdvancedDDoS { + /** + * ID of the zone setting. + */ + id: 'advanced_ddos'; + + /** + * 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; +} + +/** + * When enabled, Cloudflare serves limited copies of web pages available from the + * [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is + * offline. Refer to + * [Always Online](https://developers.cloudflare.com/cache/about/always-online) for + * more information. + */ +export interface AlwaysOnline { + /** + * ID of the zone setting. + */ + id: 'always_online'; + + /** + * 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; +} + +/** + * Reply to all requests for URLs that use "http" with a 301 redirect to the + * equivalent "https" URL. If you only want to redirect for a subset of requests, + * consider creating an "Always use HTTPS" page rule. + */ +export interface AlwaysUseHTTPS { + /** + * ID of the zone setting. + */ + id: 'always_use_https'; + + /** + * 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; +} + +/** + * Enable the Automatic HTTPS Rewrites feature for this zone. + */ +export interface AutomaticHTTPSRewrites { + /** + * ID of the zone setting. + */ + id: 'automatic_https_rewrites'; + + /** + * 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 AutomaticPlatformOptimization { + /** + * Indicates whether or not + * [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) + * is enabled. + */ + cache_by_device_type: boolean; + + /** + * Indicates whether or not Cloudflare proxy is enabled. + */ + cf: boolean; + + /** + * Indicates whether or not Automatic Platform Optimization is enabled. + */ + enabled: boolean; + + /** + * An array of hostnames where Automatic Platform Optimization for WordPress is + * activated. + */ + hostnames: Array; + + /** + * Indicates whether or not site is powered by WordPress. + */ + wordpress: boolean; + + /** + * Indicates whether or not + * [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is + * installed. + */ + wp_plugin: boolean; +} + +/** + * When the client requesting an asset supports the Brotli compression algorithm, + * Cloudflare will serve a Brotli compressed version of the asset. + */ +export interface Brotli { + /** + * ID of the zone setting. + */ + id: 'brotli'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; +} + +/** + * Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources + * will remain on your visitors' computers. Cloudflare will honor any larger times + * specified by your server. + * (https://support.cloudflare.com/hc/en-us/articles/200168276). + */ +export interface BrowserCacheTTL { + /** + * ID of the zone setting. + */ + id: 'browser_cache_ttl'; + + /** + * Current value of the zone setting. + */ + value: + | 0 + | 30 + | 60 + | 120 + | 300 + | 1200 + | 1800 + | 3600 + | 7200 + | 10800 + | 14400 + | 18000 + | 28800 + | 43200 + | 57600 + | 72000 + | 86400 + | 172800 + | 259200 + | 345600 + | 432000 + | 691200 + | 1382400 + | 2073600 + | 2678400 + | 5356800 + | 16070400 + | 31536000; + + /** + * 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; +} + +/** + * Browser Integrity Check is similar to Bad Behavior and looks for common HTTP + * headers abused most commonly by spammers and denies access to your page. It will + * also challenge visitors that do not have a user agent or a non standard user + * agent (also commonly used by abuse bots, crawlers or visitors). + * (https://support.cloudflare.com/hc/en-us/articles/200170086). + */ +export interface BrowserCheck { + /** + * ID of the zone setting. + */ + id: 'browser_check'; + + /** + * 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; +} + +/** + * Cache Level functions based off the setting level. The basic setting will cache + * most static resources (i.e., css, images, and JavaScript). The simplified + * setting will ignore the query string when delivering a cached resource. The + * aggressive setting will cache all static resources, including ones with a query + * string. (https://support.cloudflare.com/hc/en-us/articles/200168256). + */ +export interface CacheLevel { + /** + * ID of the zone setting. + */ + id: 'cache_level'; + + /** + * Current value of the zone setting. + */ + value: 'aggressive' | 'basic' | 'simplified'; + + /** + * 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; +} + +/** + * Specify how long a visitor is allowed access to your site after successfully + * completing a challenge (such as a CAPTCHA). After the TTL has expired the + * visitor will have to complete a new challenge. We recommend a 15 - 45 minute + * setting and will attempt to honor any setting above 45 minutes. + * (https://support.cloudflare.com/hc/en-us/articles/200170136). + */ +export interface ChallengeTTL { + /** + * ID of the zone setting. + */ + id: 'challenge_ttl'; + + /** + * Current value of the zone setting. + */ + value: + | 300 + | 900 + | 1800 + | 2700 + | 3600 + | 7200 + | 10800 + | 14400 + | 28800 + | 57600 + | 86400 + | 604800 + | 2592000 + | 31536000; + + /** + * 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; +} + +/** + * An allowlist of ciphers for TLS termination. These ciphers must be in the + * BoringSSL format. + */ +export interface Ciphers { + /** + * ID of the zone setting. + */ + id: 'ciphers'; + + /** + * Current value of the zone setting. + */ + value: Array; + + /** + * 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; +} + +/** + * Development Mode temporarily allows you to enter development mode for your + * websites if you need to make changes to your site. This will bypass Cloudflare's + * accelerated cache and slow down your site, but is useful if you are making + * changes to cacheable content (like images, css, or JavaScript) and would like to + * see those changes right away. Once entered, development mode will last for 3 + * hours and then automatically toggle off. + */ +export interface DevelopmentMode { + /** + * ID of the zone setting. + */ + id: 'development_mode'; + + /** + * 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; + + /** + * Value of the zone setting. Notes: The interval (in seconds) from when + * development mode expires (positive integer) or last expired (negative integer) + * for the domain. If development mode has never been enabled, this value is false. + */ + time_remaining?: number; +} + +/** + * 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 EarlyHints { + /** + * 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; +} + +/** + * Encrypt email adresses on your web page from bots, while keeping them visible to + * humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). + */ +export interface EmailObfuscation { + /** + * ID of the zone setting. + */ + id: 'email_obfuscation'; + + /** + * 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; +} + +/** + * Enhance your website's font delivery with Cloudflare Fonts. Deliver Google + * Hosted fonts from your own domain, boost performance, and enhance user privacy. + * Refer to the Cloudflare Fonts documentation for more information. + */ +export interface FontSettings { + /** + * ID of the zone setting. + */ + id: 'fonts'; + + /** + * 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; +} + +/** + * HTTP/2 Edge Prioritization optimises the delivery of resources served through + * HTTP/2 to improve page load performance. It also supports fine control of + * content delivery when used in conjunction with Workers. + */ +export interface H2Prioritization { + /** + * ID of the zone setting. + */ + id: 'h2_prioritization'; + + /** + * Current value of the zone setting. + */ + value: 'on' | 'off' | 'custom'; + + /** + * 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; +} + +/** + * When enabled, the Hotlink Protection option ensures that other sites cannot suck + * up your bandwidth by building pages that use images hosted on your site. Anytime + * a request for an image on your site hits Cloudflare, we check to ensure that + * it's not another site requesting them. People will still be able to download and + * view images from your page, but other sites won't be able to steal them for use + * on their own pages. + * (https://support.cloudflare.com/hc/en-us/articles/200170026). + */ +export interface HotlinkProtection { + /** + * ID of the zone setting. + */ + id: 'hotlink_protection'; + + /** + * 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; +} + +/** + * HTTP2 enabled for this zone. + */ +export interface HTTP2 { + /** + * ID of the zone setting. + */ + id: 'http2'; + + /** + * 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; +} + +/** + * HTTP3 enabled for this zone. + */ +export interface HTTP3 { + /** + * ID of the zone setting. + */ + id: 'http3'; + + /** + * 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; +} + +/** + * Image Resizing provides on-demand resizing, conversion and optimisation for + * images served through Cloudflare's network. Refer to the + * [Image Resizing documentation](https://developers.cloudflare.com/images/) for + * more information. + */ +export interface ImageResizing { + /** + * ID of the zone setting. + */ + id: 'image_resizing'; + + /** + * Current value of the zone setting. + */ + value: 'on' | 'off' | 'open'; + + /** + * 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; +} + +/** + * Enable IP Geolocation to have Cloudflare geolocate visitors to your website and + * pass the country code to you. + * (https://support.cloudflare.com/hc/en-us/articles/200168236). + */ +export interface IPGeolocation { + /** + * ID of the zone setting. + */ + id: 'ip_geolocation'; + + /** + * 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; +} + +/** + * Enable IPv6 on all subdomains that are Cloudflare enabled. + * (https://support.cloudflare.com/hc/en-us/articles/200168586). + */ +export interface IPV6 { + /** + * ID of the zone setting. + */ + id: 'ipv6'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; +} + +/** + * Only accepts HTTPS requests that use at least the TLS protocol version + * specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be + * rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. + */ +export interface MinTLSVersion { + /** + * ID of the zone setting. + */ + id: 'min_tls_version'; + + /** + * Current value of the zone setting. + */ + value: '1.0' | '1.1' | '1.2' | '1.3'; + + /** + * 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; +} + +/** + * Automatically minify certain assets for your website. Refer to + * [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) + * for more information. + */ +export interface Minify { + /** + * Zone setting identifier. + */ + id: 'minify'; + + /** + * Current value of the zone setting. + */ + value: Minify.Value; + + /** + * 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 namespace Minify { + /** + * Current value of the zone setting. + */ + export interface Value { + /** + * Automatically minify all CSS files for your website. + */ + css?: 'on' | 'off'; + + /** + * Automatically minify all HTML files for your website. + */ + html?: 'on' | 'off'; + + /** + * Automatically minify all JavaScript files for your website. + */ + js?: 'on' | 'off'; + } +} + +/** + * Automatically optimize image loading for website visitors on mobile devices. + * Refer to + * [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for + * more information. + */ +export interface Mirage { + /** + * ID of the zone setting. + */ + id: 'mirage'; + + /** + * 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; +} + +/** + * @deprecated: Deprecated: Use Single Redirects instead + * https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. + * Automatically redirect visitors on mobile devices to a mobile-optimized + * subdomain. + */ +export interface MobileRedirect { + /** + * Identifier of the zone setting. + */ + id: 'mobile_redirect'; + + /** + * @deprecated: Current value of the zone setting. + */ + value: MobileRedirect.Value; + + /** + * 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 namespace MobileRedirect { + /** + * @deprecated: Current value of the zone setting. + */ + export interface Value { + /** + * Which subdomain prefix you wish to redirect visitors on mobile devices to + * (subdomain must already exist). + */ + mobile_subdomain?: string | null; + + /** + * Deprecated: Use Single Redirects instead + * https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. + * Whether or not mobile redirect is enabled. + */ + status?: 'on' | 'off'; + + /** + * Whether to drop the current page path and redirect to the mobile subdomain URL + * root, or keep the path and redirect to the same page on the mobile subdomain. + */ + strip_uri?: boolean; + } +} + +/** + * Enable Network Error Logging reporting on your zone. (Beta) + */ +export interface NEL { + /** + * Zone setting identifier. + */ + id: 'nel'; + + /** + * Current value of the zone setting. + */ + value: NEL.Value; + + /** + * 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 namespace NEL { + /** + * Current value of the zone setting. + */ + export interface Value { + enabled?: boolean; + } +} + +/** + * Enables the Opportunistic Encryption feature for a zone. + */ +export interface OpportunisticEncryption { + /** + * ID of the zone setting. + */ + id: 'opportunistic_encryption'; + + /** + * 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; +} + +/** + * Add an Alt-Svc header to all legitimate requests from Tor, allowing the + * connection to use our onion services instead of exit nodes. + */ +export interface OpportunisticOnion { + /** + * ID of the zone setting. + */ + id: 'opportunistic_onion'; + + /** + * 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; +} + +/** + * Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also + * on Cloudflare. + */ +export interface OrangeToOrange { + /** + * ID of the zone setting. + */ + id: 'orange_to_orange'; + + /** + * 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; +} + +/** + * Cloudflare will proxy customer error pages on any 502,504 errors on origin + * server instead of showing a default Cloudflare error page. This does not apply + * to 522 errors and is limited to Enterprise Zones. + */ +export interface OriginErrorPagePassThru { + /** + * ID of the zone setting. + */ + id: 'origin_error_page_pass_thru'; + + /** + * 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; +} + +/** + * Value of the zone setting. + */ +export type OriginMaxHTTPVersion = 'origin_max_http_version'; + +/** + * Removes metadata and compresses your images for faster page load times. Basic + * (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual + * quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster + * image loading. Larger JPEGs are converted to progressive images, loading a + * lower-resolution image first and ending in a higher-resolution version. Not + * recommended for hi-res photography sites. + */ +export interface Polish { + /** + * ID of the zone setting. + */ + id: 'polish'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'lossless' | 'lossy'; + + /** + * 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; +} + +/** + * Cloudflare will prefetch any URLs that are included in the response headers. + * This is limited to Enterprise Zones. + */ +export interface PrefetchPreload { + /** + * ID of the zone setting. + */ + id: 'prefetch_preload'; + + /** + * 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; +} + +/** + * Maximum time between two read operations from origin. + */ +export interface ProxyReadTimeout { + /** + * ID of the zone setting. + */ + id: 'proxy_read_timeout'; + + /** + * Current value of the zone setting. + */ + value: number; + + /** + * 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; +} + +/** + * The value set for the Pseudo IPv4 setting. + */ +export interface PseudoIPV4 { + /** + * Value of the Pseudo IPv4 setting. + */ + id: 'pseudo_ipv4'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'add_header' | 'overwrite_header'; + + /** + * 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; +} + +/** + * Enables or disables buffering of responses from the proxied server. Cloudflare + * may buffer the whole payload to deliver it at once to the client versus allowing + * it to be delivered in chunks. By default, the proxied server streams directly + * and is not buffered by Cloudflare. This is limited to Enterprise Zones. + */ +export interface ResponseBuffering { + /** + * ID of the zone setting. + */ + id: 'response_buffering'; + + /** + * 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; +} + +/** + * Rocket Loader is a general-purpose asynchronous JavaScript optimisation that + * prioritises rendering your content while loading your site's Javascript + * asynchronously. Turning on Rocket Loader will immediately improve a web page's + * rendering time sometimes measured as Time to First Paint (TTFP), and also the + * `window.onload` time (assuming there is JavaScript on the page). This can have a + * positive impact on your Google search ranking. When turned on, Rocket Loader + * will automatically defer the loading of all Javascript referenced in your HTML, + * with no configuration required. Refer to + * [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) + * for more information. + */ +export interface RocketLoader { + /** + * ID of the zone setting. + */ + id: 'rocket_loader'; + + /** + * 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; +} + +/** + * Cloudflare security header for a zone. + */ +export interface SecurityHeaders { + /** + * ID of the zone's security header. + */ + id: 'security_header'; + + /** + * Current value of the zone setting. + */ + value: SecurityHeaders.Value; + + /** + * 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 namespace SecurityHeaders { + /** + * Current value of the zone setting. + */ + export interface Value { + /** + * Strict Transport Security. + */ + strict_transport_security?: Value.StrictTransportSecurity; + } + + export namespace Value { + /** + * Strict Transport Security. + */ + export interface StrictTransportSecurity { + /** + * Whether or not strict transport security is enabled. + */ + enabled?: boolean; + + /** + * Include all subdomains for strict transport security. + */ + include_subdomains?: boolean; + + /** + * Max age in seconds of the strict transport security. + */ + max_age?: number; + + /** + * Whether or not to include 'X-Content-Type-Options: nosniff' header. + */ + nosniff?: boolean; + } + } +} + +/** + * Choose the appropriate security profile for your website, which will + * automatically adjust each of the security settings. If you choose to customize + * an individual security setting, the profile will become Custom. + * (https://support.cloudflare.com/hc/en-us/articles/200170056). + */ +export interface SecurityLevel { + /** + * ID of the zone setting. + */ + id: 'security_level'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'essentially_off' | 'low' | 'medium' | 'high' | 'under_attack'; + + /** + * 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; +} + +/** + * If there is sensitive content on your website that you want visible to real + * visitors, but that you want to hide from suspicious visitors, all you have to do + * is wrap the content with Cloudflare SSE tags. Wrap any content that you want to + * be excluded from suspicious visitors in the following SSE tags: + * . For example: Bad visitors won't see my phone + * number, 555-555-5555 . Note: SSE only will work with HTML. If you + * have HTML minification enabled, you won't see the SSE tags in your HTML source + * when it's served through Cloudflare. SSE will still function in this case, as + * Cloudflare's HTML minification and SSE functionality occur on-the-fly as the + * resource moves through our network to the visitor's computer. + * (https://support.cloudflare.com/hc/en-us/articles/200170036). + */ +export interface ServerSideExcludes { + /** + * ID of the zone setting. + */ + id: 'server_side_exclude'; + + /** + * 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; +} + +/** + * Cloudflare will treat files with the same query strings as the same file in + * cache, regardless of the order of the query strings. This is limited to + * Enterprise Zones. + */ +export interface SortQueryStringForCache { + /** + * ID of the zone setting. + */ + id: 'sort_query_string_for_cache'; + + /** + * 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; +} + +/** + * SSL encrypts your visitor's connection and safeguards credit card numbers and + * other personal data to and from your website. SSL can take up to 5 minutes to + * fully activate. Requires Cloudflare active on your root domain or www domain. + * Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare + * and your web server (all HTTP traffic). Flexible: SSL between the visitor and + * Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and + * your web server. You don't need to have an SSL cert on your web server, but your + * vistors will still see the site as being HTTPS enabled. Full: SSL between the + * visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between + * Cloudflare and your web server. You'll need to have your own SSL cert or + * self-signed cert at the very least. Full (Strict): SSL between the visitor and + * Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and + * your web server. You'll need to have a valid SSL certificate installed on your + * web server. This certificate must be signed by a certificate authority, have an + * expiration date in the future, and respond for the request domain name + * (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). + */ +export interface SSL { + /** + * ID of the zone setting. + */ + id: 'ssl'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'flexible' | 'full' | 'strict'; + + /** + * 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; +} + +/** + * Enrollment in the SSL/TLS Recommender service which tries to detect and + * recommend (by sending periodic emails) the most secure SSL/TLS setting your + * origin servers support. + */ +export interface SSLRecommender { + /** + * Enrollment value for SSL/TLS Recommender. + */ + id?: 'ssl_recommender'; + + /** + * ssl-recommender enrollment setting. + */ + enabled?: boolean; +} + +/** + * Enables Crypto TLS 1.3 feature for a zone. + */ +export interface TLS1_3 { + /** + * ID of the zone setting. + */ + id: 'tls_1_3'; + + /** + * Current value of the zone setting. + */ + value: 'on' | 'off' | 'zrt'; + + /** + * 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; +} + +/** + * TLS Client Auth requires Cloudflare to connect to your origin server using a + * client certificate (Enterprise Only). + */ +export interface TLSClientAuth { + /** + * ID of the zone setting. + */ + id: 'tls_client_auth'; + + /** + * 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; +} + +/** + * Allows customer to continue to use True Client IP (Akamai feature) in the + * headers we send to the origin. This is limited to Enterprise Zones. + */ +export interface TrueClientIPHeader { + /** + * ID of the zone setting. + */ + id: 'true_client_ip_header'; + + /** + * 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; +} + +/** + * The WAF examines HTTP requests to your website. It inspects both GET and POST + * requests and applies rules to help filter out illegitimate traffic from + * legitimate website visitors. The Cloudflare WAF inspects website addresses or + * URLs to detect anything out of the ordinary. If the Cloudflare WAF determines + * suspicious user behavior, then the WAF will 'challenge' the web visitor with a + * page that asks them to submit a CAPTCHA successfully to continue their action. + * If the challenge is failed, the action will be stopped. What this means is that + * Cloudflare's WAF will block any traffic identified as illegitimate before it + * reaches your origin web server. + * (https://support.cloudflare.com/hc/en-us/articles/200172016). + */ +export interface WAF { + /** + * ID of the zone setting. + */ + id: 'waf'; + + /** + * 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; +} + +/** + * When the client requesting the image supports the WebP image codec, and WebP + * offers a performance advantage over the original image format, Cloudflare will + * serve a WebP version of the original image. + */ +export interface WebP { + /** + * ID of the zone setting. + */ + id: 'webp'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; +} + +/** + * WebSockets are open connections sustained between the client and the origin + * server. Inside a WebSockets connection, the client and the origin can pass data + * back and forth without having to reestablish sessions. This makes exchanging + * data within a WebSockets connection fast. WebSockets are often used for + * real-time applications such as live chat and gaming. For more information refer + * to + * [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). + */ +export interface Websocket { + /** + * ID of the zone setting. + */ + id: 'websockets'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; +} + +/** + * 0-RTT session resumption enabled for this zone. + */ +export interface ZeroRTT { + /** + * ID of the zone setting. + */ + id: '0rtt'; + + /** + * 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 type SettingEditResponse = Array< + | ZeroRTT + | AdvancedDDoS + | AlwaysOnline + | AlwaysUseHTTPS + | AutomaticHTTPSRewrites + | Brotli + | BrowserCacheTTL + | BrowserCheck + | CacheLevel + | ChallengeTTL + | Ciphers + | SettingEditResponse.ZonesCNAMEFlattening + | DevelopmentMode + | EarlyHints + | SettingEditResponse.ZonesEdgeCacheTTL + | EmailObfuscation + | H2Prioritization + | HotlinkProtection + | HTTP2 + | HTTP3 + | ImageResizing + | IPGeolocation + | IPV6 + | SettingEditResponse.ZonesMaxUpload + | MinTLSVersion + | Minify + | Mirage + | MobileRedirect + | NEL + | OpportunisticEncryption + | OpportunisticOnion + | OrangeToOrange + | OriginErrorPagePassThru + | Polish + | PrefetchPreload + | ProxyReadTimeout + | PseudoIPV4 + | SettingEditResponse.ZonesReplaceInsecureJS + | ResponseBuffering + | RocketLoader + | SettingEditResponse.ZonesSchemasAutomaticPlatformOptimization + | SecurityHeaders + | SecurityLevel + | ServerSideExcludes + | SettingEditResponse.ZonesSha1Support + | SortQueryStringForCache + | SSL + | SSLRecommender + | SettingEditResponse.ZonesTLS1_2Only + | TLS1_3 + | TLSClientAuth + | TrueClientIPHeader + | WAF + | WebP + | Websocket +>; + +export namespace SettingEditResponse { + /** + * Whether or not cname flattening is on. + */ + export interface ZonesCNAMEFlattening { + /** + * How to flatten the cname destination. + */ + id: 'cname_flattening'; + + /** + * Current value of the zone setting. + */ + value: 'flatten_at_root' | 'flatten_all'; + + /** + * 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; + } + + /** + * Time (in seconds) that a resource will be ensured to remain on Cloudflare's + * cache servers. + */ + export interface ZonesEdgeCacheTTL { + /** + * ID of the zone setting. + */ + id: 'edge_cache_ttl'; + + /** + * Current value of the zone setting. + */ + value: + | 30 + | 60 + | 300 + | 1200 + | 1800 + | 3600 + | 7200 + | 10800 + | 14400 + | 18000 + | 28800 + | 43200 + | 57600 + | 72000 + | 86400 + | 172800 + | 259200 + | 345600 + | 432000 + | 518400 + | 604800; + + /** + * 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; + } + + /** + * Maximum size of an allowable upload. + */ + export interface ZonesMaxUpload { + /** + * identifier of the zone setting. + */ + id: 'max_upload'; + + /** + * Current value of the zone setting. + */ + value: 100 | 200 | 500; + + /** + * 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; + } + + /** + * Automatically replace insecure JavaScript libraries with safer and faster + * alternatives provided under cdnjs and powered by Cloudflare. Currently supports + * the following libraries: Polyfill under polyfill.io. + */ + export interface ZonesReplaceInsecureJS { + /** + * ID of the zone setting. + */ + id: 'replace_insecure_js'; + + /** + * 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; + } + + /** + * [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) + * serves your WordPress site from Cloudflare's edge network and caches third-party + * fonts. + */ + export interface ZonesSchemasAutomaticPlatformOptimization { + /** + * ID of the zone setting. + */ + id: 'automatic_platform_optimization'; + + /** + * Current value of the zone setting. + */ + value: SettingsAPI.AutomaticPlatformOptimization; + + /** + * 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; + } + + /** + * Allow SHA1 support. + */ + export interface ZonesSha1Support { + /** + * Zone setting identifier. + */ + id: 'sha1_support'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; + } + + /** + * Only allows TLS1.2. + */ + export interface ZonesTLS1_2Only { + /** + * Zone setting identifier. + */ + id: 'tls_1_2_only'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; + } +} + +/** + * 0-RTT session resumption enabled for this zone. + */ +export type SettingGetResponse = + | ZeroRTT + | AdvancedDDoS + | AlwaysOnline + | AlwaysUseHTTPS + | AutomaticHTTPSRewrites + | Brotli + | BrowserCacheTTL + | BrowserCheck + | CacheLevel + | ChallengeTTL + | Ciphers + | SettingGetResponse.ZonesCNAMEFlattening + | DevelopmentMode + | EarlyHints + | SettingGetResponse.ZonesEdgeCacheTTL + | EmailObfuscation + | H2Prioritization + | HotlinkProtection + | HTTP2 + | HTTP3 + | ImageResizing + | IPGeolocation + | IPV6 + | SettingGetResponse.ZonesMaxUpload + | MinTLSVersion + | Minify + | Mirage + | MobileRedirect + | NEL + | OpportunisticEncryption + | OpportunisticOnion + | OrangeToOrange + | OriginErrorPagePassThru + | Polish + | PrefetchPreload + | ProxyReadTimeout + | PseudoIPV4 + | SettingGetResponse.ZonesReplaceInsecureJS + | ResponseBuffering + | RocketLoader + | SettingGetResponse.ZonesSchemasAutomaticPlatformOptimization + | SecurityHeaders + | SecurityLevel + | ServerSideExcludes + | SettingGetResponse.ZonesSha1Support + | SortQueryStringForCache + | SSL + | SSLRecommender + | SettingGetResponse.ZonesTLS1_2Only + | TLS1_3 + | TLSClientAuth + | TrueClientIPHeader + | WAF + | WebP + | Websocket; + +export namespace SettingGetResponse { + /** + * Whether or not cname flattening is on. + */ + export interface ZonesCNAMEFlattening { + /** + * How to flatten the cname destination. + */ + id: 'cname_flattening'; + + /** + * Current value of the zone setting. + */ + value: 'flatten_at_root' | 'flatten_all'; + + /** + * 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; + } + + /** + * Time (in seconds) that a resource will be ensured to remain on Cloudflare's + * cache servers. + */ + export interface ZonesEdgeCacheTTL { + /** + * ID of the zone setting. + */ + id: 'edge_cache_ttl'; + + /** + * Current value of the zone setting. + */ + value: + | 30 + | 60 + | 300 + | 1200 + | 1800 + | 3600 + | 7200 + | 10800 + | 14400 + | 18000 + | 28800 + | 43200 + | 57600 + | 72000 + | 86400 + | 172800 + | 259200 + | 345600 + | 432000 + | 518400 + | 604800; + + /** + * 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; + } + + /** + * Maximum size of an allowable upload. + */ + export interface ZonesMaxUpload { + /** + * identifier of the zone setting. + */ + id: 'max_upload'; + + /** + * Current value of the zone setting. + */ + value: 100 | 200 | 500; + + /** + * 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; + } + + /** + * Automatically replace insecure JavaScript libraries with safer and faster + * alternatives provided under cdnjs and powered by Cloudflare. Currently supports + * the following libraries: Polyfill under polyfill.io. + */ + export interface ZonesReplaceInsecureJS { + /** + * ID of the zone setting. + */ + id: 'replace_insecure_js'; + + /** + * 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; + } + + /** + * [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) + * serves your WordPress site from Cloudflare's edge network and caches third-party + * fonts. + */ + export interface ZonesSchemasAutomaticPlatformOptimization { + /** + * ID of the zone setting. + */ + id: 'automatic_platform_optimization'; + + /** + * Current value of the zone setting. + */ + value: SettingsAPI.AutomaticPlatformOptimization; + + /** + * 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; + } + + /** + * Allow SHA1 support. + */ + export interface ZonesSha1Support { + /** + * Zone setting identifier. + */ + id: 'sha1_support'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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; + } + + /** + * Only allows TLS1.2. + */ + export interface ZonesTLS1_2Only { + /** + * Zone setting identifier. + */ + id: 'tls_1_2_only'; + + /** + * Current value of the zone setting. + */ + value: 'off' | 'on'; + + /** + * 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 SettingEditParams { + /** + * Identifier + */ + zone_id: string; +} + +export interface SettingGetParams { + /** + * Identifier + */ + zone_id: string; +} + +export namespace Settings { + export import AdvancedDDoS = SettingsAPI.AdvancedDDoS; + export import AlwaysOnline = SettingsAPI.AlwaysOnline; + export import AlwaysUseHTTPS = SettingsAPI.AlwaysUseHTTPS; + export import AutomaticHTTPSRewrites = SettingsAPI.AutomaticHTTPSRewrites; + export import AutomaticPlatformOptimization = SettingsAPI.AutomaticPlatformOptimization; + export import Brotli = SettingsAPI.Brotli; + export import BrowserCacheTTL = SettingsAPI.BrowserCacheTTL; + export import BrowserCheck = SettingsAPI.BrowserCheck; + export import CacheLevel = SettingsAPI.CacheLevel; + export import ChallengeTTL = SettingsAPI.ChallengeTTL; + export import Ciphers = SettingsAPI.Ciphers; + export import DevelopmentMode = SettingsAPI.DevelopmentMode; + export import EarlyHints = SettingsAPI.EarlyHints; + export import EmailObfuscation = SettingsAPI.EmailObfuscation; + export import FontSettings = SettingsAPI.FontSettings; + export import H2Prioritization = SettingsAPI.H2Prioritization; + export import HotlinkProtection = SettingsAPI.HotlinkProtection; + export import HTTP2 = SettingsAPI.HTTP2; + export import HTTP3 = SettingsAPI.HTTP3; + export import ImageResizing = SettingsAPI.ImageResizing; + export import IPGeolocation = SettingsAPI.IPGeolocation; + export import IPV6 = SettingsAPI.IPV6; + export import MinTLSVersion = SettingsAPI.MinTLSVersion; + export import Minify = SettingsAPI.Minify; + export import Mirage = SettingsAPI.Mirage; + export import MobileRedirect = SettingsAPI.MobileRedirect; + export import NEL = SettingsAPI.NEL; + export import OpportunisticEncryption = SettingsAPI.OpportunisticEncryption; + export import OpportunisticOnion = SettingsAPI.OpportunisticOnion; + export import OrangeToOrange = SettingsAPI.OrangeToOrange; + export import OriginErrorPagePassThru = SettingsAPI.OriginErrorPagePassThru; + export import OriginMaxHTTPVersion = SettingsAPI.OriginMaxHTTPVersion; + export import Polish = SettingsAPI.Polish; + export import PrefetchPreload = SettingsAPI.PrefetchPreload; + export import ProxyReadTimeout = SettingsAPI.ProxyReadTimeout; + export import PseudoIPV4 = SettingsAPI.PseudoIPV4; + export import ResponseBuffering = SettingsAPI.ResponseBuffering; + export import RocketLoader = SettingsAPI.RocketLoader; + export import SecurityHeaders = SettingsAPI.SecurityHeaders; + export import SecurityLevel = SettingsAPI.SecurityLevel; + export import ServerSideExcludes = SettingsAPI.ServerSideExcludes; + export import SortQueryStringForCache = SettingsAPI.SortQueryStringForCache; + export import SSL = SettingsAPI.SSL; + export import SSLRecommender = SettingsAPI.SSLRecommender; + export import TLS1_3 = SettingsAPI.TLS1_3; + export import TLSClientAuth = SettingsAPI.TLSClientAuth; + export import TrueClientIPHeader = SettingsAPI.TrueClientIPHeader; + export import WAF = SettingsAPI.WAF; + export import WebP = SettingsAPI.WebP; + export import Websocket = SettingsAPI.Websocket; + export import ZeroRTT = SettingsAPI.ZeroRTT; + export import SettingEditResponse = SettingsAPI.SettingEditResponse; + export import SettingGetResponse = SettingsAPI.SettingGetResponse; + export import SettingEditParams = SettingsAPI.SettingEditParams; + export import SettingGetParams = SettingsAPI.SettingGetParams; +} diff --git a/src/resources/zones/settings/advanced-ddos.ts b/src/resources/zones/settings/advanced-ddos.ts deleted file mode 100644 index fbcd4cbb12..0000000000 --- a/src/resources/zones/settings/advanced-ddos.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AdvancedDDoSAPI from './advanced-ddos'; - -export class AdvancedDDoS extends APIResource {} - -/** - * Advanced protection from Distributed Denial of Service (DDoS) attacks on your - * website. This is an uneditable value that is 'on' in the case of Business and - * Enterprise zones. - */ -export interface AdvancedDDoS { - /** - * ID of the zone setting. - */ - id: 'advanced_ddos'; - - /** - * 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 namespace AdvancedDDoS { - export import AdvancedDDoS = AdvancedDDoSAPI.AdvancedDDoS; -} diff --git a/src/resources/zones/settings/always-online.ts b/src/resources/zones/settings/always-online.ts deleted file mode 100644 index 80ef3b8bb5..0000000000 --- a/src/resources/zones/settings/always-online.ts +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AlwaysOnlineAPI from './always-online'; - -export class AlwaysOnlineResource extends APIResource {} - -/** - * When enabled, Cloudflare serves limited copies of web pages available from the - * [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - * offline. Refer to - * [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - * more information. - */ -export interface AlwaysOnline { - /** - * ID of the zone setting. - */ - id: 'always_online'; - - /** - * 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 namespace AlwaysOnlineResource { - export import AlwaysOnline = AlwaysOnlineAPI.AlwaysOnline; -} diff --git a/src/resources/zones/settings/always-use-https.ts b/src/resources/zones/settings/always-use-https.ts deleted file mode 100644 index 8b0b037a9e..0000000000 --- a/src/resources/zones/settings/always-use-https.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AlwaysUseHTTPSAPI from './always-use-https'; - -export class AlwaysUseHTTPS extends APIResource {} - -/** - * Reply to all requests for URLs that use "http" with a 301 redirect to the - * equivalent "https" URL. If you only want to redirect for a subset of requests, - * consider creating an "Always use HTTPS" page rule. - */ -export interface AlwaysUseHTTPS { - /** - * ID of the zone setting. - */ - id: 'always_use_https'; - - /** - * 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 namespace AlwaysUseHTTPS { - export import AlwaysUseHTTPS = AlwaysUseHTTPSAPI.AlwaysUseHTTPS; -} diff --git a/src/resources/zones/settings/automatic-https-rewrites.ts b/src/resources/zones/settings/automatic-https-rewrites.ts deleted file mode 100644 index 160e4b2bf2..0000000000 --- a/src/resources/zones/settings/automatic-https-rewrites.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AutomaticHTTPSRewritesAPI from './automatic-https-rewrites'; - -export class AutomaticHTTPSRewrites extends APIResource {} - -/** - * Enable the Automatic HTTPS Rewrites feature for this zone. - */ -export interface AutomaticHTTPSRewrites { - /** - * ID of the zone setting. - */ - id: 'automatic_https_rewrites'; - - /** - * 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 namespace AutomaticHTTPSRewrites { - export import AutomaticHTTPSRewrites = AutomaticHTTPSRewritesAPI.AutomaticHTTPSRewrites; -} diff --git a/src/resources/zones/settings/automatic-platform-optimization.ts b/src/resources/zones/settings/automatic-platform-optimization.ts deleted file mode 100644 index 18b6b9a5ff..0000000000 --- a/src/resources/zones/settings/automatic-platform-optimization.ts +++ /dev/null @@ -1,47 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AutomaticPlatformOptimizationAPI from './automatic-platform-optimization'; - -export class AutomaticPlatformOptimizationResource extends APIResource {} - -export interface AutomaticPlatformOptimization { - /** - * Indicates whether or not - * [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - * is enabled. - */ - cache_by_device_type: boolean; - - /** - * Indicates whether or not Cloudflare proxy is enabled. - */ - cf: boolean; - - /** - * Indicates whether or not Automatic Platform Optimization is enabled. - */ - enabled: boolean; - - /** - * An array of hostnames where Automatic Platform Optimization for WordPress is - * activated. - */ - hostnames: Array; - - /** - * Indicates whether or not site is powered by WordPress. - */ - wordpress: boolean; - - /** - * Indicates whether or not - * [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - * installed. - */ - wp_plugin: boolean; -} - -export namespace AutomaticPlatformOptimizationResource { - export import AutomaticPlatformOptimization = AutomaticPlatformOptimizationAPI.AutomaticPlatformOptimization; -} diff --git a/src/resources/zones/settings/brotli.ts b/src/resources/zones/settings/brotli.ts deleted file mode 100644 index 0b1a8ed6ae..0000000000 --- a/src/resources/zones/settings/brotli.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as BrotliAPI from './brotli'; - -export class BrotliResource extends APIResource {} - -/** - * When the client requesting an asset supports the Brotli compression algorithm, - * Cloudflare will serve a Brotli compressed version of the asset. - */ -export interface Brotli { - /** - * ID of the zone setting. - */ - id: 'brotli'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'on'; - - /** - * 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 namespace BrotliResource { - export import Brotli = BrotliAPI.Brotli; -} diff --git a/src/resources/zones/settings/browser-cache-ttl.ts b/src/resources/zones/settings/browser-cache-ttl.ts deleted file mode 100644 index 9090e05ed6..0000000000 --- a/src/resources/zones/settings/browser-cache-ttl.ts +++ /dev/null @@ -1,67 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as BrowserCacheTTLAPI from './browser-cache-ttl'; - -export class BrowserCacheTTLResource extends APIResource {} - -/** - * Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - * will remain on your visitors' computers. Cloudflare will honor any larger times - * specified by your server. - * (https://support.cloudflare.com/hc/en-us/articles/200168276). - */ -export interface BrowserCacheTTL { - /** - * ID of the zone setting. - */ - id: 'browser_cache_ttl'; - - /** - * Current value of the zone setting. - */ - value: - | 0 - | 30 - | 60 - | 120 - | 300 - | 1200 - | 1800 - | 3600 - | 7200 - | 10800 - | 14400 - | 18000 - | 28800 - | 43200 - | 57600 - | 72000 - | 86400 - | 172800 - | 259200 - | 345600 - | 432000 - | 691200 - | 1382400 - | 2073600 - | 2678400 - | 5356800 - | 16070400 - | 31536000; - - /** - * 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 namespace BrowserCacheTTLResource { - export import BrowserCacheTTL = BrowserCacheTTLAPI.BrowserCacheTTL; -} diff --git a/src/resources/zones/settings/browser-check.ts b/src/resources/zones/settings/browser-check.ts deleted file mode 100644 index 359a1e7c66..0000000000 --- a/src/resources/zones/settings/browser-check.ts +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as BrowserCheckAPI from './browser-check'; - -export class BrowserCheckResource extends APIResource {} - -/** - * Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - * headers abused most commonly by spammers and denies access to your page. It will - * also challenge visitors that do not have a user agent or a non standard user - * agent (also commonly used by abuse bots, crawlers or visitors). - * (https://support.cloudflare.com/hc/en-us/articles/200170086). - */ -export interface BrowserCheck { - /** - * ID of the zone setting. - */ - id: 'browser_check'; - - /** - * 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 namespace BrowserCheckResource { - export import BrowserCheck = BrowserCheckAPI.BrowserCheck; -} diff --git a/src/resources/zones/settings/cache-level.ts b/src/resources/zones/settings/cache-level.ts deleted file mode 100644 index be42e59d7e..0000000000 --- a/src/resources/zones/settings/cache-level.ts +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as CacheLevelAPI from './cache-level'; - -export class CacheLevelResource extends APIResource {} - -/** - * Cache Level functions based off the setting level. The basic setting will cache - * most static resources (i.e., css, images, and JavaScript). The simplified - * setting will ignore the query string when delivering a cached resource. The - * aggressive setting will cache all static resources, including ones with a query - * string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - */ -export interface CacheLevel { - /** - * ID of the zone setting. - */ - id: 'cache_level'; - - /** - * Current value of the zone setting. - */ - value: 'aggressive' | 'basic' | 'simplified'; - - /** - * 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 namespace CacheLevelResource { - export import CacheLevel = CacheLevelAPI.CacheLevel; -} diff --git a/src/resources/zones/settings/challenge-ttl.ts b/src/resources/zones/settings/challenge-ttl.ts deleted file mode 100644 index 9dd36b0536..0000000000 --- a/src/resources/zones/settings/challenge-ttl.ts +++ /dev/null @@ -1,54 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ChallengeTTLAPI from './challenge-ttl'; - -export class ChallengeTTLResource extends APIResource {} - -/** - * Specify how long a visitor is allowed access to your site after successfully - * completing a challenge (such as a CAPTCHA). After the TTL has expired the - * visitor will have to complete a new challenge. We recommend a 15 - 45 minute - * setting and will attempt to honor any setting above 45 minutes. - * (https://support.cloudflare.com/hc/en-us/articles/200170136). - */ -export interface ChallengeTTL { - /** - * ID of the zone setting. - */ - id: 'challenge_ttl'; - - /** - * Current value of the zone setting. - */ - value: - | 300 - | 900 - | 1800 - | 2700 - | 3600 - | 7200 - | 10800 - | 14400 - | 28800 - | 57600 - | 86400 - | 604800 - | 2592000 - | 31536000; - - /** - * 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 namespace ChallengeTTLResource { - export import ChallengeTTL = ChallengeTTLAPI.ChallengeTTL; -} diff --git a/src/resources/zones/settings/ciphers.ts b/src/resources/zones/settings/ciphers.ts deleted file mode 100644 index 23c964be34..0000000000 --- a/src/resources/zones/settings/ciphers.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as CiphersAPI from './ciphers'; - -export class Ciphers extends APIResource {} - -/** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ -export interface Ciphers { - /** - * ID of the zone setting. - */ - id: 'ciphers'; - - /** - * Current value of the zone setting. - */ - value: Array; - - /** - * 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 namespace Ciphers { - export import Ciphers = CiphersAPI.Ciphers; -} diff --git a/src/resources/zones/settings/development-mode.ts b/src/resources/zones/settings/development-mode.ts deleted file mode 100644 index 754cf93164..0000000000 --- a/src/resources/zones/settings/development-mode.ts +++ /dev/null @@ -1,48 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as DevelopmentModeAPI from './development-mode'; - -export class DevelopmentModeResource extends APIResource {} - -/** - * Development Mode temporarily allows you to enter development mode for your - * websites if you need to make changes to your site. This will bypass Cloudflare's - * accelerated cache and slow down your site, but is useful if you are making - * changes to cacheable content (like images, css, or JavaScript) and would like to - * see those changes right away. Once entered, development mode will last for 3 - * hours and then automatically toggle off. - */ -export interface DevelopmentMode { - /** - * ID of the zone setting. - */ - id: 'development_mode'; - - /** - * 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; - - /** - * Value of the zone setting. Notes: The interval (in seconds) from when - * development mode expires (positive integer) or last expired (negative integer) - * for the domain. If development mode has never been enabled, this value is false. - */ - time_remaining?: number; -} - -export namespace DevelopmentModeResource { - export import DevelopmentMode = DevelopmentModeAPI.DevelopmentMode; -} diff --git a/src/resources/zones/settings/early-hints.ts b/src/resources/zones/settings/early-hints.ts deleted file mode 100644 index 06ea4d7787..0000000000 --- a/src/resources/zones/settings/early-hints.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as EarlyHintsAPI from './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. - */ -export interface EarlyHints { - /** - * 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 namespace EarlyHints { - export import EarlyHints = EarlyHintsAPI.EarlyHints; -} diff --git a/src/resources/zones/settings/email-obfuscation.ts b/src/resources/zones/settings/email-obfuscation.ts deleted file mode 100644 index 69f1653904..0000000000 --- a/src/resources/zones/settings/email-obfuscation.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as EmailObfuscationAPI from './email-obfuscation'; - -export class EmailObfuscationResource extends APIResource {} - -/** - * Encrypt email adresses on your web page from bots, while keeping them visible to - * humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - */ -export interface EmailObfuscation { - /** - * ID of the zone setting. - */ - id: 'email_obfuscation'; - - /** - * 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 namespace EmailObfuscationResource { - export import EmailObfuscation = EmailObfuscationAPI.EmailObfuscation; -} diff --git a/src/resources/zones/settings/font-settings.ts b/src/resources/zones/settings/font-settings.ts deleted file mode 100644 index 8cb9af6eca..0000000000 --- a/src/resources/zones/settings/font-settings.ts +++ /dev/null @@ -1,88 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as Core from '../../../core'; -import * as FontSettingsAPI from './font-settings'; - -export class FontSettings extends APIResource { - /** - * Enhance your website's font delivery with Cloudflare Fonts. Deliver Google - * Hosted fonts from your own domain, boost performance, and enhance user privacy. - * Refer to the Cloudflare Fonts documentation for more information. - */ - edit(params: FontSettingEditParams, options?: Core.RequestOptions): Core.APIPromise { - const { zone_id, ...body } = params; - return ( - this._client.patch(`/zones/${zone_id}/settings/fonts`, { body, ...options }) as Core.APIPromise<{ - result: FontSettings; - }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Enhance your website's font delivery with Cloudflare Fonts. Deliver Google - * Hosted fonts from your own domain, boost performance, and enhance user privacy. - * Refer to the Cloudflare Fonts documentation for more information. - */ - get(params: FontSettingGetParams, options?: Core.RequestOptions): Core.APIPromise { - const { zone_id } = params; - return ( - this._client.get(`/zones/${zone_id}/settings/fonts`, options) as Core.APIPromise<{ - result: FontSettings; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -/** - * Enhance your website's font delivery with Cloudflare Fonts. Deliver Google - * Hosted fonts from your own domain, boost performance, and enhance user privacy. - * Refer to the Cloudflare Fonts documentation for more information. - */ -export interface FontSettings { - /** - * ID of the zone setting. - */ - id: 'fonts'; - - /** - * 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 FontSettingEditParams { - /** - * Path param: Identifier - */ - zone_id: string; - - /** - * Body param: Whether the feature is enabled or disabled. - */ - value: 'on' | 'off'; -} - -export interface FontSettingGetParams { - /** - * Identifier - */ - zone_id: string; -} - -export namespace FontSettings { - export import FontSettings = FontSettingsAPI.FontSettings; - export import FontSettingEditParams = FontSettingsAPI.FontSettingEditParams; - export import FontSettingGetParams = FontSettingsAPI.FontSettingGetParams; -} diff --git a/src/resources/zones/settings/h2-prioritization.ts b/src/resources/zones/settings/h2-prioritization.ts deleted file mode 100644 index 3a34f82994..0000000000 --- a/src/resources/zones/settings/h2-prioritization.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as H2PrioritizationAPI from './h2-prioritization'; - -export class H2PrioritizationResource extends APIResource {} - -/** - * HTTP/2 Edge Prioritization optimises the delivery of resources served through - * HTTP/2 to improve page load performance. It also supports fine control of - * content delivery when used in conjunction with Workers. - */ -export interface H2Prioritization { - /** - * ID of the zone setting. - */ - id: 'h2_prioritization'; - - /** - * Current value of the zone setting. - */ - value: 'on' | 'off' | 'custom'; - - /** - * 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 namespace H2PrioritizationResource { - export import H2Prioritization = H2PrioritizationAPI.H2Prioritization; -} diff --git a/src/resources/zones/settings/hotlink-protection.ts b/src/resources/zones/settings/hotlink-protection.ts deleted file mode 100644 index a98713ab5d..0000000000 --- a/src/resources/zones/settings/hotlink-protection.ts +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as HotlinkProtectionAPI from './hotlink-protection'; - -export class HotlinkProtectionResource extends APIResource {} - -/** - * When enabled, the Hotlink Protection option ensures that other sites cannot suck - * up your bandwidth by building pages that use images hosted on your site. Anytime - * a request for an image on your site hits Cloudflare, we check to ensure that - * it's not another site requesting them. People will still be able to download and - * view images from your page, but other sites won't be able to steal them for use - * on their own pages. - * (https://support.cloudflare.com/hc/en-us/articles/200170026). - */ -export interface HotlinkProtection { - /** - * ID of the zone setting. - */ - id: 'hotlink_protection'; - - /** - * 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 namespace HotlinkProtectionResource { - export import HotlinkProtection = HotlinkProtectionAPI.HotlinkProtection; -} diff --git a/src/resources/zones/settings/http2.ts b/src/resources/zones/settings/http2.ts deleted file mode 100644 index 15d2cfebad..0000000000 --- a/src/resources/zones/settings/http2.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as HTTP2API from './http2'; - -export class HTTP2Resource extends APIResource {} - -/** - * HTTP2 enabled for this zone. - */ -export interface HTTP2 { - /** - * ID of the zone setting. - */ - id: 'http2'; - - /** - * 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 namespace HTTP2Resource { - export import HTTP2 = HTTP2API.HTTP2; -} diff --git a/src/resources/zones/settings/http3.ts b/src/resources/zones/settings/http3.ts deleted file mode 100644 index d3ed8e5acf..0000000000 --- a/src/resources/zones/settings/http3.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as HTTP3API from './http3'; - -export class HTTP3Resource extends APIResource {} - -/** - * HTTP3 enabled for this zone. - */ -export interface HTTP3 { - /** - * ID of the zone setting. - */ - id: 'http3'; - - /** - * 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 namespace HTTP3Resource { - export import HTTP3 = HTTP3API.HTTP3; -} diff --git a/src/resources/zones/settings/image-resizing.ts b/src/resources/zones/settings/image-resizing.ts deleted file mode 100644 index e5aedc3b8c..0000000000 --- a/src/resources/zones/settings/image-resizing.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ImageResizingAPI from './image-resizing'; - -export class ImageResizingResource extends APIResource {} - -/** - * Image Resizing provides on-demand resizing, conversion and optimisation for - * images served through Cloudflare's network. Refer to the - * [Image Resizing documentation](https://developers.cloudflare.com/images/) for - * more information. - */ -export interface ImageResizing { - /** - * ID of the zone setting. - */ - id: 'image_resizing'; - - /** - * Current value of the zone setting. - */ - value: 'on' | 'off' | 'open'; - - /** - * 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 namespace ImageResizingResource { - export import ImageResizing = ImageResizingAPI.ImageResizing; -} diff --git a/src/resources/zones/settings/index.ts b/src/resources/zones/settings/index.ts deleted file mode 100644 index 053f6806db..0000000000 --- a/src/resources/zones/settings/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { AdvancedDDoS } from './advanced-ddos'; -export { AlwaysOnline, AlwaysOnlineResource } from './always-online'; -export { AlwaysUseHTTPS } from './always-use-https'; -export { AutomaticHTTPSRewrites } from './automatic-https-rewrites'; -export { - AutomaticPlatformOptimization, - AutomaticPlatformOptimizationResource, -} from './automatic-platform-optimization'; -export { Brotli, BrotliResource } from './brotli'; -export { BrowserCacheTTL, BrowserCacheTTLResource } from './browser-cache-ttl'; -export { BrowserCheck, BrowserCheckResource } from './browser-check'; -export { CacheLevel, CacheLevelResource } from './cache-level'; -export { ChallengeTTL, ChallengeTTLResource } from './challenge-ttl'; -export { Ciphers } from './ciphers'; -export { DevelopmentMode, DevelopmentModeResource } from './development-mode'; -export { EarlyHints } from './early-hints'; -export { EmailObfuscation, EmailObfuscationResource } from './email-obfuscation'; -export { FontSettings, FontSettingEditParams, FontSettingGetParams } from './font-settings'; -export { H2Prioritization, H2PrioritizationResource } from './h2-prioritization'; -export { HTTP2, HTTP2Resource } from './http2'; -export { HTTP3, HTTP3Resource } from './http3'; -export { HotlinkProtection, HotlinkProtectionResource } from './hotlink-protection'; -export { IPGeolocation, IPGeolocationResource } from './ip-geolocation'; -export { IPV6, IPV6Resource } from './ipv6'; -export { ImageResizing, ImageResizingResource } from './image-resizing'; -export { MinTLSVersion, MinTLSVersionResource } from './min-tls-version'; -export { Minify, MinifyResource } from './minify'; -export { Mirage, MirageResource } from './mirage'; -export { MobileRedirect, MobileRedirectResource } from './mobile-redirect'; -export { NEL, NELResource } from './nel'; -export { OpportunisticEncryption, OpportunisticEncryptionResource } from './opportunistic-encryption'; -export { OpportunisticOnion, OpportunisticOnionResource } from './opportunistic-onion'; -export { OrangeToOrange, OrangeToOrangeResource } from './orange-to-orange'; -export { OriginErrorPagePassThru, OriginErrorPagePassThruResource } from './origin-error-page-pass-thru'; -export { - OriginMaxHTTPVersion, - OriginMaxHTTPVersionEditResponse, - OriginMaxHTTPVersionGetResponse, - OriginMaxHTTPVersionEditParams, - OriginMaxHTTPVersionGetParams, - OriginMaxHTTPVersionResource, -} from './origin-max-http-version'; -export { Polish, PolishResource } from './polish'; -export { PrefetchPreload, PrefetchPreloadResource } from './prefetch-preload'; -export { ProxyReadTimeout, ProxyReadTimeoutResource } from './proxy-read-timeout'; -export { PseudoIPV4, PseudoIPV4Resource } from './pseudo-ipv4'; -export { ResponseBuffering, ResponseBufferingResource } from './response-buffering'; -export { RocketLoader, RocketLoaderResource } from './rocket-loader'; -export { SSL, SSLResource } from './ssl'; -export { SSLRecommender, SSLRecommenderResource } from './ssl-recommender'; -export { SecurityHeaders } from './security-headers'; -export { SecurityLevel, SecurityLevelResource } from './security-level'; -export { ServerSideExcludes } from './server-side-excludes'; -export { Settings } from './settings'; -export { SortQueryStringForCache, SortQueryStringForCacheResource } from './sort-query-string-for-cache'; -export { TLS1_3, TLS1_3Resource } from './tls-1-3'; -export { TLSClientAuth, TLSClientAuthResource } from './tls-client-auth'; -export { TrueClientIPHeader, TrueClientIPHeaderResource } from './true-client-ip-header'; -export { WAF, WAFResource } from './waf'; -export { WebP, WebPResource } from './webp'; -export { Websocket, WebsocketResource } from './websocket'; -export { ZeroRTT, ZeroRTTResource } from './zero-rtt'; diff --git a/src/resources/zones/settings/ip-geolocation.ts b/src/resources/zones/settings/ip-geolocation.ts deleted file mode 100644 index c5a14a88b2..0000000000 --- a/src/resources/zones/settings/ip-geolocation.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as IPGeolocationAPI from './ip-geolocation'; - -export class IPGeolocationResource extends APIResource {} - -/** - * Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - * pass the country code to you. - * (https://support.cloudflare.com/hc/en-us/articles/200168236). - */ -export interface IPGeolocation { - /** - * ID of the zone setting. - */ - id: 'ip_geolocation'; - - /** - * 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 namespace IPGeolocationResource { - export import IPGeolocation = IPGeolocationAPI.IPGeolocation; -} diff --git a/src/resources/zones/settings/ipv6.ts b/src/resources/zones/settings/ipv6.ts deleted file mode 100644 index b6b30a9e7b..0000000000 --- a/src/resources/zones/settings/ipv6.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as IPV6API from './ipv6'; - -export class IPV6Resource extends APIResource {} - -/** - * Enable IPv6 on all subdomains that are Cloudflare enabled. - * (https://support.cloudflare.com/hc/en-us/articles/200168586). - */ -export interface IPV6 { - /** - * ID of the zone setting. - */ - id: 'ipv6'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'on'; - - /** - * 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 namespace IPV6Resource { - export import IPV6 = IPV6API.IPV6; -} diff --git a/src/resources/zones/settings/min-tls-version.ts b/src/resources/zones/settings/min-tls-version.ts deleted file mode 100644 index 4ab1d2cfde..0000000000 --- a/src/resources/zones/settings/min-tls-version.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as MinTLSVersionAPI from './min-tls-version'; - -export class MinTLSVersionResource extends APIResource {} - -/** - * Only accepts HTTPS requests that use at least the TLS protocol version - * specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be - * rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. - */ -export interface MinTLSVersion { - /** - * ID of the zone setting. - */ - id: 'min_tls_version'; - - /** - * Current value of the zone setting. - */ - value: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * 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 namespace MinTLSVersionResource { - export import MinTLSVersion = MinTLSVersionAPI.MinTLSVersion; -} diff --git a/src/resources/zones/settings/minify.ts b/src/resources/zones/settings/minify.ts deleted file mode 100644 index dad1c29ba3..0000000000 --- a/src/resources/zones/settings/minify.ts +++ /dev/null @@ -1,60 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as MinifyAPI from './minify'; - -export class MinifyResource extends APIResource {} - -/** - * Automatically minify certain assets for your website. Refer to - * [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - * for more information. - */ -export interface Minify { - /** - * Zone setting identifier. - */ - id: 'minify'; - - /** - * Current value of the zone setting. - */ - value: Minify.Value; - - /** - * 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 namespace Minify { - /** - * Current value of the zone setting. - */ - export interface Value { - /** - * Automatically minify all CSS files for your website. - */ - css?: 'on' | 'off'; - - /** - * Automatically minify all HTML files for your website. - */ - html?: 'on' | 'off'; - - /** - * Automatically minify all JavaScript files for your website. - */ - js?: 'on' | 'off'; - } -} - -export namespace MinifyResource { - export import Minify = MinifyAPI.Minify; -} diff --git a/src/resources/zones/settings/mirage.ts b/src/resources/zones/settings/mirage.ts deleted file mode 100644 index 2a74a57bbb..0000000000 --- a/src/resources/zones/settings/mirage.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as MirageAPI from './mirage'; - -export class MirageResource extends APIResource {} - -/** - * Automatically optimize image loading for website visitors on mobile devices. - * Refer to - * [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for - * more information. - */ -export interface Mirage { - /** - * ID of the zone setting. - */ - id: 'mirage'; - - /** - * 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 namespace MirageResource { - export import Mirage = MirageAPI.Mirage; -} diff --git a/src/resources/zones/settings/mobile-redirect.ts b/src/resources/zones/settings/mobile-redirect.ts deleted file mode 100644 index 7614885c97..0000000000 --- a/src/resources/zones/settings/mobile-redirect.ts +++ /dev/null @@ -1,65 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as MobileRedirectAPI from './mobile-redirect'; - -export class MobileRedirectResource extends APIResource {} - -/** - * @deprecated: Deprecated: Use Single Redirects instead - * https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. - * Automatically redirect visitors on mobile devices to a mobile-optimized - * subdomain. - */ -export interface MobileRedirect { - /** - * Identifier of the zone setting. - */ - id: 'mobile_redirect'; - - /** - * @deprecated: Current value of the zone setting. - */ - value: MobileRedirect.Value; - - /** - * 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 namespace MobileRedirect { - /** - * @deprecated: Current value of the zone setting. - */ - export interface Value { - /** - * Which subdomain prefix you wish to redirect visitors on mobile devices to - * (subdomain must already exist). - */ - mobile_subdomain?: string | null; - - /** - * Deprecated: Use Single Redirects instead - * https://developers.cloudflare.com/rules/url-forwarding/single-redirects/examples/#perform-mobile-redirects. - * Whether or not mobile redirect is enabled. - */ - status?: 'on' | 'off'; - - /** - * Whether to drop the current page path and redirect to the mobile subdomain URL - * root, or keep the path and redirect to the same page on the mobile subdomain. - */ - strip_uri?: boolean; - } -} - -export namespace MobileRedirectResource { - export import MobileRedirect = MobileRedirectAPI.MobileRedirect; -} diff --git a/src/resources/zones/settings/nel.ts b/src/resources/zones/settings/nel.ts deleted file mode 100644 index fd17ac32be..0000000000 --- a/src/resources/zones/settings/nel.ts +++ /dev/null @@ -1,45 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as NELAPI from './nel'; - -export class NELResource extends APIResource {} - -/** - * Enable Network Error Logging reporting on your zone. (Beta) - */ -export interface NEL { - /** - * Zone setting identifier. - */ - id: 'nel'; - - /** - * Current value of the zone setting. - */ - value: NEL.Value; - - /** - * 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 namespace NEL { - /** - * Current value of the zone setting. - */ - export interface Value { - enabled?: boolean; - } -} - -export namespace NELResource { - export import NEL = NELAPI.NEL; -} diff --git a/src/resources/zones/settings/opportunistic-encryption.ts b/src/resources/zones/settings/opportunistic-encryption.ts deleted file mode 100644 index 4355ab8756..0000000000 --- a/src/resources/zones/settings/opportunistic-encryption.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as OpportunisticEncryptionAPI from './opportunistic-encryption'; - -export class OpportunisticEncryptionResource extends APIResource {} - -/** - * Enables the Opportunistic Encryption feature for a zone. - */ -export interface OpportunisticEncryption { - /** - * ID of the zone setting. - */ - id: 'opportunistic_encryption'; - - /** - * 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 namespace OpportunisticEncryptionResource { - export import OpportunisticEncryption = OpportunisticEncryptionAPI.OpportunisticEncryption; -} diff --git a/src/resources/zones/settings/opportunistic-onion.ts b/src/resources/zones/settings/opportunistic-onion.ts deleted file mode 100644 index bdf69c6943..0000000000 --- a/src/resources/zones/settings/opportunistic-onion.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as OpportunisticOnionAPI from './opportunistic-onion'; - -export class OpportunisticOnionResource extends APIResource {} - -/** - * Add an Alt-Svc header to all legitimate requests from Tor, allowing the - * connection to use our onion services instead of exit nodes. - */ -export interface OpportunisticOnion { - /** - * ID of the zone setting. - */ - id: 'opportunistic_onion'; - - /** - * 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 namespace OpportunisticOnionResource { - export import OpportunisticOnion = OpportunisticOnionAPI.OpportunisticOnion; -} diff --git a/src/resources/zones/settings/orange-to-orange.ts b/src/resources/zones/settings/orange-to-orange.ts deleted file mode 100644 index da979bfe82..0000000000 --- a/src/resources/zones/settings/orange-to-orange.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as OrangeToOrangeAPI from './orange-to-orange'; - -export class OrangeToOrangeResource extends APIResource {} - -/** - * Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - * on Cloudflare. - */ -export interface OrangeToOrange { - /** - * ID of the zone setting. - */ - id: 'orange_to_orange'; - - /** - * 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 namespace OrangeToOrangeResource { - export import OrangeToOrange = OrangeToOrangeAPI.OrangeToOrange; -} diff --git a/src/resources/zones/settings/origin-error-page-pass-thru.ts b/src/resources/zones/settings/origin-error-page-pass-thru.ts deleted file mode 100644 index 21cc6aa85f..0000000000 --- a/src/resources/zones/settings/origin-error-page-pass-thru.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as OriginErrorPagePassThruAPI from './origin-error-page-pass-thru'; - -export class OriginErrorPagePassThruResource extends APIResource {} - -/** - * Cloudflare will proxy customer error pages on any 502,504 errors on origin - * server instead of showing a default Cloudflare error page. This does not apply - * to 522 errors and is limited to Enterprise Zones. - */ -export interface OriginErrorPagePassThru { - /** - * ID of the zone setting. - */ - id: 'origin_error_page_pass_thru'; - - /** - * 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 namespace OriginErrorPagePassThruResource { - export import OriginErrorPagePassThru = OriginErrorPagePassThruAPI.OriginErrorPagePassThru; -} diff --git a/src/resources/zones/settings/origin-max-http-version.ts b/src/resources/zones/settings/origin-max-http-version.ts deleted file mode 100644 index ebbb365708..0000000000 --- a/src/resources/zones/settings/origin-max-http-version.ts +++ /dev/null @@ -1,130 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as Core from '../../../core'; -import * as OriginMaxHTTPVersionAPI from './origin-max-http-version'; - -export class OriginMaxHTTPVersionResource extends APIResource { - /** - * Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - * attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - * requests to your origin. (Refer to - * [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - * for more information.). The default value is "2" for all plan types except ENT - * where it is "1" - */ - edit( - params: OriginMaxHTTPVersionEditParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { zone_id, ...body } = params; - return ( - this._client.patch(`/zones/${zone_id}/settings/origin_max_http_version`, { - body, - ...options, - }) as Core.APIPromise<{ result: OriginMaxHTTPVersionEditResponse }> - )._thenUnwrap((obj) => obj.result); - } - - /** - * Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - * attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - * requests to your origin. (Refer to - * [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - * for more information.). The default value is "2" for all plan types except ENT - * where it is "1" - */ - get( - params: OriginMaxHTTPVersionGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { zone_id } = params; - return ( - this._client.get(`/zones/${zone_id}/settings/origin_max_http_version`, options) as Core.APIPromise<{ - result: OriginMaxHTTPVersionGetResponse; - }> - )._thenUnwrap((obj) => obj.result); - } -} - -/** - * Value of the zone setting. - */ -export type OriginMaxHTTPVersion = 'origin_max_http_version'; - -/** - * Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - * attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - * requests to your origin. (Refer to - * [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - * for more information.). The default value is "2" for all plan types except ENT - * where it is "1" - */ -export interface OriginMaxHTTPVersionEditResponse { - /** - * Value of the zone setting. - */ - id: OriginMaxHTTPVersion; - - /** - * last time this setting was modified. - */ - modified_on: string | null; - - /** - * Value of the Origin Max HTTP Version Setting. - */ - value: '2' | '1'; -} - -/** - * Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will - * attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 - * requests to your origin. (Refer to - * [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - * for more information.). The default value is "2" for all plan types except ENT - * where it is "1" - */ -export interface OriginMaxHTTPVersionGetResponse { - /** - * Value of the zone setting. - */ - id: OriginMaxHTTPVersion; - - /** - * last time this setting was modified. - */ - modified_on: string | null; - - /** - * Value of the Origin Max HTTP Version Setting. - */ - value: '2' | '1'; -} - -export interface OriginMaxHTTPVersionEditParams { - /** - * Path param: Identifier - */ - zone_id: string; - - /** - * Body param: Value of the Origin Max HTTP Version Setting. - */ - value: '2' | '1'; -} - -export interface OriginMaxHTTPVersionGetParams { - /** - * Identifier - */ - zone_id: string; -} - -export namespace OriginMaxHTTPVersionResource { - export import OriginMaxHTTPVersion = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersion; - export import OriginMaxHTTPVersionEditResponse = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionEditResponse; - export import OriginMaxHTTPVersionGetResponse = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionGetResponse; - export import OriginMaxHTTPVersionEditParams = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionEditParams; - export import OriginMaxHTTPVersionGetParams = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionGetParams; -} diff --git a/src/resources/zones/settings/polish.ts b/src/resources/zones/settings/polish.ts deleted file mode 100644 index a55598bda1..0000000000 --- a/src/resources/zones/settings/polish.ts +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as PolishAPI from './polish'; - -export class PolishResource extends APIResource {} - -/** - * Removes metadata and compresses your images for faster page load times. Basic - * (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - * quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - * image loading. Larger JPEGs are converted to progressive images, loading a - * lower-resolution image first and ending in a higher-resolution version. Not - * recommended for hi-res photography sites. - */ -export interface Polish { - /** - * ID of the zone setting. - */ - id: 'polish'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'lossless' | 'lossy'; - - /** - * 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 namespace PolishResource { - export import Polish = PolishAPI.Polish; -} diff --git a/src/resources/zones/settings/prefetch-preload.ts b/src/resources/zones/settings/prefetch-preload.ts deleted file mode 100644 index c96668d9f8..0000000000 --- a/src/resources/zones/settings/prefetch-preload.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as PrefetchPreloadAPI from './prefetch-preload'; - -export class PrefetchPreloadResource extends APIResource {} - -/** - * Cloudflare will prefetch any URLs that are included in the response headers. - * This is limited to Enterprise Zones. - */ -export interface PrefetchPreload { - /** - * ID of the zone setting. - */ - id: 'prefetch_preload'; - - /** - * 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 namespace PrefetchPreloadResource { - export import PrefetchPreload = PrefetchPreloadAPI.PrefetchPreload; -} diff --git a/src/resources/zones/settings/proxy-read-timeout.ts b/src/resources/zones/settings/proxy-read-timeout.ts deleted file mode 100644 index 3697d4cb37..0000000000 --- a/src/resources/zones/settings/proxy-read-timeout.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ProxyReadTimeoutAPI from './proxy-read-timeout'; - -export class ProxyReadTimeoutResource extends APIResource {} - -/** - * Maximum time between two read operations from origin. - */ -export interface ProxyReadTimeout { - /** - * ID of the zone setting. - */ - id: 'proxy_read_timeout'; - - /** - * Current value of the zone setting. - */ - value: number; - - /** - * 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 namespace ProxyReadTimeoutResource { - export import ProxyReadTimeout = ProxyReadTimeoutAPI.ProxyReadTimeout; -} diff --git a/src/resources/zones/settings/pseudo-ipv4.ts b/src/resources/zones/settings/pseudo-ipv4.ts deleted file mode 100644 index d25faa7a62..0000000000 --- a/src/resources/zones/settings/pseudo-ipv4.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as PseudoIPV4API from './pseudo-ipv4'; - -export class PseudoIPV4Resource extends APIResource {} - -/** - * The value set for the Pseudo IPv4 setting. - */ -export interface PseudoIPV4 { - /** - * Value of the Pseudo IPv4 setting. - */ - id: 'pseudo_ipv4'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'add_header' | 'overwrite_header'; - - /** - * 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 namespace PseudoIPV4Resource { - export import PseudoIPV4 = PseudoIPV4API.PseudoIPV4; -} diff --git a/src/resources/zones/settings/response-buffering.ts b/src/resources/zones/settings/response-buffering.ts deleted file mode 100644 index d5a505fc18..0000000000 --- a/src/resources/zones/settings/response-buffering.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ResponseBufferingAPI from './response-buffering'; - -export class ResponseBufferingResource extends APIResource {} - -/** - * Enables or disables buffering of responses from the proxied server. Cloudflare - * may buffer the whole payload to deliver it at once to the client versus allowing - * it to be delivered in chunks. By default, the proxied server streams directly - * and is not buffered by Cloudflare. This is limited to Enterprise Zones. - */ -export interface ResponseBuffering { - /** - * ID of the zone setting. - */ - id: 'response_buffering'; - - /** - * 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 namespace ResponseBufferingResource { - export import ResponseBuffering = ResponseBufferingAPI.ResponseBuffering; -} diff --git a/src/resources/zones/settings/rocket-loader.ts b/src/resources/zones/settings/rocket-loader.ts deleted file mode 100644 index 92fcb89535..0000000000 --- a/src/resources/zones/settings/rocket-loader.ts +++ /dev/null @@ -1,45 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as RocketLoaderAPI from './rocket-loader'; - -export class RocketLoaderResource extends APIResource {} - -/** - * Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - * prioritises rendering your content while loading your site's Javascript - * asynchronously. Turning on Rocket Loader will immediately improve a web page's - * rendering time sometimes measured as Time to First Paint (TTFP), and also the - * `window.onload` time (assuming there is JavaScript on the page). This can have a - * positive impact on your Google search ranking. When turned on, Rocket Loader - * will automatically defer the loading of all Javascript referenced in your HTML, - * with no configuration required. Refer to - * [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - * for more information. - */ -export interface RocketLoader { - /** - * ID of the zone setting. - */ - id: 'rocket_loader'; - - /** - * 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 namespace RocketLoaderResource { - export import RocketLoader = RocketLoaderAPI.RocketLoader; -} diff --git a/src/resources/zones/settings/security-headers.ts b/src/resources/zones/settings/security-headers.ts deleted file mode 100644 index fae18b53ce..0000000000 --- a/src/resources/zones/settings/security-headers.ts +++ /dev/null @@ -1,75 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as SecurityHeadersAPI from './security-headers'; - -export class SecurityHeaders extends APIResource {} - -/** - * Cloudflare security header for a zone. - */ -export interface SecurityHeaders { - /** - * ID of the zone's security header. - */ - id: 'security_header'; - - /** - * Current value of the zone setting. - */ - value: SecurityHeaders.Value; - - /** - * 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 namespace SecurityHeaders { - /** - * Current value of the zone setting. - */ - export interface Value { - /** - * Strict Transport Security. - */ - strict_transport_security?: Value.StrictTransportSecurity; - } - - export namespace Value { - /** - * Strict Transport Security. - */ - export interface StrictTransportSecurity { - /** - * Whether or not strict transport security is enabled. - */ - enabled?: boolean; - - /** - * Include all subdomains for strict transport security. - */ - include_subdomains?: boolean; - - /** - * Max age in seconds of the strict transport security. - */ - max_age?: number; - - /** - * Whether or not to include 'X-Content-Type-Options: nosniff' header. - */ - nosniff?: boolean; - } - } -} - -export namespace SecurityHeaders { - export import SecurityHeaders = SecurityHeadersAPI.SecurityHeaders; -} diff --git a/src/resources/zones/settings/security-level.ts b/src/resources/zones/settings/security-level.ts deleted file mode 100644 index 359d4c3d8e..0000000000 --- a/src/resources/zones/settings/security-level.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as SecurityLevelAPI from './security-level'; - -export class SecurityLevelResource extends APIResource {} - -/** - * Choose the appropriate security profile for your website, which will - * automatically adjust each of the security settings. If you choose to customize - * an individual security setting, the profile will become Custom. - * (https://support.cloudflare.com/hc/en-us/articles/200170056). - */ -export interface SecurityLevel { - /** - * ID of the zone setting. - */ - id: 'security_level'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'essentially_off' | 'low' | 'medium' | 'high' | 'under_attack'; - - /** - * 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 namespace SecurityLevelResource { - export import SecurityLevel = SecurityLevelAPI.SecurityLevel; -} diff --git a/src/resources/zones/settings/server-side-excludes.ts b/src/resources/zones/settings/server-side-excludes.ts deleted file mode 100644 index 23f52bf99e..0000000000 --- a/src/resources/zones/settings/server-side-excludes.ts +++ /dev/null @@ -1,46 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ServerSideExcludesAPI from './server-side-excludes'; - -export class ServerSideExcludes extends APIResource {} - -/** - * If there is sensitive content on your website that you want visible to real - * visitors, but that you want to hide from suspicious visitors, all you have to do - * is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - * be excluded from suspicious visitors in the following SSE tags: - * . For example: Bad visitors won't see my phone - * number, 555-555-5555 . Note: SSE only will work with HTML. If you - * have HTML minification enabled, you won't see the SSE tags in your HTML source - * when it's served through Cloudflare. SSE will still function in this case, as - * Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - * resource moves through our network to the visitor's computer. - * (https://support.cloudflare.com/hc/en-us/articles/200170036). - */ -export interface ServerSideExcludes { - /** - * ID of the zone setting. - */ - id: 'server_side_exclude'; - - /** - * 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 namespace ServerSideExcludes { - export import ServerSideExcludes = ServerSideExcludesAPI.ServerSideExcludes; -} diff --git a/src/resources/zones/settings/settings.ts b/src/resources/zones/settings/settings.ts deleted file mode 100644 index 2ba6a902ee..0000000000 --- a/src/resources/zones/settings/settings.ts +++ /dev/null @@ -1,245 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as AdvancedDDoSAPI from './advanced-ddos'; -import * as AlwaysOnlineAPI from './always-online'; -import * as AlwaysUseHTTPSAPI from './always-use-https'; -import * as AutomaticHTTPSRewritesAPI from './automatic-https-rewrites'; -import * as AutomaticPlatformOptimizationAPI from './automatic-platform-optimization'; -import * as BrotliAPI from './brotli'; -import * as BrowserCacheTTLAPI from './browser-cache-ttl'; -import * as BrowserCheckAPI from './browser-check'; -import * as CacheLevelAPI from './cache-level'; -import * as ChallengeTTLAPI from './challenge-ttl'; -import * as CiphersAPI from './ciphers'; -import * as DevelopmentModeAPI from './development-mode'; -import * as EarlyHintsAPI from './early-hints'; -import * as EmailObfuscationAPI from './email-obfuscation'; -import * as FontSettingsAPI from './font-settings'; -import * as H2PrioritizationAPI from './h2-prioritization'; -import * as HotlinkProtectionAPI from './hotlink-protection'; -import * as HTTP2API from './http2'; -import * as HTTP3API from './http3'; -import * as ImageResizingAPI from './image-resizing'; -import * as IPGeolocationAPI from './ip-geolocation'; -import * as IPV6API from './ipv6'; -import * as MinTLSVersionAPI from './min-tls-version'; -import * as MinifyAPI from './minify'; -import * as MirageAPI from './mirage'; -import * as MobileRedirectAPI from './mobile-redirect'; -import * as NELAPI from './nel'; -import * as OpportunisticEncryptionAPI from './opportunistic-encryption'; -import * as OpportunisticOnionAPI from './opportunistic-onion'; -import * as OrangeToOrangeAPI from './orange-to-orange'; -import * as OriginErrorPagePassThruAPI from './origin-error-page-pass-thru'; -import * as OriginMaxHTTPVersionAPI from './origin-max-http-version'; -import * as PolishAPI from './polish'; -import * as PrefetchPreloadAPI from './prefetch-preload'; -import * as ProxyReadTimeoutAPI from './proxy-read-timeout'; -import * as PseudoIPV4API from './pseudo-ipv4'; -import * as ResponseBufferingAPI from './response-buffering'; -import * as RocketLoaderAPI from './rocket-loader'; -import * as SecurityHeadersAPI from './security-headers'; -import * as SecurityLevelAPI from './security-level'; -import * as ServerSideExcludesAPI from './server-side-excludes'; -import * as SortQueryStringForCacheAPI from './sort-query-string-for-cache'; -import * as SSLAPI from './ssl'; -import * as SSLRecommenderAPI from './ssl-recommender'; -import * as TLS1_3API from './tls-1-3'; -import * as TLSClientAuthAPI from './tls-client-auth'; -import * as TrueClientIPHeaderAPI from './true-client-ip-header'; -import * as WAFAPI from './waf'; -import * as WebPAPI from './webp'; -import * as WebsocketAPI from './websocket'; -import * as ZeroRTTAPI from './zero-rtt'; - -export class Settings extends APIResource { - zeroRTT: ZeroRTTAPI.ZeroRTTResource = new ZeroRTTAPI.ZeroRTTResource(this._client); - advancedDDoS: AdvancedDDoSAPI.AdvancedDDoS = new AdvancedDDoSAPI.AdvancedDDoS(this._client); - alwaysOnline: AlwaysOnlineAPI.AlwaysOnlineResource = new AlwaysOnlineAPI.AlwaysOnlineResource(this._client); - alwaysUseHTTPS: AlwaysUseHTTPSAPI.AlwaysUseHTTPS = new AlwaysUseHTTPSAPI.AlwaysUseHTTPS(this._client); - automaticHTTPSRewrites: AutomaticHTTPSRewritesAPI.AutomaticHTTPSRewrites = - new AutomaticHTTPSRewritesAPI.AutomaticHTTPSRewrites(this._client); - automaticPlatformOptimization: AutomaticPlatformOptimizationAPI.AutomaticPlatformOptimizationResource = - new AutomaticPlatformOptimizationAPI.AutomaticPlatformOptimizationResource(this._client); - brotli: BrotliAPI.BrotliResource = new BrotliAPI.BrotliResource(this._client); - browserCacheTTL: BrowserCacheTTLAPI.BrowserCacheTTLResource = - new BrowserCacheTTLAPI.BrowserCacheTTLResource(this._client); - browserCheck: BrowserCheckAPI.BrowserCheckResource = new BrowserCheckAPI.BrowserCheckResource(this._client); - cacheLevel: CacheLevelAPI.CacheLevelResource = new CacheLevelAPI.CacheLevelResource(this._client); - challengeTTL: ChallengeTTLAPI.ChallengeTTLResource = new ChallengeTTLAPI.ChallengeTTLResource(this._client); - ciphers: CiphersAPI.Ciphers = new CiphersAPI.Ciphers(this._client); - developmentMode: DevelopmentModeAPI.DevelopmentModeResource = - new DevelopmentModeAPI.DevelopmentModeResource(this._client); - earlyHints: EarlyHintsAPI.EarlyHints = new EarlyHintsAPI.EarlyHints(this._client); - emailObfuscation: EmailObfuscationAPI.EmailObfuscationResource = - new EmailObfuscationAPI.EmailObfuscationResource(this._client); - h2Prioritization: H2PrioritizationAPI.H2PrioritizationResource = - new H2PrioritizationAPI.H2PrioritizationResource(this._client); - hotlinkProtection: HotlinkProtectionAPI.HotlinkProtectionResource = - new HotlinkProtectionAPI.HotlinkProtectionResource(this._client); - http2: HTTP2API.HTTP2Resource = new HTTP2API.HTTP2Resource(this._client); - http3: HTTP3API.HTTP3Resource = new HTTP3API.HTTP3Resource(this._client); - imageResizing: ImageResizingAPI.ImageResizingResource = new ImageResizingAPI.ImageResizingResource( - this._client, - ); - ipGeolocation: IPGeolocationAPI.IPGeolocationResource = new IPGeolocationAPI.IPGeolocationResource( - this._client, - ); - ipv6: IPV6API.IPV6Resource = new IPV6API.IPV6Resource(this._client); - minTLSVersion: MinTLSVersionAPI.MinTLSVersionResource = new MinTLSVersionAPI.MinTLSVersionResource( - this._client, - ); - minify: MinifyAPI.MinifyResource = new MinifyAPI.MinifyResource(this._client); - mirage: MirageAPI.MirageResource = new MirageAPI.MirageResource(this._client); - mobileRedirect: MobileRedirectAPI.MobileRedirectResource = new MobileRedirectAPI.MobileRedirectResource( - this._client, - ); - nel: NELAPI.NELResource = new NELAPI.NELResource(this._client); - opportunisticEncryption: OpportunisticEncryptionAPI.OpportunisticEncryptionResource = - new OpportunisticEncryptionAPI.OpportunisticEncryptionResource(this._client); - opportunisticOnion: OpportunisticOnionAPI.OpportunisticOnionResource = - new OpportunisticOnionAPI.OpportunisticOnionResource(this._client); - orangeToOrange: OrangeToOrangeAPI.OrangeToOrangeResource = new OrangeToOrangeAPI.OrangeToOrangeResource( - this._client, - ); - originErrorPagePassThru: OriginErrorPagePassThruAPI.OriginErrorPagePassThruResource = - new OriginErrorPagePassThruAPI.OriginErrorPagePassThruResource(this._client); - originMaxHTTPVersion: OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionResource = - new OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionResource(this._client); - polish: PolishAPI.PolishResource = new PolishAPI.PolishResource(this._client); - prefetchPreload: PrefetchPreloadAPI.PrefetchPreloadResource = - new PrefetchPreloadAPI.PrefetchPreloadResource(this._client); - proxyReadTimeout: ProxyReadTimeoutAPI.ProxyReadTimeoutResource = - new ProxyReadTimeoutAPI.ProxyReadTimeoutResource(this._client); - pseudoIPV4: PseudoIPV4API.PseudoIPV4Resource = new PseudoIPV4API.PseudoIPV4Resource(this._client); - responseBuffering: ResponseBufferingAPI.ResponseBufferingResource = - new ResponseBufferingAPI.ResponseBufferingResource(this._client); - rocketLoader: RocketLoaderAPI.RocketLoaderResource = new RocketLoaderAPI.RocketLoaderResource(this._client); - securityHeaders: SecurityHeadersAPI.SecurityHeaders = new SecurityHeadersAPI.SecurityHeaders(this._client); - securityLevel: SecurityLevelAPI.SecurityLevelResource = new SecurityLevelAPI.SecurityLevelResource( - this._client, - ); - serverSideExcludes: ServerSideExcludesAPI.ServerSideExcludes = new ServerSideExcludesAPI.ServerSideExcludes( - this._client, - ); - sortQueryStringForCache: SortQueryStringForCacheAPI.SortQueryStringForCacheResource = - new SortQueryStringForCacheAPI.SortQueryStringForCacheResource(this._client); - ssl: SSLAPI.SSLResource = new SSLAPI.SSLResource(this._client); - sslRecommender: SSLRecommenderAPI.SSLRecommenderResource = new SSLRecommenderAPI.SSLRecommenderResource( - this._client, - ); - tls1_3: TLS1_3API.TLS1_3Resource = new TLS1_3API.TLS1_3Resource(this._client); - tlsClientAuth: TLSClientAuthAPI.TLSClientAuthResource = new TLSClientAuthAPI.TLSClientAuthResource( - this._client, - ); - trueClientIPHeader: TrueClientIPHeaderAPI.TrueClientIPHeaderResource = - new TrueClientIPHeaderAPI.TrueClientIPHeaderResource(this._client); - waf: WAFAPI.WAFResource = new WAFAPI.WAFResource(this._client); - WebP: WebPAPI.WebPResource = new WebPAPI.WebPResource(this._client); - websocket: WebsocketAPI.WebsocketResource = new WebsocketAPI.WebsocketResource(this._client); - fontSettings: FontSettingsAPI.FontSettings = new FontSettingsAPI.FontSettings(this._client); -} - -export namespace Settings { - export import ZeroRTTResource = ZeroRTTAPI.ZeroRTTResource; - export import ZeroRTT = ZeroRTTAPI.ZeroRTT; - export import AdvancedDDoS = AdvancedDDoSAPI.AdvancedDDoS; - export import AlwaysOnlineResource = AlwaysOnlineAPI.AlwaysOnlineResource; - export import AlwaysOnline = AlwaysOnlineAPI.AlwaysOnline; - export import AlwaysUseHTTPS = AlwaysUseHTTPSAPI.AlwaysUseHTTPS; - export import AutomaticHTTPSRewrites = AutomaticHTTPSRewritesAPI.AutomaticHTTPSRewrites; - export import AutomaticPlatformOptimizationResource = AutomaticPlatformOptimizationAPI.AutomaticPlatformOptimizationResource; - export import AutomaticPlatformOptimization = AutomaticPlatformOptimizationAPI.AutomaticPlatformOptimization; - export import BrotliResource = BrotliAPI.BrotliResource; - export import Brotli = BrotliAPI.Brotli; - export import BrowserCacheTTLResource = BrowserCacheTTLAPI.BrowserCacheTTLResource; - export import BrowserCacheTTL = BrowserCacheTTLAPI.BrowserCacheTTL; - export import BrowserCheckResource = BrowserCheckAPI.BrowserCheckResource; - export import BrowserCheck = BrowserCheckAPI.BrowserCheck; - export import CacheLevelResource = CacheLevelAPI.CacheLevelResource; - export import CacheLevel = CacheLevelAPI.CacheLevel; - export import ChallengeTTLResource = ChallengeTTLAPI.ChallengeTTLResource; - export import ChallengeTTL = ChallengeTTLAPI.ChallengeTTL; - export import Ciphers = CiphersAPI.Ciphers; - export import DevelopmentModeResource = DevelopmentModeAPI.DevelopmentModeResource; - export import DevelopmentMode = DevelopmentModeAPI.DevelopmentMode; - export import EarlyHints = EarlyHintsAPI.EarlyHints; - export import EmailObfuscationResource = EmailObfuscationAPI.EmailObfuscationResource; - export import EmailObfuscation = EmailObfuscationAPI.EmailObfuscation; - export import H2PrioritizationResource = H2PrioritizationAPI.H2PrioritizationResource; - export import H2Prioritization = H2PrioritizationAPI.H2Prioritization; - export import HotlinkProtectionResource = HotlinkProtectionAPI.HotlinkProtectionResource; - export import HotlinkProtection = HotlinkProtectionAPI.HotlinkProtection; - export import HTTP2Resource = HTTP2API.HTTP2Resource; - export import HTTP2 = HTTP2API.HTTP2; - export import HTTP3Resource = HTTP3API.HTTP3Resource; - export import HTTP3 = HTTP3API.HTTP3; - export import ImageResizingResource = ImageResizingAPI.ImageResizingResource; - export import ImageResizing = ImageResizingAPI.ImageResizing; - export import IPGeolocationResource = IPGeolocationAPI.IPGeolocationResource; - export import IPGeolocation = IPGeolocationAPI.IPGeolocation; - export import IPV6Resource = IPV6API.IPV6Resource; - export import IPV6 = IPV6API.IPV6; - export import MinTLSVersionResource = MinTLSVersionAPI.MinTLSVersionResource; - export import MinTLSVersion = MinTLSVersionAPI.MinTLSVersion; - export import MinifyResource = MinifyAPI.MinifyResource; - export import Minify = MinifyAPI.Minify; - export import MirageResource = MirageAPI.MirageResource; - export import Mirage = MirageAPI.Mirage; - export import MobileRedirectResource = MobileRedirectAPI.MobileRedirectResource; - export import MobileRedirect = MobileRedirectAPI.MobileRedirect; - export import NELResource = NELAPI.NELResource; - export import NEL = NELAPI.NEL; - export import OpportunisticEncryptionResource = OpportunisticEncryptionAPI.OpportunisticEncryptionResource; - export import OpportunisticEncryption = OpportunisticEncryptionAPI.OpportunisticEncryption; - export import OpportunisticOnionResource = OpportunisticOnionAPI.OpportunisticOnionResource; - export import OpportunisticOnion = OpportunisticOnionAPI.OpportunisticOnion; - export import OrangeToOrangeResource = OrangeToOrangeAPI.OrangeToOrangeResource; - export import OrangeToOrange = OrangeToOrangeAPI.OrangeToOrange; - export import OriginErrorPagePassThruResource = OriginErrorPagePassThruAPI.OriginErrorPagePassThruResource; - export import OriginErrorPagePassThru = OriginErrorPagePassThruAPI.OriginErrorPagePassThru; - export import OriginMaxHTTPVersionResource = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionResource; - export import OriginMaxHTTPVersion = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersion; - export import OriginMaxHTTPVersionEditResponse = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionEditResponse; - export import OriginMaxHTTPVersionGetResponse = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionGetResponse; - export import OriginMaxHTTPVersionEditParams = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionEditParams; - export import OriginMaxHTTPVersionGetParams = OriginMaxHTTPVersionAPI.OriginMaxHTTPVersionGetParams; - export import PolishResource = PolishAPI.PolishResource; - export import Polish = PolishAPI.Polish; - export import PrefetchPreloadResource = PrefetchPreloadAPI.PrefetchPreloadResource; - export import PrefetchPreload = PrefetchPreloadAPI.PrefetchPreload; - export import ProxyReadTimeoutResource = ProxyReadTimeoutAPI.ProxyReadTimeoutResource; - export import ProxyReadTimeout = ProxyReadTimeoutAPI.ProxyReadTimeout; - export import PseudoIPV4Resource = PseudoIPV4API.PseudoIPV4Resource; - export import PseudoIPV4 = PseudoIPV4API.PseudoIPV4; - export import ResponseBufferingResource = ResponseBufferingAPI.ResponseBufferingResource; - export import ResponseBuffering = ResponseBufferingAPI.ResponseBuffering; - export import RocketLoaderResource = RocketLoaderAPI.RocketLoaderResource; - export import RocketLoader = RocketLoaderAPI.RocketLoader; - export import SecurityHeaders = SecurityHeadersAPI.SecurityHeaders; - export import SecurityLevelResource = SecurityLevelAPI.SecurityLevelResource; - export import SecurityLevel = SecurityLevelAPI.SecurityLevel; - export import ServerSideExcludes = ServerSideExcludesAPI.ServerSideExcludes; - export import SortQueryStringForCacheResource = SortQueryStringForCacheAPI.SortQueryStringForCacheResource; - export import SortQueryStringForCache = SortQueryStringForCacheAPI.SortQueryStringForCache; - export import SSLResource = SSLAPI.SSLResource; - export import SSL = SSLAPI.SSL; - export import SSLRecommenderResource = SSLRecommenderAPI.SSLRecommenderResource; - export import SSLRecommender = SSLRecommenderAPI.SSLRecommender; - export import TLS1_3Resource = TLS1_3API.TLS1_3Resource; - export import TLS1_3 = TLS1_3API.TLS1_3; - export import TLSClientAuthResource = TLSClientAuthAPI.TLSClientAuthResource; - export import TLSClientAuth = TLSClientAuthAPI.TLSClientAuth; - export import TrueClientIPHeaderResource = TrueClientIPHeaderAPI.TrueClientIPHeaderResource; - export import TrueClientIPHeader = TrueClientIPHeaderAPI.TrueClientIPHeader; - export import WAFResource = WAFAPI.WAFResource; - export import WAF = WAFAPI.WAF; - export import WebPResource = WebPAPI.WebPResource; - export import WebP = WebPAPI.WebP; - export import WebsocketResource = WebsocketAPI.WebsocketResource; - export import Websocket = WebsocketAPI.Websocket; - export import FontSettings = FontSettingsAPI.FontSettings; - export import FontSettingEditParams = FontSettingsAPI.FontSettingEditParams; - export import FontSettingGetParams = FontSettingsAPI.FontSettingGetParams; -} diff --git a/src/resources/zones/settings/sort-query-string-for-cache.ts b/src/resources/zones/settings/sort-query-string-for-cache.ts deleted file mode 100644 index 16c8173739..0000000000 --- a/src/resources/zones/settings/sort-query-string-for-cache.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as SortQueryStringForCacheAPI from './sort-query-string-for-cache'; - -export class SortQueryStringForCacheResource extends APIResource {} - -/** - * Cloudflare will treat files with the same query strings as the same file in - * cache, regardless of the order of the query strings. This is limited to - * Enterprise Zones. - */ -export interface SortQueryStringForCache { - /** - * ID of the zone setting. - */ - id: 'sort_query_string_for_cache'; - - /** - * 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 namespace SortQueryStringForCacheResource { - export import SortQueryStringForCache = SortQueryStringForCacheAPI.SortQueryStringForCache; -} diff --git a/src/resources/zones/settings/ssl-recommender.ts b/src/resources/zones/settings/ssl-recommender.ts deleted file mode 100644 index 0f8e7449e6..0000000000 --- a/src/resources/zones/settings/ssl-recommender.ts +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as SSLRecommenderAPI from './ssl-recommender'; - -export class SSLRecommenderResource extends APIResource {} - -/** - * Enrollment in the SSL/TLS Recommender service which tries to detect and - * recommend (by sending periodic emails) the most secure SSL/TLS setting your - * origin servers support. - */ -export interface SSLRecommender { - /** - * Enrollment value for SSL/TLS Recommender. - */ - id?: 'ssl_recommender'; - - /** - * ssl-recommender enrollment setting. - */ - enabled?: boolean; -} - -export namespace SSLRecommenderResource { - export import SSLRecommender = SSLRecommenderAPI.SSLRecommender; -} diff --git a/src/resources/zones/settings/ssl.ts b/src/resources/zones/settings/ssl.ts deleted file mode 100644 index 2417b1f194..0000000000 --- a/src/resources/zones/settings/ssl.ts +++ /dev/null @@ -1,51 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as SSLAPI from './ssl'; - -export class SSLResource extends APIResource {} - -/** - * SSL encrypts your visitor's connection and safeguards credit card numbers and - * other personal data to and from your website. SSL can take up to 5 minutes to - * fully activate. Requires Cloudflare active on your root domain or www domain. - * Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - * and your web server (all HTTP traffic). Flexible: SSL between the visitor and - * Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - * your web server. You don't need to have an SSL cert on your web server, but your - * vistors will still see the site as being HTTPS enabled. Full: SSL between the - * visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - * Cloudflare and your web server. You'll need to have your own SSL cert or - * self-signed cert at the very least. Full (Strict): SSL between the visitor and - * Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - * your web server. You'll need to have a valid SSL certificate installed on your - * web server. This certificate must be signed by a certificate authority, have an - * expiration date in the future, and respond for the request domain name - * (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - */ -export interface SSL { - /** - * ID of the zone setting. - */ - id: 'ssl'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'flexible' | 'full' | 'strict'; - - /** - * 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 namespace SSLResource { - export import SSL = SSLAPI.SSL; -} diff --git a/src/resources/zones/settings/tls-1-3.ts b/src/resources/zones/settings/tls-1-3.ts deleted file mode 100644 index bedb030540..0000000000 --- a/src/resources/zones/settings/tls-1-3.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as TLS1_3API from './tls-1-3'; - -export class TLS1_3Resource extends APIResource {} - -/** - * Enables Crypto TLS 1.3 feature for a zone. - */ -export interface TLS1_3 { - /** - * ID of the zone setting. - */ - id: 'tls_1_3'; - - /** - * Current value of the zone setting. - */ - value: 'on' | 'off' | 'zrt'; - - /** - * 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 namespace TLS1_3Resource { - export import TLS1_3 = TLS1_3API.TLS1_3; -} diff --git a/src/resources/zones/settings/tls-client-auth.ts b/src/resources/zones/settings/tls-client-auth.ts deleted file mode 100644 index 37f388e88d..0000000000 --- a/src/resources/zones/settings/tls-client-auth.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as TLSClientAuthAPI from './tls-client-auth'; - -export class TLSClientAuthResource extends APIResource {} - -/** - * TLS Client Auth requires Cloudflare to connect to your origin server using a - * client certificate (Enterprise Only). - */ -export interface TLSClientAuth { - /** - * ID of the zone setting. - */ - id: 'tls_client_auth'; - - /** - * 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 namespace TLSClientAuthResource { - export import TLSClientAuth = TLSClientAuthAPI.TLSClientAuth; -} diff --git a/src/resources/zones/settings/true-client-ip-header.ts b/src/resources/zones/settings/true-client-ip-header.ts deleted file mode 100644 index f7d033d245..0000000000 --- a/src/resources/zones/settings/true-client-ip-header.ts +++ /dev/null @@ -1,37 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as TrueClientIPHeaderAPI from './true-client-ip-header'; - -export class TrueClientIPHeaderResource extends APIResource {} - -/** - * Allows customer to continue to use True Client IP (Akamai feature) in the - * headers we send to the origin. This is limited to Enterprise Zones. - */ -export interface TrueClientIPHeader { - /** - * ID of the zone setting. - */ - id: 'true_client_ip_header'; - - /** - * 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 namespace TrueClientIPHeaderResource { - export import TrueClientIPHeader = TrueClientIPHeaderAPI.TrueClientIPHeader; -} diff --git a/src/resources/zones/settings/waf.ts b/src/resources/zones/settings/waf.ts deleted file mode 100644 index 1d82cec82b..0000000000 --- a/src/resources/zones/settings/waf.ts +++ /dev/null @@ -1,45 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as WAFAPI from './waf'; - -export class WAFResource extends APIResource {} - -/** - * The WAF examines HTTP requests to your website. It inspects both GET and POST - * requests and applies rules to help filter out illegitimate traffic from - * legitimate website visitors. The Cloudflare WAF inspects website addresses or - * URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - * suspicious user behavior, then the WAF will 'challenge' the web visitor with a - * page that asks them to submit a CAPTCHA successfully to continue their action. - * If the challenge is failed, the action will be stopped. What this means is that - * Cloudflare's WAF will block any traffic identified as illegitimate before it - * reaches your origin web server. - * (https://support.cloudflare.com/hc/en-us/articles/200172016). - */ -export interface WAF { - /** - * ID of the zone setting. - */ - id: 'waf'; - - /** - * 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 namespace WAFResource { - export import WAF = WAFAPI.WAF; -} diff --git a/src/resources/zones/settings/webp.ts b/src/resources/zones/settings/webp.ts deleted file mode 100644 index afe0126146..0000000000 --- a/src/resources/zones/settings/webp.ts +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as WebPAPI from './webp'; - -export class WebPResource extends APIResource {} - -/** - * When the client requesting the image supports the WebP image codec, and WebP - * offers a performance advantage over the original image format, Cloudflare will - * serve a WebP version of the original image. - */ -export interface WebP { - /** - * ID of the zone setting. - */ - id: 'webp'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'on'; - - /** - * 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 namespace WebPResource { - export import WebP = WebPAPI.WebP; -} diff --git a/src/resources/zones/settings/websocket.ts b/src/resources/zones/settings/websocket.ts deleted file mode 100644 index e6e7b5b821..0000000000 --- a/src/resources/zones/settings/websocket.ts +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as WebsocketAPI from './websocket'; - -export class WebsocketResource extends APIResource {} - -/** - * WebSockets are open connections sustained between the client and the origin - * server. Inside a WebSockets connection, the client and the origin can pass data - * back and forth without having to reestablish sessions. This makes exchanging - * data within a WebSockets connection fast. WebSockets are often used for - * real-time applications such as live chat and gaming. For more information refer - * to - * [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). - */ -export interface Websocket { - /** - * ID of the zone setting. - */ - id: 'websockets'; - - /** - * Current value of the zone setting. - */ - value: 'off' | 'on'; - - /** - * 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 namespace WebsocketResource { - export import Websocket = WebsocketAPI.Websocket; -} diff --git a/src/resources/zones/settings/zero-rtt.ts b/src/resources/zones/settings/zero-rtt.ts deleted file mode 100644 index deaaf29cff..0000000000 --- a/src/resources/zones/settings/zero-rtt.ts +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as ZeroRTTAPI from './zero-rtt'; - -export class ZeroRTTResource extends APIResource {} - -/** - * 0-RTT session resumption enabled for this zone. - */ -export interface ZeroRTT { - /** - * ID of the zone setting. - */ - id: '0rtt'; - - /** - * 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 namespace ZeroRTTResource { - export import ZeroRTT = ZeroRTTAPI.ZeroRTT; -} diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts index 77c0caeb1e..b5de730ca5 100644 --- a/src/resources/zones/zones.ts +++ b/src/resources/zones/zones.ts @@ -6,8 +6,8 @@ import * as Core from '../../core'; import * as ActivationCheckAPI from './activation-check'; import * as CustomNameserversAPI from './custom-nameservers'; import * as HoldsAPI from './holds'; +import * as SettingsAPI from './settings'; import * as SubscriptionsAPI from './subscriptions'; -import * as SettingsAPI from './settings/settings'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; export class Zones extends APIResource { @@ -400,6 +400,61 @@ export namespace Zones { export import ActivationCheckTriggerResponse = ActivationCheckAPI.ActivationCheckTriggerResponse; export import ActivationCheckTriggerParams = ActivationCheckAPI.ActivationCheckTriggerParams; export import Settings = SettingsAPI.Settings; + export import AdvancedDDoS = SettingsAPI.AdvancedDDoS; + export import AlwaysOnline = SettingsAPI.AlwaysOnline; + export import AlwaysUseHTTPS = SettingsAPI.AlwaysUseHTTPS; + export import AutomaticHTTPSRewrites = SettingsAPI.AutomaticHTTPSRewrites; + export import AutomaticPlatformOptimization = SettingsAPI.AutomaticPlatformOptimization; + export import Brotli = SettingsAPI.Brotli; + export import BrowserCacheTTL = SettingsAPI.BrowserCacheTTL; + export import BrowserCheck = SettingsAPI.BrowserCheck; + export import CacheLevel = SettingsAPI.CacheLevel; + export import ChallengeTTL = SettingsAPI.ChallengeTTL; + export import Ciphers = SettingsAPI.Ciphers; + export import DevelopmentMode = SettingsAPI.DevelopmentMode; + export import EarlyHints = SettingsAPI.EarlyHints; + export import EmailObfuscation = SettingsAPI.EmailObfuscation; + export import FontSettings = SettingsAPI.FontSettings; + export import H2Prioritization = SettingsAPI.H2Prioritization; + export import HotlinkProtection = SettingsAPI.HotlinkProtection; + export import HTTP2 = SettingsAPI.HTTP2; + export import HTTP3 = SettingsAPI.HTTP3; + export import ImageResizing = SettingsAPI.ImageResizing; + export import IPGeolocation = SettingsAPI.IPGeolocation; + export import IPV6 = SettingsAPI.IPV6; + export import MinTLSVersion = SettingsAPI.MinTLSVersion; + export import Minify = SettingsAPI.Minify; + export import Mirage = SettingsAPI.Mirage; + export import MobileRedirect = SettingsAPI.MobileRedirect; + export import NEL = SettingsAPI.NEL; + export import OpportunisticEncryption = SettingsAPI.OpportunisticEncryption; + export import OpportunisticOnion = SettingsAPI.OpportunisticOnion; + export import OrangeToOrange = SettingsAPI.OrangeToOrange; + export import OriginErrorPagePassThru = SettingsAPI.OriginErrorPagePassThru; + export import OriginMaxHTTPVersion = SettingsAPI.OriginMaxHTTPVersion; + export import Polish = SettingsAPI.Polish; + export import PrefetchPreload = SettingsAPI.PrefetchPreload; + export import ProxyReadTimeout = SettingsAPI.ProxyReadTimeout; + export import PseudoIPV4 = SettingsAPI.PseudoIPV4; + export import ResponseBuffering = SettingsAPI.ResponseBuffering; + export import RocketLoader = SettingsAPI.RocketLoader; + export import SecurityHeaders = SettingsAPI.SecurityHeaders; + export import SecurityLevel = SettingsAPI.SecurityLevel; + export import ServerSideExcludes = SettingsAPI.ServerSideExcludes; + export import SortQueryStringForCache = SettingsAPI.SortQueryStringForCache; + export import SSL = SettingsAPI.SSL; + export import SSLRecommender = SettingsAPI.SSLRecommender; + export import TLS1_3 = SettingsAPI.TLS1_3; + export import TLSClientAuth = SettingsAPI.TLSClientAuth; + export import TrueClientIPHeader = SettingsAPI.TrueClientIPHeader; + export import WAF = SettingsAPI.WAF; + export import WebP = SettingsAPI.WebP; + export import Websocket = SettingsAPI.Websocket; + export import ZeroRTT = SettingsAPI.ZeroRTT; + export import SettingEditResponse = SettingsAPI.SettingEditResponse; + export import SettingGetResponse = SettingsAPI.SettingGetResponse; + export import SettingEditParams = SettingsAPI.SettingEditParams; + export import SettingGetParams = SettingsAPI.SettingGetParams; export import CustomNameservers = CustomNameserversAPI.CustomNameservers; export import CustomNameserverUpdateResponse = CustomNameserversAPI.CustomNameserverUpdateResponse; export import CustomNameserverGetResponse = CustomNameserversAPI.CustomNameserverGetResponse; diff --git a/tests/api-resources/zones/settings/font-settings.test.ts b/tests/api-resources/zones/settings.test.ts similarity index 81% rename from tests/api-resources/zones/settings/font-settings.test.ts rename to tests/api-resources/zones/settings.test.ts index 8db38ebc5c..a8ec352343 100644 --- a/tests/api-resources/zones/settings/font-settings.test.ts +++ b/tests/api-resources/zones/settings.test.ts @@ -9,11 +9,10 @@ const cloudflare = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource fontSettings', () => { +describe('resource settings', () => { test('edit: only required params', async () => { - const responsePromise = cloudflare.zones.settings.fontSettings.edit({ + const responsePromise = cloudflare.zones.settings.edit('always_online', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - value: 'on', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -25,14 +24,13 @@ describe('resource fontSettings', () => { }); test('edit: required and optional params', async () => { - const response = await cloudflare.zones.settings.fontSettings.edit({ + const response = await cloudflare.zones.settings.edit('always_online', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - value: 'on', }); }); test('get: only required params', async () => { - const responsePromise = cloudflare.zones.settings.fontSettings.get({ + const responsePromise = cloudflare.zones.settings.get('always_online', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); const rawResponse = await responsePromise.asResponse(); @@ -45,7 +43,7 @@ describe('resource fontSettings', () => { }); test('get: required and optional params', async () => { - const response = await cloudflare.zones.settings.fontSettings.get({ + const response = await cloudflare.zones.settings.get('always_online', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); }); diff --git a/tests/api-resources/zones/settings/origin-max-http-version.test.ts b/tests/api-resources/zones/settings/origin-max-http-version.test.ts deleted file mode 100644 index 598fa9f5ef..0000000000 --- a/tests/api-resources/zones/settings/origin-max-http-version.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const cloudflare = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource originMaxHTTPVersion', () => { - test('edit: only required params', async () => { - const responsePromise = cloudflare.zones.settings.originMaxHTTPVersion.edit({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - value: '2', - }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('edit: required and optional params', async () => { - const response = await cloudflare.zones.settings.originMaxHTTPVersion.edit({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - value: '2', - }); - }); - - test('get: only required params', async () => { - const responsePromise = cloudflare.zones.settings.originMaxHTTPVersion.get({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('get: required and optional params', async () => { - const response = await cloudflare.zones.settings.originMaxHTTPVersion.get({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - }); - }); -});