// 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> = { certId: "cert_id", certStatus: "cert_status", certUpdatedAt: "cert_updated_at", certUploadedOn: "cert_uploaded_on", createdAt: "created_at", expiresOn: "expires_on", privateKey: "private_key", serialNumber: "serial_number", updatedAt: "updated_at", uploadedOn: "uploaded_on", }; export class CertificateAlreadyDeleted extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CertificateAlreadyDeleted", { code: S.Number, message: S.String, }, ), [{ status: 400, message: { includes: "already deleted" } }], ) {} export class CertificateAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CertificateAlreadyExists", { code: S.Number, message: S.String, }, ), [{ code: 1406, message: { includes: "already exists" } }], ) {} export class CertificateNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("CertificateNotFound", { code: S.Number, message: S.String, }), [ { code: 1552, message: { includes: "certificate not found" } }, { status: 404 }, ], ) {} export class CertificatePendingDeletion extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CertificatePendingDeletion", { code: S.Number, message: S.String, }, ), [{ code: 1414, message: { includes: "pending deletion" } }], ) {} export class CertificatePendingDeployment extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CertificatePendingDeployment", { code: S.Number, message: S.String, }, ), [{ code: 1434, message: { includes: "pending deployment" } }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class HostnameAssociationNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "HostnameAssociationNotFound", { code: S.Number, message: S.String, }, ), [ { code: 1553, message: { includes: "setting for this hostname not found" }, }, { status: 404 }, ], ) {} export class HostnameCertificateIdRequired extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "HostnameCertificateIdRequired", { code: S.Number, message: S.String, }, ), [{ code: 1404, message: { includes: "Certificate ID required" } }], ) {} export class HostnameCertificateInUse extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "HostnameCertificateInUse", { code: S.Number, message: S.String, }, ), [{ code: 1433, message: { includes: "in use" } }], ) {} export class HostnameCertificateNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "HostnameCertificateNotFound", { code: S.Number, message: S.String, }, ), [{ code: 1552 }, { code: 1551 }, { status: 404 }], ) {} export class InvalidCertificate extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidCertificate", { code: S.Number, message: S.String, }), [{ code: 1408, message: { includes: "Unable to parse certificate" } }], ) {} export class InvalidCertificateId extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidCertificateId", { code: S.Number, message: S.String, }, ), [{ code: 1415, message: { includes: "Invalid Certificate ID" } }], ) {} export class InvalidHostnameConfig extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidHostnameConfig", { code: S.Number, message: S.String, }, ), [{ code: 1415 }], ) {} export class ZoneClientCertConflict extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "ZoneClientCertConflict", { code: S.Number, message: S.String, }, ), [{ status: 409 }], ) {} export interface CreateHostnameCertificateRequest { /** Identifier. */ zoneId: string; /** The hostname certificate. */ certificate: string; /** The hostname certificate's private key. */ privateKey: string; } export const CreateHostnameCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificate: S.String, privateKey: S.String.pipe(T.Body("private_key")), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameCertificateRequest", }) as any as S.Schema; export type HostnameCertificatesCreateResponseStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnameCertificatesCreateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateHostnameCertificateResponse { /** Identifier. */ id?: string | null; /** The hostname certificate. */ certificate?: string | null; /** The date when the certificate expires. */ expiresOn?: string | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** The serial number on the uploaded certificate. */ serialNumber?: string | null; /** The type of hash used for the certificate. */ signature?: string | null; /** Status of the certificate or the association. */ status?: HostnameCertificatesCreateResponseStatus | null; /** The time when the certificate was uploaded. */ uploadedOn?: string | null; } export const CreateHostnameCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnameCertificatesCreateResponseStatus)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateHostnameCertificateResponse", }) as any as S.Schema; export interface CreateOriginTlsClientAuthRequest { /** Identifier. */ zoneId: string; /** The zone's leaf certificate. */ certificate: string; /** The zone's private key. */ privateKey: string; } export const CreateOriginTlsClientAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificate: S.String, privateKey: S.String.pipe(T.Body("private_key")), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/origin_tls_client_auth", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOriginTlsClientAuthRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateOriginTlsClientAuthResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; expiresOn?: string | null; issuer?: string | null; signature?: string | null; status?: string | null; uploadedOn?: string | null; } export const CreateOriginTlsClientAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOriginTlsClientAuthResponse", }) as any as S.Schema; export interface CreateZoneCertificateRequest { /** Identifier. */ zoneId: string; /** The zone's leaf certificate. */ certificate: string; /** The zone's private key. */ privateKey: string; } export const CreateZoneCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificate: S.String, privateKey: S.String.pipe(T.Body("private_key")), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/origin_tls_client_auth", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateZoneCertificateRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateZoneCertificateResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; } export const CreateZoneCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateZoneCertificateResponse", }) as any as S.Schema; export interface DeleteHostnameCertificateRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const DeleteHostnameCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameCertificateRequest", }) as any as S.Schema; export type HostnameCertificatesDeleteResponseStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnameCertificatesDeleteResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteHostnameCertificateResponse { /** Identifier. */ id?: string | null; /** The hostname certificate. */ certificate?: string | null; /** The date when the certificate expires. */ expiresOn?: string | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** The serial number on the uploaded certificate. */ serialNumber?: string | null; /** The type of hash used for the certificate. */ signature?: string | null; /** Status of the certificate or the association. */ status?: HostnameCertificatesDeleteResponseStatus | null; /** The time when the certificate was uploaded. */ uploadedOn?: string | null; } export const DeleteHostnameCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnameCertificatesDeleteResponseStatus)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteHostnameCertificateResponse", }) as any as S.Schema; export interface DeleteOriginTlsClientAuthRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const DeleteOriginTlsClientAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOriginTlsClientAuthRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteOriginTlsClientAuthResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; } export const DeleteOriginTlsClientAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOriginTlsClientAuthResponse", }) as any as S.Schema; export interface DeleteZoneCertificateRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const DeleteZoneCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteZoneCertificateRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteZoneCertificateResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; } export const DeleteZoneCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteZoneCertificateResponse", }) as any as S.Schema; export interface GetHostnameRequest { /** Identifier. */ zoneId: string; /** The hostname on the origin for which the client certificate uploaded will be used. */ hostname: string; } export const GetHostnameRequest = /*@__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}/origin_tls_client_auth/hostnames/{hostname}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameRequest", }) as any as S.Schema; export type HostnamesGetResponseCertStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnamesGetResponseCertStatus = /*@__PURE__*/ S.String; export type HostnamesGetResponseStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnamesGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetHostnameResponse { /** Identifier. */ certId?: string | null; /** Status of the certificate or the association. */ certStatus?: HostnamesGetResponseCertStatus | null; /** The time when the certificate was updated. */ certUpdatedAt?: string | null; /** The time when the certificate was uploaded. */ certUploadedOn?: string | null; /** The hostname certificate. */ certificate?: string | null; /** The time when the certificate was created. */ createdAt?: string | null; /** Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. */ enabled?: boolean | null; /** The date when the certificate expires. */ expiresOn?: string | null; /** The hostname on the origin for which the client certificate uploaded will be used. */ hostname?: string | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** The serial number on the uploaded certificate. */ serialNumber?: string | null; /** The type of hash used for the certificate. */ signature?: string | null; /** Status of the certificate or the association. */ status?: HostnamesGetResponseStatus | null; /** The time when the certificate was updated. */ updatedAt?: string | null; } export const GetHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ certId: S.optional(S.NullOr(S.String).pipe(T.Body("cert_id"))), certStatus: S.optional( S.NullOr(HostnamesGetResponseCertStatus).pipe(T.Body("cert_status")), ), certUpdatedAt: S.optional( S.NullOr(S.String).pipe(T.Body("cert_updated_at")), ), certUploadedOn: S.optional( S.NullOr(S.String).pipe(T.Body("cert_uploaded_on")), ), certificate: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), enabled: S.optional(S.NullOr(S.Boolean)), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), hostname: S.optional(S.NullOr(S.String)), issuer: S.optional(S.NullOr(S.String)), serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnamesGetResponseStatus)), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameResponse", }) as any as S.Schema; export interface GetHostnameCertificateRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const GetHostnameCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameCertificateRequest", }) as any as S.Schema; export type HostnameCertificatesGetResponseStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnameCertificatesGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetHostnameCertificateResponse { /** Identifier. */ id?: string | null; /** The hostname certificate. */ certificate?: string | null; /** The date when the certificate expires. */ expiresOn?: string | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** The serial number on the uploaded certificate. */ serialNumber?: string | null; /** The type of hash used for the certificate. */ signature?: string | null; /** Status of the certificate or the association. */ status?: HostnameCertificatesGetResponseStatus | null; /** The time when the certificate was uploaded. */ uploadedOn?: string | null; } export const GetHostnameCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnameCertificatesGetResponseStatus)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetHostnameCertificateResponse", }) as any as S.Schema; export interface GetOriginTlsClientAuthRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const GetOriginTlsClientAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOriginTlsClientAuthRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetOriginTlsClientAuthResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; expiresOn?: string | null; issuer?: string | null; signature?: string | null; status?: string | null; uploadedOn?: string | null; } export const GetOriginTlsClientAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOriginTlsClientAuthResponse", }) as any as S.Schema; export interface GetSettingRequest { /** Identifier. */ zoneId: string; } export const GetSettingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingResponse { /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; } export const GetSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingResponse", }) as any as S.Schema; export interface GetZoneCertificateRequest { /** Identifier. */ zoneId: string; /** Identifier. */ certificateId: string; } export const GetZoneCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), certificateId: S.String.pipe(T.Label("certificate_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth/{certificate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetZoneCertificateRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetZoneCertificateResponse { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; } export const GetZoneCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetZoneCertificateResponse", }) as any as S.Schema; export interface ListHostnameCertificatesRequest { /** Identifier. */ zoneId: string; } export const ListHostnameCertificatesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnameCertificatesRequest", }) as any as S.Schema; export type HostnameCertificatesListResultItemStatus = | "initializing" | "pending_deployment" | "pending_deletion" | "active" | "deleted" | "deployment_timed_out" | "deletion_timed_out"; export const HostnameCertificatesListResultItemStatus = /*@__PURE__*/ S.String; export interface HostnameCertificatesListResultItem { /** Identifier. */ id?: string | null; /** The hostname certificate. */ certificate?: string | null; /** The date when the certificate expires. */ expiresOn?: string | null; /** The certificate authority that issued the certificate. */ issuer?: string | null; /** The serial number on the uploaded certificate. */ serialNumber?: string | null; /** The type of hash used for the certificate. */ signature?: string | null; /** Status of the certificate or the association. */ status?: HostnameCertificatesListResultItemStatus | null; /** The time when the certificate was uploaded. */ uploadedOn?: string | null; } export const HostnameCertificatesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), serialNumber: S.optional(S.NullOr(S.String).pipe(T.Body("serial_number"))), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(HostnameCertificatesListResultItemStatus)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }), ).annotate({ identifier: "HostnameCertificatesListResultItem", }) as any as S.Schema; export type HostnameCertificatesListResultList = Array; export const HostnameCertificatesListResultList = /*@__PURE__*/ S.Array( HostnameCertificatesListResultItem, ) as any as S.Schema; export interface ListHostnameCertificatesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: HostnameCertificatesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListHostnameCertificatesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: HostnameCertificatesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListHostnameCertificatesResponse", }) as any as S.Schema; export interface ListOriginTlsClientAuthsRequest { /** Identifier. */ zoneId: string; } export const ListOriginTlsClientAuthsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOriginTlsClientAuthsRequest", }) as any as S.Schema; export interface ListResultItem { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; expiresOn?: string | null; issuer?: string | null; signature?: string | null; status?: string | null; uploadedOn?: string | null; } export const ListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), expiresOn: S.optional(S.NullOr(S.String).pipe(T.Body("expires_on"))), issuer: S.optional(S.NullOr(S.String)), signature: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(S.String)), uploadedOn: S.optional(S.NullOr(S.String).pipe(T.Body("uploaded_on"))), }), ).annotate({ identifier: "ListResultItem" }) as any as S.Schema; export type ListResultList = Array; export const ListResultList = /*@__PURE__*/ S.Array( ListResultItem, ) as any as S.Schema; export interface ListOriginTlsClientAuthsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListOriginTlsClientAuthsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOriginTlsClientAuthsResponse", }) as any as S.Schema; export interface ListZoneCertificatesRequest { /** Identifier. */ zoneId: string; } export const ListZoneCertificatesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/origin_tls_client_auth", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListZoneCertificatesRequest", }) as any as S.Schema; export interface ListZoneCertificatesResultItem { /** Identifier. */ id?: string | null; /** The zone's leaf certificate. */ certificate?: string | null; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; /** The zone's private key. */ privateKey?: string | null; } export const ListZoneCertificatesResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }), ).annotate({ identifier: "ListZoneCertificatesResultItem", }) as any as S.Schema; export type ListZoneCertificatesResultList = Array; export const ListZoneCertificatesResultList = /*@__PURE__*/ S.Array( ListZoneCertificatesResultItem, ) as any as S.Schema; export interface ListZoneCertificatesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListZoneCertificatesResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListZoneCertificatesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListZoneCertificatesResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListZoneCertificatesResponse", }) as any as S.Schema; export interface HostnamesUpdateRequestConfigItem { /** Certificate identifier tag. */ certId?: string; /** Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. */ enabled?: boolean | null; /** The hostname on the origin for which the client certificate uploaded will be used. */ hostname?: string; } export const HostnamesUpdateRequestConfigItem = /*@__PURE__*/ S.suspend(() => S.Struct({ certId: S.optional(S.String.pipe(T.Body("cert_id"))), enabled: S.optional(S.NullOr(S.Boolean)), hostname: S.optional(S.String), }), ).annotate({ identifier: "HostnamesUpdateRequestConfigItem", }) as any as S.Schema; export type HostnamesUpdateRequestConfigList = Array; export const HostnamesUpdateRequestConfigList = /*@__PURE__*/ S.Array( HostnamesUpdateRequestConfigItem, ) as any as S.Schema; export interface PutHostnameRequest { /** Identifier. */ zoneId: string; config: HostnamesUpdateRequestConfigList; } export const PutHostnameRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), config: HostnamesUpdateRequestConfigList, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/origin_tls_client_auth/hostnames", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHostnameRequest", }) as any as S.Schema; export interface HostnamesUpdateResultItem { /** Identifier. */ id?: string | null; /** Identifier. */ certId?: string | null; /** The hostname certificate. */ certificate?: string | null; /** Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. */ enabled?: boolean | null; /** The hostname on the origin for which the client certificate uploaded will be used. */ hostname?: string | null; /** The hostname certificate's private key. */ privateKey?: string | null; } export const HostnamesUpdateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), certId: S.optional(S.NullOr(S.String).pipe(T.Body("cert_id"))), certificate: S.optional(S.NullOr(S.String)), enabled: S.optional(S.NullOr(S.Boolean)), hostname: S.optional(S.NullOr(S.String)), privateKey: S.optional(S.NullOr(S.String).pipe(T.Body("private_key"))), }), ).annotate({ identifier: "HostnamesUpdateResultItem", }) as any as S.Schema; export type HostnamesUpdateResultList = Array; export const HostnamesUpdateResultList = /*@__PURE__*/ S.Array( HostnamesUpdateResultItem, ) as any as S.Schema; export interface PutHostnameResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: HostnamesUpdateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const PutHostnameResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: HostnamesUpdateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutHostnameResponse", }) as any as S.Schema; export interface PutSettingRequest { /** Identifier. */ zoneId: string; /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled: boolean; } export const PutSettingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), enabled: S.Boolean, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/origin_tls_client_auth/settings", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutSettingRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutSettingResponse { /** Indicates whether zone-level authenticated origin pulls is enabled. */ enabled?: boolean | null; } export const PutSettingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutSettingResponse", }) as any as S.Schema; export type CreateHostnameCertificateError = | CertificateAlreadyExists | InvalidCertificate | Forbidden | CloudflareOpError; /** Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed. */ export const createHostnameCertificate: API.OperationMethod< CreateHostnameCertificateRequest, CreateHostnameCertificateResponse, CreateHostnameCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateHostnameCertificateRequest, output: CreateHostnameCertificateResponse, errors: [ CertificateAlreadyExists, InvalidCertificate, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateOriginTlsClientAuthError = | CertificateAlreadyExists | InvalidCertificate | ZoneClientCertConflict | Forbidden | CloudflareOpError; /** Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use. */ export const createOriginTlsClientAuth: API.OperationMethod< CreateOriginTlsClientAuthRequest, CreateOriginTlsClientAuthResponse, CreateOriginTlsClientAuthError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateOriginTlsClientAuthRequest, output: CreateOriginTlsClientAuthResponse, errors: [ CertificateAlreadyExists, InvalidCertificate, ZoneClientCertConflict, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateZoneCertificateError = | CertificateAlreadyExists | InvalidCertificate | ZoneClientCertConflict | Forbidden | CloudflareOpError; /** Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use. */ export const createZoneCertificate: API.OperationMethod< CreateZoneCertificateRequest, CreateZoneCertificateResponse, CreateZoneCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateZoneCertificateRequest, output: CreateZoneCertificateResponse, errors: [ CertificateAlreadyExists, InvalidCertificate, ZoneClientCertConflict, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteHostnameCertificateError = | HostnameCertificateNotFound | HostnameCertificateInUse | CertificatePendingDeletion | CertificatePendingDeployment | InvalidCertificateId | Forbidden | CloudflareOpError; /** Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with `enabled` set to null. After invalidating the association, the certificate can be safely deleted. */ export const deleteHostnameCertificate: API.OperationMethod< DeleteHostnameCertificateRequest, DeleteHostnameCertificateResponse, DeleteHostnameCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteHostnameCertificateRequest, output: DeleteHostnameCertificateResponse, errors: [ HostnameCertificateNotFound, HostnameCertificateInUse, CertificatePendingDeletion, CertificatePendingDeployment, InvalidCertificateId, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteOriginTlsClientAuthError = | CertificateNotFound | Forbidden | CertificateAlreadyDeleted | CertificatePendingDeployment | ZoneClientCertConflict | CloudflareOpError; /** Removes a client certificate used for zone-level authenticated origin pulls. */ export const deleteOriginTlsClientAuth: API.OperationMethod< DeleteOriginTlsClientAuthRequest, DeleteOriginTlsClientAuthResponse, DeleteOriginTlsClientAuthError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteOriginTlsClientAuthRequest, output: DeleteOriginTlsClientAuthResponse, errors: [ CertificateNotFound, Forbidden, CertificateAlreadyDeleted, CertificatePendingDeployment, ZoneClientCertConflict, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteZoneCertificateError = | CertificateNotFound | Forbidden | CertificateAlreadyDeleted | CertificatePendingDeployment | ZoneClientCertConflict | CloudflareOpError; /** Removes a client certificate used for zone-level authenticated origin pulls. */ export const deleteZoneCertificate: API.OperationMethod< DeleteZoneCertificateRequest, DeleteZoneCertificateResponse, DeleteZoneCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteZoneCertificateRequest, output: DeleteZoneCertificateResponse, errors: [ CertificateNotFound, Forbidden, CertificateAlreadyDeleted, CertificatePendingDeployment, ZoneClientCertConflict, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHostnameError = | HostnameAssociationNotFound | Forbidden | CloudflareOpError; /** Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled. */ export const getHostname: API.OperationMethod< GetHostnameRequest, GetHostnameResponse, GetHostnameError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHostnameRequest, output: GetHostnameResponse, errors: [ HostnameAssociationNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetHostnameCertificateError = | HostnameCertificateNotFound | Forbidden | CloudflareOpError; /** Get the certificate by ID to be used for client authentication on a hostname. */ export const getHostnameCertificate: API.OperationMethod< GetHostnameCertificateRequest, GetHostnameCertificateResponse, GetHostnameCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetHostnameCertificateRequest, output: GetHostnameCertificateResponse, errors: [ HostnameCertificateNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetOriginTlsClientAuthError = | CertificateNotFound | Forbidden | CloudflareOpError; /** Retrieves details for a specific client certificate used in zone-level authenticated origin pulls. */ export const getOriginTlsClientAuth: API.OperationMethod< GetOriginTlsClientAuthRequest, GetOriginTlsClientAuthResponse, GetOriginTlsClientAuthError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetOriginTlsClientAuthRequest, output: GetOriginTlsClientAuthResponse, errors: [ CertificateNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingError = Forbidden | CloudflareOpError; /** Get whether zone-level authenticated origin pulls is enabled or not. It is false by default. */ export const getSetting: API.OperationMethod< GetSettingRequest, GetSettingResponse, GetSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingRequest, output: GetSettingResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetZoneCertificateError = | CertificateNotFound | Forbidden | CloudflareOpError; /** Retrieves details for a specific client certificate used in zone-level authenticated origin pulls. */ export const getZoneCertificate: API.OperationMethod< GetZoneCertificateRequest, GetZoneCertificateResponse, GetZoneCertificateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetZoneCertificateRequest, output: GetZoneCertificateResponse, errors: [ CertificateNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListHostnameCertificatesError = Forbidden | CloudflareOpError; /** Lists all client certificates configured for per-hostname authenticated origin pulls on the zone. */ export const listHostnameCertificates: API.PaginatedOperationMethod< ListHostnameCertificatesRequest, ListHostnameCertificatesResponse, ListHostnameCertificatesError, CloudflareOpContext, HostnameCertificatesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListHostnameCertificatesRequest, output: ListHostnameCertificatesResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListOriginTlsClientAuthsError = Forbidden | CloudflareOpError; /** Lists all client certificates configured for zone-level authenticated origin pulls. */ export const listOriginTlsClientAuths: API.PaginatedOperationMethod< ListOriginTlsClientAuthsRequest, ListOriginTlsClientAuthsResponse, ListOriginTlsClientAuthsError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListOriginTlsClientAuthsRequest, output: ListOriginTlsClientAuthsResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListZoneCertificatesError = Forbidden | CloudflareOpError; /** Lists all client certificates configured for zone-level authenticated origin pulls. */ export const listZoneCertificates: API.PaginatedOperationMethod< ListZoneCertificatesRequest, ListZoneCertificatesResponse, ListZoneCertificatesError, CloudflareOpContext, ListZoneCertificatesResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListZoneCertificatesRequest, output: ListZoneCertificatesResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PutHostnameError = | HostnameCertificateIdRequired | InvalidHostnameConfig | Forbidden | CloudflareOpError; /** Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association. */ export const putHostname: API.PaginatedOperationMethod< PutHostnameRequest, PutHostnameResponse, PutHostnameError, CloudflareOpContext, HostnamesUpdateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: PutHostnameRequest, output: PutHostnameResponse, errors: [ HostnameCertificateIdRequired, InvalidHostnameConfig, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PutSettingError = Forbidden | CloudflareOpError; /** Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use. */ export const putSetting: API.OperationMethod< PutSettingRequest, PutSettingResponse, PutSettingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutSettingRequest, output: PutSettingResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));