// 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> = { accountId: "account_id", advertisedModifiedAt: "advertised_modified_at", asnPrependCount: "asn_prepend_count", autoAdvertiseWithdraw: "auto_advertise_withdraw", autoGenerated: "auto_generated", bgpSignalOpts: "bgp_signal_opts", canDelete: "can_delete", canModifyIps: "can_modify_ips", createdAt: "created_at", createdOn: "created_on", defaultSni: "default_sni", delegateLoaCreation: "delegate_loa_creation", delegatedAccountId: "delegated_account_id", documentationUrl: "documentation_url", irrValidationState: "irr_validation_state", loaDocument: "loa_document", loaDocumentId: "loa_document_id", modifiedAt: "modified_at", onDemand: "on_demand", onDemandEnabled: "on_demand_enabled", onDemandLocked: "on_demand_locked", ownershipValidationState: "ownership_validation_state", ownershipValidationToken: "ownership_validation_token", parentPrefixId: "parent_prefix_id", perPage: "per_page", regionKey: "region_key", resultInfo: "result_info", rpkiValidationState: "rpki_validation_state", serviceId: "service_id", serviceName: "service_name", sizeBytes: "size_bytes", totalCount: "total_count", totalPages: "total_pages", verifiedAt: "verified_at", }; export class AddressMapNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("AddressMapNotFound", { code: S.Number, message: S.String, }), [{ code: 1000 }, { code: 1000, message: { includes: "not_found" } }], ) {} export class BgpPrefixNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BgpPrefixNotFound", { code: S.Number, message: S.String, }), [{ code: 1002 }], ) {} export class BindingNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BindingNotFound", { code: S.Number, message: S.String, }), [{ code: 1002 }], ) {} export class DelegationNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("DelegationNotFound", { code: S.Number, message: S.String, }), [{ code: 1000 }], ) {} export class FeatureNotEnabled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("FeatureNotEnabled", { code: S.Number, message: S.String, }), [{ code: 1002, message: { includes: "address_maps_not_enabled" } }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class InvalidAccountId extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidAccountId", { code: S.Number, message: S.String, }), [{ code: 7003, message: { includes: "Could not route" } }], ) {} export class InvalidHostname extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidHostname", { code: S.Number, message: S.String, }), [{ code: 1002, message: { includes: "forbidden" } }], ) {} export class InvalidLoaForm extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidLoaForm", { code: S.Number, message: S.String, }), [{ code: 1001, message: { includes: "invalid_loa_form" } }, { code: 1001 }], ) {} export class InvalidNetworkCidr extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidNetworkCidr", { code: S.Number, message: S.String, }), [{ code: 1001, message: { includes: "invalid_network_cidr" } }], ) {} export class InvalidZoneId extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidZoneId", { code: S.Number, message: S.String, }), [{ code: 7003, message: { includes: "Could not route" } }], ) {} export class IrrEntryNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("IrrEntryNotFound", { code: S.Number, message: S.String, }), [{ code: 1003, message: { includes: "irr_entry_not_found" } }], ) {} export class LoaDocumentNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("LoaDocumentNotFound", { code: S.Number, message: S.String, }), [{ code: 1000 }], ) {} export class MethodNotAllowed extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("MethodNotAllowed", { code: S.Number, message: S.String, }), [ { code: 10405, message: { includes: "not allowed" } }, { code: 10000, message: { includes: "not allowed" } }, ], ) {} export class MissingAccountId extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("MissingAccountId", { code: S.Number, message: S.String, }), [{ code: 1001 }], ) {} export class NonexistentAccountPrefix extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "NonexistentAccountPrefix", { code: S.Number, message: S.String, }, ), [{ code: 1003 }], ) {} export class PrefixNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("PrefixNotFound", { code: S.Number, message: S.String, }), [ { code: 1000 }, { code: 1000, message: { includes: "not_found" } }, { code: 1002, message: { includes: "forbidden" } }, ], ) {} export class RegionalHostnameEmpty extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "RegionalHostnameEmpty", { code: S.Number, message: S.String, }, ), [{ code: 1000, message: { includes: "not_found" } }], ) {} export class RegionalHostnameNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "RegionalHostnameNotFound", { code: S.Number, message: S.String, }, ), [{ code: 1002, message: { includes: "forbidden" } }], ) {} export class UnsupportedBindingConfiguration extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "UnsupportedBindingConfiguration", { code: S.Number, message: S.String, }, ), [{ code: 1003 }], ) {} export type AddressMapsCreateRequestIpsList = Array; export const AddressMapsCreateRequestIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type AddressMapsCreateRequestMembershipsItemKind = "zone" | "account"; export const AddressMapsCreateRequestMembershipsItemKind = /*@__PURE__*/ S.String; export interface AddressMapsCreateRequestMembershipsItem { /** The identifier for the membership (eg. a zone or account tag). */ identifier?: string; /** The type of the membership. */ kind?: AddressMapsCreateRequestMembershipsItemKind | (string & {}); } export const AddressMapsCreateRequestMembershipsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ identifier: S.optional(S.String), kind: S.optional(AddressMapsCreateRequestMembershipsItemKind), }), ).annotate({ identifier: "AddressMapsCreateRequestMembershipsItem", }) as any as S.Schema; export type AddressMapsCreateRequestMembershipsList = Array; export const AddressMapsCreateRequestMembershipsList = /*@__PURE__*/ S.Array( AddressMapsCreateRequestMembershipsItem, ) as any as S.Schema; export interface CreateAddressMapRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean; ips?: AddressMapsCreateRequestIpsList; /** Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */ memberships?: AddressMapsCreateRequestMembershipsList; } export const CreateAddressMapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), description: S.optional(S.String), enabled: S.optional(S.Boolean), ips: S.optional(AddressMapsCreateRequestIpsList), memberships: S.optional(AddressMapsCreateRequestMembershipsList), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/address_maps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAddressMapRequest", }) as any as S.Schema; export interface AddressMapsCreateResponseIps { createdAt?: string | null; /** An IPv4 or IPv6 address. */ ip?: string | null; } export const AddressMapsCreateResponseIps = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), ip: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AddressMapsCreateResponseIps", }) as any as S.Schema; export type AddressMapsCreateResponseIpsList = Array; export const AddressMapsCreateResponseIpsList = /*@__PURE__*/ S.Array( AddressMapsCreateResponseIps, ) as any as S.Schema; export type AddressMapsCreateResponseMembershipsItemKind = "zone" | "account"; export const AddressMapsCreateResponseMembershipsItemKind = /*@__PURE__*/ S.String; export interface AddressMapsCreateResponseMembershipsItem { /** Controls whether the membership can be deleted via the API or not. */ canDelete?: boolean | null; createdAt?: string | null; /** The identifier for the membership (eg. a zone or account tag). */ identifier?: string | null; /** The type of the membership. */ kind?: AddressMapsCreateResponseMembershipsItemKind | null; } export const AddressMapsCreateResponseMembershipsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), identifier: S.optional(S.NullOr(S.String)), kind: S.optional(S.NullOr(AddressMapsCreateResponseMembershipsItemKind)), }), ).annotate({ identifier: "AddressMapsCreateResponseMembershipsItem", }) as any as S.Schema; export type AddressMapsCreateResponseMembershipsList = Array; export const AddressMapsCreateResponseMembershipsList = /*@__PURE__*/ S.Array( AddressMapsCreateResponseMembershipsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAddressMapResponse { /** Identifier of an Address Map. */ id?: string | null; /** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */ canDelete?: boolean | null; /** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */ canModifyIps?: boolean | null; createdAt?: string | null; /** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. */ defaultSni?: string | null; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string | null; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean | null; /** The set of IPs on the Address Map. */ ips?: AddressMapsCreateResponseIpsList | null; /** Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */ memberships?: AddressMapsCreateResponseMembershipsList | null; modifiedAt?: string | null; } export const CreateAddressMapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), canModifyIps: S.optional( S.NullOr(S.Boolean).pipe(T.Body("can_modify_ips")), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), defaultSni: S.optional(S.NullOr(S.String).pipe(T.Body("default_sni"))), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), ips: S.optional(S.NullOr(AddressMapsCreateResponseIpsList)), memberships: S.optional(S.NullOr(AddressMapsCreateResponseMembershipsList)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAddressMapResponse", }) as any as S.Schema; export interface CreateLoaDocumentRequest { /** Identifier of a Cloudflare account. */ accountId: string; } export const CreateLoaDocumentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/loa_documents", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLoaDocumentRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateLoaDocumentResponse { /** Identifier for the uploaded LOA document. */ id?: string | null; /** Identifier of a Cloudflare account. */ accountId?: string | null; /** Whether the LOA has been auto-generated for the prefix owner by Cloudflare. */ autoGenerated?: boolean | null; created?: string | null; /** Name of LOA document. Max file size 10MB, and supported filetype is pdf. */ filename?: string | null; /** File size of the uploaded LOA document. */ sizeBytes?: number | null; /** Whether the LOA has been verified by Cloudflare staff. */ verified?: boolean | null; /** Timestamp of the moment the LOA was marked as validated. */ verifiedAt?: string | null; } export const CreateLoaDocumentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), accountId: S.optional(S.NullOr(S.String).pipe(T.Body("account_id"))), autoGenerated: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_generated")), ), created: S.optional(S.NullOr(S.String)), filename: S.optional(S.NullOr(S.String)), sizeBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("size_bytes"))), verified: S.optional(S.NullOr(S.Boolean)), verifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("verified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLoaDocumentResponse", }) as any as S.Schema; export interface CreatePrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn: number; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr: string; /** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */ delegateLoaCreation?: boolean; /** Description of the prefix. */ description?: string; /** Identifier for the uploaded LOA document. */ loaDocumentId?: string; } export const CreatePrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), asn: S.Number, cidr: S.String, delegateLoaCreation: S.optional( S.Boolean.pipe(T.Body("delegate_loa_creation")), ), description: S.optional(S.String), loaDocumentId: S.optional(S.String.pipe(T.Body("loa_document_id"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePrefixResponse { /** Identifier of an IP Prefix. */ id?: string | null; /** Identifier of a Cloudflare account. */ accountId?: string | null; /** Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled. */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; /** Approval state of the prefix (P = pending, V = active). */ approved?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */ delegateLoaCreation?: boolean | null; /** Description of the prefix. */ description?: string | null; /** State of one kind of validation for an IP prefix. */ irrValidationState?: string | null; /** Identifier for the uploaded LOA document. */ loaDocumentId?: string | null; modifiedAt?: string | null; /** Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled. */ onDemandEnabled?: boolean | null; /** Whether advertisement status of the prefix is locked, meaning it cannot be changed. */ onDemandLocked?: boolean | null; /** State of one kind of validation for an IP prefix. */ ownershipValidationState?: string | null; /** Token provided to demonstrate ownership of the prefix. */ ownershipValidationToken?: string | null; /** State of one kind of validation for an IP prefix. */ rpkiValidationState?: string | null; } export const CreatePrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), accountId: S.optional(S.NullOr(S.String).pipe(T.Body("account_id"))), advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), approved: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegateLoaCreation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("delegate_loa_creation")), ), description: S.optional(S.NullOr(S.String)), irrValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("irr_validation_state")), ), loaDocumentId: S.optional( S.NullOr(S.String).pipe(T.Body("loa_document_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemandEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_enabled")), ), onDemandLocked: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_locked")), ), ownershipValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_state")), ), ownershipValidationToken: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_token")), ), rpkiValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("rpki_validation_state")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixResponse", }) as any as S.Schema; export interface CreatePrefixBgpPrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr: string; } export const CreatePrefixBgpPrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), cidr: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixBgpPrefixRequest", }) as any as S.Schema; export interface PrefixesBgpPrefixesCreateResponseBgpSignalOpts { /** Whether control of advertisement of the prefix to the Internet is enabled to be performed via BGP signal */ enabled?: boolean | null; /** Last time BGP signaling control was toggled. This field is null if BGP signaling has never been enabled. */ modifiedAt?: string | null; } export const PrefixesBgpPrefixesCreateResponseBgpSignalOpts = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }), ).annotate({ identifier: "PrefixesBgpPrefixesCreateResponseBgpSignalOpts", }) as any as S.Schema; export interface PrefixesBgpPrefixesCreateResponseOnDemand { /** Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled. */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; /** Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled. */ onDemandEnabled?: boolean | null; /** Whether the advertisement status of the prefix is locked, meaning it cannot be changed. */ onDemandLocked?: boolean | null; } export const PrefixesBgpPrefixesCreateResponseOnDemand = /*@__PURE__*/ S.suspend(() => S.Struct({ advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), onDemandEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_enabled")), ), onDemandLocked: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_locked")), ), }), ).annotate({ identifier: "PrefixesBgpPrefixesCreateResponseOnDemand", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePrefixBgpPrefixResponse { /** Identifier of BGP Prefix. */ id?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */ asnPrependCount?: number | null; /** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route. */ autoAdvertiseWithdraw?: boolean | null; bgpSignalOpts?: PrefixesBgpPrefixesCreateResponseBgpSignalOpts | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; modifiedAt?: string | null; onDemand?: PrefixesBgpPrefixesCreateResponseOnDemand | null; } export const CreatePrefixBgpPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), asnPrependCount: S.optional( S.NullOr(S.Number).pipe(T.Body("asn_prepend_count")), ), autoAdvertiseWithdraw: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_advertise_withdraw")), ), bgpSignalOpts: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseBgpSignalOpts).pipe( T.Body("bgp_signal_opts"), ), ), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemand: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseOnDemand).pipe( T.Body("on_demand"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixBgpPrefixResponse", }) as any as S.Schema; export interface CreatePrefixDelegationRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr: string; /** Account identifier for the account to which prefix is being delegated. */ delegatedAccountId: string; } export const CreatePrefixDelegationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), cidr: S.String, delegatedAccountId: S.String.pipe(T.Body("delegated_account_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixDelegationRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePrefixDelegationResponse { /** Identifier of a Delegation. */ id?: string | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Account identifier for the account to which prefix is being delegated. */ delegatedAccountId?: string | null; modifiedAt?: string | null; /** Identifier of an IP Prefix. */ parentPrefixId?: string | null; } export const CreatePrefixDelegationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegatedAccountId: S.optional( S.NullOr(S.String).pipe(T.Body("delegated_account_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), parentPrefixId: S.optional( S.NullOr(S.String).pipe(T.Body("parent_prefix_id")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixDelegationResponse", }) as any as S.Schema; export interface CreatePrefixServiceBindingRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr: string; /** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the */ serviceId: string; } export const CreatePrefixServiceBindingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), cidr: S.String, serviceId: S.String.pipe(T.Body("service_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixServiceBindingRequest", }) as any as S.Schema; export type PrefixesServiceBindingsCreateResponseProvisioningState = | "provisioning" | "active"; export const PrefixesServiceBindingsCreateResponseProvisioningState = /*@__PURE__*/ S.String; export interface PrefixesServiceBindingsCreateResponseProvisioning { /** When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active and can be used with its associated service. */ state?: PrefixesServiceBindingsCreateResponseProvisioningState | null; } export const PrefixesServiceBindingsCreateResponseProvisioning = /*@__PURE__*/ S.suspend(() => S.Struct({ state: S.optional( S.NullOr(PrefixesServiceBindingsCreateResponseProvisioningState), ), }), ).annotate({ identifier: "PrefixesServiceBindingsCreateResponseProvisioning", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePrefixServiceBindingResponse { /** Identifier of a Service Binding. */ id?: string | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; /** Status of a Service Binding's deployment to the Cloudflare network */ provisioning?: PrefixesServiceBindingsCreateResponseProvisioning | null; /** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the */ serviceId?: string | null; /** Name of a service running on the Cloudflare network */ serviceName?: string | null; } export const CreatePrefixServiceBindingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cidr: S.optional(S.NullOr(S.String)), provisioning: S.optional( S.NullOr(PrefixesServiceBindingsCreateResponseProvisioning), ), serviceId: S.optional(S.NullOr(S.String).pipe(T.Body("service_id"))), serviceName: S.optional(S.NullOr(S.String).pipe(T.Body("service_name"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreatePrefixServiceBindingResponse", }) as any as S.Schema; export interface CreateRegionalHostnameRequest { /** Identifier. */ zoneId: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; /** Configure which routing method to use for the regional hostname */ routing?: string; } export const CreateRegionalHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), hostname: S.String, regionKey: S.String.pipe(T.Body("region_key")), routing: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/addressing/regional_hostnames", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRegionalHostnameRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateRegionalHostnameResponse { /** When the regional hostname was created */ createdOn: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; /** Configure which routing method to use for the regional hostname */ routing: string; } export const CreateRegionalHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdOn: S.String.pipe(T.Body("created_on")), hostname: S.String, regionKey: S.String.pipe(T.Body("region_key")), routing: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRegionalHostnameResponse", }) as any as S.Schema; export interface DeleteAddressMapRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; } export const DeleteAddressMapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapRequest", }) as any as S.Schema; export interface DeleteAddressMapResponse {} export const DeleteAddressMapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapResponse", }) as any as S.Schema; export interface DeleteAddressMapAccountRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** Identifier of the Cloudflare account to remove from the address map. */ memberAccountId: string; } export const DeleteAddressMapAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), memberAccountId: S.String.pipe(T.Label("member_account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{member_account_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapAccountRequest", }) as any as S.Schema; export interface DeleteAddressMapAccountResponse {} export const DeleteAddressMapAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapAccountResponse", }) as any as S.Schema; export interface DeleteAddressMapIpRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** An IPv4 or IPv6 address. */ ipAddress: string; } export const DeleteAddressMapIpRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), ipAddress: S.String.pipe(T.Label("ip_address")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapIpRequest", }) as any as S.Schema; export interface DeleteAddressMapIpResponse {} export const DeleteAddressMapIpResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapIpResponse", }) as any as S.Schema; export interface DeleteAddressMapZoneRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** Identifier of a zone. */ zoneId: string; } export const DeleteAddressMapZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapZoneRequest", }) as any as S.Schema; export interface DeleteAddressMapZoneResponse {} export const DeleteAddressMapZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAddressMapZoneResponse", }) as any as S.Schema; export interface DeletePrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const DeletePrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixRequest", }) as any as S.Schema; export interface DeletePrefixResponse {} export const DeletePrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixResponse", }) as any as S.Schema; export interface DeletePrefixDelegationRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Identifier of a Delegation. */ delegationId: string; } export const DeletePrefixDelegationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), delegationId: S.String.pipe(T.Label("delegation_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixDelegationRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeletePrefixDelegationResponse { /** Identifier of a Delegation. */ id?: string | null; } export const DeletePrefixDelegationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixDelegationResponse", }) as any as S.Schema; export interface DeletePrefixServiceBindingRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Identifier of a Service Binding. */ bindingId: string; } export const DeletePrefixServiceBindingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), bindingId: S.String.pipe(T.Label("binding_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixServiceBindingRequest", }) as any as S.Schema; export interface DeletePrefixServiceBindingResponse {} export const DeletePrefixServiceBindingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeletePrefixServiceBindingResponse", }) as any as S.Schema; export interface DeleteRegionalHostnameRequest { /** Identifier. */ zoneId: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; } export const DeleteRegionalHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), hostname: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRegionalHostnameRequest", }) as any as S.Schema; export interface DeleteRegionalHostnameResponse {} export const DeleteRegionalHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRegionalHostnameResponse", }) as any as S.Schema; export interface GetAddressMapRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; } export const GetAddressMapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAddressMapRequest", }) as any as S.Schema; export type AddressMapsGetResponseIps = AddressMapsCreateResponseIps; export const AddressMapsGetResponseIps = AddressMapsCreateResponseIps; export type AddressMapsGetResponseIpsList = Array; export const AddressMapsGetResponseIpsList = /*@__PURE__*/ S.Array( AddressMapsCreateResponseIps, ) as any as S.Schema; export type AddressMapsGetResponseMembershipsItemKind = "zone" | "account"; export const AddressMapsGetResponseMembershipsItemKind = /*@__PURE__*/ S.String; export interface AddressMapsGetResponseMembershipsItem { /** Controls whether the membership can be deleted via the API or not. */ canDelete?: boolean | null; createdAt?: string | null; /** The identifier for the membership (eg. a zone or account tag). */ identifier?: string | null; /** The type of the membership. */ kind?: AddressMapsGetResponseMembershipsItemKind | null; } export const AddressMapsGetResponseMembershipsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), identifier: S.optional(S.NullOr(S.String)), kind: S.optional(S.NullOr(AddressMapsGetResponseMembershipsItemKind)), }), ).annotate({ identifier: "AddressMapsGetResponseMembershipsItem", }) as any as S.Schema; export type AddressMapsGetResponseMembershipsList = Array; export const AddressMapsGetResponseMembershipsList = /*@__PURE__*/ S.Array( AddressMapsGetResponseMembershipsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAddressMapResponse { /** Identifier of an Address Map. */ id?: string | null; /** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */ canDelete?: boolean | null; /** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */ canModifyIps?: boolean | null; createdAt?: string | null; /** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. */ defaultSni?: string | null; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string | null; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean | null; /** The set of IPs on the Address Map. */ ips?: AddressMapsGetResponseIpsList | null; /** Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */ memberships?: AddressMapsGetResponseMembershipsList | null; modifiedAt?: string | null; } export const GetAddressMapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), canModifyIps: S.optional( S.NullOr(S.Boolean).pipe(T.Body("can_modify_ips")), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), defaultSni: S.optional(S.NullOr(S.String).pipe(T.Body("default_sni"))), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), ips: S.optional(S.NullOr(AddressMapsGetResponseIpsList)), memberships: S.optional(S.NullOr(AddressMapsGetResponseMembershipsList)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAddressMapResponse", }) as any as S.Schema; export interface GetLoaDocumentRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier for the uploaded LOA document. */ loaDocumentId: string; } export const GetLoaDocumentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), loaDocumentId: S.String.pipe(T.Label("loa_document_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/loa_documents/{loa_document_id}/download", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLoaDocumentRequest", }) as any as S.Schema; export interface GetLoaDocumentResponse {} export const GetLoaDocumentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLoaDocumentResponse", }) as any as S.Schema; export interface GetPrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const GetPrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPrefixResponse { /** Identifier of an IP Prefix. */ id?: string | null; /** Identifier of a Cloudflare account. */ accountId?: string | null; /** Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled. */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; /** Approval state of the prefix (P = pending, V = active). */ approved?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */ delegateLoaCreation?: boolean | null; /** Description of the prefix. */ description?: string | null; /** State of one kind of validation for an IP prefix. */ irrValidationState?: string | null; /** Identifier for the uploaded LOA document. */ loaDocumentId?: string | null; modifiedAt?: string | null; /** Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled. */ onDemandEnabled?: boolean | null; /** Whether advertisement status of the prefix is locked, meaning it cannot be changed. */ onDemandLocked?: boolean | null; /** State of one kind of validation for an IP prefix. */ ownershipValidationState?: string | null; /** Token provided to demonstrate ownership of the prefix. */ ownershipValidationToken?: string | null; /** State of one kind of validation for an IP prefix. */ rpkiValidationState?: string | null; } export const GetPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), accountId: S.optional(S.NullOr(S.String).pipe(T.Body("account_id"))), advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), approved: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegateLoaCreation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("delegate_loa_creation")), ), description: S.optional(S.NullOr(S.String)), irrValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("irr_validation_state")), ), loaDocumentId: S.optional( S.NullOr(S.String).pipe(T.Body("loa_document_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemandEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_enabled")), ), onDemandLocked: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_locked")), ), ownershipValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_state")), ), ownershipValidationToken: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_token")), ), rpkiValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("rpki_validation_state")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixResponse", }) as any as S.Schema; export interface GetPrefixAdvertisementStatusRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const GetPrefixAdvertisementStatusRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixAdvertisementStatusRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPrefixAdvertisementStatusResponse { /** Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; } export const GetPrefixAdvertisementStatusResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixAdvertisementStatusResponse", }) as any as S.Schema; export interface GetPrefixBgpPrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Identifier of BGP Prefix. */ bgpPrefixId: string; } export const GetPrefixBgpPrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), bgpPrefixId: S.String.pipe(T.Label("bgp_prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixBgpPrefixRequest", }) as any as S.Schema; export type PrefixesBgpPrefixesGetResponseBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export const PrefixesBgpPrefixesGetResponseBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export type PrefixesBgpPrefixesGetResponseOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; export const PrefixesBgpPrefixesGetResponseOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPrefixBgpPrefixResponse { /** Identifier of BGP Prefix. */ id?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */ asnPrependCount?: number | null; /** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route. */ autoAdvertiseWithdraw?: boolean | null; bgpSignalOpts?: PrefixesBgpPrefixesCreateResponseBgpSignalOpts | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; modifiedAt?: string | null; onDemand?: PrefixesBgpPrefixesCreateResponseOnDemand | null; } export const GetPrefixBgpPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), asnPrependCount: S.optional( S.NullOr(S.Number).pipe(T.Body("asn_prepend_count")), ), autoAdvertiseWithdraw: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_advertise_withdraw")), ), bgpSignalOpts: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseBgpSignalOpts).pipe( T.Body("bgp_signal_opts"), ), ), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemand: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseOnDemand).pipe( T.Body("on_demand"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixBgpPrefixResponse", }) as any as S.Schema; export interface GetPrefixServiceBindingRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Identifier of a Service Binding. */ bindingId: string; } export const GetPrefixServiceBindingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), bindingId: S.String.pipe(T.Label("binding_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixServiceBindingRequest", }) as any as S.Schema; export type PrefixesServiceBindingsGetResponseProvisioningState = | "provisioning" | "active"; export const PrefixesServiceBindingsGetResponseProvisioningState = /*@__PURE__*/ S.String; export interface PrefixesServiceBindingsGetResponseProvisioning { /** When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active and can be used with its associated service. */ state?: PrefixesServiceBindingsGetResponseProvisioningState | null; } export const PrefixesServiceBindingsGetResponseProvisioning = /*@__PURE__*/ S.suspend(() => S.Struct({ state: S.optional( S.NullOr(PrefixesServiceBindingsGetResponseProvisioningState), ), }), ).annotate({ identifier: "PrefixesServiceBindingsGetResponseProvisioning", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPrefixServiceBindingResponse { /** Identifier of a Service Binding. */ id?: string | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; /** Status of a Service Binding's deployment to the Cloudflare network */ provisioning?: PrefixesServiceBindingsGetResponseProvisioning | null; /** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the */ serviceId?: string | null; /** Name of a service running on the Cloudflare network */ serviceName?: string | null; } export const GetPrefixServiceBindingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cidr: S.optional(S.NullOr(S.String)), provisioning: S.optional( S.NullOr(PrefixesServiceBindingsGetResponseProvisioning), ), serviceId: S.optional(S.NullOr(S.String).pipe(T.Body("service_id"))), serviceName: S.optional(S.NullOr(S.String).pipe(T.Body("service_name"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPrefixServiceBindingResponse", }) as any as S.Schema; export interface GetRegionalHostnameRequest { /** Identifier. */ zoneId: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; } export const GetRegionalHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), hostname: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRegionalHostnameRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetRegionalHostnameResponse { /** When the regional hostname was created */ createdOn: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; /** Configure which routing method to use for the regional hostname */ routing: string; } export const GetRegionalHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdOn: S.String.pipe(T.Body("created_on")), hostname: S.String, regionKey: S.String.pipe(T.Body("region_key")), routing: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRegionalHostnameResponse", }) as any as S.Schema; export interface ListAddressMapsRequest { /** Identifier of a Cloudflare account. */ accountId: string; } export const ListAddressMapsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/address_maps", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAddressMapsRequest", }) as any as S.Schema; export interface AddressMapsListResultItem { /** Identifier of an Address Map. */ id?: string | null; /** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */ canDelete?: boolean | null; /** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */ canModifyIps?: boolean | null; createdAt?: string | null; /** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. */ defaultSni?: string | null; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string | null; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean | null; modifiedAt?: string | null; } export const AddressMapsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), canModifyIps: S.optional( S.NullOr(S.Boolean).pipe(T.Body("can_modify_ips")), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), defaultSni: S.optional(S.NullOr(S.String).pipe(T.Body("default_sni"))), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }), ).annotate({ identifier: "AddressMapsListResultItem", }) as any as S.Schema; export type AddressMapsListResultList = Array; export const AddressMapsListResultList = /*@__PURE__*/ S.Array( AddressMapsListResultItem, ) as any as S.Schema; export interface ListAddressMapsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AddressMapsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAddressMapsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AddressMapsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAddressMapsResponse", }) as any as S.Schema; export interface ListPrefixBgpPrefixesRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const ListPrefixBgpPrefixesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixBgpPrefixesRequest", }) as any as S.Schema; export type PrefixesBgpPrefixesListResultItemBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export const PrefixesBgpPrefixesListResultItemBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export type PrefixesBgpPrefixesListResultItemOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; export const PrefixesBgpPrefixesListResultItemOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; export interface PrefixesBgpPrefixesListResultItem { /** Identifier of BGP Prefix. */ id?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */ asnPrependCount?: number | null; /** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route. */ autoAdvertiseWithdraw?: boolean | null; bgpSignalOpts?: PrefixesBgpPrefixesCreateResponseBgpSignalOpts | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; modifiedAt?: string | null; onDemand?: PrefixesBgpPrefixesCreateResponseOnDemand | null; } export const PrefixesBgpPrefixesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), asnPrependCount: S.optional( S.NullOr(S.Number).pipe(T.Body("asn_prepend_count")), ), autoAdvertiseWithdraw: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_advertise_withdraw")), ), bgpSignalOpts: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseBgpSignalOpts).pipe( T.Body("bgp_signal_opts"), ), ), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemand: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseOnDemand).pipe( T.Body("on_demand"), ), ), }), ).annotate({ identifier: "PrefixesBgpPrefixesListResultItem", }) as any as S.Schema; export type PrefixesBgpPrefixesListResultList = Array; export const PrefixesBgpPrefixesListResultList = /*@__PURE__*/ S.Array( PrefixesBgpPrefixesListResultItem, ) as any as S.Schema; export interface ListPrefixBgpPrefixesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PrefixesBgpPrefixesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPrefixBgpPrefixesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PrefixesBgpPrefixesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixBgpPrefixesResponse", }) as any as S.Schema; export interface ListPrefixDelegationsRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const ListPrefixDelegationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixDelegationsRequest", }) as any as S.Schema; export interface PrefixesDelegationsListResultItem { /** Identifier of a Delegation. */ id?: string | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Account identifier for the account to which prefix is being delegated. */ delegatedAccountId?: string | null; modifiedAt?: string | null; /** Identifier of an IP Prefix. */ parentPrefixId?: string | null; } export const PrefixesDelegationsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegatedAccountId: S.optional( S.NullOr(S.String).pipe(T.Body("delegated_account_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), parentPrefixId: S.optional( S.NullOr(S.String).pipe(T.Body("parent_prefix_id")), ), }), ).annotate({ identifier: "PrefixesDelegationsListResultItem", }) as any as S.Schema; export type PrefixesDelegationsListResultList = Array; export const PrefixesDelegationsListResultList = /*@__PURE__*/ S.Array( PrefixesDelegationsListResultItem, ) as any as S.Schema; export interface ListPrefixDelegationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PrefixesDelegationsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPrefixDelegationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PrefixesDelegationsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixDelegationsResponse", }) as any as S.Schema; export interface ListPrefixesRequest { /** Identifier of a Cloudflare account. */ accountId: string; } export const ListPrefixesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixesRequest", }) as any as S.Schema; export interface PrefixesListResultItem { /** Identifier of an IP Prefix. */ id?: string | null; /** Identifier of a Cloudflare account. */ accountId?: string | null; /** Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled. */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; /** Approval state of the prefix (P = pending, V = active). */ approved?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */ delegateLoaCreation?: boolean | null; /** Description of the prefix. */ description?: string | null; /** State of one kind of validation for an IP prefix. */ irrValidationState?: string | null; /** Identifier for the uploaded LOA document. */ loaDocumentId?: string | null; modifiedAt?: string | null; /** Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled. */ onDemandEnabled?: boolean | null; /** Whether advertisement status of the prefix is locked, meaning it cannot be changed. */ onDemandLocked?: boolean | null; /** State of one kind of validation for an IP prefix. */ ownershipValidationState?: string | null; /** Token provided to demonstrate ownership of the prefix. */ ownershipValidationToken?: string | null; /** State of one kind of validation for an IP prefix. */ rpkiValidationState?: string | null; } export const PrefixesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), accountId: S.optional(S.NullOr(S.String).pipe(T.Body("account_id"))), advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), approved: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegateLoaCreation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("delegate_loa_creation")), ), description: S.optional(S.NullOr(S.String)), irrValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("irr_validation_state")), ), loaDocumentId: S.optional( S.NullOr(S.String).pipe(T.Body("loa_document_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemandEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_enabled")), ), onDemandLocked: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_locked")), ), ownershipValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_state")), ), ownershipValidationToken: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_token")), ), rpkiValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("rpki_validation_state")), ), }), ).annotate({ identifier: "PrefixesListResultItem", }) as any as S.Schema; export type PrefixesListResultList = Array; export const PrefixesListResultList = /*@__PURE__*/ S.Array( PrefixesListResultItem, ) as any as S.Schema; export interface ListPrefixesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PrefixesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPrefixesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PrefixesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixesResponse", }) as any as S.Schema; export interface ListPrefixServiceBindingsRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; } export const ListPrefixServiceBindingsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixServiceBindingsRequest", }) as any as S.Schema; export type PrefixesServiceBindingsListResultItemProvisioningState = | "provisioning" | "active"; export const PrefixesServiceBindingsListResultItemProvisioningState = /*@__PURE__*/ S.String; export interface PrefixesServiceBindingsListResultItemProvisioning { /** When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active and can be used with its associated service. */ state?: PrefixesServiceBindingsListResultItemProvisioningState | null; } export const PrefixesServiceBindingsListResultItemProvisioning = /*@__PURE__*/ S.suspend(() => S.Struct({ state: S.optional( S.NullOr(PrefixesServiceBindingsListResultItemProvisioningState), ), }), ).annotate({ identifier: "PrefixesServiceBindingsListResultItemProvisioning", }) as any as S.Schema; export interface PrefixesServiceBindingsListResultItem { /** Identifier of a Service Binding. */ id?: string | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; /** Status of a Service Binding's deployment to the Cloudflare network */ provisioning?: PrefixesServiceBindingsListResultItemProvisioning | null; /** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the */ serviceId?: string | null; /** Name of a service running on the Cloudflare network */ serviceName?: string | null; } export const PrefixesServiceBindingsListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), cidr: S.optional(S.NullOr(S.String)), provisioning: S.optional( S.NullOr(PrefixesServiceBindingsListResultItemProvisioning), ), serviceId: S.optional(S.NullOr(S.String).pipe(T.Body("service_id"))), serviceName: S.optional(S.NullOr(S.String).pipe(T.Body("service_name"))), }), ).annotate({ identifier: "PrefixesServiceBindingsListResultItem", }) as any as S.Schema; export type PrefixesServiceBindingsListResultList = Array; export const PrefixesServiceBindingsListResultList = /*@__PURE__*/ S.Array( PrefixesServiceBindingsListResultItem, ) as any as S.Schema; export interface ListPrefixServiceBindingsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PrefixesServiceBindingsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPrefixServiceBindingsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PrefixesServiceBindingsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPrefixServiceBindingsResponse", }) as any as S.Schema; export interface ListRegionalHostnameRegionsRequest { /** Identifier. */ accountId: string; } export const ListRegionalHostnameRegionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/regional_hostnames/regions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRegionalHostnameRegionsRequest", }) as any as S.Schema; export interface RegionalHostnamesRegionsListResultItem { /** Identifying key for the region */ key?: string | null; /** Human-readable text label for the region */ label?: string | null; } export const RegionalHostnamesRegionsListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ key: S.optional(S.NullOr(S.String)), label: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "RegionalHostnamesRegionsListResultItem", }) as any as S.Schema; export type RegionalHostnamesRegionsListResultList = Array; export const RegionalHostnamesRegionsListResultList = /*@__PURE__*/ S.Array( RegionalHostnamesRegionsListResultItem, ) as any as S.Schema; export interface ListRegionalHostnameRegionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: RegionalHostnamesRegionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListRegionalHostnameRegionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: RegionalHostnamesRegionsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRegionalHostnameRegionsResponse", }) as any as S.Schema; export interface ListRegionalHostnamesRequest { /** Identifier. */ zoneId: string; } export const ListRegionalHostnamesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/addressing/regional_hostnames", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRegionalHostnamesRequest", }) as any as S.Schema; export interface RegionalHostnamesListResultItem { /** When the regional hostname was created */ createdOn: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; /** Configure which routing method to use for the regional hostname */ routing: string; } export const RegionalHostnamesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdOn: S.String.pipe(T.Body("created_on")), hostname: S.String, regionKey: S.String.pipe(T.Body("region_key")), routing: S.String, }), ).annotate({ identifier: "RegionalHostnamesListResultItem", }) as any as S.Schema; export type RegionalHostnamesListResultList = Array; export const RegionalHostnamesListResultList = /*@__PURE__*/ S.Array( RegionalHostnamesListResultItem, ) as any as S.Schema; export interface ListRegionalHostnamesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: RegionalHostnamesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListRegionalHostnamesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: RegionalHostnamesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRegionalHostnamesResponse", }) as any as S.Schema; export interface ListServicesRequest { /** Identifier of a Cloudflare account. */ accountId: string; } export const ListServicesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/addressing/services", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListServicesRequest", }) as any as S.Schema; export interface ServicesListResultItem { /** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the */ id?: string | null; /** Name of a service running on the Cloudflare network */ name?: string | null; } export const ServicesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ServicesListResultItem", }) as any as S.Schema; export type ServicesListResultList = Array; export const ServicesListResultList = /*@__PURE__*/ S.Array( ServicesListResultItem, ) as any as S.Schema; export interface ListServicesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ServicesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListServicesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ServicesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListServicesResponse", }) as any as S.Schema; export interface PatchAddressMapRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. */ defaultSni?: string; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean; } export const PatchAddressMapRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), defaultSni: S.optional(S.String.pipe(T.Body("default_sni"))), description: S.optional(S.String), enabled: S.optional(S.Boolean), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAddressMapRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAddressMapResponse { /** Identifier of an Address Map. */ id?: string | null; /** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */ canDelete?: boolean | null; /** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */ canModifyIps?: boolean | null; createdAt?: string | null; /** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. */ defaultSni?: string | null; /** An optional description field which may be used to describe the types of IPs or zones on the map. */ description?: string | null; /** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */ enabled?: boolean | null; modifiedAt?: string | null; } export const PatchAddressMapResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), canDelete: S.optional(S.NullOr(S.Boolean).pipe(T.Body("can_delete"))), canModifyIps: S.optional( S.NullOr(S.Boolean).pipe(T.Body("can_modify_ips")), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), defaultSni: S.optional(S.NullOr(S.String).pipe(T.Body("default_sni"))), description: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAddressMapResponse", }) as any as S.Schema; export interface PatchPrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Description of the prefix. */ description: string; } export const PatchPrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), description: S.String, }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchPrefixResponse { /** Identifier of an IP Prefix. */ id?: string | null; /** Identifier of a Cloudflare account. */ accountId?: string | null; /** Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled. */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; /** Approval state of the prefix (P = pending, V = active). */ approved?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; /** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */ delegateLoaCreation?: boolean | null; /** Description of the prefix. */ description?: string | null; /** State of one kind of validation for an IP prefix. */ irrValidationState?: string | null; /** Identifier for the uploaded LOA document. */ loaDocumentId?: string | null; modifiedAt?: string | null; /** Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled. */ onDemandEnabled?: boolean | null; /** Whether advertisement status of the prefix is locked, meaning it cannot be changed. */ onDemandLocked?: boolean | null; /** State of one kind of validation for an IP prefix. */ ownershipValidationState?: string | null; /** Token provided to demonstrate ownership of the prefix. */ ownershipValidationToken?: string | null; /** State of one kind of validation for an IP prefix. */ rpkiValidationState?: string | null; } export const PatchPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), accountId: S.optional(S.NullOr(S.String).pipe(T.Body("account_id"))), advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), approved: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), delegateLoaCreation: S.optional( S.NullOr(S.Boolean).pipe(T.Body("delegate_loa_creation")), ), description: S.optional(S.NullOr(S.String)), irrValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("irr_validation_state")), ), loaDocumentId: S.optional( S.NullOr(S.String).pipe(T.Body("loa_document_id")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemandEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_enabled")), ), onDemandLocked: S.optional( S.NullOr(S.Boolean).pipe(T.Body("on_demand_locked")), ), ownershipValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_state")), ), ownershipValidationToken: S.optional( S.NullOr(S.String).pipe(T.Body("ownership_validation_token")), ), rpkiValidationState: S.optional( S.NullOr(S.String).pipe(T.Body("rpki_validation_state")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixResponse", }) as any as S.Schema; export interface PatchPrefixAdvertisementStatusRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If */ advertised: boolean; } export const PatchPrefixAdvertisementStatusRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), advertised: S.Boolean, }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixAdvertisementStatusRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchPrefixAdvertisementStatusResponse { /** Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If */ advertised?: boolean | null; /** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */ advertisedModifiedAt?: string | null; } export const PatchPrefixAdvertisementStatusResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ advertised: S.optional(S.NullOr(S.Boolean)), advertisedModifiedAt: S.optional( S.NullOr(S.String).pipe(T.Body("advertised_modified_at")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixAdvertisementStatusResponse", }) as any as S.Schema; export interface PrefixesBgpPrefixesEditRequestOnDemand { advertised?: boolean; } export const PrefixesBgpPrefixesEditRequestOnDemand = /*@__PURE__*/ S.suspend( () => S.Struct({ advertised: S.optional(S.Boolean), }), ).annotate({ identifier: "PrefixesBgpPrefixesEditRequestOnDemand", }) as any as S.Schema; export interface PatchPrefixBgpPrefixRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an IP Prefix. */ prefixId: string; /** Identifier of BGP Prefix. */ bgpPrefixId: string; /** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */ asnPrependCount?: number; /** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route. */ autoAdvertiseWithdraw?: boolean; onDemand?: PrefixesBgpPrefixesEditRequestOnDemand; } export const PatchPrefixBgpPrefixRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), prefixId: S.String.pipe(T.Label("prefix_id")), bgpPrefixId: S.String.pipe(T.Label("bgp_prefix_id")), asnPrependCount: S.optional(S.Number.pipe(T.Body("asn_prepend_count"))), autoAdvertiseWithdraw: S.optional( S.Boolean.pipe(T.Body("auto_advertise_withdraw")), ), onDemand: S.optional( PrefixesBgpPrefixesEditRequestOnDemand.pipe(T.Body("on_demand")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixBgpPrefixRequest", }) as any as S.Schema; export type PrefixesBgpPrefixesEditResponseBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export const PrefixesBgpPrefixesEditResponseBgpSignalOpts = PrefixesBgpPrefixesCreateResponseBgpSignalOpts; export type PrefixesBgpPrefixesEditResponseOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; export const PrefixesBgpPrefixesEditResponseOnDemand = PrefixesBgpPrefixesCreateResponseOnDemand; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchPrefixBgpPrefixResponse { /** Identifier of BGP Prefix. */ id?: string | null; /** Autonomous System Number (ASN) the prefix will be advertised under. */ asn?: number | null; /** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */ asnPrependCount?: number | null; /** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route. */ autoAdvertiseWithdraw?: boolean | null; bgpSignalOpts?: PrefixesBgpPrefixesCreateResponseBgpSignalOpts | null; /** IP Prefix in Classless Inter-Domain Routing format. */ cidr?: string | null; createdAt?: string | null; modifiedAt?: string | null; onDemand?: PrefixesBgpPrefixesCreateResponseOnDemand | null; } export const PatchPrefixBgpPrefixResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), asn: S.optional(S.NullOr(S.Number)), asnPrependCount: S.optional( S.NullOr(S.Number).pipe(T.Body("asn_prepend_count")), ), autoAdvertiseWithdraw: S.optional( S.NullOr(S.Boolean).pipe(T.Body("auto_advertise_withdraw")), ), bgpSignalOpts: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseBgpSignalOpts).pipe( T.Body("bgp_signal_opts"), ), ), cidr: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), onDemand: S.optional( S.NullOr(PrefixesBgpPrefixesCreateResponseOnDemand).pipe( T.Body("on_demand"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchPrefixBgpPrefixResponse", }) as any as S.Schema; export interface PatchRegionalHostnameRequest { /** Identifier. */ zoneId: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; } export const PatchRegionalHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), hostname: S.String.pipe(T.Label()), regionKey: S.String.pipe(T.Body("region_key")), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRegionalHostnameRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchRegionalHostnameResponse { /** When the regional hostname was created */ createdOn: string; /** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com` */ hostname: string; /** Identifying key for the region */ regionKey: string; /** Configure which routing method to use for the regional hostname */ routing: string; } export const PatchRegionalHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdOn: S.String.pipe(T.Body("created_on")), hostname: S.String, regionKey: S.String.pipe(T.Body("region_key")), routing: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRegionalHostnameResponse", }) as any as S.Schema; export interface PutAddressMapAccountRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** Identifier of the Cloudflare account to add as a member of the address map. */ memberAccountId: string; } export const PutAddressMapAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), memberAccountId: S.String.pipe(T.Label("member_account_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{member_account_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapAccountRequest", }) as any as S.Schema; export interface PutAddressMapAccountResponse {} export const PutAddressMapAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapAccountResponse", }) as any as S.Schema; export interface PutAddressMapIpRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** An IPv4 or IPv6 address. */ ipAddress: string; } export const PutAddressMapIpRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), ipAddress: S.String.pipe(T.Label("ip_address")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapIpRequest", }) as any as S.Schema; export interface PutAddressMapIpResponse {} export const PutAddressMapIpResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapIpResponse", }) as any as S.Schema; export interface PutAddressMapZoneRequest { /** Identifier of a Cloudflare account. */ accountId: string; /** Identifier of an Address Map. */ addressMapId: string; /** Identifier of a zone. */ zoneId: string; } export const PutAddressMapZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), addressMapId: S.String.pipe(T.Label("address_map_id")), zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapZoneRequest", }) as any as S.Schema; export interface PutAddressMapZoneResponse {} export const PutAddressMapZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutAddressMapZoneResponse", }) as any as S.Schema; export type CreateAddressMapError = | FeatureNotEnabled | InvalidAccountId | Forbidden | CloudflareOpError; /** Create a new address map under the account. */ export const createAddressMap: API.OperationMethod< CreateAddressMapRequest, CreateAddressMapResponse, CreateAddressMapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAddressMapRequest, output: CreateAddressMapResponse, errors: [ FeatureNotEnabled, InvalidAccountId, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateLoaDocumentError = | InvalidAccountId | InvalidLoaForm | CloudflareOpError; /** Submit LOA document (pdf format) under the account. */ export const createLoaDocument: API.OperationMethod< CreateLoaDocumentRequest, CreateLoaDocumentResponse, CreateLoaDocumentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateLoaDocumentRequest, output: CreateLoaDocumentResponse, errors: [ InvalidAccountId, InvalidLoaForm, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePrefixError = | InvalidAccountId | InvalidNetworkCidr | IrrEntryNotFound | CloudflareOpError; /** Add a new prefix under the account. */ export const createPrefix: API.OperationMethod< CreatePrefixRequest, CreatePrefixResponse, CreatePrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePrefixRequest, output: CreatePrefixResponse, errors: [ InvalidAccountId, InvalidNetworkCidr, IrrEntryNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePrefixBgpPrefixError = | NonexistentAccountPrefix | InvalidAccountId | InvalidNetworkCidr | CloudflareOpError; /** Create a BGP prefix, controlling the BGP advertisement status of a specific subnet. When created, BGP prefixes are initially withdrawn, and can be advertised with the Update BGP Prefix API. */ export const createPrefixBgpPrefix: API.OperationMethod< CreatePrefixBgpPrefixRequest, CreatePrefixBgpPrefixResponse, CreatePrefixBgpPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePrefixBgpPrefixRequest, output: CreatePrefixBgpPrefixResponse, errors: [ NonexistentAccountPrefix, InvalidAccountId, InvalidNetworkCidr, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePrefixDelegationError = | PrefixNotFound | MissingAccountId | InvalidAccountId | CloudflareOpError; /** Create a new account delegation for a given IP prefix. */ export const createPrefixDelegation: API.OperationMethod< CreatePrefixDelegationRequest, CreatePrefixDelegationResponse, CreatePrefixDelegationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePrefixDelegationRequest, output: CreatePrefixDelegationResponse, errors: [ PrefixNotFound, MissingAccountId, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreatePrefixServiceBindingError = | UnsupportedBindingConfiguration | InvalidAccountId | CloudflareOpError; /** Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **NOTE:** The first Service Binding created for an IP Prefix must exactly match the IP Prefix's CIDR. Subsequent Service Bindings may be created with a more-specific CIDR. Refer to the [Service Bindings Documentation](https://developers.cloudflare.com/byoip/service-bindings/) for compatibility details. */ export const createPrefixServiceBinding: API.OperationMethod< CreatePrefixServiceBindingRequest, CreatePrefixServiceBindingResponse, CreatePrefixServiceBindingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreatePrefixServiceBindingRequest, output: CreatePrefixServiceBindingResponse, errors: [ UnsupportedBindingConfiguration, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRegionalHostnameError = | InvalidZoneId | InvalidHostname | RegionalHostnameEmpty | CloudflareOpError; /** Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/). */ export const createRegionalHostname: API.OperationMethod< CreateRegionalHostnameRequest, CreateRegionalHostnameResponse, CreateRegionalHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRegionalHostnameRequest, output: CreateRegionalHostnameResponse, errors: [ InvalidZoneId, InvalidHostname, RegionalHostnameEmpty, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAddressMapError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | AddressMapNotFound | CloudflareOpError; /** Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted. */ export const deleteAddressMap: API.OperationMethod< DeleteAddressMapRequest, DeleteAddressMapResponse, DeleteAddressMapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAddressMapRequest, output: DeleteAddressMapResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, AddressMapNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAddressMapAccountError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | CloudflareOpError; /** Remove an account as a member of a particular address map. */ export const deleteAddressMapAccount: API.OperationMethod< DeleteAddressMapAccountRequest, DeleteAddressMapAccountResponse, DeleteAddressMapAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAddressMapAccountRequest, output: DeleteAddressMapAccountResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAddressMapIpError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | AddressMapNotFound | CloudflareOpError; /** Remove an IP from a particular address map. */ export const deleteAddressMapIp: API.OperationMethod< DeleteAddressMapIpRequest, DeleteAddressMapIpResponse, DeleteAddressMapIpError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAddressMapIpRequest, output: DeleteAddressMapIpResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, AddressMapNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAddressMapZoneError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | CloudflareOpError; /** Remove a zone as a member of a particular address map. */ export const deleteAddressMapZone: API.OperationMethod< DeleteAddressMapZoneRequest, DeleteAddressMapZoneResponse, DeleteAddressMapZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAddressMapZoneRequest, output: DeleteAddressMapZoneResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeletePrefixError = | MethodNotAllowed | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** Delete an unapproved prefix owned by the account. */ export const deletePrefix: API.OperationMethod< DeletePrefixRequest, DeletePrefixResponse, DeletePrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeletePrefixRequest, output: DeletePrefixResponse, errors: [ MethodNotAllowed, PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeletePrefixDelegationError = | DelegationNotFound | InvalidAccountId | CloudflareOpError; /** Delete an account delegation for a given IP prefix. */ export const deletePrefixDelegation: API.OperationMethod< DeletePrefixDelegationRequest, DeletePrefixDelegationResponse, DeletePrefixDelegationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeletePrefixDelegationRequest, output: DeletePrefixDelegationResponse, errors: [ DelegationNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeletePrefixServiceBindingError = | BindingNotFound | InvalidAccountId | PrefixNotFound | CloudflareOpError; /** Delete a Service Binding */ export const deletePrefixServiceBinding: API.OperationMethod< DeletePrefixServiceBindingRequest, DeletePrefixServiceBindingResponse, DeletePrefixServiceBindingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeletePrefixServiceBindingRequest, output: DeletePrefixServiceBindingResponse, errors: [ BindingNotFound, InvalidAccountId, PrefixNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRegionalHostnameError = | MethodNotAllowed | InvalidZoneId | RegionalHostnameNotFound | RegionalHostnameEmpty | CloudflareOpError; /** Delete the region configuration for a specific Regional Hostname. */ export const deleteRegionalHostname: API.OperationMethod< DeleteRegionalHostnameRequest, DeleteRegionalHostnameResponse, DeleteRegionalHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRegionalHostnameRequest, output: DeleteRegionalHostnameResponse, errors: [ MethodNotAllowed, InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAddressMapError = | AddressMapNotFound | InvalidAccountId | Forbidden | CloudflareOpError; /** Show a particular address map owned by the account. */ export const getAddressMap: API.OperationMethod< GetAddressMapRequest, GetAddressMapResponse, GetAddressMapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAddressMapRequest, output: GetAddressMapResponse, errors: [ AddressMapNotFound, InvalidAccountId, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetLoaDocumentError = | LoaDocumentNotFound | InvalidAccountId | CloudflareOpError; /** Download specified LOA document under the account. */ export const getLoaDocument: API.OperationMethod< GetLoaDocumentRequest, GetLoaDocumentResponse, GetLoaDocumentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetLoaDocumentRequest, output: GetLoaDocumentResponse, errors: [ LoaDocumentNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPrefixError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** List a particular prefix owned by the account. */ export const getPrefix: API.OperationMethod< GetPrefixRequest, GetPrefixResponse, GetPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPrefixRequest, output: GetPrefixResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPrefixAdvertisementStatusError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** View the current advertisement state for a prefix. **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix. */ export const getPrefixAdvertisementStatus: API.OperationMethod< GetPrefixAdvertisementStatusRequest, GetPrefixAdvertisementStatusResponse, GetPrefixAdvertisementStatusError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPrefixAdvertisementStatusRequest, output: GetPrefixAdvertisementStatusResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPrefixBgpPrefixError = | BgpPrefixNotFound | InvalidAccountId | PrefixNotFound | CloudflareOpError; /** Retrieve a single BGP Prefix according to its identifier */ export const getPrefixBgpPrefix: API.OperationMethod< GetPrefixBgpPrefixRequest, GetPrefixBgpPrefixResponse, GetPrefixBgpPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPrefixBgpPrefixRequest, output: GetPrefixBgpPrefixResponse, errors: [ BgpPrefixNotFound, InvalidAccountId, PrefixNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPrefixServiceBindingError = | BindingNotFound | InvalidAccountId | PrefixNotFound | CloudflareOpError; /** Fetch a single Service Binding */ export const getPrefixServiceBinding: API.OperationMethod< GetPrefixServiceBindingRequest, GetPrefixServiceBindingResponse, GetPrefixServiceBindingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPrefixServiceBindingRequest, output: GetPrefixServiceBindingResponse, errors: [ BindingNotFound, InvalidAccountId, PrefixNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetRegionalHostnameError = | InvalidZoneId | RegionalHostnameNotFound | RegionalHostnameEmpty | CloudflareOpError; /** Fetch the configuration for a specific Regional Hostname, within a zone. */ export const getRegionalHostname: API.OperationMethod< GetRegionalHostnameRequest, GetRegionalHostnameResponse, GetRegionalHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetRegionalHostnameRequest, output: GetRegionalHostnameResponse, errors: [ InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListAddressMapsError = CloudflareOpError; /** List all address maps owned by the account. */ export const listAddressMaps: API.PaginatedOperationMethod< ListAddressMapsRequest, ListAddressMapsResponse, ListAddressMapsError, CloudflareOpContext, AddressMapsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAddressMapsRequest, output: ListAddressMapsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPrefixBgpPrefixesError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes. */ export const listPrefixBgpPrefixes: API.PaginatedOperationMethod< ListPrefixBgpPrefixesRequest, ListPrefixBgpPrefixesResponse, ListPrefixBgpPrefixesError, CloudflareOpContext, PrefixesBgpPrefixesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPrefixBgpPrefixesRequest, output: ListPrefixBgpPrefixesResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPrefixDelegationsError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** List all delegations for a given account IP prefix. */ export const listPrefixDelegations: API.PaginatedOperationMethod< ListPrefixDelegationsRequest, ListPrefixDelegationsResponse, ListPrefixDelegationsError, CloudflareOpContext, PrefixesDelegationsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPrefixDelegationsRequest, output: ListPrefixDelegationsResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPrefixesError = CloudflareOpError; /** List all prefixes owned by the account. */ export const listPrefixes: API.PaginatedOperationMethod< ListPrefixesRequest, ListPrefixesResponse, ListPrefixesError, CloudflareOpContext, PrefixesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPrefixesRequest, output: ListPrefixesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPrefixServiceBindingsError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address. **Example:** binding `192.0.2.0/24` to Cloudflare Magic Transit and `192.0.2.1/32` to the Cloudflare CDN would route traffic for `192.0.2.1` to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit. */ export const listPrefixServiceBindings: API.PaginatedOperationMethod< ListPrefixServiceBindingsRequest, ListPrefixServiceBindingsResponse, ListPrefixServiceBindingsError, CloudflareOpContext, PrefixesServiceBindingsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPrefixServiceBindingsRequest, output: ListPrefixServiceBindingsResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListRegionalHostnameRegionsError = CloudflareOpError; /** List all Regional Services regions available for use by this account. */ export const listRegionalHostnameRegions: API.PaginatedOperationMethod< ListRegionalHostnameRegionsRequest, ListRegionalHostnameRegionsResponse, ListRegionalHostnameRegionsError, CloudflareOpContext, RegionalHostnamesRegionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListRegionalHostnameRegionsRequest, output: ListRegionalHostnameRegionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListRegionalHostnamesError = Forbidden | CloudflareOpError; /** List all Regional Hostnames within a zone. */ export const listRegionalHostnames: API.PaginatedOperationMethod< ListRegionalHostnamesRequest, ListRegionalHostnamesResponse, ListRegionalHostnamesError, CloudflareOpContext, RegionalHostnamesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListRegionalHostnamesRequest, output: ListRegionalHostnamesResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListServicesError = CloudflareOpError; /** Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs. */ export const listServices: API.PaginatedOperationMethod< ListServicesRequest, ListServicesResponse, ListServicesError, CloudflareOpContext, ServicesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListServicesRequest, output: ListServicesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchAddressMapError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | CloudflareOpError; /** Modify properties of an address map owned by the account. */ export const patchAddressMap: API.OperationMethod< PatchAddressMapRequest, PatchAddressMapResponse, PatchAddressMapError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAddressMapRequest, output: PatchAddressMapResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchPrefixError = | MethodNotAllowed | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** Modify the description for a prefix owned by the account. */ export const patchPrefix: API.OperationMethod< PatchPrefixRequest, PatchPrefixResponse, PatchPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchPrefixRequest, output: PatchPrefixResponse, errors: [ MethodNotAllowed, PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchPrefixAdvertisementStatusError = | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** Advertise or withdraw the BGP route for a prefix. **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix. */ export const patchPrefixAdvertisementStatus: API.OperationMethod< PatchPrefixAdvertisementStatusRequest, PatchPrefixAdvertisementStatusResponse, PatchPrefixAdvertisementStatusError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchPrefixAdvertisementStatusRequest, output: PatchPrefixAdvertisementStatusResponse, errors: [ PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchPrefixBgpPrefixError = | BgpPrefixNotFound | PrefixNotFound | InvalidAccountId | CloudflareOpError; /** Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn). */ export const patchPrefixBgpPrefix: API.OperationMethod< PatchPrefixBgpPrefixRequest, PatchPrefixBgpPrefixResponse, PatchPrefixBgpPrefixError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchPrefixBgpPrefixRequest, output: PatchPrefixBgpPrefixResponse, errors: [ BgpPrefixNotFound, PrefixNotFound, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchRegionalHostnameError = | InvalidZoneId | RegionalHostnameNotFound | RegionalHostnameEmpty | CloudflareOpError; /** Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable. */ export const patchRegionalHostname: API.OperationMethod< PatchRegionalHostnameRequest, PatchRegionalHostnameResponse, PatchRegionalHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchRegionalHostnameRequest, output: PatchRegionalHostnameResponse, errors: [ InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutAddressMapAccountError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | CloudflareOpError; /** Add an account as a member of a particular address map. */ export const putAddressMapAccount: API.OperationMethod< PutAddressMapAccountRequest, PutAddressMapAccountResponse, PutAddressMapAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutAddressMapAccountRequest, output: PutAddressMapAccountResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutAddressMapIpError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | AddressMapNotFound | CloudflareOpError; /** Add an IP from a prefix owned by the account to a particular address map. */ export const putAddressMapIp: API.OperationMethod< PutAddressMapIpRequest, PutAddressMapIpResponse, PutAddressMapIpError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutAddressMapIpRequest, output: PutAddressMapIpResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, AddressMapNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutAddressMapZoneError = | MethodNotAllowed | FeatureNotEnabled | InvalidAccountId | CloudflareOpError; /** Add a zone as a member of a particular address map. */ export const putAddressMapZone: API.OperationMethod< PutAddressMapZoneRequest, PutAddressMapZoneResponse, PutAddressMapZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutAddressMapZoneRequest, output: PutAddressMapZoneResponse, errors: [ MethodNotAllowed, FeatureNotEnabled, InvalidAccountId, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, }));