"use strict";
// File generated from our OpenAPI spec by Stainless.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Routes = void 0;
const resource_1 = require("cloudflare/resource");
class Routes extends resource_1.APIResource {
    /**
     * Creates a new Magic static route. Use `?validate_only=true` as an optional query
     * parameter to run validation only without persisting changes.
     */
    create(accountIdentifier, body, options) {
        return this._client.post(`/accounts/${accountIdentifier}/magic/routes`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update a specific Magic static route. Use `?validate_only=true` as an optional
     * query parameter to run validation only without persisting changes.
     */
    update(accountIdentifier, routeIdentifier, body, options) {
        return this._client.put(`/accounts/${accountIdentifier}/magic/routes/${routeIdentifier}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List all Magic static routes.
     */
    list(accountIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/magic/routes`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Disable and remove a specific Magic static route.
     */
    delete(accountIdentifier, routeIdentifier, options) {
        return this._client.delete(`/accounts/${accountIdentifier}/magic/routes/${routeIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete multiple Magic static routes.
     */
    empty(accountIdentifier, body, options) {
        return this._client.delete(`/accounts/${accountIdentifier}/magic/routes`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get a specific Magic static route.
     */
    get(accountIdentifier, routeIdentifier, options) {
        return this._client.get(`/accounts/${accountIdentifier}/magic/routes/${routeIdentifier}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Routes = Routes;
(function (Routes) {
})(Routes = exports.Routes || (exports.Routes = {}));
//# sourceMappingURL=routes.js.map