// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
export class Filters extends 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);
    }
}
(function (Filters) {
})(Filters || (Filters = {}));
//# sourceMappingURL=filters.mjs.map