// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as PoliciesAPI from 'cloudflaredev/resources/page-shield/policies';
import { SinglePage } from 'cloudflaredev/pagination';
export class Policies extends 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.getAPIList(`/zones/${zone_id}/page_shield/policies`, PoliciesSinglePage, options);
    }
    /**
     * 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);
    }
}
export class PoliciesSinglePage extends SinglePage {
}
(function (Policies) {
    Policies.PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage;
})(Policies || (Policies = {}));
//# sourceMappingURL=policies.mjs.map