// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflaredev/resource';
import * as HostnamesAPI from 'cloudflaredev/resources/web3/hostnames/hostnames';
import * as IPFSUniversalPathsAPI from 'cloudflaredev/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths';
import { SinglePage } from 'cloudflaredev/pagination';
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.getAPIList(`/zones/${zoneIdentifier}/web3/hostnames`, HostnamesSinglePage, options);
    }
    /**
     * 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);
    }
}
export class HostnamesSinglePage extends SinglePage {
}
(function (Hostnames) {
    Hostnames.HostnamesSinglePage = HostnamesAPI.HostnamesSinglePage;
    Hostnames.IPFSUniversalPaths = IPFSUniversalPathsAPI.IPFSUniversalPaths;
})(Hostnames || (Hostnames = {}));
//# sourceMappingURL=hostnames.mjs.map