"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Policies = void 0;
const resource_1 = require("cloudflare/resource");
class Policies extends resource_1.APIResource {
    /**
     * Create a Page Shield policy.
     */
    create(params, options) {
        const { zone_id, ...body } = params;
        return this._client.post(`/zones/${zone_id}/page_shield/policies`, { body, ...options });
    }
    /**
     * Update a Page Shield policy by ID.
     */
    update(policyId, params, options) {
        const { zone_id, ...body } = params;
        return this._client.put(`/zones/${zone_id}/page_shield/policies/${policyId}`, { body, ...options });
    }
    /**
     * Lists all Page Shield policies.
     */
    list(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/page_shield/policies`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete a Page Shield policy by ID.
     */
    delete(policyId, params, options) {
        const { zone_id } = params;
        return this._client.delete(`/zones/${zone_id}/page_shield/policies/${policyId}`, {
            ...options,
            headers: { Accept: '*/*', ...options?.headers },
        });
    }
    /**
     * Fetches a Page Shield policy by ID.
     */
    get(policyId, params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/page_shield/policies/${policyId}`, options);
    }
}
exports.Policies = Policies;
(function (Policies) {
})(Policies = exports.Policies || (exports.Policies = {}));
//# sourceMappingURL=policies.js.map