// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as TagsAPI from 'cloudflaredev/resources/workers-for-platforms/dispatch/namespaces/scripts/tags';
import { SinglePage } from 'cloudflaredev/pagination';
export class Tags extends APIResource {
    /**
     * Put script tags for a script uploaded to a Workers for Platforms namespace.
     */
    update(dispatchNamespace, scriptName, params, options) {
        const { account_id, body } = params;
        return this._client.put(`/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/tags`, { body: body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Fetch tags from a script uploaded to a Workers for Platforms namespace.
     */
    list(dispatchNamespace, scriptName, params, options) {
        const { account_id } = params;
        return this._client.getAPIList(`/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/tags`, TagListResponsesSinglePage, options);
    }
    /**
     * Delete script tag for a script uploaded to a Workers for Platforms namespace.
     */
    delete(dispatchNamespace, scriptName, tag, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/tags/${tag}`, options)._thenUnwrap((obj) => obj.result);
    }
}
export class TagListResponsesSinglePage extends SinglePage {
}
(function (Tags) {
    Tags.TagListResponsesSinglePage = TagsAPI.TagListResponsesSinglePage;
})(Tags || (Tags = {}));
//# sourceMappingURL=tags.mjs.map