// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { createdOn: "created_on", modifiedOn: "modified_on", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class InvalidWeb3HostnameTarget extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidWeb3HostnameTarget", { code: S.Number, message: S.String, }, ), [{ code: 1006 }], ) {} export class Web3HostnameNotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "Web3HostnameNotEntitled", { code: S.Number, message: S.String, }, ), [{ code: 1010, message: { includes: "not entitled" } }], ) {} export class Web3HostnameNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "Web3HostnameNotFound", { code: S.Number, message: S.String, }, ), [{ code: 1002 }], ) {} export type HostnamesCreateRequestTarget = | "ethereum" | "ipfs" | "ipfs_universal_path"; export const HostnamesCreateRequestTarget = /*@__PURE__*/ S.String; export interface CreateHostnameRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the hostname that points to the target gateway via CNAME. */ name: string; /** Specify the target gateway of the hostname. */ target: HostnamesCreateRequestTarget | (string & {}); /** Specify an optional description of the hostname. */ description?: string; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string; } export const CreateHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String, target: HostnamesCreateRequestTarget, description: S.optional(S.String), dnslink: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/web3/hostnames", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameRequest", }) as any as S.Schema; export type HostnamesCreateResponseStatus = | "active" | "pending" | "deleting" | "error"; export const HostnamesCreateResponseStatus = /*@__PURE__*/ S.String; export type HostnamesCreateResponseTarget = | "ethereum" | "ipfs" | "ipfs_universal_path"; export const HostnamesCreateResponseTarget = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateHostnameResponse { /** Specify the identifier of the hostname. */ id?: string | null; createdOn?: string | null; /** Specify an optional description of the hostname. */ description?: string | null; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string | null; modifiedOn?: string | null; /** Specify the hostname that points to the target gateway via CNAME. */ name?: string | null; /** Specifies the status of the hostname's activation. */ status?: HostnamesCreateResponseStatus | null; /** Specify the target gateway of the hostname. */ target?: HostnamesCreateResponseTarget | null; } export const CreateHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), dnslink: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), name: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnamesCreateResponseStatus)), target: S.optional(S.NullOr(HostnamesCreateResponseTarget)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameResponse", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesCreateRequestType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesCreateRequestType = /*@__PURE__*/ S.String; export interface CreateHostnameIpfsUniversalPathContentListEntryRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Specify the CID or content path of content to block. */ content: string; /** Specify the type of content list entry to block. */ type: | HostnamesIpfsUniversalPathsContentListsEntriesCreateRequestType | (string & {}); /** Specify an optional description of the content list entry. */ description?: string; } export const CreateHostnameIpfsUniversalPathContentListEntryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), content: S.String, type: HostnamesIpfsUniversalPathsContentListsEntriesCreateRequestType, description: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameIpfsUniversalPathContentListEntryRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesCreateResponseType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesCreateResponseType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateHostnameIpfsUniversalPathContentListEntryResponse { /** Specify the identifier of the hostname. */ id?: string | null; /** Specify the CID or content path of content to block. */ content?: string | null; createdOn?: string | null; /** Specify an optional description of the content list entry. */ description?: string | null; modifiedOn?: string | null; /** Specify the type of content list entry to block. */ type?: HostnamesIpfsUniversalPathsContentListsEntriesCreateResponseType | null; } export const CreateHostnameIpfsUniversalPathContentListEntryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), content: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), type: S.optional( S.NullOr( HostnamesIpfsUniversalPathsContentListsEntriesCreateResponseType, ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameIpfsUniversalPathContentListEntryResponse", }) as any as S.Schema; export interface DeleteHostnameRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; } export const DeleteHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/web3/hostnames/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteHostnameResponse { /** Specify the identifier of the hostname. */ id: string; } export const DeleteHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameResponse", }) as any as S.Schema; export interface DeleteHostnameIpfsUniversalPathContentListEntryRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Specify the identifier of the hostname. */ contentListEntryIdentifier: string; } export const DeleteHostnameIpfsUniversalPathContentListEntryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), contentListEntryIdentifier: S.String.pipe( T.Label("content_list_entry_identifier"), ), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameIpfsUniversalPathContentListEntryRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteHostnameIpfsUniversalPathContentListEntryResponse { /** Specify the identifier of the hostname. */ id: string; } export const DeleteHostnameIpfsUniversalPathContentListEntryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameIpfsUniversalPathContentListEntryResponse", }) as any as S.Schema; export interface GetHostnameRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; } export const GetHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/web3/hostnames/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameRequest", }) as any as S.Schema; export type HostnamesGetResponseStatus = | "active" | "pending" | "deleting" | "error"; export const HostnamesGetResponseStatus = /*@__PURE__*/ S.String; export type HostnamesGetResponseTarget = | "ethereum" | "ipfs" | "ipfs_universal_path"; export const HostnamesGetResponseTarget = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetHostnameResponse { /** Specify the identifier of the hostname. */ id?: string | null; createdOn?: string | null; /** Specify an optional description of the hostname. */ description?: string | null; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string | null; modifiedOn?: string | null; /** Specify the hostname that points to the target gateway via CNAME. */ name?: string | null; /** Specifies the status of the hostname's activation. */ status?: HostnamesGetResponseStatus | null; /** Specify the target gateway of the hostname. */ target?: HostnamesGetResponseTarget | null; } export const GetHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), dnslink: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), name: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnamesGetResponseStatus)), target: S.optional(S.NullOr(HostnamesGetResponseTarget)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameResponse", }) as any as S.Schema; export interface GetHostnameIpfsUniversalPathContentListRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; } export const GetHostnameIpfsUniversalPathContentListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameIpfsUniversalPathContentListRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsGetResponseAction = "block"; export const HostnamesIpfsUniversalPathsContentListsGetResponseAction = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetHostnameIpfsUniversalPathContentListResponse { /** Behavior of the content list. */ action?: HostnamesIpfsUniversalPathsContentListsGetResponseAction | null; } export const GetHostnameIpfsUniversalPathContentListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional( S.NullOr(HostnamesIpfsUniversalPathsContentListsGetResponseAction), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameIpfsUniversalPathContentListResponse", }) as any as S.Schema; export interface GetHostnameIpfsUniversalPathContentListEntryRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Specify the identifier of the hostname. */ contentListEntryIdentifier: string; } export const GetHostnameIpfsUniversalPathContentListEntryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), contentListEntryIdentifier: S.String.pipe( T.Label("content_list_entry_identifier"), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameIpfsUniversalPathContentListEntryRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesGetResponseType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesGetResponseType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetHostnameIpfsUniversalPathContentListEntryResponse { /** Specify the identifier of the hostname. */ id?: string | null; /** Specify the CID or content path of content to block. */ content?: string | null; createdOn?: string | null; /** Specify an optional description of the content list entry. */ description?: string | null; modifiedOn?: string | null; /** Specify the type of content list entry to block. */ type?: HostnamesIpfsUniversalPathsContentListsEntriesGetResponseType | null; } export const GetHostnameIpfsUniversalPathContentListEntryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), content: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), type: S.optional( S.NullOr(HostnamesIpfsUniversalPathsContentListsEntriesGetResponseType), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameIpfsUniversalPathContentListEntryResponse", }) as any as S.Schema; export interface ListHostnameIpfsUniversalPathContentListEntriesRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; } export const ListHostnameIpfsUniversalPathContentListEntriesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnameIpfsUniversalPathContentListEntriesRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItemType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItemType = /*@__PURE__*/ S.String; export interface HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItem { /** Specify the identifier of the hostname. */ id?: string | null; /** Specify the CID or content path of content to block. */ content?: string | null; createdOn?: string | null; /** Specify an optional description of the content list entry. */ description?: string | null; modifiedOn?: string | null; /** Specify the type of content list entry to block. */ type?: HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItemType | null; } export const HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), content: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), type: S.optional( S.NullOr( HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItemType, ), ), }), ).annotate({ identifier: "HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItem", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesList = Array; export const HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesList = /*@__PURE__*/ S.Array( HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListHostnameIpfsUniversalPathContentListEntriesResponse { /** Provides content list entries. */ entries?: HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesList | null; } export const ListHostnameIpfsUniversalPathContentListEntriesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ entries: S.optional( S.NullOr( HostnamesIpfsUniversalPathsContentListsEntriesListResponseEntriesList, ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnameIpfsUniversalPathContentListEntriesResponse", }) as any as S.Schema; export interface ListHostnamesRequest { /** Specify the identifier of the hostname. */ zoneId: string; } export const ListHostnamesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/web3/hostnames", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnamesRequest", }) as any as S.Schema; export type HostnamesListResultItemStatus = | "active" | "pending" | "deleting" | "error"; export const HostnamesListResultItemStatus = /*@__PURE__*/ S.String; export type HostnamesListResultItemTarget = | "ethereum" | "ipfs" | "ipfs_universal_path"; export const HostnamesListResultItemTarget = /*@__PURE__*/ S.String; export interface HostnamesListResultItem { /** Specify the identifier of the hostname. */ id?: string | null; createdOn?: string | null; /** Specify an optional description of the hostname. */ description?: string | null; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string | null; modifiedOn?: string | null; /** Specify the hostname that points to the target gateway via CNAME. */ name?: string | null; /** Specifies the status of the hostname's activation. */ status?: HostnamesListResultItemStatus | null; /** Specify the target gateway of the hostname. */ target?: HostnamesListResultItemTarget | null; } export const HostnamesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), dnslink: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), name: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnamesListResultItemStatus)), target: S.optional(S.NullOr(HostnamesListResultItemTarget)), }), ).annotate({ identifier: "HostnamesListResultItem", }) as any as S.Schema; export type HostnamesListResultList = Array; export const HostnamesListResultList = /*@__PURE__*/ S.Array( HostnamesListResultItem, ) as any as S.Schema; export interface ListHostnamesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: HostnamesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListHostnamesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: HostnamesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnamesResponse", }) as any as S.Schema; export interface PatchHostnameRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Specify an optional description of the hostname. */ description?: string; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string; } export const PatchHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), description: S.optional(S.String), dnslink: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/web3/hostnames/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchHostnameRequest", }) as any as S.Schema; export type HostnamesEditResponseStatus = | "active" | "pending" | "deleting" | "error"; export const HostnamesEditResponseStatus = /*@__PURE__*/ S.String; export type HostnamesEditResponseTarget = | "ethereum" | "ipfs" | "ipfs_universal_path"; export const HostnamesEditResponseTarget = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchHostnameResponse { /** Specify the identifier of the hostname. */ id?: string | null; createdOn?: string | null; /** Specify an optional description of the hostname. */ description?: string | null; /** Specify the DNSLink value used if the target is ipfs. */ dnslink?: string | null; modifiedOn?: string | null; /** Specify the hostname that points to the target gateway via CNAME. */ name?: string | null; /** Specifies the status of the hostname's activation. */ status?: HostnamesEditResponseStatus | null; /** Specify the target gateway of the hostname. */ target?: HostnamesEditResponseTarget | null; } export const PatchHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), dnslink: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), name: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnamesEditResponseStatus)), target: S.optional(S.NullOr(HostnamesEditResponseTarget)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchHostnameResponse", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsUpdateRequestAction = "block"; export const HostnamesIpfsUniversalPathsContentListsUpdateRequestAction = /*@__PURE__*/ S.String; export type HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItemType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItemType = /*@__PURE__*/ S.String; export interface HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItem { /** Specify the identifier of the hostname. */ id?: string; /** Specify the CID or content path of content to block. */ content?: string; createdOn?: string; /** Specify an optional description of the content list entry. */ description?: string; modifiedOn?: string; /** Specify the type of content list entry to block. */ type?: | HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItemType | (string & {}); } export const HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), content: S.optional(S.String), createdOn: S.optional(S.String.pipe(T.Body("created_on"))), description: S.optional(S.String), modifiedOn: S.optional(S.String.pipe(T.Body("modified_on"))), type: S.optional( HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItemType, ), }), ).annotate({ identifier: "HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItem", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesList = Array; export const HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesList = /*@__PURE__*/ S.Array( HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesItem, ) as any as S.Schema; export interface PutHostnameIpfsUniversalPathContentListRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Behavior of the content list. */ action: | HostnamesIpfsUniversalPathsContentListsUpdateRequestAction | (string & {}); /** Provides content list entries. */ entries: HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesList; } export const PutHostnameIpfsUniversalPathContentListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), action: HostnamesIpfsUniversalPathsContentListsUpdateRequestAction, entries: HostnamesIpfsUniversalPathsContentListsUpdateRequestEntriesList, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHostnameIpfsUniversalPathContentListRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsUpdateResponseAction = "block"; export const HostnamesIpfsUniversalPathsContentListsUpdateResponseAction = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutHostnameIpfsUniversalPathContentListResponse { /** Behavior of the content list. */ action?: HostnamesIpfsUniversalPathsContentListsUpdateResponseAction | null; } export const PutHostnameIpfsUniversalPathContentListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional( S.NullOr(HostnamesIpfsUniversalPathsContentListsUpdateResponseAction), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHostnameIpfsUniversalPathContentListResponse", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesUpdateRequestType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesUpdateRequestType = /*@__PURE__*/ S.String; export interface UpdateHostnameIpfsUniversalPathContentListEntryRequest { /** Specify the identifier of the hostname. */ zoneId: string; /** Specify the identifier of the hostname. */ identifier: string; /** Specify the identifier of the hostname. */ contentListEntryIdentifier: string; /** Specify the CID or content path of content to block. */ content: string; /** Specify the type of content list entry to block. */ type: | HostnamesIpfsUniversalPathsContentListsEntriesUpdateRequestType | (string & {}); /** Specify an optional description of the content list entry. */ description?: string; } export const UpdateHostnameIpfsUniversalPathContentListEntryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: S.String.pipe(T.Label()), contentListEntryIdentifier: S.String.pipe( T.Label("content_list_entry_identifier"), ), content: S.String, type: HostnamesIpfsUniversalPathsContentListsEntriesUpdateRequestType, description: S.optional(S.String), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateHostnameIpfsUniversalPathContentListEntryRequest", }) as any as S.Schema; export type HostnamesIpfsUniversalPathsContentListsEntriesUpdateResponseType = | "cid" | "content_path"; export const HostnamesIpfsUniversalPathsContentListsEntriesUpdateResponseType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateHostnameIpfsUniversalPathContentListEntryResponse { /** Specify the identifier of the hostname. */ id?: string | null; /** Specify the CID or content path of content to block. */ content?: string | null; createdOn?: string | null; /** Specify an optional description of the content list entry. */ description?: string | null; modifiedOn?: string | null; /** Specify the type of content list entry to block. */ type?: HostnamesIpfsUniversalPathsContentListsEntriesUpdateResponseType | null; } export const UpdateHostnameIpfsUniversalPathContentListEntryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), content: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), type: S.optional( S.NullOr( HostnamesIpfsUniversalPathsContentListsEntriesUpdateResponseType, ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateHostnameIpfsUniversalPathContentListEntryResponse", }) as any as S.Schema; export type CreateHostnameError = | Web3HostnameNotEntitled | Forbidden | CloudflareOpError; /** Create Web3 Hostname */ export const createHostname: API.OperationMethod< CreateHostnameRequest, CreateHostnameResponse, CreateHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateHostnameRequest, output: CreateHostnameResponse, errors: [ Web3HostnameNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateHostnameIpfsUniversalPathContentListEntryError = CloudflareOpError; /** Create IPFS Universal Path Gateway Content List Entry */ export const createHostnameIpfsUniversalPathContentListEntry: API.OperationMethod< CreateHostnameIpfsUniversalPathContentListEntryRequest, CreateHostnameIpfsUniversalPathContentListEntryResponse, CreateHostnameIpfsUniversalPathContentListEntryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateHostnameIpfsUniversalPathContentListEntryRequest, output: CreateHostnameIpfsUniversalPathContentListEntryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteHostnameError = | Web3HostnameNotFound | Forbidden | CloudflareOpError; /** Delete Web3 Hostname */ export const deleteHostname: API.OperationMethod< DeleteHostnameRequest, DeleteHostnameResponse, DeleteHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteHostnameRequest, output: DeleteHostnameResponse, errors: [ Web3HostnameNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteHostnameIpfsUniversalPathContentListEntryError = CloudflareOpError; /** Delete IPFS Universal Path Gateway Content List Entry */ export const deleteHostnameIpfsUniversalPathContentListEntry: API.OperationMethod< DeleteHostnameIpfsUniversalPathContentListEntryRequest, DeleteHostnameIpfsUniversalPathContentListEntryResponse, DeleteHostnameIpfsUniversalPathContentListEntryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteHostnameIpfsUniversalPathContentListEntryRequest, output: DeleteHostnameIpfsUniversalPathContentListEntryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHostnameError = | Web3HostnameNotFound | Forbidden | CloudflareOpError; /** Web3 Hostname Details */ export const getHostname: API.OperationMethod< GetHostnameRequest, GetHostnameResponse, GetHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHostnameRequest, output: GetHostnameResponse, errors: [ Web3HostnameNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHostnameIpfsUniversalPathContentListError = | Web3HostnameNotFound | InvalidWeb3HostnameTarget | Forbidden | CloudflareOpError; /** IPFS Universal Path Gateway Content List Details */ export const getHostnameIpfsUniversalPathContentList: API.OperationMethod< GetHostnameIpfsUniversalPathContentListRequest, GetHostnameIpfsUniversalPathContentListResponse, GetHostnameIpfsUniversalPathContentListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHostnameIpfsUniversalPathContentListRequest, output: GetHostnameIpfsUniversalPathContentListResponse, errors: [ Web3HostnameNotFound, InvalidWeb3HostnameTarget, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHostnameIpfsUniversalPathContentListEntryError = CloudflareOpError; /** IPFS Universal Path Gateway Content List Entry Details */ export const getHostnameIpfsUniversalPathContentListEntry: API.OperationMethod< GetHostnameIpfsUniversalPathContentListEntryRequest, GetHostnameIpfsUniversalPathContentListEntryResponse, GetHostnameIpfsUniversalPathContentListEntryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHostnameIpfsUniversalPathContentListEntryRequest, output: GetHostnameIpfsUniversalPathContentListEntryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListHostnameIpfsUniversalPathContentListEntriesError = | Web3HostnameNotFound | InvalidWeb3HostnameTarget | Forbidden | CloudflareOpError; /** List IPFS Universal Path Gateway Content List Entries */ export const listHostnameIpfsUniversalPathContentListEntries: API.OperationMethod< ListHostnameIpfsUniversalPathContentListEntriesRequest, ListHostnameIpfsUniversalPathContentListEntriesResponse, ListHostnameIpfsUniversalPathContentListEntriesError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListHostnameIpfsUniversalPathContentListEntriesRequest, output: ListHostnameIpfsUniversalPathContentListEntriesResponse, errors: [ Web3HostnameNotFound, InvalidWeb3HostnameTarget, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListHostnamesError = Forbidden | CloudflareOpError; /** List Web3 Hostnames */ export const listHostnames: API.PaginatedOperationMethod< ListHostnamesRequest, ListHostnamesResponse, ListHostnamesError, CloudflareOpContext, HostnamesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListHostnamesRequest, output: ListHostnamesResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchHostnameError = | Web3HostnameNotFound | Forbidden | CloudflareOpError; /** Edit Web3 Hostname */ export const patchHostname: API.OperationMethod< PatchHostnameRequest, PatchHostnameResponse, PatchHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchHostnameRequest, output: PatchHostnameResponse, errors: [ Web3HostnameNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutHostnameIpfsUniversalPathContentListError = | Web3HostnameNotFound | InvalidWeb3HostnameTarget | Forbidden | CloudflareOpError; /** Update IPFS Universal Path Gateway Content List */ export const putHostnameIpfsUniversalPathContentList: API.OperationMethod< PutHostnameIpfsUniversalPathContentListRequest, PutHostnameIpfsUniversalPathContentListResponse, PutHostnameIpfsUniversalPathContentListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutHostnameIpfsUniversalPathContentListRequest, output: PutHostnameIpfsUniversalPathContentListResponse, errors: [ Web3HostnameNotFound, InvalidWeb3HostnameTarget, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateHostnameIpfsUniversalPathContentListEntryError = CloudflareOpError; /** Edit IPFS Universal Path Gateway Content List Entry */ export const updateHostnameIpfsUniversalPathContentListEntry: API.OperationMethod< UpdateHostnameIpfsUniversalPathContentListEntryRequest, UpdateHostnameIpfsUniversalPathContentListEntryResponse, UpdateHostnameIpfsUniversalPathContentListEntryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateHostnameIpfsUniversalPathContentListEntryRequest, output: UpdateHostnameIpfsUniversalPathContentListEntryResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));