// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { aiBotsProtection: "ai_bots_protection", autoUpdateModel: "auto_update_model", bmCookieEnabled: "bm_cookie_enabled", cfRobotsVariant: "cf_robots_variant", contentBotsProtection: "content_bots_protection", crawlerProtection: "crawler_protection", enableJs: "enable_js", fightMode: "fight_mode", isRobotsTxtManaged: "is_robots_txt_managed", optimizeWordpress: "optimize_wordpress", sbfmDefinitelyAutomated: "sbfm_definitely_automated", sbfmLikelyAutomated: "sbfm_likely_automated", sbfmStaticResourceProtection: "sbfm_static_resource_protection", sbfmVerifiedBots: "sbfm_verified_bots", staleZoneConfiguration: "stale_zone_configuration", suppressSessionScore: "suppress_session_score", usingLatestModel: "using_latest_model", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export interface CreateFeedbackRequestRequestsByAttribute { metric: string; requests: number; } export const CreateFeedbackRequestRequestsByAttribute = /*@__PURE__*/ S.suspend( () => S.Struct({ metric: S.String, requests: S.Number, }), ).annotate({ identifier: "CreateFeedbackRequestRequestsByAttribute", }) as any as S.Schema; export type CreateFeedbackRequestType = "false_positive" | "false_negative"; export const CreateFeedbackRequestType = /*@__PURE__*/ S.String; export interface CreateFeedbackRequest { /** Identifier. */ zoneId: string; description: string; /** Wirefilter expression describing the traffic being reported. */ expression: string; firstRequestSeenAt: string; lastRequestSeenAt: string; requests: number; /** Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. */ requestsByAttribute: CreateFeedbackRequestRequestsByAttribute; /** Map of bot scores (1-99) to request counts. Sum must equal `requests`. */ requestsByScore: unknown; /** Map of score source to request counts. Sum must equal `requests`. */ requestsByScoreSrc: unknown; /** Type of feedback report. */ type: CreateFeedbackRequestType | (string & {}); subtype?: string; } export const CreateFeedbackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), description: S.String, expression: S.String, firstRequestSeenAt: S.String.pipe(T.Body("first_request_seen_at")), lastRequestSeenAt: S.String.pipe(T.Body("last_request_seen_at")), requests: S.Number, requestsByAttribute: CreateFeedbackRequestRequestsByAttribute.pipe( T.Body("requests_by_attribute"), ), requestsByScore: S.Unknown.pipe(T.Body("requests_by_score")), requestsByScoreSrc: S.Unknown.pipe(T.Body("requests_by_score_src")), type: CreateFeedbackRequestType, subtype: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/bot_management/feedback", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateFeedbackRequest", }) as any as S.Schema; export interface CreateFeedbackResponse {} export const CreateFeedbackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateFeedbackResponse", }) as any as S.Schema; export interface GetBotManagementRequest { /** Identifier. */ zoneId: string; } export const GetBotManagementRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/bot_management", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBotManagementRequest", }) as any as S.Schema; export type GetResultBotFightModeConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const GetResultBotFightModeConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type GetResultBotFightModeConfigurationCfRobotsVariant = | "off" | "policy_only"; export const GetResultBotFightModeConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type GetResultBotFightModeConfigurationContentBotsProtection = | "block" | "disabled"; export const GetResultBotFightModeConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type GetResultBotFightModeConfigurationCrawlerProtection = | "enabled" | "disabled"; export const GetResultBotFightModeConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export interface GetResultBotFightModeConfigurationStaleZoneConfiguration { /** Indicates that the zone's wordpress optimization for SBFM is turned on. */ optimizeWordpress?: boolean | null; /** Indicates that the zone's definitely automated requests are being blocked or challenged. */ sbfmDefinitelyAutomated?: string | null; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string | null; /** Indicates that the zone's static resource protection is turned on. */ sbfmStaticResourceProtection?: string | null; /** Indicates that the zone's verified bot requests are being blocked. */ sbfmVerifiedBots?: string | null; /** Indicates that the zone's session score tracking is disabled. */ suppressSessionScore?: boolean | null; } export const GetResultBotFightModeConfigurationStaleZoneConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_verified_bots")), ), suppressSessionScore: S.optional( S.NullOr(S.Boolean).pipe(T.Body("suppress_session_score")), ), }), ).annotate({ identifier: "GetResultBotFightModeConfigurationStaleZoneConfiguration", }) as any as S.Schema; export interface GetResultBotFightModeConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: GetResultBotFightModeConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: GetResultBotFightModeConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: GetResultBotFightModeConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: GetResultBotFightModeConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Whether to enable Bot Fight Mode. */ fightMode?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultBotFightModeConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const GetResultBotFightModeConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr(GetResultBotFightModeConfigurationAiBotsProtection).pipe( T.Body("ai_bots_protection"), ), ), cfRobotsVariant: S.optional( S.NullOr(GetResultBotFightModeConfigurationCfRobotsVariant).pipe( T.Body("cf_robots_variant"), ), ), contentBotsProtection: S.optional( S.NullOr(GetResultBotFightModeConfigurationContentBotsProtection).pipe( T.Body("content_bots_protection"), ), ), crawlerProtection: S.optional( S.NullOr(GetResultBotFightModeConfigurationCrawlerProtection).pipe( T.Body("crawler_protection"), ), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), fightMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("fight_mode"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), staleZoneConfiguration: S.optional( S.NullOr(GetResultBotFightModeConfigurationStaleZoneConfiguration).pipe( T.Body("stale_zone_configuration"), ), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "GetResultBotFightModeConfiguration", }) as any as S.Schema; export type GetResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const GetResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant = | "off" | "policy_only"; export const GetResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection = | "block" | "disabled"; export const GetResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection = | "enabled" | "disabled"; export const GetResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated = | "allow" | "block" | "managed_challenge"; export const GetResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots = | "allow" | "block"; export const GetResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots = /*@__PURE__*/ S.String; export interface GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean | null; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string | null; } export const GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("fight_mode"))), sbfmLikelyAutomated: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_likely_automated")), ), }), ).annotate({ identifier: "GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration", }) as any as S.Schema; export interface GetResultSuperBotFightModeDefinitelyConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: GetResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: GetResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: GetResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: GetResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** Whether to optimize Super Bot Fight Mode protections for Wordpress. */ optimizeWordpress?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on definitely automated requests. */ sbfmDefinitelyAutomated?: GetResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated | null; /** Super Bot Fight Mode (SBFM) to enable static resource protection. */ sbfmStaticResourceProtection?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on verified bots requests. */ sbfmVerifiedBots?: GetResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const GetResultSuperBotFightModeDefinitelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection, ).pipe(T.Body("ai_bots_protection")), ), cfRobotsVariant: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant, ).pipe(T.Body("cf_robots_variant")), ), contentBotsProtection: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection, ).pipe(T.Body("crawler_protection")), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated, ).pipe(T.Body("sbfm_definitely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots, ).pipe(T.Body("sbfm_verified_bots")), ), staleZoneConfiguration: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration, ).pipe(T.Body("stale_zone_configuration")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "GetResultSuperBotFightModeDefinitelyConfiguration", }) as any as S.Schema; export type GetResultSuperBotFightModeLikelyConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const GetResultSuperBotFightModeLikelyConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationCfRobotsVariant = | "off" | "policy_only"; export const GetResultSuperBotFightModeLikelyConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationContentBotsProtection = | "block" | "disabled"; export const GetResultSuperBotFightModeLikelyConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationCrawlerProtection = | "enabled" | "disabled"; export const GetResultSuperBotFightModeLikelyConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated = | "allow" | "block" | "managed_challenge"; export const GetResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated = | "allow" | "block" | "managed_challenge"; export const GetResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated = /*@__PURE__*/ S.String; export type GetResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots = | "allow" | "block"; export const GetResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots = /*@__PURE__*/ S.String; export interface GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean | null; } export const GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("fight_mode"))), }), ).annotate({ identifier: "GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration", }) as any as S.Schema; export interface GetResultSuperBotFightModeLikelyConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: GetResultSuperBotFightModeLikelyConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: GetResultSuperBotFightModeLikelyConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: GetResultSuperBotFightModeLikelyConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: GetResultSuperBotFightModeLikelyConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** Whether to optimize Super Bot Fight Mode protections for Wordpress. */ optimizeWordpress?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on definitely automated requests. */ sbfmDefinitelyAutomated?: GetResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated | null; /** Super Bot Fight Mode (SBFM) action to take on likely automated requests. */ sbfmLikelyAutomated?: GetResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated | null; /** Super Bot Fight Mode (SBFM) to enable static resource protection. */ sbfmStaticResourceProtection?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on verified bots requests. */ sbfmVerifiedBots?: GetResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const GetResultSuperBotFightModeLikelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationAiBotsProtection, ).pipe(T.Body("ai_bots_protection")), ), cfRobotsVariant: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationCfRobotsVariant, ).pipe(T.Body("cf_robots_variant")), ), contentBotsProtection: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationCrawlerProtection, ).pipe(T.Body("crawler_protection")), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated, ).pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated, ).pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots, ).pipe(T.Body("sbfm_verified_bots")), ), staleZoneConfiguration: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration, ).pipe(T.Body("stale_zone_configuration")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "GetResultSuperBotFightModeLikelyConfiguration", }) as any as S.Schema; export type GetResultSubscriptionConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const GetResultSubscriptionConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type GetResultSubscriptionConfigurationCfRobotsVariant = | "off" | "policy_only"; export const GetResultSubscriptionConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type GetResultSubscriptionConfigurationContentBotsProtection = | "block" | "disabled"; export const GetResultSubscriptionConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type GetResultSubscriptionConfigurationCrawlerProtection = | "enabled" | "disabled"; export const GetResultSubscriptionConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export interface GetResultSubscriptionConfigurationStaleZoneConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean | null; /** Indicates that the zone's wordpress optimization for SBFM is turned on. */ optimizeWordpress?: boolean | null; /** Indicates that the zone's definitely automated requests are being blocked or challenged. */ sbfmDefinitelyAutomated?: string | null; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string | null; /** Indicates that the zone's static resource protection is turned on. */ sbfmStaticResourceProtection?: string | null; /** Indicates that the zone's verified bot requests are being blocked. */ sbfmVerifiedBots?: string | null; } export const GetResultSubscriptionConfigurationStaleZoneConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("fight_mode"))), optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr(S.String).pipe(T.Body("sbfm_verified_bots")), ), }), ).annotate({ identifier: "GetResultSubscriptionConfigurationStaleZoneConfiguration", }) as any as S.Schema; export interface GetResultSubscriptionConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: GetResultSubscriptionConfigurationAiBotsProtection | null; /** Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) */ autoUpdateModel?: boolean | null; /** Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true */ bmCookieEnabled?: boolean | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: GetResultSubscriptionConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: GetResultSubscriptionConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: GetResultSubscriptionConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSubscriptionConfigurationStaleZoneConfiguration | null; /** Whether to disable tracking the highest bot score for a session in the Bot Management cookie. */ suppressSessionScore?: boolean | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const GetResultSubscriptionConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr(GetResultSubscriptionConfigurationAiBotsProtection).pipe( T.Body("ai_bots_protection"), ), ), autoUpdateModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_update_model")), ), bmCookieEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("bm_cookie_enabled")), ), cfRobotsVariant: S.optional( S.NullOr(GetResultSubscriptionConfigurationCfRobotsVariant).pipe( T.Body("cf_robots_variant"), ), ), contentBotsProtection: S.optional( S.NullOr(GetResultSubscriptionConfigurationContentBotsProtection).pipe( T.Body("content_bots_protection"), ), ), crawlerProtection: S.optional( S.NullOr(GetResultSubscriptionConfigurationCrawlerProtection).pipe( T.Body("crawler_protection"), ), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), staleZoneConfiguration: S.optional( S.NullOr(GetResultSubscriptionConfigurationStaleZoneConfiguration).pipe( T.Body("stale_zone_configuration"), ), ), suppressSessionScore: S.optional( S.NullOr(S.Boolean).pipe(T.Body("suppress_session_score")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "GetResultSubscriptionConfiguration", }) as any as S.Schema; export type GetResult = | GetResultBotFightModeConfiguration | GetResultSuperBotFightModeDefinitelyConfiguration | GetResultSuperBotFightModeLikelyConfiguration | GetResultSubscriptionConfiguration; export const GetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "fightMode", "isRobotsTxtManaged", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmLikelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "autoUpdateModel", "bmCookieEnabled", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "staleZoneConfiguration", "suppressSessionScore", "usingLatestModel", ], ]), ); export type GetBotManagementResponse = GetResult; export const GetBotManagementResponse = /*@__PURE__*/ S.suspend(() => GetResult.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetBotManagementResponse", }) as any as S.Schema; export interface ListFeedbackRequest { /** Identifier. */ zoneId: string; } export const ListFeedbackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/bot_management/feedback", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListFeedbackRequest", }) as any as S.Schema; export type ListFeedbackResponseRequestsByAttribute = CreateFeedbackRequestRequestsByAttribute; export const ListFeedbackResponseRequestsByAttribute = CreateFeedbackRequestRequestsByAttribute; export type ListFeedbackResponseType = "false_positive" | "false_negative"; export const ListFeedbackResponseType = /*@__PURE__*/ S.String; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface ListFeedbackResponse { description: string; /** Wirefilter expression describing the traffic being reported. */ expression: string; firstRequestSeenAt: string; lastRequestSeenAt: string; requests: number; /** Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. */ requestsByAttribute: CreateFeedbackRequestRequestsByAttribute; /** Map of bot scores (1-99) to request counts. Sum must equal `requests`. */ requestsByScore: unknown; /** Map of score source to request counts. Sum must equal `requests`. */ requestsByScoreSrc: unknown; /** Type of feedback report. */ type: ListFeedbackResponseType; createdAt?: string | null; subtype?: string | null; } export const ListFeedbackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.String, expression: S.String, firstRequestSeenAt: S.String.pipe(T.Body("first_request_seen_at")), lastRequestSeenAt: S.String.pipe(T.Body("last_request_seen_at")), requests: S.Number, requestsByAttribute: CreateFeedbackRequestRequestsByAttribute.pipe( T.Body("requests_by_attribute"), ), requestsByScore: S.Unknown.pipe(T.Body("requests_by_score")), requestsByScoreSrc: S.Unknown.pipe(T.Body("requests_by_score_src")), type: ListFeedbackResponseType, createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), subtype: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListFeedbackResponse", }) as any as S.Schema; export type UpdateRequestAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const UpdateRequestAiBotsProtection = /*@__PURE__*/ S.String; export type UpdateRequestCfRobotsVariant = "off" | "policy_only"; export const UpdateRequestCfRobotsVariant = /*@__PURE__*/ S.String; export type UpdateRequestContentBotsProtection = "block" | "disabled"; export const UpdateRequestContentBotsProtection = /*@__PURE__*/ S.String; export type UpdateRequestCrawlerProtection = "enabled" | "disabled"; export const UpdateRequestCrawlerProtection = /*@__PURE__*/ S.String; export interface UpdateRequestStaleZoneConfigurationBotFightModeConfiguration { /** Indicates that the zone's wordpress optimization for SBFM is turned on. */ optimizeWordpress?: boolean; /** Indicates that the zone's definitely automated requests are being blocked or challenged. */ sbfmDefinitelyAutomated?: string; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string; /** Indicates that the zone's static resource protection is turned on. */ sbfmStaticResourceProtection?: string; /** Indicates that the zone's verified bot requests are being blocked. */ sbfmVerifiedBots?: string; /** Indicates that the zone's session score tracking is disabled. */ suppressSessionScore?: boolean; } export const UpdateRequestStaleZoneConfigurationBotFightModeConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ optimizeWordpress: S.optional( S.Boolean.pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.String.pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.String.pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.String.pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional(S.String.pipe(T.Body("sbfm_verified_bots"))), suppressSessionScore: S.optional( S.Boolean.pipe(T.Body("suppress_session_score")), ), }), ).annotate({ identifier: "UpdateRequestStaleZoneConfigurationBotFightModeConfiguration", }) as any as S.Schema; export interface UpdateRequestStaleZoneConfigurationSuperBotFightModeDefinitelyConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string; } export const UpdateRequestStaleZoneConfigurationSuperBotFightModeDefinitelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.Boolean.pipe(T.Body("fight_mode"))), sbfmLikelyAutomated: S.optional( S.String.pipe(T.Body("sbfm_likely_automated")), ), }), ).annotate({ identifier: "UpdateRequestStaleZoneConfigurationSuperBotFightModeDefinitelyConfiguration", }) as any as S.Schema; export interface UpdateRequestStaleZoneConfigurationSuperBotFightModeLikelyConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean; } export const UpdateRequestStaleZoneConfigurationSuperBotFightModeLikelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.Boolean.pipe(T.Body("fight_mode"))), }), ).annotate({ identifier: "UpdateRequestStaleZoneConfigurationSuperBotFightModeLikelyConfiguration", }) as any as S.Schema; export interface UpdateRequestStaleZoneConfigurationSubscriptionConfiguration { /** Indicates that the zone's Bot Fight Mode is turned on. */ fightMode?: boolean; /** Indicates that the zone's wordpress optimization for SBFM is turned on. */ optimizeWordpress?: boolean; /** Indicates that the zone's definitely automated requests are being blocked or challenged. */ sbfmDefinitelyAutomated?: string; /** Indicates that the zone's likely automated requests are being blocked or challenged. */ sbfmLikelyAutomated?: string; /** Indicates that the zone's static resource protection is turned on. */ sbfmStaticResourceProtection?: string; /** Indicates that the zone's verified bot requests are being blocked. */ sbfmVerifiedBots?: string; } export const UpdateRequestStaleZoneConfigurationSubscriptionConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ fightMode: S.optional(S.Boolean.pipe(T.Body("fight_mode"))), optimizeWordpress: S.optional( S.Boolean.pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.String.pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.String.pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.String.pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional(S.String.pipe(T.Body("sbfm_verified_bots"))), }), ).annotate({ identifier: "UpdateRequestStaleZoneConfigurationSubscriptionConfiguration", }) as any as S.Schema; export type UpdateRequestStaleZoneConfiguration = | UpdateRequestStaleZoneConfigurationBotFightModeConfiguration | UpdateRequestStaleZoneConfigurationSuperBotFightModeDefinitelyConfiguration | UpdateRequestStaleZoneConfigurationSuperBotFightModeLikelyConfiguration | UpdateRequestStaleZoneConfigurationSubscriptionConfiguration; export const UpdateRequestStaleZoneConfiguration = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmLikelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", "suppressSessionScore", ], ["fightMode", "sbfmLikelyAutomated"], ["fightMode"], [ "fightMode", "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmLikelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", ], ]), ); export type UpdateRequestSbfmDefinitelyAutomated = | "allow" | "block" | "managed_challenge"; export const UpdateRequestSbfmDefinitelyAutomated = /*@__PURE__*/ S.String; export type UpdateRequestSbfmVerifiedBots = "allow" | "block"; export const UpdateRequestSbfmVerifiedBots = /*@__PURE__*/ S.String; export type UpdateRequestSbfmLikelyAutomated = | "allow" | "block" | "managed_challenge"; export const UpdateRequestSbfmLikelyAutomated = /*@__PURE__*/ S.String; export interface PutBotManagementRequest { /** Identifier. */ zoneId: string; /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: UpdateRequestAiBotsProtection | (string & {}); /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: UpdateRequestCfRobotsVariant | (string & {}); /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: UpdateRequestContentBotsProtection | (string & {}); /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: UpdateRequestCrawlerProtection | (string & {}); /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean; /** Whether to enable Bot Fight Mode. */ fightMode?: boolean; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: UpdateRequestStaleZoneConfiguration; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean; /** Whether to optimize Super Bot Fight Mode protections for Wordpress. */ optimizeWordpress?: boolean; /** Super Bot Fight Mode (SBFM) action to take on definitely automated requests. */ sbfmDefinitelyAutomated?: | UpdateRequestSbfmDefinitelyAutomated | (string & {}); /** Super Bot Fight Mode (SBFM) to enable static resource protection. */ sbfmStaticResourceProtection?: boolean; /** Super Bot Fight Mode (SBFM) action to take on verified bots requests. */ sbfmVerifiedBots?: UpdateRequestSbfmVerifiedBots | (string & {}); /** Super Bot Fight Mode (SBFM) action to take on likely automated requests. */ sbfmLikelyAutomated?: UpdateRequestSbfmLikelyAutomated | (string & {}); /** Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) */ autoUpdateModel?: boolean; /** Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true */ bmCookieEnabled?: boolean; /** Whether to disable tracking the highest bot score for a session in the Bot Management cookie. */ suppressSessionScore?: boolean; } export const PutBotManagementRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), aiBotsProtection: S.optional( UpdateRequestAiBotsProtection.pipe(T.Body("ai_bots_protection")), ), cfRobotsVariant: S.optional( UpdateRequestCfRobotsVariant.pipe(T.Body("cf_robots_variant")), ), contentBotsProtection: S.optional( UpdateRequestContentBotsProtection.pipe( T.Body("content_bots_protection"), ), ), crawlerProtection: S.optional( UpdateRequestCrawlerProtection.pipe(T.Body("crawler_protection")), ), enableJs: S.optional(S.Boolean.pipe(T.Body("enable_js"))), fightMode: S.optional(S.Boolean.pipe(T.Body("fight_mode"))), isRobotsTxtManaged: S.optional( S.Boolean.pipe(T.Body("is_robots_txt_managed")), ), staleZoneConfiguration: S.optional( UpdateRequestStaleZoneConfiguration.pipe( T.Body("stale_zone_configuration"), ), ), usingLatestModel: S.optional(S.Boolean.pipe(T.Body("using_latest_model"))), optimizeWordpress: S.optional(S.Boolean.pipe(T.Body("optimize_wordpress"))), sbfmDefinitelyAutomated: S.optional( UpdateRequestSbfmDefinitelyAutomated.pipe( T.Body("sbfm_definitely_automated"), ), ), sbfmStaticResourceProtection: S.optional( S.Boolean.pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( UpdateRequestSbfmVerifiedBots.pipe(T.Body("sbfm_verified_bots")), ), sbfmLikelyAutomated: S.optional( UpdateRequestSbfmLikelyAutomated.pipe(T.Body("sbfm_likely_automated")), ), autoUpdateModel: S.optional(S.Boolean.pipe(T.Body("auto_update_model"))), bmCookieEnabled: S.optional(S.Boolean.pipe(T.Body("bm_cookie_enabled"))), suppressSessionScore: S.optional( S.Boolean.pipe(T.Body("suppress_session_score")), ), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/bot_management", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBotManagementRequest", }) as any as S.Schema; export type UpdateResultBotFightModeConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const UpdateResultBotFightModeConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultBotFightModeConfigurationCfRobotsVariant = | "off" | "policy_only"; export const UpdateResultBotFightModeConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type UpdateResultBotFightModeConfigurationContentBotsProtection = | "block" | "disabled"; export const UpdateResultBotFightModeConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultBotFightModeConfigurationCrawlerProtection = | "enabled" | "disabled"; export const UpdateResultBotFightModeConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type UpdateResultBotFightModeConfigurationStaleZoneConfiguration = GetResultBotFightModeConfigurationStaleZoneConfiguration; export const UpdateResultBotFightModeConfigurationStaleZoneConfiguration = GetResultBotFightModeConfigurationStaleZoneConfiguration; export interface UpdateResultBotFightModeConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: UpdateResultBotFightModeConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: UpdateResultBotFightModeConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: UpdateResultBotFightModeConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: UpdateResultBotFightModeConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Whether to enable Bot Fight Mode. */ fightMode?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultBotFightModeConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const UpdateResultBotFightModeConfiguration = /*@__PURE__*/ S.suspend( () => S.Struct({ aiBotsProtection: S.optional( S.NullOr(UpdateResultBotFightModeConfigurationAiBotsProtection).pipe( T.Body("ai_bots_protection"), ), ), cfRobotsVariant: S.optional( S.NullOr(UpdateResultBotFightModeConfigurationCfRobotsVariant).pipe( T.Body("cf_robots_variant"), ), ), contentBotsProtection: S.optional( S.NullOr( UpdateResultBotFightModeConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr(UpdateResultBotFightModeConfigurationCrawlerProtection).pipe( T.Body("crawler_protection"), ), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), fightMode: S.optional(S.NullOr(S.Boolean).pipe(T.Body("fight_mode"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), staleZoneConfiguration: S.optional( S.NullOr(GetResultBotFightModeConfigurationStaleZoneConfiguration).pipe( T.Body("stale_zone_configuration"), ), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "UpdateResultBotFightModeConfiguration", }) as any as S.Schema; export type UpdateResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant = | "off" | "policy_only"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection = | "block" | "disabled"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection = | "enabled" | "disabled"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated = | "allow" | "block" | "managed_challenge"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots = | "allow" | "block"; export const UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration = GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration; export const UpdateResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration = GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration; export interface UpdateResultSuperBotFightModeDefinitelyConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: UpdateResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: UpdateResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: UpdateResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: UpdateResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** Whether to optimize Super Bot Fight Mode protections for Wordpress. */ optimizeWordpress?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on definitely automated requests. */ sbfmDefinitelyAutomated?: UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated | null; /** Super Bot Fight Mode (SBFM) to enable static resource protection. */ sbfmStaticResourceProtection?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on verified bots requests. */ sbfmVerifiedBots?: UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const UpdateResultSuperBotFightModeDefinitelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationAiBotsProtection, ).pipe(T.Body("ai_bots_protection")), ), cfRobotsVariant: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationCfRobotsVariant, ).pipe(T.Body("cf_robots_variant")), ), contentBotsProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationCrawlerProtection, ).pipe(T.Body("crawler_protection")), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmDefinitelyAutomated, ).pipe(T.Body("sbfm_definitely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr( UpdateResultSuperBotFightModeDefinitelyConfigurationSbfmVerifiedBots, ).pipe(T.Body("sbfm_verified_bots")), ), staleZoneConfiguration: S.optional( S.NullOr( GetResultSuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration, ).pipe(T.Body("stale_zone_configuration")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "UpdateResultSuperBotFightModeDefinitelyConfiguration", }) as any as S.Schema; export type UpdateResultSuperBotFightModeLikelyConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const UpdateResultSuperBotFightModeLikelyConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationCfRobotsVariant = | "off" | "policy_only"; export const UpdateResultSuperBotFightModeLikelyConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationContentBotsProtection = | "block" | "disabled"; export const UpdateResultSuperBotFightModeLikelyConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationCrawlerProtection = | "enabled" | "disabled"; export const UpdateResultSuperBotFightModeLikelyConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated = | "allow" | "block" | "managed_challenge"; export const UpdateResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated = | "allow" | "block" | "managed_challenge"; export const UpdateResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots = | "allow" | "block"; export const UpdateResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots = /*@__PURE__*/ S.String; export type UpdateResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration = GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration; export const UpdateResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration = GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration; export interface UpdateResultSuperBotFightModeLikelyConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: UpdateResultSuperBotFightModeLikelyConfigurationAiBotsProtection | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: UpdateResultSuperBotFightModeLikelyConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: UpdateResultSuperBotFightModeLikelyConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: UpdateResultSuperBotFightModeLikelyConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** Whether to optimize Super Bot Fight Mode protections for Wordpress. */ optimizeWordpress?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on definitely automated requests. */ sbfmDefinitelyAutomated?: UpdateResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated | null; /** Super Bot Fight Mode (SBFM) action to take on likely automated requests. */ sbfmLikelyAutomated?: UpdateResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated | null; /** Super Bot Fight Mode (SBFM) to enable static resource protection. */ sbfmStaticResourceProtection?: boolean | null; /** Super Bot Fight Mode (SBFM) action to take on verified bots requests. */ sbfmVerifiedBots?: UpdateResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const UpdateResultSuperBotFightModeLikelyConfiguration = /*@__PURE__*/ S.suspend(() => S.Struct({ aiBotsProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationAiBotsProtection, ).pipe(T.Body("ai_bots_protection")), ), cfRobotsVariant: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationCfRobotsVariant, ).pipe(T.Body("cf_robots_variant")), ), contentBotsProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationCrawlerProtection, ).pipe(T.Body("crawler_protection")), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), optimizeWordpress: S.optional( S.NullOr(S.Boolean).pipe(T.Body("optimize_wordpress")), ), sbfmDefinitelyAutomated: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationSbfmDefinitelyAutomated, ).pipe(T.Body("sbfm_definitely_automated")), ), sbfmLikelyAutomated: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationSbfmLikelyAutomated, ).pipe(T.Body("sbfm_likely_automated")), ), sbfmStaticResourceProtection: S.optional( S.NullOr(S.Boolean).pipe(T.Body("sbfm_static_resource_protection")), ), sbfmVerifiedBots: S.optional( S.NullOr( UpdateResultSuperBotFightModeLikelyConfigurationSbfmVerifiedBots, ).pipe(T.Body("sbfm_verified_bots")), ), staleZoneConfiguration: S.optional( S.NullOr( GetResultSuperBotFightModeLikelyConfigurationStaleZoneConfiguration, ).pipe(T.Body("stale_zone_configuration")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "UpdateResultSuperBotFightModeLikelyConfiguration", }) as any as S.Schema; export type UpdateResultSubscriptionConfigurationAiBotsProtection = | "block" | "disabled" | "only_on_ad_pages"; export const UpdateResultSubscriptionConfigurationAiBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSubscriptionConfigurationCfRobotsVariant = | "off" | "policy_only"; export const UpdateResultSubscriptionConfigurationCfRobotsVariant = /*@__PURE__*/ S.String; export type UpdateResultSubscriptionConfigurationContentBotsProtection = | "block" | "disabled"; export const UpdateResultSubscriptionConfigurationContentBotsProtection = /*@__PURE__*/ S.String; export type UpdateResultSubscriptionConfigurationCrawlerProtection = | "enabled" | "disabled"; export const UpdateResultSubscriptionConfigurationCrawlerProtection = /*@__PURE__*/ S.String; export type UpdateResultSubscriptionConfigurationStaleZoneConfiguration = GetResultSubscriptionConfigurationStaleZoneConfiguration; export const UpdateResultSubscriptionConfigurationStaleZoneConfiguration = GetResultSubscriptionConfigurationStaleZoneConfiguration; export interface UpdateResultSubscriptionConfiguration { /** Enable rule to block AI Scrapers and Crawlers. */ aiBotsProtection?: UpdateResultSubscriptionConfigurationAiBotsProtection | null; /** Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) */ autoUpdateModel?: boolean | null; /** Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true */ bmCookieEnabled?: boolean | null; /** Specifies the Robots Access Control License variant to use. */ cfRobotsVariant?: UpdateResultSubscriptionConfigurationCfRobotsVariant | null; /** Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. */ contentBotsProtection?: UpdateResultSubscriptionConfigurationContentBotsProtection | null; /** Enable rule to punish AI Scrapers and Crawlers via a link maze. */ crawlerProtection?: UpdateResultSubscriptionConfigurationCrawlerProtection | null; /** Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). */ enableJs?: boolean | null; /** Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. */ isRobotsTxtManaged?: boolean | null; /** A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. */ staleZoneConfiguration?: GetResultSubscriptionConfigurationStaleZoneConfiguration | null; /** Whether to disable tracking the highest bot score for a session in the Bot Management cookie. */ suppressSessionScore?: boolean | null; /** A read-only field that indicates whether the zone currently is running the latest ML model. */ usingLatestModel?: boolean | null; } export const UpdateResultSubscriptionConfiguration = /*@__PURE__*/ S.suspend( () => S.Struct({ aiBotsProtection: S.optional( S.NullOr(UpdateResultSubscriptionConfigurationAiBotsProtection).pipe( T.Body("ai_bots_protection"), ), ), autoUpdateModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_update_model")), ), bmCookieEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("bm_cookie_enabled")), ), cfRobotsVariant: S.optional( S.NullOr(UpdateResultSubscriptionConfigurationCfRobotsVariant).pipe( T.Body("cf_robots_variant"), ), ), contentBotsProtection: S.optional( S.NullOr( UpdateResultSubscriptionConfigurationContentBotsProtection, ).pipe(T.Body("content_bots_protection")), ), crawlerProtection: S.optional( S.NullOr(UpdateResultSubscriptionConfigurationCrawlerProtection).pipe( T.Body("crawler_protection"), ), ), enableJs: S.optional(S.NullOr(S.Boolean).pipe(T.Body("enable_js"))), isRobotsTxtManaged: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_robots_txt_managed")), ), staleZoneConfiguration: S.optional( S.NullOr(GetResultSubscriptionConfigurationStaleZoneConfiguration).pipe( T.Body("stale_zone_configuration"), ), ), suppressSessionScore: S.optional( S.NullOr(S.Boolean).pipe(T.Body("suppress_session_score")), ), usingLatestModel: S.optional( S.NullOr(S.Boolean).pipe(T.Body("using_latest_model")), ), }), ).annotate({ identifier: "UpdateResultSubscriptionConfiguration", }) as any as S.Schema; export type UpdateResult = | UpdateResultBotFightModeConfiguration | UpdateResultSuperBotFightModeDefinitelyConfiguration | UpdateResultSuperBotFightModeLikelyConfiguration | UpdateResultSubscriptionConfiguration; export const UpdateResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "fightMode", "isRobotsTxtManaged", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "optimizeWordpress", "sbfmDefinitelyAutomated", "sbfmLikelyAutomated", "sbfmStaticResourceProtection", "sbfmVerifiedBots", "staleZoneConfiguration", "usingLatestModel", ], [ "aiBotsProtection", "autoUpdateModel", "bmCookieEnabled", "cfRobotsVariant", "contentBotsProtection", "crawlerProtection", "enableJs", "isRobotsTxtManaged", "staleZoneConfiguration", "suppressSessionScore", "usingLatestModel", ], ]), ); export type PutBotManagementResponse = UpdateResult; export const PutBotManagementResponse = /*@__PURE__*/ S.suspend(() => UpdateResult.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutBotManagementResponse", }) as any as S.Schema; export type CreateFeedbackError = CloudflareOpError; /** Submit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively. */ export const createFeedback: API.OperationMethod< CreateFeedbackRequest, CreateFeedbackResponse, CreateFeedbackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateFeedbackRequest, output: CreateFeedbackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetBotManagementError = Forbidden | CloudflareOpError; /** Retrieve a zone's Bot Management Config */ export const getBotManagement: API.OperationMethod< GetBotManagementRequest, GetBotManagementResponse, GetBotManagementError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetBotManagementRequest, output: GetBotManagementResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListFeedbackError = CloudflareOpError; /** Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans. */ export const listFeedback: API.OperationMethod< ListFeedbackRequest, ListFeedbackResponse, ListFeedbackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListFeedbackRequest, output: ListFeedbackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutBotManagementError = Forbidden | CloudflareOpError; /** Updates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. #### Clean up configuration for Bot Fight Mode plan ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` #### Clean up configuration for SBFM Pro plan ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` #### Clean up configuration for SBFM Biz plan ```json { "fight_mode": false } ``` #### Clean up configuration for BM Enterprise Subscription plan It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ``` */ export const putBotManagement: API.OperationMethod< PutBotManagementRequest, PutBotManagementResponse, PutBotManagementError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutBotManagementRequest, output: PutBotManagementResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));