// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as IPFSUniversalPathsAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths';
export class Hostnames extends APIResource {
    constructor() {
        super(...arguments);
        this.ipfsUniversalPaths = new IPFSUniversalPathsAPI.IPFSUniversalPaths(this._client);
    }
    /**
     * Create Web3 Hostname
     */
    create(zoneIdentifier, body, options) {
        return this._client.post(`/zones/${zoneIdentifier}/web3/hostnames`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * List Web3 Hostnames
     */
    list(zoneIdentifier, options) {
        return this._client.get(`/zones/${zoneIdentifier}/web3/hostnames`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Delete Web3 Hostname
     */
    delete(zoneIdentifier, identifier, options) {
        return this._client.delete(`/zones/${zoneIdentifier}/web3/hostnames/${identifier}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Edit Web3 Hostname
     */
    edit(zoneIdentifier, identifier, body, options) {
        return this._client.patch(`/zones/${zoneIdentifier}/web3/hostnames/${identifier}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Web3 Hostname Details
     */
    get(zoneIdentifier, identifier, options) {
        return this._client.get(`/zones/${zoneIdentifier}/web3/hostnames/${identifier}`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (Hostnames) {
    Hostnames.IPFSUniversalPaths = IPFSUniversalPathsAPI.IPFSUniversalPaths;
})(Hostnames || (Hostnames = {}));
//# sourceMappingURL=hostnames.mjs.map