UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

51 lines 2.11 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; import * as HostnamesAPI from 'cloudflare/resources/web3/hostnames/hostnames'; import * as IPFSUniversalPathsAPI from 'cloudflare/resources/web3/hostnames/ipfs-universal-paths/ipfs-universal-paths'; import { SinglePage } from 'cloudflare/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`, DistributedWebHostnamesSinglePage, 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 DistributedWebHostnamesSinglePage extends SinglePage { } (function (Hostnames) { Hostnames.DistributedWebHostnamesSinglePage = HostnamesAPI.DistributedWebHostnamesSinglePage; Hostnames.IPFSUniversalPaths = IPFSUniversalPathsAPI.IPFSUniversalPaths; })(Hostnames || (Hostnames = {})); //# sourceMappingURL=hostnames.mjs.map