/**
 * Cloudflare BOT-MANAGEMENT API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service bot-management
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const GetBotManagementRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/bot_management" }));
export const GetBotManagementResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Union([
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmDefinitelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                suppressSessionScore: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                optimizeWordpress: "optimize_wordpress",
                sbfmDefinitelyAutomated: "sbfm_definitely_automated",
                sbfmLikelyAutomated: "sbfm_likely_automated",
                sbfmStaticResourceProtection: "sbfm_static_resource_protection",
                sbfmVerifiedBots: "sbfm_verified_bots",
                suppressSessionScore: "suppress_session_score",
            })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        fightMode: "fight_mode",
        isRobotsTxtManaged: "is_robots_txt_managed",
        staleZoneConfiguration: "stale_zone_configuration",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmDefinitelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.Literals(["allow", "block"]), Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                fightMode: "fight_mode",
                sbfmLikelyAutomated: "sbfm_likely_automated",
            })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        isRobotsTxtManaged: "is_robots_txt_managed",
        optimizeWordpress: "optimize_wordpress",
        sbfmDefinitelyAutomated: "sbfm_definitely_automated",
        sbfmStaticResourceProtection: "sbfm_static_resource_protection",
        sbfmVerifiedBots: "sbfm_verified_bots",
        staleZoneConfiguration: "stale_zone_configuration",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmDefinitelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmLikelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.Literals(["allow", "block"]), Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            }).pipe(Schema.encodeKeys({ fightMode: "fight_mode" })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        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",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        autoUpdateModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        bmCookieEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmDefinitelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                fightMode: "fight_mode",
                optimizeWordpress: "optimize_wordpress",
                sbfmDefinitelyAutomated: "sbfm_definitely_automated",
                sbfmLikelyAutomated: "sbfm_likely_automated",
                sbfmStaticResourceProtection: "sbfm_static_resource_protection",
                sbfmVerifiedBots: "sbfm_verified_bots",
            })),
            Schema.Null,
        ])),
        suppressSessionScore: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        autoUpdateModel: "auto_update_model",
        bmCookieEnabled: "bm_cookie_enabled",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        isRobotsTxtManaged: "is_robots_txt_managed",
        staleZoneConfiguration: "stale_zone_configuration",
        suppressSessionScore: "suppress_session_score",
        usingLatestModel: "using_latest_model",
    })),
]).pipe(T.ResponsePath("result"));
export const getBotManagement = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetBotManagementRequest,
    output: GetBotManagementResponse,
    errors: [],
}));
export const PutBotManagementRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    aiBotsProtection: Schema.optional(Schema.Literals(["block", "disabled", "only_on_ad_pages"])),
    cfRobotsVariant: Schema.optional(Schema.Literals(["off", "policy_only"])),
    crawlerProtection: Schema.optional(Schema.Literals(["enabled", "disabled"])),
    enableJs: Schema.optional(Schema.Boolean),
    fightMode: Schema.optional(Schema.Boolean),
    isRobotsTxtManaged: Schema.optional(Schema.Boolean),
}).pipe(Schema.encodeKeys({
    aiBotsProtection: "ai_bots_protection",
    cfRobotsVariant: "cf_robots_variant",
    crawlerProtection: "crawler_protection",
    enableJs: "enable_js",
    fightMode: "fight_mode",
    isRobotsTxtManaged: "is_robots_txt_managed",
}), T.Http({ method: "PUT", path: "/zones/{zone_id}/bot_management" }));
export const PutBotManagementResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Union([
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmDefinitelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                suppressSessionScore: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                optimizeWordpress: "optimize_wordpress",
                sbfmDefinitelyAutomated: "sbfm_definitely_automated",
                sbfmLikelyAutomated: "sbfm_likely_automated",
                sbfmStaticResourceProtection: "sbfm_static_resource_protection",
                sbfmVerifiedBots: "sbfm_verified_bots",
                suppressSessionScore: "suppress_session_score",
            })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        fightMode: "fight_mode",
        isRobotsTxtManaged: "is_robots_txt_managed",
        staleZoneConfiguration: "stale_zone_configuration",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmDefinitelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.Literals(["allow", "block"]), Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                fightMode: "fight_mode",
                sbfmLikelyAutomated: "sbfm_likely_automated",
            })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        isRobotsTxtManaged: "is_robots_txt_managed",
        optimizeWordpress: "optimize_wordpress",
        sbfmDefinitelyAutomated: "sbfm_definitely_automated",
        sbfmStaticResourceProtection: "sbfm_static_resource_protection",
        sbfmVerifiedBots: "sbfm_verified_bots",
        staleZoneConfiguration: "stale_zone_configuration",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmDefinitelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmLikelyAutomated: Schema.optional(Schema.Union([
            Schema.Literals(["allow", "block", "managed_challenge"]),
            Schema.Null,
        ])),
        sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.Literals(["allow", "block"]), Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            }).pipe(Schema.encodeKeys({ fightMode: "fight_mode" })),
            Schema.Null,
        ])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        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",
        usingLatestModel: "using_latest_model",
    })),
    Schema.Struct({
        aiBotsProtection: Schema.optional(Schema.Union([
            Schema.Literals(["block", "disabled", "only_on_ad_pages"]),
            Schema.Null,
        ])),
        autoUpdateModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        bmCookieEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        cfRobotsVariant: Schema.optional(Schema.Union([Schema.Literals(["off", "policy_only"]), Schema.Null])),
        crawlerProtection: Schema.optional(Schema.Union([Schema.Literals(["enabled", "disabled"]), Schema.Null])),
        enableJs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        isRobotsTxtManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        staleZoneConfiguration: Schema.optional(Schema.Union([
            Schema.Struct({
                fightMode: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                optimizeWordpress: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                sbfmDefinitelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmLikelyAutomated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmStaticResourceProtection: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                sbfmVerifiedBots: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                fightMode: "fight_mode",
                optimizeWordpress: "optimize_wordpress",
                sbfmDefinitelyAutomated: "sbfm_definitely_automated",
                sbfmLikelyAutomated: "sbfm_likely_automated",
                sbfmStaticResourceProtection: "sbfm_static_resource_protection",
                sbfmVerifiedBots: "sbfm_verified_bots",
            })),
            Schema.Null,
        ])),
        suppressSessionScore: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        usingLatestModel: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        aiBotsProtection: "ai_bots_protection",
        autoUpdateModel: "auto_update_model",
        bmCookieEnabled: "bm_cookie_enabled",
        cfRobotsVariant: "cf_robots_variant",
        crawlerProtection: "crawler_protection",
        enableJs: "enable_js",
        isRobotsTxtManaged: "is_robots_txt_managed",
        staleZoneConfiguration: "stale_zone_configuration",
        suppressSessionScore: "suppress_session_score",
        usingLatestModel: "using_latest_model",
    })),
]).pipe(T.ResponsePath("result"));
export const putBotManagement = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutBotManagementRequest,
    output: PutBotManagementResponse,
    errors: [],
}));
//# sourceMappingURL=bot-management.js.map