// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
export class Script extends APIResource {
    /**
     * Upload a worker, or a new version of a worker.
     */
    update(params, options) {
        const { zone_id } = params;
        return this._client.put(`/zones/${zone_id}/workers/script`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete your Worker. This call has no response body on a successful delete.
     */
    delete(params, options) {
        const { zone_id } = params;
        return this._client.delete(`/zones/${zone_id}/workers/script`, {
            ...options,
            headers: { Accept: '*/*', ...options?.headers },
        });
    }
    /**
     * Fetch raw script content for your worker. Note this is the original script
     * content, not JSON encoded.
     */
    get(params, options) {
        const { zone_id } = params;
        return this._client.get(`/zones/${zone_id}/workers/script`, { ...options, __binaryResponse: true });
    }
}
(function (Script) {
})(Script || (Script = {}));
//# sourceMappingURL=script.mjs.map