cloudflare
Version:
The official TypeScript library for the Cloudflare API
32 lines • 1.19 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.BotManagement = void 0;
const resource_1 = require("cloudflare/resource");
class BotManagement extends resource_1.APIResource {
/**
* 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
*/
update(params, options) {
const { zone_id, ...body } = params;
return this._client.put(`/zones/${zone_id}/bot_management`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Retrieve a zone's Bot Management Config
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/bot_management`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.BotManagement = BotManagement;
//# sourceMappingURL=bot-management.js.map