"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Filters = void 0;
const resource_1 = require("cloudflare/resource");
class Filters extends resource_1.APIResource {
    /**
     * Create Filter
     */
    create(params, options) {
        const { zone_id, ...body } = params;
        return this._client.post(`/zones/${zone_id}/workers/filters`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update Filter
     */
    update(filterId, params, options) {
        const { zone_id, ...body } = params;
        return this._client.put(`/zones/${zone_id}/workers/filters/${filterId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List Filters
     */
    list(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/workers/filters`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete Filter
     */
    delete(filterId, params, options) {
        const { zone_id } = params;
        return this._client.delete(`/zones/${zone_id}/workers/filters/${filterId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Filters = Filters;
(function (Filters) {
})(Filters = exports.Filters || (exports.Filters = {}));
//# sourceMappingURL=filters.js.map