UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

99 lines 3.32 kB
import * as Core from 'cloudflare/core'; 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 declare class Hostnames extends APIResource { ipfsUniversalPaths: IPFSUniversalPathsAPI.IPFSUniversalPaths; /** * Create Web3 Hostname */ create(zoneIdentifier: string, body: HostnameCreateParams, options?: Core.RequestOptions): Core.APIPromise<Hostname>; /** * List Web3 Hostnames */ list(zoneIdentifier: string, options?: Core.RequestOptions): Core.PagePromise<HostnamesSinglePage, Hostname>; /** * Delete Web3 Hostname */ delete(zoneIdentifier: string, identifier: string, body: HostnameDeleteParams, options?: Core.RequestOptions): Core.APIPromise<HostnameDeleteResponse | null>; /** * Edit Web3 Hostname */ edit(zoneIdentifier: string, identifier: string, body: HostnameEditParams, options?: Core.RequestOptions): Core.APIPromise<Hostname>; /** * Web3 Hostname Details */ get(zoneIdentifier: string, identifier: string, options?: Core.RequestOptions): Core.APIPromise<Hostname>; } export declare class HostnamesSinglePage extends SinglePage<Hostname> { } export interface Hostname { /** * Identifier */ id?: string; created_on?: string; /** * An optional description of the hostname. */ description?: string; /** * DNSLink value used if the target is ipfs. */ dnslink?: string; modified_on?: string; /** * The hostname that will point to the target gateway via CNAME. */ name?: string; /** * Status of the hostname's activation. */ status?: 'active' | 'pending' | 'deleting' | 'error'; /** * Target gateway of the hostname. */ target?: 'ethereum' | 'ipfs' | 'ipfs_universal_path'; } export interface HostnameDeleteResponse { /** * Identifier */ id: string; } export interface HostnameCreateParams { /** * Target gateway of the hostname. */ target: 'ethereum' | 'ipfs' | 'ipfs_universal_path'; /** * An optional description of the hostname. */ description?: string; /** * DNSLink value used if the target is ipfs. */ dnslink?: string; } export type HostnameDeleteParams = unknown; export interface HostnameEditParams { /** * An optional description of the hostname. */ description?: string; /** * DNSLink value used if the target is ipfs. */ dnslink?: string; } export declare namespace Hostnames { export import Hostname = HostnamesAPI.Hostname; export import HostnameDeleteResponse = HostnamesAPI.HostnameDeleteResponse; export import HostnamesSinglePage = HostnamesAPI.HostnamesSinglePage; export import HostnameCreateParams = HostnamesAPI.HostnameCreateParams; export import HostnameDeleteParams = HostnamesAPI.HostnameDeleteParams; export import HostnameEditParams = HostnamesAPI.HostnameEditParams; export import IPFSUniversalPaths = IPFSUniversalPathsAPI.IPFSUniversalPaths; } //# sourceMappingURL=hostnames.d.ts.map